Repository navigation
OpenConceptLab/ocl_online#862 | Comparing expansions or collection versions tells apart members that share an ID - #1121
Conversation
…rsions tells apart members that share an ID Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
snyaggarwal
left a comment
There was a problem hiding this comment.
Changes requested. The comparison now distinguishes shared IDs in its results. Please fix the two link paths below before merging so readers can open the right member and revision.
I ran 107 focused Django tests, including the existing expansion detail test for duplicate IDs. All passed. Pylint scored 10/10 on the four changed files.
… addresses of the compared revisions, and Markdown links to them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
snyaggarwal
left a comment
There was a problem hiding this comment.
Re-review verdict: Changes requested. I reviewed 4963d344 together with OpenConceptLab/oclweb3#125 at 31facefa. The JSON now identifies both revisions when they exist. Three issues remain when readers follow the links.
-
[P2] Route View and Markdown links to an actual revision page. View uses the source API revision path as a TermBrowser URL, for example
/orgs/O/sources/B/concepts/1/22/. The exact repository routes stop at the resource ID. I checked this with the app’s React Router matcher, and the revision URL falls through to the 404 page. The same path is produced by Markdown whenWEB_URLpoints at TermBrowser v3. Please add a route and loading behavior for the exact revision, and test that the generated link reaches it. Link builder · Repository routes. -
[P2] Preserve access granted by the collection. The new View and Compare targets are source endpoints. With an authenticated reader of a public collection whose member comes from a private source, the changelog returned 200 and the direct revision request returned 403. A request for the same revision through the expansion, with the member version in the path and the source in
uri, returned 200. Please keep the exact revision links within the selected collection or expansion so they honor the same access as the changelog. Source revision permissions · Expansion member lookup. -
[P2] Suppress Compare when a new retired member has no predecessor. With A/1 in both expansions and retired B/1 first appearing in the newer expansion, the API reports B/1 as
changed_retired, withversion_urland noprev_version_url. TermBrowser still displays Compare and falls back to the bare ID for both sides. The older link returned HTTP 200 for A/1 in a local API test. For a source-qualified row, only offer Compare when both revisions exist. Compare button and fallback.
I ran 97 API tests, 361 frontend tests, and local checks for the routes and API responses above. Pylint and ESLint passed on the changed files.
…red revision stay inside the compared collection Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You're right on all three. They're fixed in 401304d and OpenConceptLab/oclweb3@3aa8603.
I also opened the links 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, and Compare. All showed the right revision. The Markdown links were tried only in tests. Tests: 1,763 API tests ran, with one failure, Both PR descriptions are updated. Ready for another look. (Written by Claude for Sunny) |
snyaggarwal
left a comment
There was a problem hiding this comment.
Re-review verdict: Changes requested. I reviewed 401304df with OpenConceptLab/oclweb3#125 at 3aa8603. The revision routes now match, collection-only access works through the expansion, and a shared retired member without a predecessor no longer offers Compare. I verified two remaining cases.
-
[P2] Build links in the order returned by the changelog. The UI lets the newer expansion sit on the left. The API reorders the pair by creation time, but the link builders still use the picker order. With the newer expansion selected first, View for a changed shared ID requested the newer revision from the older expansion and returned 404. The same request against
meta.version2.urireturned 200. Usemeta.version1.uriandmeta.version2.urifor View and Compare. TermBrowser base URLs · API ordering. -
[P2] Preserve the exact concept ID through the View route. The new split-view path passes through React Router’s pathname decoding and
parseRepoPath, thenConceptHomeapplies bothencodeURIComponentandencodeURIto the concept ID. I traced the shared IDsa banda%20bthrough this path. Both requestedconcepts/a%2520b/b2/. The API returned the UUID for the literala%20bmember, or 404 when that member was absent. Keep one round of path encoding from the original ID and cover the final HTTP request for both IDs. This also affects Markdown links opened in TermBrowser v3. Route parser · Detail request.
Verification included 103 focused API tests, 371 frontend tests, and two local API checks reproducing the cases above. Pylint and ESLint passed on the changed files.
|
Both points from the last review are fixed in OpenConceptLab/oclweb3#125, commit a4ad78b. No change was needed in this PR.
On point 2:
Tests: Tried in a browser on local data, as a reader who can't view the source, with the newer expansion picked first:
(Written by Claude for Sunny) |
snyaggarwal
left a comment
There was a problem hiding this comment.
Changes requested. I re-reviewed 401304df with OpenConceptLab/oclweb3#125 at a4ad78b. The two findings from the previous round are fixed. Selecting the newer expansion first now produces links to the correct old and new revisions, and View requests distinct revisions for a b and a%20b.
[P2] Keep the stored concept ID when opening a regular collection row. The new detail helper assumes it receives a stored ID. An ordinary row click still puts the decoded item.id into the route and into the detail request. I reproduced this with a concept created using ID a:b. The API stores a%3Ab, while the expansion list returns id: "a:b". The new request goes to concepts/a%3Ab/ and returns 404. The previous request went to concepts/a%253Ab/ and returned 200 for the same concept. Carry the stored member ID from the list result’s resource URL into the panel, then encode it once. Please cover an ordinary row click as well as a changelog link. Row selection · Detail request · Expansion lookup.
All 17 focused API tests and 383 frontend tests passed. ESLint passed on the changed frontend files. Three additional local checks verified the two fixes and reproduced the collection-list regression.
|
The P2 from the last review is fixed in OpenConceptLab/oclweb3#125, commit 78af931. No change was needed in this PR. Fix: a row click now takes the stored ID from the row's own Tests: Tried in a browser on local data:
Side effect: for (Written by Claude for Sunny) |
snyaggarwal
left a comment
There was a problem hiding this comment.
Approve. I re-reviewed oclapi2 401304df and OpenConceptLab/oclweb3#125 at 78af931. The last blocker is fixed. The collection list now uses the stored code, so clicking a:b opens the expected concept, and two rows with the same display ID can still open distinct stored codes.
The previous cases also passed. View and Compare follow the API’s older and newer sides even when the picker order is reversed. Changelog links resolve the expected revision through the expansion for a reader without direct source access, and Compare is hidden for a shared row without an older revision.
All 17 focused API tests and 388 frontend tests passed, along with changed-file ESLint and a local check that confirmed the returned UUIDs. I found no remaining blockers for the pair.
Ticket: OpenConceptLab/ocl_online#862
Why
Two sources in a collection can have a concept or mapping with the same ID. Comparing two expansions, or two versions of a collection, treated them as one, so it could say "No change" when a code was dropped.
As the ticket found, the comparison used the ID alone.
What
Members of expansions and collection versions are now compared by source and ID. Comparing two versions of a source is unchanged.
/orgs/CIEL/sources/CIEL/concepts/1873/. In$changelog, its entry keepsidand gainssourceandversion_url, the address of the revision it describes. A changed or retired one also hasprev_version_url. In$compare, the address is in themnemoniclist.<expansion or version>/concepts/1/22/?uri=<source>. Someone who can view the collection can open it, even when the source is private.On staging's data (read only, old and new code side by side)
jamlung/Demo-Collectionjamlung/demoBITRI/BEMRSThe new concept and mapping counts match the number of different members in the database.
To look at in review
$changelog, or themnemoniclist of$compare, as IDs get an address for a shared ID.version_urlandprev_version_urlare addresses in the member's own source. To open a revision with the collection's access, ask the compared version for it, as the Markdown links do.BITRI/BEMRShas 12 in its older expansion.Tests
test_get_concepts_search_options_without_q_select_the_whole_version, which also failed locally on master and comes and goes. Pylint is clean.🤖 Generated with Claude Code