Skip to content

Reconciliation API implementation (#665)#671

Open
blms wants to merge 4 commits into
developfrom
feature/665-reconciliation
Open

Reconciliation API implementation (#665)#671
blms wants to merge 4 commits into
developfrom
feature/665-reconciliation

Conversation

@blms
Copy link
Copy Markdown

@blms blms commented May 7, 2026

In this PR

Per #665:

  • Add the option to configure a reconciliation API endpoint (and optional type filter) for TEIDataPointer attributes
    • Once the URL is entered, fetch the list of available types for the filter from the manifest's defaultTypes
  • When configured, use the reconciliation API response instead of XML:IDs to populate attribute autocompletes
    • Pre-fill the autocomplete with the text content of the node or mark, and allow typing to change the query
    • Store selection's ID from the reconciliation API with a # prepended
    • Show an external link button with a computed view link, when available

Questions

  1. Do we want this to be available for every TEIDataPointer attribute, or only sameAs or some other subset?
  2. Is the whole format correct with the #? Going off Rebecca's comment in Slack + your note about only using _ for NBU backwards compatibility.
  3. Is it confusing to have the attribute appear to pre-populate with the element's text content, even when they haven't yet selected an authority record from the reconciliation API? Trying to figure out the most user-friendly way to do that.
    • I definitely see the utility in not requiring the user to type exactly what the text already says, but I wonder if it may appear as though reconciliation has already happened before they perform the query.

Visual walkthrough

Config flow

  • Available Attributes now has a new column called "Autocomplete":
    Screenshot 2026-05-07 at 1 22 47 PM

  • Once the "enable remote data source" checkbox is toggled (i.e. choosing Reconciliation API instead of XML ID), the user can fill out the reconciliation API endpoint URL, and an optional type filter:
    Screenshot 2026-05-07 at 1 23 04 PM

  • The type filter will fetch the defaultTypes from the reconciliation manifest to fill out the autocomplete:
    Screenshot 2026-05-07 at 1 23 15 PM

Editor flow

  • Clicking a configured element or mark will auto-populate the attribute with its text content:
    Screenshot 2026-05-07 at 4 22 54 PM

  • Clicking the autocomplete field will show you options from the reconciliation API:
    Screenshot 2026-05-07 at 4 22 56 PM

  • Typing will result in a query being sent to the reconciliation service (300ms debounced):
    Screenshot 2026-05-07 at 4 23 18 PM

  • On selection, the ID of the chosen authority record will populate the attribute, prefaced with #

  • The "external link" button will take you to the view URL for that record, if one is configured in the manifest.
    Screenshot 2026-05-07 at 4 22 59 PM

@blms blms requested a review from NickLaiacona May 7, 2026 20:48
@NickLaiacona
Copy link
Copy Markdown
Member

NickLaiacona commented May 11, 2026

Do we want this to be available for every TEIDataPointer attribute, or only sameAs or some other subset?

It should work for any TEIDataPointer attribute. However, most of these attributes allow 1-n entries, delimited by whitespace. sameAs is an odd duck in that it only allows for 1 TEIDataPointer.

Is the whole format correct with the #? Going off Rebecca's comment in Slack + your note about only using _ for NBU backwards compatibility.

I don't think we want '#' for these or a _ prefix. Just the record ID (GUID in our case). The record ID may not contain whitespace, as this is used as a delimiter. Also, we run into trouble if they contain forward slashes. There's a separate conversation to be had about the '_' use in NBU specifically, but that is outside this PR.

Is it confusing to have the attribute appear to pre-populate with the element's text content, even when they haven't yet selected an authority record from the reconciliation API? Trying to figure out the most user-friendly way to do that.
I definitely see the utility in not requiring the user to type exactly what the text already says, but I wonder if it may appear as though reconciliation has already happened before they perform the query.

Let me try it out and give feedback.

@NickLaiacona
Copy link
Copy Markdown
Member

NickLaiacona commented May 11, 2026

Regarding multiple entries, I think it is OK if we only allow one TEIDataPointer for attributes using Reconciliation API.

@NickLaiacona
Copy link
Copy Markdown
Member

Tried out this interface, it feels pretty good to me, but does require some training for the user to understand what to expect. I think given the context in which this feature is used, that is fine. I would like to try it out against the prod core data NBU project, to see how it functions with a non trivial number of returns.

Copy link
Copy Markdown
Member

@NickLaiacona NickLaiacona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants