Repository navigation
OpenConceptLab/ocl_issues#3021 | History lists each version under the repo version that has it - #100
Merged
Merged
Conversation
…der the repo version that has it The History tab treated the last item of its repo version list as HEAD and filed every version it couldn't place there. Inside a repo page that list was RepoHome's first page of 10 versions (or a collection's versions), and on its own it was the API's default page of 25, so for a source with more versions, concepts and mappings only in HEAD showed under an old version, and every listed version showed even when empty. - historyGroups.js groups versions by repo version from each version's own source_versions, finds HEAD by id, and doesn't rely on the list being complete or of the right repo. - ConceptHome and MappingHome load every version of the resource's own source (limit 1000), once per source, instead of taking RepoHome's page. - Repo versions with nothing under them are left out, and "created on" falls back to created_at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Codex review, pass 1 (codex-cli 0.167.0, commit 19d62a2)Verdict: findings (2 findings)
findings.json{
"reviewer": "codex-cli 0.167.0",
"perspective": "defects",
"mode": "full",
"commit": "19d62a23",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P1",
"tag": null,
"file": "src/components/concepts/ConceptHome.jsx",
"line": 158,
"claim": "Failed source-version requests are cached as successful empty lists in both history loaders.",
"scenario": "If the source versions request returns a transient HTTP error, APIService resolves with the error body. This stores an empty list alongside the source URL. Opening another resource from that source then skips fetching, even after the API recovers. Earlier uncontained versions remain incorrectly grouped under HEAD, and release dates remain missing until the component remounts. Previously, an empty list allowed another fetch.",
"action": "Validate a successful response before caching its source URL in ConceptHome and MappingHome. Leave failed requests retryable and test failure followed by navigation to another resource.",
"lines_delta": null,
"confidence": "high"
},
{
"id": "F1.2",
"severity": "P2",
"tag": null,
"file": "src/components/concepts/ConceptHome.jsx",
"line": 157,
"claim": "Requesting limit=1000 does not load the full source-version list.",
"scenario": "For a source with releases v1 through v1001 plus HEAD, both loaders fetch only v1001 through v2. An earlier uncontained resource version created before v1 is consequently grouped under v2 instead of v1. Groups reconstructed for v1 and HEAD also lack their creation dates. This violates the acceptance criteria for sources with any number of versions.",
"action": "Follow pagination through all source versions in both ConceptHome and MappingHome before caching the list. Add coverage spanning more than 1,000 entries.",
"lines_delta": null,
"confidence": "high"
}
]
} |
…ist that failed to load Codex pass 1, F1.1: a failed request was kept as an empty list for that source, so History never asked again until the panel remounted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Codex review, pass 2 (codex-cli 0.167.0, commit d065ba1)Verdict: clean Earlier findings: F1.1 resolved, F1.2 unresolved findings.json{
"reviewer": "codex-cli 0.167.0",
"perspective": "defects",
"mode": "verify",
"commit": "d065ba11",
"verdict": "clean",
"prior": [
{
"id": "F1.1",
"status": "resolved"
},
{
"id": "F1.2",
"status": "unresolved"
}
],
"findings": []
}F1.2 stays open as accepted in pass 1 (largest production source: 352 versions). No P0 or P1 is open. |
…uses createdOn Simplification review S2 and S4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
Simplification review (Claude subagent, commit d065ba1)Verdict: findings (4 findings)
findings.json{
"perspective": "simplify",
"mode": "full",
"reviewer": "claude subagent",
"commit": "d065ba11",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "S1",
"tag": "yagni",
"file": "src/components/mappings/MappingHome.jsx",
"line": 120,
"claim": "fetchRepoVersions is duplicated almost verbatim in ConceptHome.jsx and MappingHome.jsx (url-equality check, limit 1000 fetch, array guard, setLoading). Extract one shared helper/hook.",
"action": "Move the shared fetch-and-cache logic into one helper (e.g. in historyGroups.js or a small hook) and call it from both Homes.",
"lines_delta": -12,
"confidence": 0.4,
"severity": null,
"scenario": null
},
{
"id": "S2",
"tag": "shrink",
"file": "src/components/concepts/historyGroups.js",
"line": 71,
"claim": "Final ordering builds `result`, then filters it twice (HEAD first, others sorted by sortTime). sortTime's fallback to the max resource-version date only matters for groups built from toRepoVersion with no date, which can be folded into one comparator.",
"action": "Sort once with a comparator that puts isHead first, then orders by sortTime desc, instead of two filters plus spread.",
"lines_delta": -3,
"confidence": 0.4,
"severity": null,
"scenario": null
},
{
"id": "S3",
"tag": "dup-test",
"file": "src/components/concepts/__tests__/historyGroups.test.js",
"line": 88,
"claim": "The 'no repo version list at all' test mostly overlaps the 'repo version missing from the list' test, since both exercise the fallback to toRepoVersion and HEAD synthesis.",
"action": "Merge into one test or drop the 'no list at all' case.",
"lines_delta": -6,
"confidence": 0.3,
"severity": null,
"scenario": null
},
{
"id": "S4",
"tag": "shrink",
"file": "src/components/concepts/History.jsx",
"line": 235,
"claim": "The conditional created-on render computes `repoVersion.created_on || repoVersion.created_at` twice and duplicates the createdOn helper in historyGroups.js.",
"action": "Export createdOn from historyGroups.js and use `const date = createdOn(repoVersion)` in the JSX.",
"lines_delta": -2,
"confidence": 0.4,
"severity": null,
"scenario": null
}
]
}Tests rerun after the cuts: 136 pass, ESLint clean. |
Member
Author
paynejd
marked this pull request as ready for review
November 10, 2026 21:34
snyaggarwal
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes OpenConceptLab/ocl_issues#3021
What was wrong
The History tab on a concept or mapping treated the last item of its repo version list as HEAD, and filed every version it couldn't place there. That list was:
For a source with more versions than that, such as CIEL with 55, versions that are only in HEAD were listed under an old version. Every listed repo version was shown, even with nothing under it.
What changed
historyGroups.js(new, unit-tested) groups versions by repo version:source_versions;It ignores a list that belongs to another repo, and gives a version missing from the list its own group. Repo versions with nothing under them are left out.
ConceptHome and MappingHome load every version of the resource's own source (
limit: 1000, once per source) instead of taking RepoHome's page, so RepoHome no longer passesrepoVersionsto them."Created on" falls back to
created_at, which is what the versions list returns. It used to show today's date.Before and after
CIEL 170921 (Tavapadon) has three versions, all only in HEAD.
The
issues#3021-screenshotsbranch holds only these images and can be deleted after review.Testing
npm testpasses (136 tests, including 8 new ones inhistoryGroups.test.js), and ESLint is clean with CI's command.🤖 Generated with Claude Code