Repository navigation
Conversation
…ows the API's notice The Mapper stops a new or copied project from its own numbers, before it asks the API, so the API's notice for that limit never showed. It now asks for it first, and shows its own sentence only when there's none. That sentence no longer says that deleting one project frees a slot, which isn't so for someone past the limit. In the notice dialog, the line of a limit that never resets has an info icon in place of the calendar, and a long title's lines are evened out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVzyaMUV7QSvivXit7
… time; the Mapper's own sentence says only what's so A late answer could reopen a dialog already closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVzyaMUV7QSvivXit7
…a refusal shown meanwhile Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AaZ4qVzyaMUV7QSvivXit7
|
Codex review, pass 1 (codex-cli 0.169.0, commit fdf4d41) Verdict: findings, 1 finding.
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "full",
"commit": "fdf4d41",
"verdict": "findings",
"prior": [],
"findings": [
{
"id": "F1.1",
"severity": "P1",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 6569,
"claim": "A late Copy response can reopen a dialog the user already dismissed.",
"scenario": "At the project limit, a user chooses Create similar inside a project. The menu closes without visible feedback while the request is pending, so the user tries again. If the second request returns first and the user closes its notice, the first request can time out and reopen the fallback dialog without another click.",
"action": "Allow only one blocked Copy lookup at a time. Add a regression test that retries while the lookup is pending and checks that the dialog stays closed after dismissal.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Pass 1 (commit 8ab744f):
|
|
Codex review, pass 2 (codex-cli 0.169.0, commit 8ab744f) Verdict: findings, 1 finding. Earlier: F1.1 resolved
findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "verify",
"commit": "8ab744f",
"verdict": "findings",
"prior": [
{
"id": "F1.1",
"status": "resolved"
}
],
"findings": [
{
"id": "F2.1",
"severity": "P2",
"tag": null,
"file": "src/components/map-projects/MapProject.jsx",
"line": 6576,
"claim": "A delayed Create similar notice can replace a newer refusal dialog.",
"scenario": "While a match run is in progress, a user at the project cap chooses Create similar. The notice lookup is slow, and a match request hits its own limit and opens a dialog. When the Copy lookup finishes, it replaces the match dialog and hides the reason the run stopped.",
"action": "Invalidate the pending Copy notice when a newer refusal is shown. Add a regression test that resolves the Copy lookup after a match refusal opens.",
"lines_delta": null,
"confidence": "high"
}
]
} |
|
Pass 2 (commit bf1df9e):
|
|
Simplification review (a fresh Claude subagent, commit bf1df9e) Verdict: clean. findings.json{
"reviewer": "claude subagent",
"perspective": "simplify",
"mode": "full",
"commit": "bf1df9e",
"verdict": "clean",
"prior": [],
"findings": []
} |
|
Codex check of commits 8ab744f..bf1df9e (codex-cli 0.169.0, commit bf1df9e) Verdict: clean. Earlier: F2.1 resolved findings.json{
"reviewer": "codex-cli 0.169.0",
"perspective": "defects",
"mode": "final",
"commit": "bf1df9e",
"verdict": "clean",
"prior": [
{
"id": "F2.1",
"status": "resolved"
}
],
"findings": []
} |
snyaggarwal
left a comment
There was a problem hiding this comment.
Verdict: approve. Merge order for OpenConceptLab/ocl_online#785: OpenConceptLab/oclapi2#1118, then OpenConceptLab/ocl_online_api#133, then this one. Any order is safe, because with no notice the Mapper shows its own dialog.
Open core: clean. The Mapper renders the notice the API sends, through the existing LimitNotice/normalizeNotice(). It works nothing out, and the components and locale files gain no plan, upgrade or limit wording. The locale change goes the right way: it drops the "delete one to free a slot" sentence for a neutral "You can't start another map project.", and the dropped new_project key falls back to projects.default through QuotaDialog's key list. The cap icon is chosen from the API's kind, and textWrap: 'balance' is cosmetic.
Contract and fallback check:
fetchCapabilityNotice()readsdata.noticefromGET /capabilities/mapper.projects/note/, the same shape as the create refusal'snotice.errorCode='mapper_projects_limit_reached'matches oclapi2's code.- On an open install the route is a 404, and a failure, a timeout or a missing
titlegives null, so the Mapper showsQuotaDialogas before. The tests cover each of these.projects_not_entitledandaccessnever ask and still showPreviewLimitDialog. - Re-entrancy: New and "create similar" in the list are guarded by
checkingNewProject. Copy inside a project is guarded bycopyBlockPendingRefand never replaces a refusal already shown (Codex F1.1/F2.1, fixed by Jon).
Nits, none blocking:
MapProject.jsxonCopyClick: during the wait of up to 5 s there's no busy state, unlike the list'scheckingNewProject. On a slow API a Copy click looks like it did nothing until the dialog opens.- Pre-existing, so this PR doesn't need to change it: if the note route answers with a
messageandnotice: null, the API is saying there's room. The Mapper still shows the fallback because of its cached count. Refreshing the cache in that case would let a user with a stale cache go on. That's a possible follow-up.
CI is green.
Linked Issue
Advances OpenConceptLab/ocl_online#785
What this changes
When someone can't start another map project, the Mapper shows the notice the API sends, in the notice dialog it already has.
The Mapper stops a new or copied project from its own cached numbers, before it asks the API to create it, so the API's notice for that limit never showed. It now asks
GET /capabilities/mapper.projects/note/first: the route it already asks for the line under a new project's owner, which may now also answer with anotice. That covers the New button, "create similar" in the list and inside a project, and opening/map-projects/newdirectly.With no notice (an API without the route, an older one, a failure, or no answer in 5 seconds) it shows its own dialog, as before. That dialog's sentence no longer says that deleting one project frees a slot, because it doesn't for someone who is past the limit.
Two small changes to the notice dialog: a limit that never resets has an info icon on its line in place of the calendar, and a long title's lines are evened out.
How it was checked
npm test(833) andnpm run test:integration(20) pass, and ESLint is clean. In a browser against a local API, at 1440 and 390 px and in the four languages: past the limit, at it, with no notice, with no route, every way to start a project, and someone who has room.Existing pieces used
LimitNoticeQuotaDialogOrder
It can be released before or after the API's parts: until the API sends a notice, the Mapper shows its own dialog.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AaZ4qVzyaMUV7QSvivXit7