Skip to content

OpenConceptLab/ocl_online#862 | Comparison shows the source of an ID that several sources share, and opens the right member - #125

Merged
snyaggarwal merged 4 commits into
mainfrom
issues-862-compare-shared-ids
Dec 4, 2026
Merged

snyaggarwal merged 4 commits into
mainfrom
issues-862-compare-shared-ids

Conversation

@snyaggarwal

@snyaggarwal snyaggarwal commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Ticket: OpenConceptLab/ocl_online#862. Needs OpenConceptLab/oclapi2#1121, and came out of its review.

Why

When two sources in a collection share an ID, the comparison's View and Compare links used the ID alone. The API answers 409 to that, because it can't tell which one is meant. The table didn't say which source a row was from either.

What

For an ID that several sources share, OpenConceptLab/oclapi2#1121 sends source, version_url and prev_version_url:

  • The table shows the owner and source under the ID.
  • View opens the compared revision in the split view. For a retired member it's the older revision, as today.
  • Compare compares the two revisions. It's hidden when one of them doesn't exist.
  • Access: both stay inside the compared expansion or version (<expansion>/concepts/1/22/?uri=<source>), so someone who can view the collection can open them, even when the source is private.

The split view can open an exact version of a concept or mapping, for any source or collection, such as /orgs/CIEL/sources/CIEL/concepts/1/6406424/. Edit, Retire and adding mappings are hidden there, since saving an old version would overwrite the latest.

An ID that one source uses is listed and linked as before. The two PRs can be deployed in either order: without the API's change, nothing changes here.

To look at in review

  • Look: the source is small text under the ID. Is that how you want it, @paynejd?
  • Not changed: Compare on the mappings tab opens the concepts' comparison page, as it does today. Clicking a shared ID in a collection's list still asks by ID alone, which the API answers with 409.

Tests

npm test: 371 pass, with new tests for the routes, the links, that a View link reaches its revision, and when Compare shows. ESLint is clean.

Tried in a browser on local data, as a reader who can't view the source: View for newer, older and removed concepts and a mapping, Compare, filtering the list, choosing another row and closing the panel. Exact versions of a CIEL concept and mapping open too.

🤖 Generated with Claude Code

…that several sources share, and opens the right member

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
snyaggarwal and others added 3 commits December 3, 2026 16:03
… of a concept or mapping, and a shared ID's links stay inside the compared collection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er and newer sides, and an ID with a space or % opens its own page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…D the API stored, so an ID like a:b opens in a collection

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyaggarwal
snyaggarwal merged commit 109ab7d into main Dec 4, 2026
2 checks passed
@snyaggarwal
snyaggarwal deleted the issues-862-compare-shared-ids branch December 4, 2026 11:37
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.

1 participant