Skip to content

OpenConceptLab/ocl_online#702 | Mapper notice slot and read-only map projects: project strip, locks, autosave stop, leave prompts - #141

Merged
snyaggarwal merged 43 commits into
mainfrom
ocl_online-702-notice-locks
Nov 26, 2026
Merged

snyaggarwal merged 43 commits into
mainfrom
ocl_online-702-notice-locks

Conversation

@paynejd

@paynejd paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member

Part of OpenConceptLab/ocl_online#702, with the Mapper's read-only work for OpenConceptLab/ocl_online#424.

Summary

Adds one slot that shows a notice the server sends, and makes a map project read-only when the server says so. The Mapper renders the fields it is sent and works out nothing itself, under the same rules as TBv3's notice slot.

  • Notice slot (LimitNotice, limitNotice.js). Renders a sent notice as a dialog or a strip. The payload keeps only the fields the slot knows, drops links that are not http(s) and computes no wording, colour or date. With no notice it shows the API's own detail and Close, through neutral fallback keys in all four locales.
  • Project strip. A map project asks GET /capabilities/notices/?resource=<project> once per project and language (useResourceNotice) and shows the first notice as a strip at the top of the project. A newer answer replaces it, and an empty answer takes the strip away.
  • Read-only. The project turns read-only when its notice locks edit, or when a save is refused as read-only (content_read_only). The pending autosave is dropped and nothing autosaves until a save goes through or a newer answer from the notices route ends it. Edits kept back meanwhile are autosaved once it ends.
  • Locks. While read-only, every control that writes the project is disabled with a padlock and the notice's tooltip ("Read-only" when there is none): AutoMatch, Save, Configure's fields and Save and Close, the decision chips, the review note, Approve and Reject, Map, Propose and its fields, comments and the bulk decisions. Viewing, filters, export and delete stay open. Turning read-only closes the dialogs and menus that would change the project, and Configure shows the saved settings without letting them change. EditLockContext carries the reason to each control, as TBv3's NoticeLocks does for a repository's.
  • Leaving. Leaving a read-only project, by closing the tab or within the app, asks first while it has edits no save kept. Leaving a run says its matches aren't saved. A save that lands after the user left can't send edits they chose to discard.
  • Refusals. A read-only refusal that carries a notice opens it once; one without a notice shows its detail and Close only.
  • Next step for the right account (OpenConceptLab/ocl_online#701). When the limit dialogs ask the connected service for a next step, they pass the refusal's owner (a user's or an organization's relative URL), so the step offered is for that owner. A service without the parameter ignores it.
  • Self-hosted OCL. A server without the notices route (404), a 401 or a failed request shows nothing and locks nothing, so the open product behaves as before.

All fixtures and tests use neutral made-up text ("Example notice").

Merged main

Main's #139 and #140 (OpenConceptLab/ocl_online#786) are merged in (04ba704). A proposal edit schedules an autosave only while the project isn't read-only, and Configure's snapshot now sees mapping-only changes. A bridge repository's looked-up canonical URL is applied like every other change in the selector while Configure is open, and through the parent's setter once it has closed, so a late reply can't bring back an algorithm removed since (095a2d8, 7c67c2c).

How to test

  1. The commands CI runs (.github/workflows/build.yml): ./node_modules/eslint/bin/eslint.js src --ext .jsx,.js and npm run test:all (820 unit and 13 integration tests pass, after merging main).
  2. Against a server without the notices route: open a project and edit it. No strip appears, nothing is locked and autosave works as before.
  3. Against a server whose notice for the project locks edit: the strip shows; the controls above show a padlock and the notice's tooltip; Configure opens read-only; nothing autosaves.
  4. Make an edit, then have the notice land before the autosave: leaving the project asks first.
  5. Make a save come back refused as read-only, with and without a notice: with one, the notice opens once; without, the API's detail and Close.
  6. Have the notices route answer with no notice: the strip goes, the controls unlock and the kept-back edits autosave.

Design-system gaps

The OCL design system has no strip or inline-alert component, so LimitNotice is new. It is built from design-system foundations (tokens, MUI v5 and Emotion), matches TBv3's notice slot and reuses existing repo components where they exist. The lock pattern (a disabled control with a padlock and a tooltip saying why) is also not in the design system yet. Flagging both as gaps and proposing them for promotion into the design system, so later work inherits them.

Review

Three Codex passes, a check of the earlier slot commits, ten follow-up checks and a simplification review are posted as comments below.

  • Fixed: every P1 the passes and checks found, among them the controls the edit lock didn't lock, edits lost on leaving a read-only project, a save queued behind a refused one, Configure and Propose fields that still changed a locked project, and a bridge lookup that could undo or restore algorithms.
  • Fixed by main: check 2's FC.7 and FC.8 (proposal and column-mapping edits the leave guards missed) were also on main; OpenConceptLab/ocl_online#786 | Proposal edits and column-mapping changes are seen as unsaved #140 fixed them, and the merge brings that in.
  • Accepted, P1: F1.2 (after a read-only refusal the browser still warns about unsaved configuration, which is accurate) and F1.3 (a refusal scoped to one AI request gets its notice under a separate decision).
  • Accepted, P2: a refusal skipped by a navigation that lands between a save and its refusal, a notice without a title, a target source left blank when the lock ends mid-Configure, a blank canonical URL a delayed lookup can fill, and four group-tooltip edge cases (it also shows over a locked group's enabled controls).
  • Simplification: S1–S4 applied (6cf4cc4); S5–S7 rejected with reasons.
  • After merging main: check 8 found FC.24 (P1, a late bridge lookup could bring back a removed algorithm), fixed in 095a2d8; check 9 found FC.25 (P2), fixed in 7c67c2c; check 10 found FC.26 (P2), accepted because main has the same race between a bridge lookup and MapProject's version pin.
  • No P0 or P1 is open.

Refs OpenConceptLab/ocl_online#702

Reviewer: snyaggarwal

🤖 Generated with Claude Code

https://claude.ai/code/session_01AaZ4qUUvHsBRU74LtyPpSf

paynejd and others added 30 commits November 24, 2026 17:22
…t whose limit refused

A refusal's quota.owner (a user's or an organization's relative URL) goes to
/billing/plan/ as `owner`, so the next step offered is for that owner. An
endpoint without the parameter ignores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…e's notice as a dialog, strip or inline notice

limitNotice.js keeps the notice payload's known fields only (http(s) links
only, a clamped fraction, the way out first, rightmost in a dialog), with the
same names and rules as TBv3's. LimitNotice renders each field it's sent; with
no notice it shows the API's detail. useResourceNotice asks
GET /capabilities/notices/?resource=<url>; an API without the route shows
nothing. Locale files get neutral labels only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…once, then stops autosaving

On a content_read_only refusal, or when the project's notice locks `edit` as
it opens, the project turns read-only: the pending autosave is dropped,
nothing autosaves, saves on leave or posts its log, and the refusal isn't an
unsaved change to warn about. A strip at the top shows the notice, or the
API's detail. A save that goes through ends it.

Refusals that carry a notice open LimitNotice in place of the limit dialog
(OpenConceptLab/ocl_online#702), and every limit dialog passes the refusal's
owner (OpenConceptLab/ocl_online#701).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ly before posting its log

Codex pass 1 F1.6: the log post checked the read-only state before the
successful save cleared it, so the first save after a project became
editable again posted no log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ead-only isn't sent

Codex pass 1 F1.4: a save on leave waits for the save in flight, and was sent
even when that one turned the project read-only. sendAfter checks again when
the queued save's turn comes, and drops it while the project is read-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…le it has edits no save kept

Codex pass 1 F1.1 (in part): a read-only project saves nothing, so closing
the tab asks while it has edits no save kept, the refused one's included. A
refusal alone adds no warning: a read-only project with no edits closes
without one. createEditTracker counts the edits and the ones each save kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ows its detail and Close only

Codex pass 2 F2.5: the fallback mounted the limit dialog, which asks the
connected service for a next step. With no notice the fallback now shows a
neutral title, the API's detail and Close, and asks nothing. The limit
dialogs keep their lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…e takes back the strip and read-only it began

Codex pass 2 F2.4: useResourceNotice now tells a pending answer from an empty
one. When the latest answer for a project is empty, the strip and the
read-only state an earlier answer began are cleared; a pending or failed one
changes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…e it's shown, so a save queued on leave isn't sent

Codex pass 2 F2.2: a save on leave refused as read-only showed only a
message, without recording read-only, so a second save on leave queued behind
it was sent. recordReadOnlyRefusal runs first in the save's handler, whatever
is shown next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…p asks first while it has unsaved edits

Codex pass 2 F2.1: in-app navigation now reads the same read-only and
unsaved-edit state as closing the tab, and asks first with a dialog that says
leaving discards those edits. With no edits it leaves at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ntil a save keeps it

Codex pass 2 F2.3: a Discuss comment lives in the row log, which the next save
posts, and never scheduled an autosave, so a read-only project lost it
without asking. It now counts as an edit until a save goes through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…the user left is told once

Codex pass 3 F3.1: a save in flight as the user left the project could be
refused as read-only with no page left to show its dialog, and the save on
leave queued behind it is dropped, so nothing said the edits weren't kept.
isToldOnLeave sends that refusal to the leave message, once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…nfigure's unsaved changes

Codex pass 3 F3.2: Configure's changes become an edit only when it closes, so
in-app navigation with it open and changed left a read-only project without
asking. The leave state now includes the existing snapshot comparison.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…utosaved once it ends

Codex pass 3 F3.3: when an empty answer from the notices route, or a save that
goes through, ends read-only, the edits made meanwhile had no autosave queued
and, no longer read-only, no warning either. They're queued for autosave.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… leaves without asking

Codex pass 3 F3.4: with unsaved edits on a read-only project, the leave guard
held the delete dialog's redirect and offered to stay on the deleted
project. A successful delete marks that redirect as the page's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…says its matches aren't saved

Codex pass 3 F3.5: the run's leave dialog said what it had matched is saved,
which a read-only project can't do. It now says leaving stops the run and,
the project being read-only, its matches aren't saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ol that writes it

While the project is read-only (its notice locks `edit`, or a save was
refused as read-only), AutoMatch, Save, Configure's Save and Close, the
decision chips, the review note, Approve and Reject, Map, Propose, comments
and the bulk decisions are disabled with a lock and the notice's tooltip
("Read-only" without one), as TBv3 locks a repository's controls. Viewing,
filters, export and delete stay open. EditLockContext carries the reason to
each control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…edit locks make unneeded

A read-only project's edit controls are locked, so no edit can be made that
leaving would lose. Removed: the edit tracker, the read-only clauses of both
leave guards and their dialog, counting comments and Configure as read-only
edits, requeueing edits when read-only ends, the run dialog's read-only
wording, and the delete redirect's bypass. A read-only refusal still pauses
autosave, drops a queued save and is told once after leaving, and adds no
leave warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…h their controls

The lock beside the Decision and Review labels wrapped under them. It now
sits before the decision chips and inside the review field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ad-only ask before leaving again

The locks stop new edits, but not one made before the project turned
read-only: a notice that lands inside the autosave window cancels the save,
and a save refused as read-only keeps nothing. Both left without a warning.
This restores, from before the locks, the edit tracker, the read-only clause
of both leave guards and their dialog, comments and Configure's changes as
edits, the requeue once read-only ends, and the delete redirect's bypass.
The requeue now runs only while the page is open, so a save that lands after
the user left can't send edits they chose to discard.

(Codex check, FC.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…says its matches aren't saved again

A project can turn read-only while AutoMatch runs, from a notice or a refused
save. Its leave dialog said what the run matched is saved, but the paused
autosave skips that save. The read-only wording is back, chosen by
getRunLeaveMessageKey so it's tested.

(Codex check, FC.6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… ends the read-only state a refused save began

A save refused as read-only locked the project until it was reopened: an
empty answer from the notices route took back only what the route had shown.
Each answer now carries when it was asked for, and one asked for after the
refusal that locks nothing (supersedesRefusal) ends that read-only state and
requeues its edits. The next save that's refused shows its notice or detail
again.

(Codex check, FC.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… are locked, not just Propose

With Propose locked, the proposal's fields still changed the project's
proposal as the user typed, so the decision panel and the CSV export showed
an edit no save could keep. While the project is read-only the fields and
Add more are disabled, and the handlers that update the project's proposal
change nothing.

(Codex check, FC.4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… settings without letting them change

With Save and Close locked, Configure's fields still changed the project as
the user typed: the header took a new name that closing Configure then
dropped. While the project is read-only every field that changes a saved
setting is disabled: owner, name, context, input language, target repository
and version, name locales and default filter, lookup, advanced settings, the
OCL AI Assistant's options, the algorithms and their settings, reranker,
scores and the field mapping. The section toggles and links stay open, and
a field mapping's likely source isn't picked while it can't be changed.

(Codex check, FC.3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…e dialogs and menus that would change it

A notice that lands while a write dialog or menu is open left it working:
a bulk decision's Apply changed rows no save could keep, AutoMatch's dialog
could start a run, and an open relationship menu could change a mapping's
type. Turning read-only now closes the bulk confirmation, the AutoMatch
dialog and the relationship menu, and their handlers recheck read-only before
changing anything.

(Codex check, FC.5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ds say why on hover

Fixes check 2's FC.9 (P1): while the project is read-only, Configure's and
Propose's disabled fields showed no reason, only their Save and Close and
Propose buttons did. Each group of locked fields (owner, name and context,
input file and language, target repository and version, name locales,
default filter, lookup, advanced settings, the OCL AI Assistant's options,
the algorithms and their settings, reranker, scores and the field mapping,
and Propose's fields) now shows the lock tooltip anywhere over it, and an
algorithm's Remove shows it in place of "Remove". Without a lock nothing is
wrapped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…rns read-only isn't added

Fixes check 2's FC.10 (P2): the Add algorithm picker, open when the lock
landed, could still add an algorithm to the project's settings. The lock
replaces the picker's wrapper, which closes it, and adding an algorithm
now does nothing while the selector is locked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…project's bridge settings as saved

Fixes check 2's FC.11 (P2): opening Configure on a read-only project could
replace a bridge algorithm's saved version with the default, or its
canonical URL with the source's, in the project's live settings, which a
candidate refresh then used. While the selector is locked the versions are
still read for display, but neither is changed, including by a lookup that
settles after the lock lands; both are filled in as before once the project
can be changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…ject's edits closes when it ends

Fixes check 2's FC.12 (P2): if the project stopped being read-only while
the prompt saying its edits would be discarded was open, the edits were
queued for autosave again, so its Leave saved what it said it would
discard. The prompt now closes as read-only ends; leaving then goes
straight away and saves the edits, as for any project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…cked once the lock ends

Fixes check 2's FC.13 (P2): a Mapping: Code field with no target source
skipped picking its likely source while the project was read-only, and
still had none after the lock ended with Configure open. The source is now
picked when the picker becomes editable, as on opening; a source already
chosen is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
paynejd and others added 2 commits November 25, 2026 11:27
…nfigure closes no longer restores a removed algorithm

Codex check 8, FC.24 (P1): the merge applied the bridge canonical URL reply to the selector's own copy of the list, which is out of date once Configure has closed and a new selector has changed it. The reply goes through the parent's setter again, as an updater, so it lands on the project's algorithms as they are when it settles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qUUvHsBRU74LtyPpSf
…ookup to the list as it is now; only an unmounted one goes through the parent's setter

Codex check 9, FC.25 (P2): with the updater form always, a custom algorithm check that settled in the same batch replaced the list from the selector's own copy and dropped the looked-up canonical URL. While mounted, the reply now goes through latestValueRef and commitValue like every other change here (as after the merge of main); once Configure has closed, through the parent's setter (FC.24).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qUUvHsBRU74LtyPpSf
@paynejd
paynejd requested a review from snyaggarwal November 25, 2026 16:36
@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex review, pass 1 (codex-cli 0.169.0, commit 5489eda)

Verdict: findings (6 findings).

  • F1.1 (P1) The API's edit lock pauses autosave without locking the project's editing controls. Fixed in 807ef8f (leaving a read-only project warns while it has edits no save kept); the controls are locked in 33fe219
  • F1.2 (P1) The browser still warns about unsaved configuration after a read-only refusal. Accepted: the warning is accurate, those configuration changes were not saved
  • F1.3 (P1) The Mapper discards notices on request-scoped AI refusals. Accepted: a request-scoped refusal gets its notice under a separate decision, not in this PR
  • F1.4 (P2) A deferred save-on-leave still sends after the preceding save receives a read-only refusal. Fixed in 8b7f7f4
  • F1.5 (P2) The normalizer drops every field in a notice that omits its title. Accepted: the contract requires a title
  • F1.6 (P2) The first successful save after write access returns drops its project log. Fixed in 932fbb4

The full text of F1.3's scenario is on the private ticket OpenConceptLab/ocl_online#702.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "full",
  "commit": "5489edaa6048373c4b7eb7f2566ed3818c1930fd",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "F1.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 2014,
      "claim": "The API's edit lock pauses autosave without locking the project's editing controls.",
      "scenario": "Open a project whose notice contains `locks: [\"edit\"]`. A user can still change a review note or approve a row. The UI accepts the change, but leaving discards it because neither autosave nor save-on-leave runs. The enabled Save button can also reopen the same refusal dialog on each click.",
      "action": "Apply the server's edit lock and tooltip to project mutation controls. Keep viewing and export available, and show the read-only refusal once per read-only period.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.2",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 487,
      "claim": "The browser still warns about unsaved configuration after a read-only refusal.",
      "scenario": "Change a setting in Configure, click Save and Close, and receive `content_read_only`. The failed save leaves Configure and its changed snapshot open. Refreshing still triggers the unload prompt because `configChanged` remains a warning condition.",
      "action": "Have the project unload guard account for the read-only state and test a refusal with Configure open and changed.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.3",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 4219,
      "claim": "The Mapper discards notices on request-scoped AI refusals.",
      "scenario": "[on the private ticket] The service returns a 403 with `scope: \"request\"` and a `notice`. The handler skips the row and returns before rendering the notice, so the user sees no explanation supplied by the API.",
      "action": "Render the supplied notice for the refused row while preserving the run's ability to continue. Keep the existing behavior for request-scoped refusals without a notice.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.4",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 1837,
      "claim": "A deferred save-on-leave still sends after the preceding save receives a read-only refusal.",
      "scenario": "An autosave is in flight when the user makes another edit and navigates away. The leave save queues behind the first request. When the first request receives `content_read_only`, the project enters read-only state, but the queued callback sends a second PUT anyway.",
      "action": "Recheck read-only state when a deferred automatic save is about to send. Test the queued request directly. The added save-on-leave test clears the pending save before calling `saveOnLeave`.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.5",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/limitNotice.js",
      "line": 77,
      "claim": "The normalizer drops every field in a notice that omits its title.",
      "scenario": "A refusal includes `notice` with a restriction and a valid help link but no title. The Mapper falls back to the legacy dialog and drops both supplied fields. A titleless resource notice also loses any supplied edit lock.",
      "action": "Preserve usable fields and locks when the title is absent. Add coverage for a titleless refusal and a titleless resource notice.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.6",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 1886,
      "claim": "The first successful save after write access returns drops its project log.",
      "scenario": "A project becomes writable again while its Mapper tab is open. The user saves successfully and leaves. The save handler attempts to post the merged log while the read-only flag is still set, so the POST is skipped and the successful save's history entry is lost.",
      "action": "Clear the read-only state before posting the log for a successful save.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex review, pass 2 (codex-cli 0.169.0, commit 807ef8f)

Verdict: findings (5 findings).

  • F2.1 (P1) In-app navigation silently discards edits to a read-only project. Fixed in 95fc6b4
  • F2.2 (P2) A queued save-on-leave still sends if the preceding save was itself a leave save. Fixed in c4b1592
  • F2.3 (P2) The unload guard misses edits that save manually without scheduling autosave. Fixed in 12a62a6
  • F2.4 (P2) A fresh empty notices response leaves the old read-only strip and autosave pause in place. Fixed in eb7b5b9
  • F2.5 (P2) The detail-only read-only fallback can add a message and action of its own beside the API's detail. Fixed in 50c96a8

The full text of F2.5 is on the private ticket OpenConceptLab/ocl_online#702.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "verify",
  "commit": "807ef8f6ff9606b46888233db758d2b72bbbcdf0",
  "verdict": "findings",
  "prior": [
    {
      "id": "F1.1",
      "status": "unresolved"
    },
    {
      "id": "F1.2",
      "status": "unresolved"
    },
    {
      "id": "F1.3",
      "status": "unresolved"
    },
    {
      "id": "F1.4",
      "status": "unresolved"
    },
    {
      "id": "F1.5",
      "status": "unresolved"
    },
    {
      "id": "F1.6",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "F2.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 3100,
      "claim": "In-app navigation silently discards edits to a read-only project.",
      "scenario": "Edit a review note, close the read-only refusal, then use Back to return to the project list. The edit tracker records the unsaved note, but only the browser unload guard consults it. In-app navigation proceeds without a warning and save-on-leave is paused, so the note disappears.",
      "action": "Use the read-only and unsaved-edit state in the in-app leave guard and explain that leaving discards the edits.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.2",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 1905,
      "claim": "A queued save-on-leave still sends if the preceding save was itself a leave save.",
      "scenario": "Start AutoMatch with unsaved Configure changes, then click Stop and Leave after the project becomes read-only on the server. Stop and Leave starts a save, and unmount queues another for the open Configure changes. The first PUT returns `content_read_only`, but its `leaving` branch only shows a toast. The second PUT sees the read-only flag still clear, sends, and raises the same toast again.",
      "action": "Record the read-only refusal before choosing how to display it. Test two leave saves queued through the response handler.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.3",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 1990,
      "claim": "The unload guard misses edits that save manually without scheduling autosave.",
      "scenario": "Add a comment in Discuss, click Save, and receive `content_read_only`. The comment lives in the row log and its handler never calls `scheduleAutoSave`, so the tracker reports no edits. The read-only branch ignores the failed-save flag, and reloading loses the comment without a warning.",
      "action": "Mark user-authored row-log changes as dirty and clear them when the log is persisted. Add a test for a refused manual save containing only a comment.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.4",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 2025,
      "claim": "A fresh empty notices response leaves the old read-only strip and autosave pause in place.",
      "scenario": "Open a read-only project, then free up a project slot in another tab. Change the Mapper language so it fetches resource notices again. The API now returns an empty list, but MapProject ignores the empty result. The strip still says the project is read-only and edits still fail to trigger autosave.",
      "action": "Distinguish a pending request from a successful empty response and clear the lock supplied by the previous resource notice when the latest response is empty.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.5",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/LimitNotice.jsx",
      "line": 295,
      "claim": "The detail-only read-only fallback can add a message and action of its own beside the API's detail.",
      "scenario": "Save against an API that returns `content_read_only` with `detail` and `capability` but no `notice`. The new fallback mounts `LimitDialog`, which can add a message and button of its own [details on the private ticket]. The contract calls for the refusal detail alone in this fallback.",
      "action": "Render the new read-only fallback with a neutral title, the API detail and close controls. Leave the existing dialogs as they are.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex review, pass 3 (codex-cli 0.169.0, commit 12a62a6)

Verdict: findings (5 findings).

  • F3.1 (P1) A read-only refusal can silently discard edits after in-app navigation. Fixed in 3b1ee5b
  • F3.2 (P1) The in-app leave guard misses unsaved changes in an open Configure panel. Fixed in e82698c
  • F3.3 (P2) Clearing a route-supplied read-only notice can leave dirty edits with neither a save nor a warning. Fixed in 00c83df
  • F3.4 (P2) The new leave guard can keep users on a project they have already deleted. Fixed in 69271cd
  • F3.5 (P2) The active-run leave dialog promises to save results while the project is read-only. Fixed in c4ff038
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "verify",
  "commit": "12a62a63724325f89befa066f23dbddb034ffe76",
  "verdict": "findings",
  "prior": [
    {
      "id": "F1.1",
      "status": "unresolved"
    },
    {
      "id": "F1.2",
      "status": "unresolved"
    },
    {
      "id": "F1.3",
      "status": "unresolved"
    },
    {
      "id": "F1.4",
      "status": "regressed"
    },
    {
      "id": "F1.5",
      "status": "unresolved"
    },
    {
      "id": "F1.6",
      "status": "resolved"
    },
    {
      "id": "F2.1",
      "status": "regressed"
    },
    {
      "id": "F2.2",
      "status": "resolved"
    },
    {
      "id": "F2.3",
      "status": "resolved"
    },
    {
      "id": "F2.4",
      "status": "regressed"
    },
    {
      "id": "F2.5",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "F3.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 1917,
      "claim": "A read-only refusal can silently discard edits after in-app navigation.",
      "scenario": "An autosave is in flight when the user makes another edit and returns to the project list. The first save receives content_read_only after the project unmounts. Its dialog cannot appear, and the queued leave save is skipped before it can show a failure alert. Both edits are lost without feedback.",
      "action": "Show the existing leave-save alert when an in-flight save receives a read-only refusal after unmount. Keep the queued request suppressed and report the refusal once.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.2",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 518,
      "claim": "The in-app leave guard misses unsaved changes in an open Configure panel.",
      "scenario": "On a read-only project, change its name or context in Configure and use browser Back to return to the Mapper project list while the panel is open. The edit tracker has no entry until Configure closes, so navigation proceeds without confirmation. The read-only scheduler then skips the cleanup save and the changes disappear.",
      "action": "Include the existing configuration snapshot comparison when the in-app guard checks for unsaved read-only edits.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.3",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 2040,
      "claim": "Clearing a route-supplied read-only notice can leave dirty edits with neither a save nor a warning.",
      "scenario": "The project loads with an edit lock, and the user adds a review note. After write access returns, switching the UI language triggers a notices request that returns an empty list. The lock and leave warning clear, but the note was never queued for autosave. Leaving before making another edit or saving manually loses the note.",
      "action": "Requeue pending edits when a fresh response releases the route-supplied edit lock, or keep the leave warning until those edits are saved.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.4",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 7291,
      "claim": "The new leave guard can keep users on a project they have already deleted.",
      "scenario": "A user makes a local edit in a read-only project, then confirms deletion. The API allows deletion and returns 204. The guard intercepts the success redirect and offers Stay, which leaves the user viewing the deleted project.",
      "action": "Bypass the leave guard for the redirect after confirmed deletion succeeds.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.5",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 7277,
      "claim": "The active-run leave dialog promises to save results while the project is read-only.",
      "scenario": "A project becomes read-only during AutoMatch, and a save refusal or refreshed resource notice records the lock before the user navigates away. The dialog says the matches so far will be saved. Choosing Stop and leave skips the save and discards the results.",
      "action": "Use a read-only message when a run is active that explains that leaving stops the run and discards its unsaved results.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 12a62a6..c4ff038 on the earlier notice-slot branch (codex-cli 0.169.0)

Verdict: findings (2 findings).

  • FC.1 (P2) A late save response can persist edits after the user confirmed discarding them. Resolved by eab419a (a save that lands after the user left no longer requeues edits they chose to discard)
  • FC.2 (P2) A read-only refusal can still disappear if navigation commits before the refusal dialog. Accepted: if a navigation lands between a save and its refusal, the dialog can be skipped; the API refused the save, so nothing is written, and on return the project's notice locks editing again.
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "c4ff038e39afcc954d473a59544a71df5f2ccaa0",
  "verdict": "findings",
  "prior": [
    {
      "id": "F3.1",
      "status": "unresolved"
    },
    {
      "id": "F3.2",
      "status": "resolved"
    },
    {
      "id": "F3.3",
      "status": "regressed"
    },
    {
      "id": "F3.4",
      "status": "resolved"
    },
    {
      "id": "F3.5",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "FC.1",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 2028,
      "claim": "A late save response can persist edits after the user confirmed discarding them.",
      "scenario": "Write access returns while the page still shows the project as read-only. The user clicks Save, adds another review note while the request is pending, then confirms leaving and discarding the unsaved edit. The successful response arrives after unmount and queues another PUT from the old page. That PUT saves the discarded note and can overwrite changes saved from a reopened project.",
      "action": "Requeue edits only while the project is mounted and the user has not confirmed discarding them. Cover a successful save response that arrives after departure.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.2",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 1917,
      "claim": "A read-only refusal can still disappear if navigation commits before the refusal dialog.",
      "scenario": "An autosave receives a read-only refusal just before the user clicks Mapping Projects. The response handler sees the page still mounted, cancels the pending autosave, and queues the dialog and read-only state update. If the click commits before those updates, the leave guard has not been installed and the page unmounts without showing either the dialog or the global alert.",
      "action": "Keep the refusal pending until its dialog is shown. If the page unmounts first, show the global leave-save alert once.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 1 of commits c4ff038..157d63c (codex-cli 0.169.0)

Verdict: findings (6 findings).

  • FC.1 (P1) A late edit lock can silently discard changes the Mapper already accepted. Fixed in eab419a
  • FC.2 (P1) A lock set by a save refusal keeps controls disabled after a fresh resource response confirms that editing is allowed. Fixed in 25b86ee
  • FC.3 (P1) Configure still accepts live project edits when Save and Close is locked. Fixed in 93b5af7
  • FC.4 (P1) Proposal fields can still change a locked project's proposal. Fixed in d79d353
  • FC.5 (P2) A late notice leaves already-open edit dialogs and menus actionable. Fixed in 2f35ea8
  • FC.6 (P2) The active-run leave dialog promises to save results that the edit lock prevents it from saving. Fixed in fe3dc81
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "157d63cd53c150c7a4e4921f42d12650feef2a07",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "FC.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/leaveGuard.js",
      "line": 9,
      "claim": "A late edit lock can silently discard changes the Mapper already accepted.",
      "scenario": "Type a review note while the resource notice is loading. The notice arrives before autosave and cancels the pending save. Returning to Mapping Projects or reloading now drops the note without a warning. The same loss occurs after dismissing a read-only save refusal because the refusal clears the failed-save warning.",
      "action": "Preserve dirty state when a lock cancels or refuses a save. Warn on either kind of navigation while those edits remain unsaved, and resume autosave if the lock clears. Restore regression coverage for these transitions.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.2",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 6552,
      "claim": "A lock set by a save refusal keeps controls disabled after a fresh resource response confirms that editing is allowed.",
      "scenario": "A save receives a read-only 403. The user frees a project slot in another tab, then switches the Mapper language. The new resource request returns an empty notices list, but the clearing path only recognizes locks set by the notices route. Save and the other edit controls stay disabled until the project is reopened.",
      "action": "Let a successful resource check started after the refusal supersede it. Keep showing the refusal notice or API detail when the save fails.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.3",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/ConfigurationForm.jsx",
      "line": 576,
      "claim": "Configure still accepts live project edits when Save and Close is locked.",
      "scenario": "Open Configure on a project that already shows the read-only notice, change its name, and close the panel. The project header shows the new name, but closing clears the configuration snapshot and drops the autosave. Leaving loses the change without a warning.",
      "action": "Keep configuration viewable and make fields that change saved project settings read-only while the edit lock is active.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.4",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/Propose.jsx",
      "line": 119,
      "claim": "Proposal fields can still change a locked project's proposal.",
      "scenario": "Open a saved proposal on a read-only project and change its concept ID or relationship. The field handler immediately updates the project-level proposal, so the decision panel and CSV export show the changed value even though the Propose button is disabled.",
      "action": "Make proposal fields read-only under the edit lock and guard the project-level proposal update handler.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.5",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 6965,
      "claim": "A late notice leaves already-open edit dialogs and menus actionable.",
      "scenario": "Open the bulk Reject confirmation before the notice arrives. Once the project is locked, Apply still clears mappings locally and reports success, but autosave is paused. The AutoMatch dialog can likewise submit a run that the API refuses, and an open relationship menu in MapButton can still apply a new mapping type.",
      "action": "Close or disable open write dialogs and menus when the lock arrives. Recheck the lock in the handlers that apply the bulk change, start AutoMatch, and change the mapping type.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.6",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 7245,
      "claim": "The active-run leave dialog promises to save results that the edit lock prevents it from saving.",
      "scenario": "A project becomes read-only during an AutoMatch run and receives a notice or save refusal. The user tries to leave and sees that matches completed so far will be saved. Stop and leave closes the run, but the paused scheduler skips the project save and the results are discarded.",
      "action": "Restore the read-only message for a running project so users know that leaving discards unsaved results.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 2 of commits 157d63c..2f35ea8 (codex-cli 0.169.0)

Verdict: findings (7 findings).

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "2f35ea8f7b49936e13ff7d90f8c0e62526219711",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.1",
      "status": "unresolved"
    },
    {
      "id": "FC.2",
      "status": "resolved"
    },
    {
      "id": "FC.3",
      "status": "unresolved"
    },
    {
      "id": "FC.4",
      "status": "resolved"
    },
    {
      "id": "FC.5",
      "status": "resolved"
    },
    {
      "id": "FC.6",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "FC.7",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 5907,
      "claim": "The leave guards miss unsaved edits to an existing proposal.",
      "scenario": "Change the concept ID of a saved proposal before a delayed edit lock arrives. The field updates the proposal included in the project's save payload, but the handler leaves the edit tracker clean. With no other pending edits, navigating away or reloading discards the new ID without a warning.",
      "action": "Track accepted proposal field changes as unsaved. Add a regression test that edits a proposal, applies a lock, and checks both leave guards.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.8",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 521,
      "claim": "The leave guards miss Configure edits to column mappings.",
      "scenario": "Change a column's Mapped field or target source just before a delayed edit lock arrives. The configuration snapshot compares `col.mapped`, while the controls write `col.label` and `col.targetSource`. With no other edits, closing Configure queues nothing and either kind of navigation can discard the mapping without a warning.",
      "action": "Compare the saved column mapping fields in the configuration snapshot and cover a mapping edit followed by a late lock.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.9",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/ConfigurationForm.jsx",
      "line": 183,
      "claim": "The newly disabled Configure and Propose fields omit the notice tooltip required for locked controls.",
      "scenario": "Open a project with an edit lock and a custom tooltip. Hover the disabled project name in Configure or concept ID in Propose. Neither shows the reason supplied by the API. The tooltip is attached only to the respective submit button.",
      "action": "Apply the existing lock tooltip to the newly disabled write controls in both panels.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.10",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MultiAlgoSelector.jsx",
      "line": 808,
      "claim": "The Add Algorithm menu remains actionable when the project becomes read-only.",
      "scenario": "Open the algorithm picker in Configure before a delayed notice arrives. The disabled FormControl leaves the already-open menu active. Clicking an available option still invokes `addAlgo` and changes the project's live algorithm settings.",
      "action": "Close the picker when the lock arrives and have the add handler check the current lock before applying the selection.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.11",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MultiAlgoSelector.jsx",
      "line": 255,
      "claim": "Opening Configure can rewrite a locked project's bridge settings.",
      "scenario": "Open Configure on a read-only project whose saved bridge version is absent from the returned version list. The version-loading effect replaces it with the default in live project state even though the picker is disabled. A subsequent candidate refresh can use the replacement version.",
      "action": "Keep fetching bridge metadata for display and guard automatic version and canonical URL updates against the current lock, including when an in-flight lookup settles.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.12",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 7317,
      "claim": "The discard dialog can save the edits it says will be discarded.",
      "scenario": "With unsaved edits on a locked project, start a fresh notice request by changing languages and then try to leave. If the response clears the lock while the discard dialog is open, the Mapper requeues the edits and leaves the dialog unchanged. Clicking Leave during the debounce window flushes those edits to the server on unmount.",
      "action": "Dismiss or update the discard prompt when the lock clears so its text and actions agree with the resumed autosave.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.13",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/ColumnMapTable.jsx",
      "line": 87,
      "claim": "A target source skipped under the lock is still skipped after editing is restored.",
      "scenario": "Open Configure on a locked project with a Mapping: Code column whose target source is unset and has a matching source in the available options. Clear the lock while Configure stays open. The picker becomes enabled, but its mount-only effect never fills the matching source. Saving without noticing the blank picker leaves candidate requests without that mapping configuration.",
      "action": "Run the source suggestion when the picker becomes editable, while preserving any existing selection.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 3 of commits 2f35ea8..fe2fe2d (codex-cli 0.169.0)

Verdict: findings (4 findings).

  • FC.14 (P1) A bridge lookup started when editing resumes can silently overwrite newer algorithm edits. Fixed in 7237e61
  • FC.15 (P2) Unlocking Configure restores a target source the user deliberately cleared. Fixed in 30141f4
  • FC.16 (P2) The group tooltip presents enabled controls as locked. Accepted: the group tooltip also shows over enabled controls in a locked group
  • FC.17 (P2) The tooltip wrapper resets the output-language checkbox when the lock arrives. Fixed in b2b20a3
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "fe2fe2d",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.7",
      "status": "unresolved"
    },
    {
      "id": "FC.8",
      "status": "unresolved"
    },
    {
      "id": "FC.9",
      "status": "regressed"
    },
    {
      "id": "FC.10",
      "status": "resolved"
    },
    {
      "id": "FC.11",
      "status": "regressed"
    },
    {
      "id": "FC.12",
      "status": "resolved"
    },
    {
      "id": "FC.13",
      "status": "regressed"
    }
  ],
  "findings": [
    {
      "id": "FC.14",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MultiAlgoSelector.jsx",
      "line": 246,
      "claim": "A bridge lookup started when editing resumes can silently overwrite newer algorithm edits.",
      "scenario": "Open Configure on a locked project with a bridge algorithm. When the lock clears, change another algorithm's batch size while the bridge canonical URL lookup is pending. The reply replaces the entire algorithm list with the snapshot taken at unlock, reverting the new batch size without a warning. Reproduced with the component and a delayed lookup.",
      "action": "Apply the canonical URL to the latest algorithm state with a functional update. Verify that the bridge source still matches the request and preserve any canonical URL the user entered while it was pending.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.15",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/ColumnMapTable.jsx",
      "line": 77,
      "claim": "Unlocking Configure restores a target source the user deliberately cleared.",
      "scenario": "Clear the target source for a Mapping: Code column with a matching suggestion, then let an edit lock arrive and clear while Configure stays open. The picker treats the deliberate clear as an unset field and silently restores the suggested source. Reproduced through the picker's Clear button.",
      "action": "Distinguish a deliberate clear from a target source that has never been set. Apply the automatic suggestion only to the latter, including when the picker remounts.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.16",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/LookupConfig.jsx",
      "line": 47,
      "claim": "The group tooltip presents enabled controls as locked.",
      "scenario": "In a read-only project, hover over the eye button in Lookup Configuration. It displays the API's edit-lock reason even though clicking it still reveals or hides the token. The same group wrapper shows the lock reason over the enabled Close button in custom algorithm settings.",
      "action": "Attach the lock tooltip to disabled write controls and keep enabled viewing and dismissal controls outside its trigger area.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.17",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/ConfigurationForm.jsx",
      "line": 454,
      "claim": "The tooltip wrapper resets the output-language checkbox when the lock arrives.",
      "scenario": "Check Set OCL AI Assistant output language, then let a delayed edit notice arrive before choosing a language. The wrapper remounts the panel, unchecks the box, and hides the picker. The box stays unchecked when editing resumes, so the user has to repeat the selection step. The checkbox survived the same transition without the new wrapper.",
      "action": "Keep the output-language panel mounted across lock transitions, or retain its checkbox state above the tooltip wrapper.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 4 of commits fe2fe2d..7237e61 (codex-cli 0.169.0)

Verdict: findings (3 findings).

  • FC.18 (P2) A delayed bridge lookup can silently undo a deliberate decision to leave the canonical URL blank. Accepted
  • FC.19 (P2) An earlier hover can show the lock reason over an enabled button when the lock returns. Accepted, with check 3's FC.16: a locked group's tooltip also shows over its enabled controls, which still work. Reverting the controlled tooltip (bbded91) answered FC.20 but not this; check 5 still finds it.
  • FC.20 (P2) Field-group tooltips lose long-press access and Escape dismissal. Resolved by bbded91
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "7237e61",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.14",
      "status": "resolved"
    },
    {
      "id": "FC.15",
      "status": "resolved"
    },
    {
      "id": "FC.16",
      "status": "regressed"
    },
    {
      "id": "FC.17",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "FC.18",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/projectTargetRepo.js",
      "line": 88,
      "claim": "A delayed bridge lookup can silently undo a deliberate decision to leave the canonical URL blank.",
      "scenario": "Open Configure on a locked project whose bridge algorithm has no saved canonical URL. After the lock clears, enter a URL and then clear it to use the derived URL while the lookup is pending. The reply treats the explicit blank as the original missing value and replaces it with the repository URL without warning. Reproduced through the bridge settings field.",
      "action": "Distinguish an explicit clear from a missing canonical URL when checking whether the field changed during the lookup. Add a component regression test for clearing the field before the reply.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.19",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/NoticeLock.jsx",
      "line": 29,
      "claim": "An earlier hover can show the lock reason over an enabled button when the lock returns.",
      "scenario": "Hover over a locked field in Lookup Configuration. While the lock is cleared, move within the group to the enabled token eye. If the lock returns while the pointer is still there, the tooltip opens over the eye because the mouseover while unlocked left the old hover state intact.",
      "action": "Update hover eligibility even while the project is unlocked, and use the lock state only to control tooltip visibility.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.20",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/NoticeLock.jsx",
      "line": 31,
      "claim": "Field-group tooltips lose long-press access and Escape dismissal.",
      "scenario": "Long-press a locked settings group on a touchscreen. Its lock reason no longer appears. With a mouse, open the tooltip and press Escape while keeping the pointer still. The tooltip stays visible because the controlled open state never receives the close request. Both interactions worked at fe2fe2d.",
      "action": "Preserve MUI's long-press and Escape handling for eligible tooltip targets while keeping enabled controls outside the trigger area.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 5 of commits 7237e61..bbded91 (codex-cli 0.169.0)

Verdict: findings (1 finding).

Earlier findings: FC.18 and FC.19 unresolved (both accepted on check 4); FC.20 regressed: the revert brought back the group's touch listener, which is FC.21 below.

  • FC.21 (P2) The restored group touch listener can leave text selection disabled across the page. Fixed in db8d085
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "bbded91",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.18",
      "status": "unresolved"
    },
    {
      "id": "FC.19",
      "status": "unresolved"
    },
    {
      "id": "FC.20",
      "status": "regressed"
    }
  ],
  "findings": [
    {
      "id": "FC.21",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/NoticeLock.jsx",
      "line": 28,
      "claim": "The restored group touch listener can leave text selection disabled across the page.",
      "scenario": "On a touchscreen, open Add Algorithm in an editable project and tap the OCL provider icon on an option. Both the icon tooltip and the group tooltip handle the touch. The group tooltip saves the selection-disabled style set by the icon tooltip and restores it after the icon tooltip restores the original value. A reproduction with the rendered picker left `document.body.style.WebkitUserSelect` set to `none` even after unmount, preventing ordinary text selection in Safari.",
      "action": "Set `disableTouchListener={!lock}` on the group tooltip so locked fields retain long-press access. Test that tapping the picker icon while unlocked restores the body\u2019s selection style.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 6 of commits bbded91..db8d085 (codex-cli 0.169.0)

Verdict: findings (2 findings).

  • FC.22 (P2) An unlocked touch can suppress the first hover after the field group locks. Accepted
  • FC.23 (P2) A field-group tooltip can reopen on relock after the pointer has left the group. Accepted
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "db8d085",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.21",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "FC.22",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/NoticeLock.jsx",
      "line": 31,
      "claim": "An unlocked touch can suppress the first hover after the field group locks.",
      "scenario": "On a touchscreen laptop, tap a field in Configure while the project is editable. After a save refusal locks the project, use the mouse to hover over the same field group. MUI still records the unlocked touch, but the disabled touch-end handler never clears that state. The lock reason stays hidden until the pointer leaves and returns. Reproduced against db8d085. The first hover worked at bbded91.",
      "action": "Prevent the group tooltip from recording touches while unlocked. Keep the field subtree mounted and preserve long-press support while locked.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.23",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/NoticeLock.jsx",
      "line": 31,
      "claim": "A field-group tooltip can reopen on relock after the pointer has left the group.",
      "scenario": "Hover over a locked field group until its tooltip opens. When the lock clears, move the pointer outside the group. If the project locks again while the form stays open, the tooltip appears without a new hover. The disabled mouse-leave handler leaves MUI's previous open state intact. Reproduced against db8d085. The tooltip stayed closed at bbded91.",
      "action": "Clear the tooltip's open state when the lock clears while keeping the field subtree mounted.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Simplification review (fresh Claude subagent, commit db8d085)

Verdict: 7 suggestions; S1-S4 applied in 6cf4cc4, S5-S7 rejected.

  • S1 (delete) The Inline component and the size='inline' branch of LimitNotice have no caller: MapProject renders only size='strip' and the dialog. Scope/Reset/Meter/Rows props that exist only for Inline (labelSize, sx on Scope, the unlabelled Rows mode) go with it. Applied in 6cf4cc4 (the unused inline variant and the props only it used removed)
  • S2 (shrink) getNoticeIcon ends with tone === 'info' ? 'info' : tone, which is just tone. Applied in 6cf4cc4
  • S3 (shrink) getLocks has one non-test caller (locksEditing), which wraps the notice in an array to use it; WRITE_ACTIONS is already enforced in normalizeNotice. Applied in 6cf4cc4 (locksEditing reads the notice's locks directly, getLocks removed)
  • S4 (shrink) hasReadOnlyEdits is a one-line helper with one caller (shouldAskBeforeLeaving). Applied in 6cf4cc4
  • S5 (shrink) clearRouteNotice repeats leaveReadOnly's body (reset refs, setIsReadOnly(false), setProjectNotice(null), requeueUnsavedEdits) apart from the early-return guard. Rejected: it touches the leave/requeue path that a P1 fix in this history pins, for an 8-line saving
  • S6 (dup-test) Four 'autosave paused' tests (scheduling no-op, pending doesn't fire, nothing handed back on leave, works again after) each rebuild the same scheduler and differ by one assertion; 'sendAfter: with nothing in flight' also overlaps the sendAfter queue tests. Rejected: the autosave tests each pin one behaviour; folding them saves little and blurs which one fails
  • S7 (shrink) NoticeDialog and FallbackDialog repeat the same Dialog, title row with CloseIconButton and Close button markup. Rejected: merging the two dialogs' markup is a visual refactor after the final screenshots
findings.json
{
  "reviewer": "claude subagent",
  "perspective": "simplify",
  "mode": "full",
  "commit": "db8d085",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "S1",
      "severity": null,
      "tag": "delete",
      "file": "src/components/common/LimitNotice.jsx",
      "line": null,
      "claim": "The Inline component and the size='inline' branch of LimitNotice have no caller: MapProject renders only size='strip' and the dialog. Scope/Reset/Meter/Rows props that exist only for Inline (labelSize, sx on Scope, the unlabelled Rows mode) go with it.",
      "scenario": null,
      "action": "nothing replaces it; drop the 'inline' branch, the 'inline' case in the orderActions comment/test (limitNotice.test.js orderActions 'inline' assertion), and re-add when a caller exists",
      "lines_delta": -45,
      "confidence": "high"
    },
    {
      "id": "S2",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/common/limitNotice.js",
      "line": null,
      "claim": "getNoticeIcon ends with `tone === 'info' ? 'info' : tone`, which is just `tone`.",
      "scenario": null,
      "action": "`return getNoticeTone(notice)` after the read_only and not_included checks",
      "lines_delta": -2,
      "confidence": "high"
    },
    {
      "id": "S3",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/common/limitNotice.js",
      "line": null,
      "claim": "getLocks has one non-test caller (locksEditing), which wraps the notice in an array to use it; WRITE_ACTIONS is already enforced in normalizeNotice.",
      "scenario": null,
      "action": "`export const locksEditing = notice => Boolean(notice?.locks?.includes('edit'))`; delete getLocks and its test lines",
      "lines_delta": -4,
      "confidence": "medium"
    },
    {
      "id": "S4",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/map-projects/leaveGuard.js",
      "line": null,
      "claim": "hasReadOnlyEdits is a one-line helper with one caller (shouldAskBeforeLeaving).",
      "scenario": null,
      "action": "Inline `Boolean(readOnly && unsavedEdits)` in shouldAskBeforeLeaving; drop the export and its test lines",
      "lines_delta": -4,
      "confidence": "medium"
    },
    {
      "id": "S5",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/map-projects/MapProject.jsx",
      "line": null,
      "claim": "clearRouteNotice repeats leaveReadOnly's body (reset refs, setIsReadOnly(false), setProjectNotice(null), requeueUnsavedEdits) apart from the early-return guard.",
      "scenario": null,
      "action": "Make leaveReadOnly always do the resets (requeue is already a no-op with no unsaved edits), and have clearRouteNotice be `if(projectNoticeFromRouteRef.current) leaveReadOnly()`",
      "lines_delta": -8,
      "confidence": "low"
    },
    {
      "id": "S6",
      "severity": null,
      "tag": "dup-test",
      "file": "src/components/map-projects/__tests__/autosave.test.js",
      "line": null,
      "claim": "Four 'autosave paused' tests (scheduling no-op, pending doesn't fire, nothing handed back on leave, works again after) each rebuild the same scheduler and differ by one assertion; 'sendAfter: with nothing in flight' also overlaps the sendAfter queue tests.",
      "scenario": null,
      "action": "Fold them into one or two tests with a shared setup; no behaviour loses its pin (the P1 lock/leave tests stay)",
      "lines_delta": -30,
      "confidence": "low"
    },
    {
      "id": "S7",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/common/LimitNotice.jsx",
      "line": null,
      "claim": "NoticeDialog and FallbackDialog repeat the same Dialog, title row with CloseIconButton and Close button markup.",
      "scenario": null,
      "action": "Extract the shared title row (or render FallbackDialog as NoticeDialog with a synthesized {title: t('limit_notice.fallback_title')} and the detail as body) to drop about 15 lines",
      "lines_delta": -15,
      "confidence": "low"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 7 of commits db8d085..6cf4cc4 (codex-cli 0.169.0)

Verdict: clean.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "6cf4cc4",
  "verdict": "clean",
  "prior": [],
  "findings": []
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 8 of the merge 04ba704 (codex-cli 0.169.0)

Main (#139, #140) merged into the branch. Conflicts in MapProject.jsx (a proposal edit goes through main's editProposed only while the project isn't read-only) and MultiAlgoSelector.jsx (main's latestValueRef and commitValue, with the branch's lock check and its guard for a canonical URL typed while the lookup was pending).

Verdict: findings (1 finding).

  • FC.24 (P1) A pending bridge lookup can restore a removed algorithm because the merge reads the list from the unmounted selector. Fixed in 095a2d8 (the reply goes through the parent's setter as an updater); refined in 7c67c2c after check 9 (only once the selector has unmounted). Not added: an integration test that mounts the real selector, which needs its API module stubbed; the reply's application is covered by the applyBridgeCanonical tests.
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "04ba704",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "FC.24",
      "severity": "P1",
      "tag": null,
      "file": "src/components/map-projects/MultiAlgoSelector.jsx",
      "line": 262,
      "claim": "A pending bridge lookup can restore a removed algorithm because the merge reads the list and lock state from the unmounted selector.",
      "scenario": "Open Configure with a slow bridge canonical lookup, close it, reopen it, and remove the bridge before the lookup resolves. The first selector still holds the old list and overwrites the project's current list, restoring the bridge. This also happens if a read-only notice lands after the removal. A later save can persist the restored bridge. The same sequence preserved the removal on the first parent.",
      "action": "Apply bridge replies through a functional update on the project-owned algorithm state and check the project's live read-only flag before applying them. Add an integration test that resolves the first lookup after Configure closes, reopens, and removes the bridge.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}```

</details>

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 9 of commits 04ba704..095a2d8 (codex-cli 0.169.0)

Verdict: findings (1 finding). FC.24 resolved.

  • FC.25 (P2) A custom algorithm check's reply in the same batch can drop the canonical URL a bridge lookup returned. Fixed in 7c67c2c: while mounted, the bridge reply goes through latestValueRef and commitValue like every other change in the selector; only once Configure has closed does it go through the parent's setter. No test added, for the reason on check 8.
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "095a2d8",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.24",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "FC.25",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MultiAlgoSelector.jsx",
      "line": 266,
      "claim": "A custom algorithm verification reply can discard the canonical URL returned by a bridge lookup in the same React batch.",
      "scenario": "With Configure open and both requests pending, the bridge lookup queues its updater first. The custom verification then succeeds before React commits and replaces the list using `latestValueRef`, which still lacks the new canonical URL. The bridge falls back to a derived URL, and the selector has already marked the lookup as synced. The same reply order preserved both updates at 04ba704.",
      "action": "Apply the custom verification patch through the parent’s functional setter as well, and add a regression test that resolves both requests before React commits.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}```

</details>

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check 10 of commits 095a2d8..7c67c2c (codex-cli 0.169.0)

Verdict: findings (1 finding). FC.24 and FC.25 resolved.

  • FC.26 (P2) A mounted canonical lookup can overwrite a bridge version MapProject pinned in the same batch. Accepted: pre-existing on main. While mounted, the reply now takes main's own path (latestValueRef and commitValue), and main's bridge reply races MapProject's pinVersion updater the same way. The full fix is to have every selector change compose as an updater on the parent's state, which reworks main's OpenConceptLab/ocl_online#786 model; it's left as a follow-up, not this PR.

No P0 or P1 is open; the loop ends here.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "7c67c2c",
  "verdict": "findings",
  "prior": [
    {"id": "FC.24", "status": "resolved"},
    {"id": "FC.25", "status": "resolved"}
  ],
  "findings": [
    {
      "id": "FC.26",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MultiAlgoSelector.jsx",
      "line": 281,
      "claim": "A mounted canonical lookup can overwrite the bridge version that MapProject just pinned.",
      "scenario": "With Configure open and no bridge version set, MapProject queues the version returned by $resolveReference. If the canonical URL reply lands before React commits that update, commitValue replaces the list from the selector's ref, which still lacks the version. When the selector's versions lookup supplies no default, the version stays unset. A React 18 reproduction kept both fields on 095a2d8 and lost the version on 7c67c2c.",
      "action": "Make the canonical lookup and selector edits compose as patches against the parent's queued algorithm state. Add a batching regression test that verifies both the pinned version and canonical URL survive.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}```

</details>

@snyaggarwal snyaggarwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Merge verdict · Request changes. The Mapper needs a way to recheck write access while the project is open, and an older save response should preserve a newer edit lock. I left both findings and a cleanup suggestion inline. GitHub's lint and test check passed at this head.

I checked the companion TBv3 flow and traced the resource lookup, write refusal, and owner handoff through the API. Related provider finding in OpenConceptLab/ocl_online#702.

@snyaggarwal snyaggarwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review · Request changes still stands. The head is still 7c67c2c. I rechecked the notice hook and save-success handler. Returning to the same project still has no way to fetch a fresh notice, and a delayed save success still clears the latest lock unconditionally. The existing inline threads remain open.

paynejd and others added 3 commits November 25, 2026 22:03
…user comes back to it; a save ends only a lock it was sent under

- The project's notice is asked for again each time the user comes back to the page (shown and focused)
  while it shows a strip or is read-only: access restored in another tab now ends the lock, and the edits
  kept back autosave (useNoticeLookup, watchReturns).
- The read-only state moves to createReadOnlyLock, created once like the autosave scheduler. Each time it
  turns read-only counts; a save takes that count as it's sent, and its success ends read-only only if no
  lock came after it was sent, so a newer notice's lock stands and nothing is requeued.
- A refused save records its read-only state once (recordReadOnlyRefusal); the dialog branch only shows it.
- Integration tests mount the real lookup hook, lock, autosave scheduler and edit tracker with answered
  requests: the recheck after a locked answer and after a refused save, and saves answered out of order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWY2d45rQTXPXsYP6e
…ace keeps its edits unsaved; a read-only refusal asks the route again

Check 11's FC.27: a save whose success left a newer lock in place marked its edits saved, though its log
can't be sent while read-only, so a row comment could be lost on leaving. Its edits now stay unsaved, and
are queued once read-only ends. FC.28: a refusal that arrived after a recheck went out kept the project
read-only, since that answer was asked for before the refusal. A refusal that turns it read-only now asks
the route again (useNoticeLookup's askAgain), so an answer asked for after it can end it.

The integration harness cancels a pending autosave on a manual save, as onSave does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWY2d45rQTXPXsYP6e
…ne sequence; a refusal renews only a lookup in flight

Check 12's FC.29: a refusal and the lookup asked right after it could read the same clock reading, so its
empty answer couldn't end the refusal. nextNoticeSequence() now orders both. FC.30: if the notices route and
the save disagreed, each refused autosave asked the route again and requeued, without end. A refusal now
renews a lookup only while one is in flight (FC.28's case); with none, the lock stays until the user
comes back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWY2d45rQTXPXsYP6e
@paynejd

paynejd commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 7c67c2c..6116c22 (codex-cli 0.169.0, commit 6116c22)

The fixes for review 6067859545: a recheck on return, a save that ends only a lock it was sent under, and the refusal recorded once.

Verdict: findings: 2 P2

  • FC.27 (P2) src/components/map-projects/MapProject.jsx:1920: a save whose success left a newer lock in place marked its edits saved, though its log can't be sent while read-only, so a row comment could be lost on leaving.
  • FC.28 (P2) src/components/map-projects/readOnlyLock.js:68: a refusal arriving after a recheck went out kept the project read-only, since that answer was asked for before the refusal.

Response:

  • FC.27: fixed in 7a8f808: under a newer lock the save's edits stay unsaved (the leave guard warns), and are queued once read-only ends.
  • FC.28: fixed in 7a8f808, completed in 4324845: a refusal renews a lookup still in flight, so an answer asked for after the refusal can end it.
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "6116c22",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "FC.27",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/MapProject.jsx",
      "line": 1920,
      "claim": "A successful save can mark a row comment as saved even though a newer lock prevents the separate log write.",
      "scenario": "A user adds a row comment and saves. A notice locks the project before the successful save response arrives. The response marks the edit as saved, but the comment exists only in the log and the lock blocks the log POST. If the user leaves or reloads after the save settles, the comment is lost without a warning. Unlocking also queues no retry if there are no other unsaved edits.",
      "action": "Keep unsent log edits pending for the leave guard and flush them when editing is restored. Add a regression test with a comment in a save whose response arrives after a newer lock.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.28",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/readOnlyLock.js",
      "line": 68,
      "claim": "A delayed save refusal can defeat the focus refresh even when the refresh confirms that access was restored.",
      "scenario": "A save is refused while a notice has the project locked, but its 403 response is delayed. The user restores access in another tab and returns. The focus lookup starts, then the delayed 403 arrives and replaces the notice lock with a refusal lock. The lookup returns empty, but its request predates the recorded refusal, so Save stays disabled and pending edits remain paused until another recheck.",
      "action": "When a refusal overtakes a focus lookup, issue a replacement lookup after recording the refusal. Keep the lock until that lookup confirms editing is available.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 6116c22..7a8f808 (codex-cli 0.169.0, commit 7a8f808)

Verdict: findings: 2 P2. FC.27 resolved; FC.28 unresolved.

  • FC.29 (P2) src/components/common/useNoticeLookup.js:35: a refusal and the lookup asked right after it could share a clock reading, so the empty answer couldn't end the refusal.
  • FC.30 (P2) src/components/map-projects/readOnlyLock.js:43: if the notices route and the save disagreed (during a rollout), each refused autosave asked the route again and requeued, without end.

Response:

  • FC.28 and FC.29: fixed in 4324845: refusals and lookups are ordered by one sequence (nextNoticeSequence()), not the clock.
  • FC.30: fixed in 4324845: a refusal renews a lookup only while one is in flight; with none, the lock stays until the user comes back.
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "7a8f808",
  "verdict": "findings",
  "prior": [
    {"id": "FC.27", "status": "resolved"},
    {"id": "FC.28", "status": "unresolved"}
  ],
  "findings": [
    {
      "id": "FC.29",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/useNoticeLookup.js",
      "line": 35,
      "claim": "The refusal-triggered lookup can leave an editable project locked when its timestamp matches the refusal timestamp.",
      "scenario": "A save refusal arrives after the user returns to the tab. Access has been restored, but the refusal and its immediate follow-up lookup fall within the same browser timer interval. The fresh empty answer fails the strict `requestedAt > refusedAt` check, so the project stays read-only and its edits stay queued until another lookup or successful manual save. [Browser timer precision](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now#security_requirements)",
      "action": "Use a shared sequence counter to order lookup starts and refusals. Test that a fresh empty answer clears the lock when both events have the same clock reading.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.30",
      "severity": "P2",
      "tag": null,
      "file": "src/components/map-projects/readOnlyLock.js",
      "line": 43,
      "claim": "A disagreement between the notices route and the save endpoint can make autosave retry indefinitely.",
      "scenario": "During a rollout, a save carrying unsaved edits reaches a server that refuses it as read-only, while the follow-up notices lookup reaches a server that returns an empty list. The empty answer clears the lock and requeues autosave. If the endpoints keep disagreeing, each refused autosave triggers another lookup and retry without user input.",
      "action": "Allow one immediate recovery lookup. If the autosave it requeues is refused again, keep the lock until a user-triggered recheck or a successful manual save.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 7a8f808..4324845 (codex-cli 0.169.0, commit 4324845)

Verdict: clean. FC.28, FC.29 and FC.30 resolved. No findings.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "4324845",
  "verdict": "clean",
  "prior": [
    {"id": "FC.28", "status": "resolved"},
    {"id": "FC.29", "status": "resolved"},
    {"id": "FC.30", "status": "resolved"}
  ],
  "findings": []
}

@snyaggarwal snyaggarwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Merge verdict · Approve. Returning to a read-only project now rechecks access and resumes autosave for pending edits when the server unlocks it. A save sent before a newer lock preserves that lock, and the refusal is recorded once. I ran 27 focused tests at this head, including the seven lock integration cases. GitHub lint and tests also passed.

@snyaggarwal
snyaggarwal merged commit 3de4136 into main Nov 26, 2026
2 checks passed
@snyaggarwal
snyaggarwal deleted the ocl_online-702-notice-locks branch November 26, 2026 03:36
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