Skip to content

OpenConceptLab/ocl_online#702 | Notice slot: account and resource strips, refusal notices, locks - #117

Merged
snyaggarwal merged 28 commits into
mainfrom
ocl_online-702-notice-slot
Nov 26, 2026
Merged

snyaggarwal merged 28 commits into
mainfrom
ocl_online-702-notice-slot

Conversation

@paynejd

@paynejd paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member

Part of OpenConceptLab/ocl_online#702.

Summary

Adds one slot that shows a notice the server sends, and the places that use it. The app renders the fields it is sent and works out nothing itself.

  • Notice slot (LimitNotice). Renders a sent notice as a dialog, a strip or an inline notice. limitNoticePayload.js keeps only the fields the slot knows, drops links that are not http(s), orders the actions and clamps the meter. With no notice it shows the API's own detail text, through neutral fallback keys in all four locales.
  • Account strip. When signed in, the header asks GET /capabilities/notices/ once a session and shows each notice under the announcement banner. The strip stack takes at most 40vh and scrolls within it, and --page-height leaves the room.
  • Per-resource strips. A repository or version page asks the same route with ?resource= and shows its strip at the top of the panel. A version's page and each Versions row ask for that version's notices; anything that writes to HEAD follows HEAD.
  • Locked controls. A write action the server refuses for a resource shows disabled with a padlock and the notice's tooltip (shared LockableMenuItem). This covers repository, concept, mapping, version, expansion, reference, default-filter, external-export, Add to Collection, Clone to Source and rebuild controls. Controls that only read stay open, and a dialog that can write to another target locks its submit button against the target chosen.
  • Refusals that carry a notice. The repository forms show it inline under the visibility field, adding a member and other repository writes open it in one app-level dialog, and each one asks the strips to refresh. A refusal without a notice keeps its own error text.
  • Self-hosted OCL. A server without the notices route (404) or a failed request shows nothing and locks nothing, so the open product behaves as before.
  • Refresh. Strips refresh after a refusal that carries a notice, a visibility change and a repository or version deletion (a queued deletion refreshes when its task has ended). Only the latest request answers, and a change of user or language retires any request in flight.

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

How to test

  1. The commands CI runs (.github/workflows/pr.yml): ./node_modules/eslint/bin/eslint.js src --ext .jsx,.js and npm test (289 tests pass, after merging main).
  2. Against a server without the notices route: sign in and browse. No strip appears and no control is locked.
  3. Against a server that sends notices: an account strip shows under the announcement banner and scrolls in a short window; a repository page shows its own strip; the controls the notice names show a padlock and tooltip, and the read-only ones (Download, the conversion preview, Reset to Default Filters) stay open.
  4. Open a repository write form, make the server refuse it with a notice, and check the notice shows (inline or in the dialog) and the strips refresh.
  5. Switch language and user with a request in flight: the strip shows only the latest answer.

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) and reuses existing repo components where they exist. Flagging it as a gap and proposing it for promotion back into the design system, so later work inherits it.

Review

Three Codex passes, a simplification review and six follow-up checks are posted as comments below.

Final check

Six checks followed the passes, the last on a066b5c.

  • Fixed: the Add, Clone and rebuild submit buttons wait for their destination's lookup (d299893, c15987a, 1625d7e), and the inline Rebuild no longer blocks the shortcut to Create Similar (a550246).
  • Reverted: a background poll for a closed conversion (fe0afef, reverted in 367b267), since it could reload the app and lose unsaved work.
  • Accepted, all P2: a refusal that arrives after the conversion dialog is closed isn't shown, a stale account-strip count after a queued deletion and a reload, a failed lookup counting as no lock, and a quick switch back between versions. The API still refuses each write and the refusal opens its notice.
  • Check 4 (ceb9dbf, two code comments reworded): clean.
  • Merged main (848f0a5): one conflict, in SearchFilters.jsx, resolved to keep main's Retired control and this branch's default-filters lock.
  • Check 5 (the merge): one P2, fixed in a066b5c: main's request-ID guard in Matched Candidates dropped a superseded reply before notice handling, so a refusal carrying a notice no longer refreshed the strips. Check 6 (a066b5c): clean.
  • 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 26 commits November 24, 2026 17:29
…ce, as a dialog, a strip or an inline notice

limitNoticePayload.js keeps only the fields the slot knows, drops links
that aren't http(s), orders the actions (the primary one first in a strip
or inline notice, rightmost in a dialog) and clamps the meter. It also maps
TBv3 entry points to oclapi2's write actions, for the locks a resource
notice names. LimitNotice.jsx renders the result in design-system
foundations; with no notice it shows the API's detail alone. Neutral
fallback keys in all four locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… and locks on the edit actions a notice names

When signed in, the header asks GET /capabilities/notices/ once a session
(and again after a refusal that carried a notice) and shows each notice as
a strip under the announcement banner. The app bar moves down by both, and
--page-height leaves the room. A repository page asks the same route with
?resource= and shows its strip at the top of the panel; each edit action
whose oclapi2 write actions the notice locks is disabled, with a lock and
the notice's tooltip. A server without the route (404) or a failed request
shows nothing and locks nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… it: under the visibility field, as a dialog on member add, in QuotaDialog's place

The repository create and edit forms show it inline under the visibility
field instead of a toast; adding a member opens it as a dialog; QuotaDialog
hands it to LimitNotice and skips its own next-step request. A refusal
without a notice behaves as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…es a notice opens it in one app-level dialog

showRefusalNotice() hands the notice to RefusalNoticeDialog, mounted once
in Header, and asks the notice strips to look again. Concept, mapping,
version and expansion saves, retire and reactivate, the concept panel's
mapping actions, removing from a collection, adding references and
external exports use it; a refusal without a notice keeps its own error.
(Codex pass 1, F1.4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… writes to, and cover the remaining repository writes

A version's page asks for that version's notices as well as HEAD's: its
strip and its version actions follow the version, everything that writes
to HEAD follows HEAD. Each Versions row's menu, and its external exports,
ask for that row's version. Edit Version maps to edit only, since the
version form has no visibility field. The results toolbar's Create Mapping
and Create Similar, saved default filters, reference actions and removal,
and the reference panel's Delete now lock too; default filters change
locally only once the API has saved them, and these writes' refusals use
the notice dialog. (Codex pass 1, F1.1 to F1.4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
… viewport; form refusals and notice requests answer only while current

The account strip stack takes at most 40vh and scrolls within it. The
repository form's inline refusal belongs to the owner and visibility that
were submitted: changing either clears it, and a refusal for an earlier
submission is ignored. Only a hook's latest notices request may update the
strips or the session cache, and a failed one clears the cache. (Codex
pass 1, F1.5 to F1.7)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…nge or a deletion, stale requests never answer, and the repository panel scrolls when strips leave too little room

refreshNotices() asks both notice hooks to fetch again: after a refusal
with a notice, a repository create or a change of visibility, and a
repository or version deletion. The session cache still serves ordinary
navigation. createRequestGuard lets only the latest request answer; a
cache hit or a change of user or language retires any request in flight
(tested). With a resource strip, the repository panel keeps at least 600px
for its contents and scrolls within the page, so its results stay
reachable under stacked strips. (Codex pass 2, F2.5 to F2.7)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…collection controls follow the lock of what they write

Delete Expansion follows its version's edit lock. New Expansion and Create
Similar stay open, since the form can create on any version it offers;
its Create button follows the chosen version's notices. The default
filters menu stays open with only Save as Default Filters locked, so the
local reset still works. Add to Collection opens a refusal's notice in the
notice dialog and keeps its own error text otherwise (tested).
(Codex pass 2, F2.1 to F2.4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWoKtCSAj7tp1bmnnF
…ild under an expansion's updates follow their version's edit lock

Both rebuild shortcuts open the rebuild dialog, whose Rebuild sends re-evaluate/, an edit of the expansion's version
in oclapi2. The dialog's Rebuild and the Rebuild under the updates now lock, with the padlock and the notice's reason,
when that version's notices lock its edits. The warning icon on the version row stays open: its dialog also offers
Create Similar, which can write to another version.

(Codex pass 3, F3.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
… lock their submit for a destination whose notices lock it

Both write to the destination the person chooses: Add puts references into the chosen collection, Clone posts
concepts/$clone/ to the chosen source, and oclapi2 asks about each as an edit of that destination. Each dialog now
asks for the chosen destination's notices and locks its submit button, with the padlock and the notice's reason,
when they lock that write. The entry points and the destination pickers stay open.

(Codex pass 3, F3.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
…an edit lock; Transform, Remove and the conversion's submit lock

oclapi2 doesn't ask about the conversion preview (writes_content = False), so a read-only collection's editors can
still see what a conversion would change. The Actions menu now stays open on HEAD. Transform and Remove, which only
add and remove references, lock with the padlock and the notice's reason; Convert opens its dialog, where the preview
loads and only the submit button locks.

(Codex pass 3, F3.3)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
…the notice it carries, direct or queued

A direct conversion refused with a 403 now opens the refusal's notice in the notice dialog, and a queued one keeps
the notice the worker returns with its refusal (convert_references answers {"refusal": <body>}) and opens it the
same way. Either refreshes the notices, so the convert submit locks. A refusal without a notice keeps today's
error text.

(Codex pass 3, F3.4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
…te locked, with the reason, instead of hiding them

The versions tabs now pass the version's lock reason to the External Exports dialog apart from edit permission.
Under an edit lock, upload and delete stay in view, disabled with the padlock and the notice's reason, and the
delete confirmation's Delete locks too, so a confirmation opened before the notices arrived can't send the refused
write. Download stays open.

(Codex pass 3, F3.5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
…s the notices once its task has ended

oclapi2 answers a deletion that outlasts its wait with 202 and the task, while the repository still exists. RepoHome
now watches that task (GET /tasks/<id>/ until it has finished, giving up after three failed asks in a row) and
refreshes the notices then, instead of refreshing at once and caching a count that still includes the repository.
The watch outlives the page, since the account strips are on every page. With no task to watch, it refreshes at once
as before.

(Codex pass 3, F3.6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
… height through usePublishedHeight

Its own copy of the effect is gone; the show/hide behaviour is the same.

(simplification review, S1)

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

The repository, concept, mapping and reference-action menus render each
lockable item through it, instead of repeating the tooltip, disabled state
and lock mark per item. Same markup and behaviour.

(simplification review, S2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
…xed task-watch timing, fewer exports and repeated tests

getNoticeIcon drops a redundant ternary; NOTICE_KINDS and NOTICE_TONES are
no longer exported (WRITE_ACTIONS stays: a test reads it); watchTask keeps
only its schedule option, with the interval and failure limit as constants;
the notices cache shares one try/catch; getNoticeDetail's test keeps two
assertions, since getNotice's covers the body shapes.

(simplification review, S4, S5, S6, S7, S8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWHAAnosWk939WDCvW
…or their destination's notices before they can send

Fixes the final check's FC.1 (P1): while the chosen destination's notices
were still being asked for, Add (Add to Collection), Clone (Clone to
Source) and the rebuild confirmation's Rebuild stayed enabled, so a slow
connection let a write through that the API refuses.

- useResourceNoticeLookup returns the notices and whether they're still
  pending (readNoticeLookup). A failed request or a 404 settles with no
  lock, so without notices nothing changes once the answer is in.
- Add, Clone and the expansion form's Create (the same kind of
  destination dialog, which Create Similar opens) stay disabled while the
  lookup is pending.
- The Rebuild under an expansion's updates hands its confirmation the
  lock its rows already know (getRebuildLock); opened any other way, the
  confirmation asks for itself and its Rebuild waits for the answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…tes opens its confirmation again; only the confirmation's Rebuild locks

Fixes the final check's FC.2 (P2): the version's edit lock disabled the
Rebuild under an expansion's updates, which also closed the way to the
confirmation's Create Similar, whose destination can be another,
writable version.

The shortcut now always opens the confirmation (it still waits while the
expansion is processing). The confirmation's Rebuild takes the version's
lock from the expansion rows, and Create Similar opens the expansion
form, which follows the notices of the version it selects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…after its dialog closes, so a refusal's notice still shows

Fixes the final check's FC.3 (P2): closing the convert dialog while a
queued (202) conversion ran stopped the only polling, so a refusal the
worker sent later, with its notice, was never shown and the notice
strips weren't refreshed.

Closing now hands the task to watchQueuedRefusal, which asks about it
with watchTask until it ends and opens the refusal's notice in the
shared notice dialog (which also refreshes the strips). A conversion
that succeeds, or is refused without a notice, shows nothing more, as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…for its version's notices when it opens

Fixes the second check's FC.6 (P1): the Rebuild under an expansion's
updates handed its confirmation a copy of the lock its rows knew, and the
confirmation then skipped its own lookup, so a lock lifted since could
keep its Rebuild disabled.

The handoff is gone (getRebuildLock, the rows' own lookup and their
VersionExpansionRows wrapper). However it's opened, the confirmation asks
for its version's notices, follows their later changes, and its Rebuild
stays disabled until that lookup has settled (canSendRebuild). This also
covers the rebuild half of FC.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…ed conversion: its polling could reload the page

This reverts commit fe0afef.

The second check found it regressed FC.3 (with FC.7 and FC.8, P2): once
the dialog had closed, a task poll that hit a 401 went through
APIService.get's session renewal, which reloads the page and loses
unrelated unsaved work, and three failed polls in a row still ended the
watch. FC.3 is accepted instead: closing a queued conversion stops
watching it, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…r its new notices instead of passing on its old answer

Fixes the second check's FC.5 (P2): after a failed lookup for
destination A, choosing B and then A again before B answered left A's
old, empty answer in place, so the lookup said it had settled while A's
new request was still running, and Add was enabled.

When the resource asked about changes, the lookup now drops an answer
stored for another one (forgetOtherAnswer), so A waits for its own new
answer. Asking the same resource again, after a refusal or a change of
language, still keeps its answer meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qV1UZS6yw6XYUBJyBn
…ce, without naming which

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qXc8xZCPdVva48SdCe
…etired control and the default-filters lock

Conflicts in onClear and onSetDefaultFilters: both reset or pass the Retired
setting as main does, and still skip saving default filters while a notice
locks it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qXc8xZCPdVva48SdCe
…al still refreshes the notice strips

main's request-ID guard drops replies to an earlier search before any notice handling, so a refusal that came back after a later search left the strips unrefreshed. Codex check 5, FC.11.

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:32
@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

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

Verdict: findings: 6 P1, 2 P2

  • F1.1 (P1) src/components/repos/RepoHome.jsx:563: Repository pages and version menus use HEAD's notices for writes to individual versions.
  • F1.2 (P1) src/components/common/limitNoticePayload.js:132: Edit Version is mapped to visibility writes that VersionForm cannot perform.
  • F1.3 (P1) src/components/repos/RepoHome.jsx:650: Several repository write controls remain enabled even when the page has an edit lock.
  • F1.4 (P1) src/components/mappings/MappingForm.jsx:400: Repository content writes can discard a refusal's notice and skip the account refresh.
  • F1.5 (P1) src/components/app/AccountNotices.jsx:23: Stacked account notices can make the app bar and page unreachable.
  • F1.6 (P1) src/components/repos/RepoCreate.jsx:288: The inline refusal can describe a different owner or visibility from the form's current selection.
  • F1.7 (P2) src/components/common/useNotices.js:57: Older account notices can reappear after a refusal refresh clears them.
  • F1.8 (P2) src/components/common/limitNoticePayload.js:68: The normalizer discards every field of a notice that omits its title.

Responses:

  • F1.1: fixed in b734575
  • F1.2: fixed in b734575
  • F1.3: fixed in b734575
  • F1.4: fixed in 642bf1a and b734575 (notice dialog on every repository write; a refusal without a notice keeps its own error)
  • F1.5: fixed in 4a94c76
  • F1.6: fixed in 4a94c76
  • F1.7: fixed in 4a94c76
  • F1.8: accepted: the server sends a title with every notice. A body without one is treated as no notice, so the user sees the API's detail text (the documented fallback); a resource notice without a title locks nothing, and the API still refuses the write.

Pass 2 found F1.3, F1.4, F1.5 and F1.7 only partly fixed; what was left is in pass 2's findings and their fixes.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "full",
  "commit": "ecf3b2937e789fca4c0552b35d403df015e97228",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "F1.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/RepoHome.jsx",
      "line": 563,
      "claim": "Repository pages and version menus use HEAD's notices for writes to individual versions.",
      "scenario": "An owner opens a private version of a public source. The notices endpoint returns an edit lock for the version URL and an empty list for HEAD. The page queries HEAD, so the resource strip is missing and Release and Delete Version stay enabled. The API refuses both actions.",
      "action": "Fetch notices for the version URL on version pages and use the target version's notices for each Versions row. Keep HEAD notices for controls that write to HEAD.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.2",
      "severity": "P1",
      "tag": null,
      "file": "src/components/common/limitNoticePayload.js",
      "line": 132,
      "claim": "Edit Version is mapped to visibility writes that VersionForm cannot perform.",
      "scenario": "Even when a version's notice supplies locks: [\"edit\"], Edit Version opens. VersionForm has no visibility field, so saving any change it offers is an edit and receives a refusal.",
      "action": "Map Edit Version to edit only. Keep the visibility actions on Edit Repository and test the two controls separately.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.3",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/RepoHome.jsx",
      "line": 650,
      "claim": "Several repository write controls remain enabled even when the page has an edit lock.",
      "scenario": "On a locked source, selecting concepts still enables Create Mapping and Create Similar in the results toolbar. Save as Default Filters also sends a refused PATCH, then updates the local metadata and reports success. On a locked collection, a reference's Actions menu still enables Delete.",
      "action": "Apply the resource lock to the search toolbar, default-filter controls and reference removal controls. Update local defaults only after the API confirms the write.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.4",
      "severity": "P1",
      "tag": null,
      "file": "src/components/mappings/MappingForm.jsx",
      "line": 400,
      "claim": "Repository content writes can discard a refusal's notice and skip the account refresh.",
      "scenario": "A user opens Add Mapping while the source is writable. The source becomes read-only while the form is open. The submit returns a 403 with a notice, but MappingForm shows only the legacy error toast. The notice's actions are unavailable and the account and resource notices are never refreshed.",
      "action": "Route notice-bearing write failures through the notice slot and refresh event, including concept, mapping and version saves. Preserve the existing error path for responses without a notice.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.5",
      "severity": "P1",
      "tag": null,
      "file": "src/components/app/AccountNotices.jsx",
      "line": 23,
      "claim": "Stacked account notices can make the app bar and page unreachable.",
      "scenario": "A user with a personal notice and several organization notices opens TBv3 in a short viewport. The fixed stack can consume the whole viewport, pushes the app bar below it, and reduces the page's allocated height to zero. The stack has no scroll area and the body cannot scroll.",
      "action": "Cap the notice stack's height and let it scroll internally while reserving space for the app bar and page.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.6",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/RepoCreate.jsx",
      "line": 288,
      "claim": "The inline refusal can describe a different owner or visibility from the form's current selection.",
      "scenario": "After a private-create refusal for one organization, the user selects a different owner. The old organization's explanation and action links remain under the visibility field. A delayed refusal can also restore the private notice after the user has already switched to Public.",
      "action": "Associate the notice with the submitted owner and visibility. Clear it when either changes and ignore responses from superseded submissions.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.7",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/useNotices.js",
      "line": 57,
      "claim": "Older account notices can reappear after a refusal refresh clears them.",
      "scenario": "After a successful account fetch, a refusal-triggered refresh returns 401. The strip disappears, but a full-page navigation restores the old strip from session storage without fetching. An older in-flight success can also overwrite a newer empty response because each request has its own current flag.",
      "action": "Let only the latest active request update the visible notices and session cache. Invalidate the cached notices when the refresh fails.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F1.8",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/limitNoticePayload.js",
      "line": 68,
      "claim": "The normalizer discards every field of a notice that omits its title.",
      "scenario": "The API sends a notice with restriction text and a valid help link but no title. The relevant surface falls back to the legacy error display and loses both fields. A titleless resource notice also loses any locks it carries.",
      "action": "Accept payloads with usable fields, render the title only when supplied, and update the test that currently requires a title.",
      "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 4a94c76)

Verdict: findings: 6 P1, 1 P2

Earlier findings: F1.1 resolved, F1.2 resolved, F1.3 unresolved, F1.4 unresolved, F1.5 unresolved, F1.6 resolved, F1.7 unresolved, F1.8 unresolved. What was left of F1.3, F1.4, F1.5 and F1.7 is in this pass's findings below (F2.1, F2.3, F2.4, F2.5, F2.7); pass 3 found them all resolved. F1.8 stays accepted (see pass 1).

  • F2.1 (P1) src/components/repos/CollectionVersionsTab.jsx:690: Delete Expansion remains enabled when the owning version's notice locks edits.
  • F2.2 (P1) src/components/repos/CollectionVersionsTab.jsx:622: The expansion menu locks a form that can write to other versions.
  • F2.3 (P1) src/components/search/SearchFilters.jsx:370: Locking the entire default-filters menu blocks a read-only action and leaves an already-open Save action enabled.
  • F2.4 (P1) src/components/common/AddToCollectionDialog.jsx:161: Add to Collection drops the refusal notice and skips the required refresh.
  • F2.5 (P1) src/components/repos/RepoHome.jsx:665: Stacked account notices and a resource notice can collapse the repository results to zero height.
  • F2.6 (P1) src/components/repos/RepoCreate.jsx:289: Publishing a read-only repository leaves its account strip stale for the rest of the session.
  • F2.7 (P2) src/components/common/useNotices.js:94: A cache hit leaves an in-flight request for a previous language current.

Responses:

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "verify",
  "commit": "4a94c7650b684e97994108bf997c5b7a845af65e",
  "verdict": "findings",
  "prior": [
    {
      "id": "F1.1",
      "status": "resolved"
    },
    {
      "id": "F1.2",
      "status": "resolved"
    },
    {
      "id": "F1.3",
      "status": "unresolved"
    },
    {
      "id": "F1.4",
      "status": "unresolved"
    },
    {
      "id": "F1.5",
      "status": "unresolved"
    },
    {
      "id": "F1.6",
      "status": "resolved"
    },
    {
      "id": "F1.7",
      "status": "unresolved"
    },
    {
      "id": "F1.8",
      "status": "unresolved"
    }
  ],
  "findings": [
    {
      "id": "F2.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/CollectionVersionsTab.jsx",
      "line": 690,
      "claim": "Delete Expansion remains enabled when the owning version's notice locks edits.",
      "scenario": "On a read-only collection version with a non-default expansion, open the expansion's menu and choose Delete. The control has no lock even after the notice loads, and oclapi2 refuses the DELETE as an edit of that version.",
      "action": "Apply the owning version's edit lock to Delete Expansion and show its tooltip on the disabled item.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.2",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/CollectionVersionsTab.jsx",
      "line": 622,
      "claim": "The expansion menu locks a form that can write to other versions.",
      "scenario": "A collection has a writable public HEAD and a read-only private version. New Expansion on the private version is disabled, even though the form lets the user switch to HEAD and create the expansion there. Opening the form from HEAD also permits selecting the locked version and submitting to it.",
      "action": "Keep the form reachable when it offers a writable version. Fetch or reuse notices for the selected version and lock the Create button against that version.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.3",
      "severity": "P1",
      "tag": null,
      "file": "src/components/search/SearchFilters.jsx",
      "line": 370,
      "claim": "Locking the entire default-filters menu blocks a read-only action and leaves an already-open Save action enabled.",
      "scenario": "On a source with saved defaults and an edit lock, a user changes their local filters and cannot use Reset to Default Filters to restore them. If the menu was already open when the notice arrived, Save as Default Filters still sends the PATCH.",
      "action": "Keep the menu accessible and apply the lock and tooltip to Save as Default Filters. Leave the local reset available.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.4",
      "severity": "P1",
      "tag": null,
      "file": "src/components/common/AddToCollectionDialog.jsx",
      "line": 161,
      "claim": "Add to Collection drops the refusal notice and skips the required refresh.",
      "scenario": "From concept search, select a read-only destination collection and click Add. Its references endpoint returns a 403 with `notice`. The dialog shows only the old detail string, so the supplied actions and help link never appear and the account strips do not refresh.",
      "action": "Pass the refusal to the shared notice handler and preserve the existing error display when the body has no notice. Cover both responses in a regression test.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.5",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/RepoHome.jsx",
      "line": 665,
      "claim": "Stacked account notices and a resource notice can collapse the repository results to zero height.",
      "scenario": "In a 720px-tall viewport, enough account strips to reach the 40vh cap leave 432px. A read-only repository strip taller than 76px uses up the rest of the space after the results panel subtracts its fixed 356px. The results panel collapses to zero height, so the user cannot browse the repository's rows.",
      "action": "Make the repository body scroll within the remaining viewport and keep its results reachable when both sets of strips are shown. Test stacked notices in a short viewport.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.6",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/RepoCreate.jsx",
      "line": 289,
      "claim": "Publishing a read-only repository leaves its account strip stale for the rest of the session.",
      "scenario": "A user follows Make Public from the notice for their only read-only repository and saves successfully. The repository page fetches fresh resource notices, but the Header continues to say one repository is read-only. Reloading restores the same strip from session storage.",
      "action": "Invalidate and refresh account notices after a successful visibility change or repository deletion that can change the summary, while retaining session caching for ordinary navigation.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F2.7",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/useNotices.js",
      "line": 94,
      "claim": "A cache hit leaves an in-flight request for a previous language current.",
      "scenario": "With English notices cached, switch to Spanish and then back to English before the Spanish request completes. English loads from cache without advancing the request guard. The late Spanish response then replaces the English strip and overwrites the cache.",
      "action": "Invalidate in-flight requests whenever the user or language changes, including when the new state can load from cache. Add a regression test for switching back before the request completes.",
      "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 78b9571)

Verdict: findings: 5 P1, 1 P2

Earlier findings: F2.1 resolved, F2.2 resolved, F2.3 resolved, F2.4 resolved, F2.5 resolved, F2.6 resolved, F2.7 resolved.

  • F3.1 (P1) src/components/repos/CollectionVersionsTab.jsx:796: Two expansion rebuild shortcuts bypass the version's edit lock.
  • F3.2 (P1) src/components/common/AddToCollectionDialog.jsx:362: Add to Collection and Clone to Source leave their submit buttons enabled for read-only destinations.
  • F3.3 (P1) src/components/search/Search.jsx:749: The References Actions lock blocks the conversion preview, which oclapi2 permits on read-only collections.
  • F3.4 (P1) src/components/collections/ConvertReferencesDialog.jsx:243: Reference conversion discards structured refusal notices.
  • F3.5 (P1) src/components/repos/ExternalExportsDialog.jsx:178: External export upload and delete disappear when an edit lock arrives, and an open delete confirmation stays enabled.
  • F3.6 (P2) src/components/repos/RepoHome.jsx:519: A queued deletion refreshes account notices before the deletion completes.

Responses:

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "verify",
  "commit": "78b9571f5d7862499ab2189604f3cb52ca053f53",
  "verdict": "findings",
  "prior": [
    {
      "id": "F2.1",
      "status": "resolved"
    },
    {
      "id": "F2.2",
      "status": "resolved"
    },
    {
      "id": "F2.3",
      "status": "resolved"
    },
    {
      "id": "F2.4",
      "status": "resolved"
    },
    {
      "id": "F2.5",
      "status": "resolved"
    },
    {
      "id": "F2.6",
      "status": "resolved"
    },
    {
      "id": "F2.7",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "F3.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/CollectionVersionsTab.jsx",
      "line": 796,
      "claim": "Two expansion rebuild shortcuts bypass the version's edit lock.",
      "scenario": "A read-only collection version has a stale default expansion or an expansion with newer source versions available. The version-row warning icon and the Rebuild button below the update details still open the rebuild dialog. Confirming sends a request that oclapi2 refuses.",
      "action": "Apply the target version's edit lock to both shortcuts and to the rebuild confirmation.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.2",
      "severity": "P1",
      "tag": null,
      "file": "src/components/common/AddToCollectionDialog.jsx",
      "line": 362,
      "claim": "Add to Collection and Clone to Source leave their submit buttons enabled for read-only destinations.",
      "scenario": "An editor selects a read-only collection and can still submit Add. The same happens when they select a read-only source and submit Clone in CloneToSourceDialog.jsx. Both requests are edits of the selected destination and are refused.",
      "action": "Fetch notices for the selected destination in each dialog and lock its submit button when the destination's edit action is locked. Keep the entry points and destination selectors available.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.3",
      "severity": "P1",
      "tag": null,
      "file": "src/components/search/Search.jsx",
      "line": 749,
      "claim": "The References Actions lock blocks the conversion preview, which oclapi2 permits on read-only collections.",
      "scenario": "An editor selects a resource-versioned reference on a read-only collection's HEAD. The locked menu prevents them from opening the conversion dialog and seeing what the conversion would change. The preview endpoint explicitly sets writes_content to false.",
      "action": "Keep the menu and conversion preview available. Apply the edit lock to the conversion submit button and to actions that only mutate references.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.4",
      "severity": "P1",
      "tag": null,
      "file": "src/components/collections/ConvertReferencesDialog.jsx",
      "line": 243,
      "claim": "Reference conversion discards structured refusal notices.",
      "scenario": "A collection becomes read-only after the editor opens the conversion preview. A direct 403 shows only detail. If the change happens while conversion is queued, the worker returns the full refusal but getQueuedConversion reduces it to text. In either case the notice and its actions are lost, and the strips do not refresh.",
      "action": "Preserve and render the notice for direct and queued refusals, trigger the notice refresh, and keep the current error text for refusals without a notice.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.5",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/ExternalExportsDialog.jsx",
      "line": 178,
      "claim": "External export upload and delete disappear when an edit lock arrives, and an open delete confirmation stays enabled.",
      "scenario": "An org admin opens External Exports on a read-only version. When its notices arrive, the upload and delete controls vanish without a lock indicator or reason. If the admin opened the delete confirmation while the request was pending, its Delete button can still send the refused write.",
      "action": "Pass the version's lock reason separately from edit permission. Show locked upload and delete controls with the reason and apply the same lock to the delete confirmation.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "F3.6",
      "severity": "P2",
      "tag": null,
      "file": "src/components/repos/RepoHome.jsx",
      "line": 519,
      "claim": "A queued deletion refreshes account notices before the deletion completes.",
      "scenario": "Deleting a read-only source or collection takes long enough for oclapi2 to return 202. The immediate notice GET still counts the repository and caches that result. When the worker finishes, no refresh runs, so the account strip can keep counting the deleted repository even after a reload in the same tab.",
      "action": "Refresh when the queued deletion succeeds, using the returned task ID to observe completion.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Simplification review (claude subagent, commit 35dd686)

  • S1 (reuse) src/components/app/AnnouncementBanner.jsx:16: AnnouncementBanner still has its own copy of the publish-height-as-CSS-variable effect (HEIGHT_VAR), and the new usePublishedHeight.js says it does the same thing. Response: applied in ffbf1e5.
  • S2 (shrink) src/components/repos/RepoManagementList.jsx:30: Each menu item repeats lockFor(x) three times (LockTooltip title, disabled, LockMark), copied across RepoManagementList, ConceptManagementList, MappingManagementList and other dialogs. Response: applied in a4636f0.
  • S3 (yagni) src/components/common/limitNoticePayload.js:173: createRequestGuard and useRequestGuard exist only for the two hooks in useNotices.js. Response: declined: the request guard is a tested helper that pins the F2.7 behaviour, so it stays a separate unit.
  • S4 (shrink) src/components/common/limitNoticePayload.js:113: getNoticeIcon's last line has a redundant ternary (tone === 'info' ? 'info' : tone). Response: applied in 925d2a1.
  • S5 (delete) src/components/common/limitNoticePayload.js:6: NOTICE_KINDS, NOTICE_TONES and WRITE_ACTIONS are exported with no importer outside the module and its tests. Response: applied in 925d2a1 (WRITE_ACTIONS stays exported: a test reads it).
  • S6 (yagni) src/components/repos/taskState.js:8: watchTask's interval and maxFailures options are only defaults in production. Response: applied in 925d2a1.
  • S7 (shrink) src/components/common/useNotices.js:37: readCache, writeCache and clearCache each carry their own try/catch around sessionStorage. Response: applied in 925d2a1.
  • S8 (dup-test) src/components/common/__tests__/limitNoticePayload.test.js:105: getNoticeDetail's five shape assertions repeat getNotice's shape handling through getBody. Response: applied in 925d2a1.
simplify.json
{
  "reviewer": "claude subagent",
  "perspective": "simplify",
  "mode": "full",
  "commit": "35dd686a0d1785b0da5e635a63b8bd6438e8c8d9",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "S1",
      "severity": null,
      "tag": "reuse",
      "file": "src/components/app/AnnouncementBanner.jsx",
      "line": 16,
      "claim": "AnnouncementBanner still has its own copy of the publish-height-as-CSS-variable effect (HEIGHT_VAR), and the new usePublishedHeight.js says it does the same thing.",
      "scenario": null,
      "action": "Make AnnouncementBanner call usePublishedHeight('--announcement-height', shown) and delete its inline effect, if show/hide semantics match; else drop the 'as AnnouncementBanner does' comment.",
      "lines_delta": -14,
      "confidence": "medium"
    },
    {
      "id": "S2",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/repos/RepoManagementList.jsx",
      "line": 30,
      "claim": "Each menu item repeats lockFor(x) three times (LockTooltip title, disabled, LockMark), copied across RepoManagementList, ConceptManagementList, MappingManagementList and other dialogs.",
      "scenario": null,
      "action": "Add a LockableMenuItem wrapper in NoticeLocks.jsx taking a lock reason; at minimum hoist each lock into a const.",
      "lines_delta": -60,
      "confidence": "medium"
    },
    {
      "id": "S3",
      "severity": null,
      "tag": "yagni",
      "file": "src/components/common/limitNoticePayload.js",
      "line": 173,
      "claim": "createRequestGuard and useRequestGuard exist only for the two hooks in useNotices.js.",
      "scenario": null,
      "action": "Inline as a useRef counter in useNotices.js.",
      "lines_delta": -8,
      "confidence": "low"
    },
    {
      "id": "S4",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/common/limitNoticePayload.js",
      "line": 113,
      "claim": "getNoticeIcon's last line has a redundant ternary (tone === 'info' ? 'info' : tone).",
      "scenario": null,
      "action": "if(notice?.kind === 'read_only') return 'lock'; return notice?.kind === 'not_included' ? 'info' : getNoticeTone(notice)",
      "lines_delta": -3,
      "confidence": "high"
    },
    {
      "id": "S5",
      "severity": null,
      "tag": "delete",
      "file": "src/components/common/limitNoticePayload.js",
      "line": 6,
      "claim": "NOTICE_KINDS, NOTICE_TONES and WRITE_ACTIONS are exported with no importer outside the module and its tests.",
      "scenario": null,
      "action": "Drop the export keyword unless a test imports them.",
      "lines_delta": 0,
      "confidence": "medium"
    },
    {
      "id": "S6",
      "severity": null,
      "tag": "yagni",
      "file": "src/components/repos/taskState.js",
      "line": 8,
      "claim": "watchTask's interval and maxFailures options are only defaults in production.",
      "scenario": null,
      "action": "Keep schedule for the test; make interval and maxFailures module constants.",
      "lines_delta": -3,
      "confidence": "low"
    },
    {
      "id": "S7",
      "severity": null,
      "tag": "shrink",
      "file": "src/components/common/useNotices.js",
      "line": 37,
      "claim": "readCache, writeCache and clearCache each carry their own try/catch around sessionStorage.",
      "scenario": null,
      "action": "One safely(fn) helper, or a single store(value) that removes the key on null.",
      "lines_delta": -12,
      "confidence": "medium"
    },
    {
      "id": "S8",
      "severity": null,
      "tag": "dup-test",
      "file": "src/components/common/__tests__/limitNoticePayload.test.js",
      "line": 105,
      "claim": "getNoticeDetail's five shape assertions repeat getNotice's shape handling through getBody.",
      "scenario": null,
      "action": "Keep one shape matrix via getNotice; cut getNoticeDetail to two assertions (detail wins over error, a string body).",
      "lines_delta": -4,
      "confidence": "low"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 78b9571..925d2a1 (codex-cli 0.169.0, commit 925d2a1)

Verdict: findings: 1 P1, 3 P2

Earlier findings: F3.1 regressed, F3.2 unresolved, F3.3 resolved, F3.4 unresolved, F3.5 resolved, F3.6 unresolved.

  • FC.1 (P1) src/components/common/AddToCollectionDialog.jsx:98: A pending notice lookup leaves Add, Clone, and the rebuild confirmation enabled.
  • FC.2 (P2) src/components/repos/ExpansionRowList.jsx:229: The inline Rebuild lock also blocks a shortcut to Create Similar on a writable version.
  • FC.3 (P2) src/components/collections/ConvertReferencesDialog.jsx:235: Closing a queued conversion stops the only observer that can show its refusal notice.
  • FC.4 (P2) src/components/repos/RepoHome.jsx:520: A queued deletion can still leave the session's account notice stale after the repository is gone.

Responses:

  • FC.1: fixed in d299893 (the rebuild half finished in c15987a)
  • FC.2: fixed in a550246
  • FC.3: fixed in fe0afef, then reverted in 367b267 and accepted: a detached poll after the dialog closes could trigger a session-renewal reload and lose unrelated unsaved work, which is worse than a refusal shown only when the user next acts
  • FC.4: accepted: keeping deletion watches across reloads needs new machinery, and the only effect is a stale account-strip count until the next refresh, while the API still refuses what it should
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "925d2a10dc6490d7876e2f0e0470dd88e4b3dcaa",
  "verdict": "findings",
  "prior": [
    {
      "id": "F3.1",
      "status": "regressed"
    },
    {
      "id": "F3.2",
      "status": "unresolved"
    },
    {
      "id": "F3.3",
      "status": "resolved"
    },
    {
      "id": "F3.4",
      "status": "unresolved"
    },
    {
      "id": "F3.5",
      "status": "resolved"
    },
    {
      "id": "F3.6",
      "status": "unresolved"
    }
  ],
  "findings": [
    {
      "id": "FC.1",
      "severity": "P1",
      "tag": null,
      "file": "src/components/common/AddToCollectionDialog.jsx",
      "line": 98,
      "claim": "A pending notice lookup leaves Add, Clone, and the rebuild confirmation enabled.",
      "scenario": "On a slow connection, an editor selects a read-only collection or source and clicks Add or Clone before its notices arrive. Both dialogs send a write the API refuses. The expansion warning shortcut has the same gap because its confirmation starts a fresh lookup even if the expansion row already has the version's edit lock.",
      "action": "Track whether the target's notice lookup is pending and defer submission until it settles. Reuse the version's known lock when opening the rebuild confirmation.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.2",
      "severity": "P2",
      "tag": null,
      "file": "src/components/repos/ExpansionRowList.jsx",
      "line": 229,
      "claim": "The inline Rebuild lock also blocks a shortcut to Create Similar on a writable version.",
      "scenario": "A private collection version has an expansion with source updates, and the collection's HEAD is public and writable. The inline Rebuild button used to open a dialog where the editor could choose Create Similar and select HEAD. The new lock disables that shortcut based only on the private version's notices.",
      "action": "Keep the dialog accessible from the inline shortcut and lock its Rebuild confirmation. Let the Create Similar form apply the notices for its selected destination.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.3",
      "severity": "P2",
      "tag": null,
      "file": "src/components/collections/ConvertReferencesDialog.jsx",
      "line": 235,
      "claim": "Closing a queued conversion stops the only observer that can show its refusal notice.",
      "scenario": "A conversion returns 202 and the editor clicks Close while it runs. The dialog unmounts and cancels polling. If the worker then refuses the conversion because the collection became read-only, the editor sees only the earlier queued message and the notice strips do not refresh.",
      "action": "Keep observing an accepted conversion after the dialog closes so a later structured refusal can open the shared notice and refresh the strips.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.4",
      "severity": "P2",
      "tag": null,
      "file": "src/components/repos/RepoHome.jsx",
      "line": 520,
      "claim": "A queued deletion can still leave the session's account notice stale after the repository is gone.",
      "scenario": "An owner reloads the tab after the delete returns 202 but before the worker finishes. The reload drops the in-memory watcher and restores the cached count. A second tab that receives the API's 409 Already Queued response has the same stale count because that response carries no task ID and the fallback refresh runs before deletion completes.",
      "action": "Resume pending deletion checks across reloads. When the API supplies no task ID, revalidate once the repository's deletion is observable.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 925d2a1..fe0afef (codex-cli 0.169.0, commit fe0afef)

Verdict: findings: 1 P1, 3 P2

Earlier findings: FC.1 unresolved, FC.2 resolved, FC.3 regressed, FC.4 unresolved.

  • FC.5 (P2) src/components/common/useNotices.js:125: Reselecting a destination can enable submission before its new notice lookup settles.
  • FC.6 (P1) src/components/repos/CollectionVersionsTab.jsx:552: The inline Rebuild confirmation can keep an obsolete lock for a writable version.
  • FC.7 (P2) src/components/collections/ConvertReferencesDialog.jsx:264: A closed conversion's background poll can reload the app and discard unrelated unsaved work.
  • FC.8 (P2) src/components/collections/referenceConversionUtils.js:133: Three temporary poll failures can still hide a closed conversion's eventual refusal.

Responses:

  • FC.5: fixed in 1625d7e
  • FC.6: fixed in c15987a (the known-lock handoff is gone; the confirmation always looks up and its Rebuild waits)
  • FC.7: resolved by the revert 367b267
  • FC.8: resolved by the revert 367b267
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "fe0afefd734b94c3a3cf316c00f3861487d30f0a",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.1",
      "status": "unresolved"
    },
    {
      "id": "FC.2",
      "status": "resolved"
    },
    {
      "id": "FC.3",
      "status": "regressed"
    },
    {
      "id": "FC.4",
      "status": "unresolved"
    }
  ],
  "findings": [
    {
      "id": "FC.5",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/useNotices.js",
      "line": 125,
      "claim": "Reselecting a destination can enable submission before its new notice lookup settles.",
      "scenario": "An editor selects read-only collection A and its first notice request fails. They select B, then switch back to A before B's lookup settles. The hook still holds A's empty result, so it reports pending as false while the new lookup for A runs. Clicking Add in that window sends a write the API refuses.",
      "action": "Track whether the current selection's request has settled independently of the URL on the last response. Cover A \u2192 B \u2192 A before B settles.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.6",
      "severity": "P1",
      "tag": null,
      "file": "src/components/repos/CollectionVersionsTab.jsx",
      "line": 552,
      "claim": "The inline Rebuild confirmation can keep an obsolete lock for a writable version.",
      "scenario": "An editor opens the expansion rows while a version is read-only, restores write access in another tab, then opens the inline Rebuild confirmation. The confirmation copies the old lock and skips its own lookup. Its Rebuild stays disabled even if the rows later refresh and clear their lock. Before this change, opening the confirmation fetched the version's current notices.",
      "action": "Have the rows and confirmation share a live lookup for the version. Revalidate when opening the confirmation and let it follow subsequent notice updates.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.7",
      "severity": "P2",
      "tag": null,
      "file": "src/components/collections/ConvertReferencesDialog.jsx",
      "line": 264,
      "claim": "A closed conversion's background poll can reload the app and discard unrelated unsaved work.",
      "scenario": "An editor closes a queued conversion and starts filling out another form while the task is still running. If their access token expires, the next task poll gets a 401. APIService.get triggers session renewal, which reloads the page on success. The draft and the in-memory conversion watcher are both lost.",
      "action": "Use the request method without automatic navigation for detached polling. Pause the watch on a 401 and resume it when credentials are available.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.8",
      "severity": "P2",
      "tag": null,
      "file": "src/components/collections/referenceConversionUtils.js",
      "line": 133,
      "claim": "Three temporary poll failures can still hide a closed conversion's eventual refusal.",
      "scenario": "An editor closes a queued conversion. A brief gateway outage covers three polls, then the endpoint recovers and returns the worker's structured refusal. The watcher has already stopped, so the notice never opens and the strips do not refresh.",
      "action": "Retry transient network and server errors with backoff or resume polling after connectivity returns. Test recovery after the current three-failure cutoff.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits fe0afef..1625d7e (codex-cli 0.169.0, commit 1625d7e)

Verdict: findings: 2 P2

Earlier findings: FC.5 resolved, FC.6 resolved, FC.7 resolved, FC.8 resolved.

  • FC.9 (P2) src/components/repos/CollectionVersionsTab.jsx:541: A transient lookup failure can unlock Rebuild for a read-only version.
  • FC.10 (P2) src/components/common/useNotices.js:121: Clearing the stored answer on every resource change can remove a known lock when returning to a version.

Responses:

  • FC.9: accepted: a failed lookup counts as no lock everywhere by design (so a server without the route behaves as before); if it fails on a locked version the API still refuses the rebuild and the refusal opens its notice
  • FC.10: accepted: only in a quick switch back before the other lookup answers; the API still refuses the release and the refusal shows its notice

Loop ended here, as bounded: no P0 or P1 open.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "1625d7ec7a472312f03e3e19fa43c2356bc09369",
  "verdict": "findings",
  "prior": [
    {
      "id": "FC.5",
      "status": "resolved"
    },
    {
      "id": "FC.6",
      "status": "resolved"
    },
    {
      "id": "FC.7",
      "status": "resolved"
    },
    {
      "id": "FC.8",
      "status": "resolved"
    }
  ],
  "findings": [
    {
      "id": "FC.9",
      "severity": "P2",
      "tag": null,
      "file": "src/components/repos/CollectionVersionsTab.jsx",
      "line": 541,
      "claim": "A transient lookup failure can unlock Rebuild for a read-only version.",
      "scenario": "An editor expands a read-only collection version with source updates. Before this change, the row could fetch the version's lock and pass it to the confirmation. With this change, if the notice request on opening the confirmation times out, the lookup settles with no notices. Rebuild loses its padlock and tooltip and sends a POST that oclapi2 refuses.",
      "action": "Keep the last successful lock for that version available while the confirmation revalidates. Let a successful response update or clear it, and keep the 404 fallback for servers without the route.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.10",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/useNotices.js",
      "line": 121,
      "claim": "Clearing the stored answer on every resource change can remove a known lock when returning to a version.",
      "scenario": "A collection owner views read-only version A and its notice loads. They switch to version B, then back to A before B's notice request finishes. Previously A's stored notice still locked Release version on return. The new reset discards it, and the Actions menu ignores the pending lookup. The owner can open the release confirmation and submit a write that oclapi2 refuses.",
      "action": "Track whether the current selection's lookup settled separately from the last successful answer. Preserve matching notices during revalidation so an existing lock stays visible while destination submits still wait for a fresh answer.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 1625d7e..ceb9dbf (codex-cli 0.169.0, commit ceb9dbf)

Verdict: clean. The commit only rewords two code comments (EditMembers.jsx, RepoCreate.jsx). No findings.

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

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check of the merge 848f0a5 (codex-cli 0.169.0, commit 848f0a5)

Main merged into the branch. Only SearchFilters.jsx conflicted: main's Retired control and the branch's default-filters lock are both kept.

Verdict: findings: 1 P2

  • FC.11 (P2) src/components/search/Search.jsx:529: main's request-ID guard in Matched Candidates drops a superseded reply before notice handling, so a refusal that carries a notice no longer refreshes the notice strips.

Response:

  • FC.11: fixed in a066b5c: a superseded reply now goes through takeRefusalNotice, which refreshes the strips when it carries a notice and does nothing otherwise; the superseded search still shows no dialog, alert or results.
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "848f0a5c3",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "FC.11",
      "severity": "P2",
      "tag": null,
      "file": "src/components/search/Search.jsx",
      "line": 529,
      "claim": "The merge drops refusal notices from superseded Matched Candidates requests before they can refresh the account notice strip.",
      "scenario": "A user starts Matched Candidates, then runs an ordinary keyword search on the same repository while the match is pending. If the match returns a refusal carrying a new account notice, the request-ID guard discards it before notice handling. The account strip can show stale information for the rest of the session unless another action triggers a refresh.",
      "action": "Detect notice-bearing refusals before the request-ID guard. Refresh the notice strips for a superseded refusal and keep the dialog and result updates scoped to the current search.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}```

</details>

@paynejd

paynejd commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 848f0a5..a066b5c (codex-cli 0.169.0, commit a066b5c)

Verdict: clean. FC.11 resolved. No findings.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "a066b5cf8",
  "verdict": "clean",
  "prior": [
    {
      "id": "FC.11",
      "status": "resolved"
    }
  ],
  "findings": []
}```

</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. Revalidate resource notices when users return from another tab so edit controls recover after write access is restored. GitHub's lint and test check passed at this head. This is the TBv3 counterpart of the recovery path in OpenConceptLab/oclmap#141.

Comment thread src/components/common/useNotices.js Resolved
paynejd and others added 2 commits November 25, 2026 21:53
…ain when the person returns to the page while it shows them

A notice's link can send the person to another tab, where they may change what the notice asks for. Coming back
to the same resource page changes neither the resource nor the language, so the lookup now asks again on a
return (the page shown again or focused), while it holds notices, and locked controls recover on an empty answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaZ4qWY2d45rQTXPXsYP6e
…n and focused; the resource lookup's requests move to a plain object its tests drive

Check 7's FC.12: a tab shown in a window that isn't focused yet used up the return, so the focus that
followed asked nothing. FC.13: the test registered its own listener. createResourceNoticeLookup now holds
what useResourceNoticeLookup asked, its request guard and its return watch; the hook keeps the answer in
state, and the tests drive the lookup with answered requests.

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

@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. 94d59c0 addresses my resource-lock finding. Returning to the same tab or window now re-fetches the notice while it is shown, and an empty answer unlocks the controls. I ran the 24 notice payload tests locally and verified the PR lint and test check passed. One non-blocking follow-up is inline.

Comment thread src/components/common/useNotices.js Outdated
load()
}, [load, resourceURL])
useRefetchOnChange(load)
const lookup = readNoticeLookup(state, resourceURL)

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.

Non-blocking follow-up: the header's account notices also open links in a new tab. Completing an action there can leave the header banner showing the old notice, which is also cached for the session. Consider enabling the same return refresh in useAccountNotices while it shows notices.

@paynejd

paynejd commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits a066b5c..94d59c0 (codex-cli 0.169.0, commit 94d59c0)

The recheck on return asked for in review 6067859767.

Verdict: findings: 2 P2

  • FC.12 (P2) src/components/common/limitNoticePayload.js:205: a tab shown in a window that isn't focused yet used up the return, so the focus that followed asked nothing.
  • FC.13 (P2) src/components/common/__tests__/limitNoticePayload.test.js:297: the unlock test registered its own listener, so it passed without the lookup's recheck.

Response:

  • FC.12: fixed in c8b740e: a return counts once the page is both shown and focused.
  • FC.13: fixed in c8b740e: createResourceNoticeLookup now holds the lookup's requests, request guard and return watch; the hook keeps its answer in state, and the tests drive the lookup with answered requests (removing the watch fails the unlock test).
findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "94d59c035",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "FC.12",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/limitNoticePayload.js",
      "line": 205,
      "claim": "A visibility change can consume the recheck before the resource page regains focus.",
      "scenario": "The user moves the notice destination into a separate window, exposing the resource tab while focus stays in the destination window. The visibility event rechecks while the lock still applies and clears `away`. After the user restores access and clicks back, the focus event triggers no request, so the controls stay locked. I reproduced the stale lock by dispatching visibility and focus separately. [HTML Standard on visibility and focus](https://html.spec.whatwg.org/multipage/interaction.html#focus)",
      "action": "Keep a focus recheck pending when the resource page becomes visible in an unfocused window. Add coverage for visibility and focus events separated by an access change.",
      "lines_delta": null,
      "confidence": "high"
    },
    {
      "id": "FC.13",
      "severity": "P2",
      "tag": null,
      "file": "src/components/common/__tests__/limitNoticePayload.test.js",
      "line": 297,
      "claim": "The unchanged-resource regression test bypasses the production lookup and its return subscription.",
      "scenario": "If `useRefetchOnReturn` is removed from `useResourceNoticeLookup`, the test still passes because it registers its own listener and assigns the empty result directly. In the app, returning to the unchanged resource would make no request and leave editing locked.",
      "action": "Exercise the production lookup with mocked notice responses. Dispatch the return events, verify that it requests the same resource again, and assert that the empty response clears the lock.",
      "lines_delta": null,
      "confidence": "high"
    }
  ]
}

@paynejd

paynejd commented Nov 26, 2026

Copy link
Copy Markdown
Member Author

Codex check of commits 94d59c0..c8b740e (codex-cli 0.169.0, commit c8b740e)

Verdict: clean. FC.12 and FC.13 resolved. No findings.

findings.json
{
  "reviewer": "codex-cli 0.169.0",
  "perspective": "defects",
  "mode": "final",
  "commit": "c8b740e96",
  "verdict": "clean",
  "prior": [
    {"id": "FC.12", "status": "resolved"},
    {"id": "FC.13", "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. I checked the updated resource lookup. It waits for the tab to be both visible and focused, and an empty response still releases the lock on the same resource. All 26 focused tests and GitHub lint and tests passed. The account-banner refresh is still a non-blocking follow-up.

@snyaggarwal
snyaggarwal merged commit 54852d9 into main Nov 26, 2026
2 checks passed
@snyaggarwal
snyaggarwal deleted the ocl_online-702-notice-slot 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