Repository navigation
[3602 by Claude Opus 5.5] Settings → Maintenance: held follow-ups show only what needs a decision, in plain words, and Resume works for cancelled work - #3615
Conversation
…8 Settings files plus the loading-state check), lint and typecheck pass, and so do the Playwright suites for held follow-ups, Instance data and the Settings layout. I didn't change the handoff API, the CLI output or what Resume/Release do on the server.
Held follow-ups (`MaintenanceSection.tsx`)
- Resume for cancelled work: a cancelled follow-up now has a "Publish the cancelled work" checkbox beside Resume. Resume sends `authorizeCancelled: true` only when it's ticked. No CLI flag appears anywhere in the UI.
- Default list: shows only follow-ups that are held or in recovery. Released ones sit under a collapsed "Show released (N)" with no buttons or checkboxes. Follow-ups still in recovery keep Release but have no Resume.
- Plain labels: statuses, phases and reasons now have labels ("Held", "Agent finished", "Comment posted", "Released automatically (stale)", "Pull request closed", and so on). The server's next-action text is mapped in the UI to a short sentence, and the line is left out when there is nothing to do. The labels live in a new `heldFollowupText.ts`.
- Row details: the task id links to `/tasks/:id` and the worktree path is gone. Times show as relative ("3 hrs ago") using the task list's formatter, with the full date in a tooltip. I didn't find a single app-wide relative/absolute formatter, so the task list's one is the closest match.
- Wording: the description, paragraph, empty state and error messages use the texts from the issue, and everything is called "held follow-up". Rate-limit (429) errors get their own plain message. I replaced the duplicate note in the Settings inspector with a different one.
- Release confirmation: Release now opens a confirmation dialog, reusing the existing `AgentConfirmDialog`. The force checkbox reads "Also release if it has unpublished work", and its refusal uses the wording from the issue.
- Loading: the first load shows `ListSkeleton`. Later reads are silent: after each action, and every 60 seconds while the section is on screen. If a later read fails, the last rows stay. The Refresh button is gone.
- No request from other categories: a new `settingsSectionVisibility.ts` tells each section whether it is on screen (`SettingsNavigation.tsx` provides it). The list is now fetched only when Maintenance is open or a search shows the section.
Instance data (`InstanceStorageSection.tsx`)
- Held follow-ups now come first in the Maintenance category.
- The texts are shortened as the issue lists. Categories, protection reasons and export states have labels. The paragraph about what the export contains is unchanged.
- The inventory now shows each repository as a stacked row on phones instead of a table, so nothing sits off-screen at 390px. Because of that I changed the existing `e2e/instance-storage.pw.ts`, which tested sideways scrolling and swiping of the table: it now checks that the inventory fits the screen. I also updated its expected cleanup message.
Also changed
- Errors (`followupHandoffsApi.ts`): the server's refusal codes are mapped to plain messages, and the server's own CLI-oriented error text is no longer shown.
- Docs: I updated the line in `docs/docs/operations/maintenance.md` that quoted the old checkbox text.
- Unit tests: cover the Resume option, the default filter, the labels, the request waiting for the section to be shown, the skeleton, the release dialog, and keeping rows when a later read fails.
- Browser test: the new `e2e/held-followups.pw.ts` runs at 1440 and 390 and checks that nothing is requested from another category. It also checks the order, the hidden server path and CLI flag, the release dialog with its refusal, and Resume with the checkbox ticked.
The previews show the held follow-ups list and the Release dialog at 1440 and 390, and Instance data at desktop and 390.
|
/ultrafix goal=8 max=6 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 6) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves Maintenance wording, organization, and loading behavior with focused UI changes. It needs a localized correction before merge: cancellation consent can carry over to a different follow-up on the same pull request. ✅ Explicit cancellation authorization — Resume sends ✅ Read-only released records — Released follow-ups are separated into a collapsed list without mutation controls. ✅ Visibility-aware loading — The held-follow-up list waits for section visibility, and failed background reads preserve existing rows. Review was limited to static analysis of the supplied code; no commands or tests were run. The authoritative checks show no failures and five pending checks. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 Scope cancellation consent to the attempt
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Test polling lifecycle behaviorThe tests cover initial visibility and an action-triggered refresh failure, but do not exercise the new interval, hiding the section, or overlapping list responses. Focused timer and deferred-response tests would improve confidence in background refresh behavior. This is optional coverage beyond the demonstrated consent defect. S2: 🟢 Clarify retained commit locationThe new forced-release dialog says unpublished commits “stay on the branch,” while the supplied maintenance documentation describes retention through a detached checkout and backup reference when the branch is restarted. “Unpublished commits are kept” would communicate the preservation guarantee without implying a particular location. This wording refinement is non-blocking. ScoreThe implementation is focused and has useful coverage, but cancellation consent must not transfer between attempts. No current checks have failed; five remain pending. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 4bc12d3
Summary of ChangesI fixed F1: ticking "Publish the cancelled work" now applies only to the attempt it was ticked for. A later attempt on the same pull request starts unchecked, and Resume on it sends no What changed (
Tests (
The whole Found but not changed (outside F1): the "Also release if it has unpublished work" box ( Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +55/−2 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…s only to the attempt it was ticked for. A later attempt on the same pull request starts unchecked, and Resume on it sends no `authorizeCancelled`. I fixed F1: ticking "Publish the cancelled work" now applies only to the attempt it was ticked for. A later attempt on the same pull request starts unchecked, and Resume on it sends no `authorizeCancelled`. **What changed** (`propr-ui/src/pages/SettingsPage/MaintenanceSection.tsx`) - A new `attemptOf` helper identifies a follow-up by repository, pull request and `taskId`. The tick is stored under that, not under `keyOf`. - The checkbox and `resume` both match on it, so a different task on the same pull request never sees the earlier tick. - After every successful list read, the stored tick is cleared unless the same attempt is still listed and still waiting for that choice. So it goes away when the attempt disappears, gets replaced, or stops needing the choice. This holds even if the same task later comes back. **Tests** (`MaintenanceSection.test.tsx`, 4 new) - Three cases tick the box for cancelled attempt A, then re-read the list: - A leaves the list and a different attempt B is held later. - B replaces A in a single read. - A leaves the list and comes back. In each one the box ends up unchecked and Resume is called without `authorizeCancelled`. - One case checks that the tick survives a re-read while the same attempt stays held, and that Resume then sends `authorizeCancelled: true`. - Against the unfixed component, the three carry-over cases fail. The whole `MaintenanceSection` test file passes (20 tests), and lint (zero warnings) and typecheck are clean. I didn't re-run the Playwright suites: the browser test only ticks and resumes one attempt, which this change doesn't touch. There's nothing new to see on screen, so I made no previews. **Found but not changed (outside F1):** the "Also release if it has unpublished work" box (`forceFor`) has the same flaw. It's stored by repository and pull request only, so a force tick could carry over to a later attempt on the same pull request. This keying was there before this PR, so I left it alone; it could be fixed the same way if you select it. PR: #3615 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves Maintenance wording, presentation, and loading behavior, but needs a localized correction before merge: background refreshes can leave Release consent attached to a replaced follow-up. ✅ Explicit publication choice — Cancelled-work authorization is bound to task identity and cleared when that attempt disappears or changes. ✅ Clearer action boundaries — Released rows are read-only, recovery rows omit Resume, and Release requires confirmation. ✅ Focused coverage — Added tests cover cancellation consent, visibility gating, and failed background reads. The supplied current-head checks report 16 passed and no failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F2: 🔴 Invalidate Release consent when attempts change
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation is focused and current checks pass, but Release consent needs the same attempt-isolation protection already implemented for cancelled-work publication. This is a localized correctness blocker. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit da590e9
Summary of ChangesI fixed F2: if the follow-up on a pull request changes while a Release decision is pending, that decision no longer carries over to the new attempt. The 25 What changed (
New tests (
I also ran the tests against the previous component: the four tests for the bug fail there, and the "same attempt" test passes on both versions, as it should. Separate finding, not changed: reads can finish out of order. A slow background poll that started before an action can finish after the action's own refresh and put back the older rows. This comes from the existing polling design rather than F2; it can't release the wrong attempt, because Release is checked against whatever was loaded last. Fixing it would mean ignoring responses from older reads, which I left alone since it wasn't selected. I didn't add previews: the only visible difference is the dialog closing with a message during a background refresh, which is an edge case. Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +78/−3 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…e a Release decision is pending, that decision no longer carries over to the new attempt. The 25 `MaintenanceSection` unit tests, all 34 Settings unit test files, lint (zero warnings), typecheck and the Playwright `held-followups.pw.ts` suite at 1440 and 390 pass.
I fixed F2: if the follow-up on a pull request changes while a Release decision is pending, that decision no longer carries over to the new attempt. The 25 `MaintenanceSection` unit tests, all 34 Settings unit test files, lint (zero warnings), typecheck and the Playwright `held-followups.pw.ts` suite at 1440 and 390 pass.
**What changed** (`MaintenanceSection.tsx`)
- **The "unpublished work" checkbox** now belongs to one attempt (the same per-attempt key the "Publish the cancelled work" choice uses), not just the pull request. After every successful refresh it is cleared unless that same attempt is still listed and not released. So if attempt B replaces A, B's checkbox starts unticked and Release on B is not forced.
- **An open Release dialog** belongs to the attempt it was opened for. If a refresh (such as the 60-second poll) shows that attempt replaced, released or gone, the dialog closes and the page says: "integry/propr#N changed while you were deciding. Nothing was released; check it and choose again."
- **Before Release is sent**, it is checked against the latest successful read. If the attempt it was confirmed for is no longer the open one, nothing is sent and the same message appears.
**New tests** (`MaintenanceSection.test.tsx`, using fake timers to trigger the 60-second poll):
- A ticked "unpublished work" box on attempt A, then a poll returns attempt B: B's box is unticked and Release sends `{ force: false }`.
- An open dialog for A, with a poll where A is replaced by B, released, or gone: the dialog closes, the message appears, and Release is never called.
- An open dialog while the same attempt stays open: the dialog survives the poll and still releases with `force: true`.
I also ran the tests against the previous component: the four tests for the bug fail there, and the "same attempt" test passes on both versions, as it should.
**Separate finding, not changed:** reads can finish out of order. A slow background poll that started before an action can finish after the action's own refresh and put back the older rows. This comes from the existing polling design rather than F2; it can't release the wrong attempt, because Release is checked against whatever was loaded last. Fixing it would mean ignoring responses from older reads, which I left alone since it wasn't selected.
I didn't add previews: the only visible difference is the dialog closing with a message during a background refresh, which is an edge case.
PR: #3615
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
/ultrafix goal=8 max=4 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 4) First action:
|
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR substantially delivers the Maintenance UI improvements, but needs a localized fix for overlapping list requests before merge. ✅ Explicit operator choices — Cancelled-work publication requires a checkbox, Release requires confirmation, and observed attempt replacements clear consent. ✅ Clearer presentation — Released follow-ups are collapsed and read-only; labels replace server terminology; storage categories and protection reasons have readable names. ✅ Focused coverage — Added tests cover visibility gating, confirmation withdrawal, consent reset, and retained rows after refresh failures. Current-head checks report 16 passed, none failed or pending. This review is based on static inspection of the supplied code; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F3: 🔴 Prevent stale reads from restoring obsolete actions
SuggestionsThese are optional follow-ups and are not sent to No suggestions. ScoreThe implementation is focused and well covered, with passing current-head checks. The newly introduced response-ordering defect can restore obsolete action targets and should be fixed before merge. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
❌ ProPR could not start on The ProPR worker refused the job because the disk that holds its working copies is nearly full. Nothing was changed on this pull request. Once space has been freed on the worker host, post the command again. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR improves Maintenance wording, visibility, and confirmation flows, but needs a localized correction to asynchronous list updates before merge. ✅ Explicit decisions — Cancelled publication requires a checkbox, and Release opens a confirmation dialog. ✅ Attempt-specific consent — Successful refreshes clear choices when the corresponding attempt disappears or changes. ✅ Focused coverage — Added tests cover visibility gating, released-row filtering, confirmation withdrawal, and background failures. Current checks report 16 passed, none failed or pending. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F4: 🔴 Older reads can restore obsolete actions
SuggestionsThese are optional follow-ups and are not sent to S3: 🟢 Distinguish retry-owned cancellation choices
ScoreThe implementation is focused and well covered, with passing current checks. The overlapping-read defect requires correction because it can misdirect an explicit publication decision. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 532274a
Summary of ChangesI fixed F3 and F4. A list read that has been overtaken by a newer read or by an action can no longer change the held follow-ups section. Both fixes are in Fix: each list read is now numbered, and only the newest one may write anything. It can't update the rows,
The refresh after each action is a newer read, so it always wins. Release still checks One race is left, and it is unavoidable. A poll that starts while an action is still running can briefly show the state from before the action. The buttons are disabled at that point, and the action's own refresh replaces it. Regression tests (in
All three fail on the previous code and pass now. Checks: all of these pass:
There is no visible change, so I didn't make previews. Review digestRisk-tiered paths
Validation evidence
Diff size: 2 files changed, +92/−6 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
… newer read or by an action can no longer change the held follow-ups section. Both fixes are in `propr-ui/src/pages/SettingsPage/MaintenanceSection.tsx`. I fixed F3 and F4. A list read that has been overtaken by a newer read or by an action can no longer change the held follow-ups section. Both fixes are in `propr-ui/src/pages/SettingsPage/MaintenanceSection.tsx`. **Fix:** each list read is now numbered, and only the newest one may write anything. It can't update the rows, `latest.current`, either consent choice, or the first-load error. Anything still outstanding is dropped: - when Resume or Release starts (in `run`), so a poll that began before the action can't bring back what the action changed (F3). - when the section stops being visible, so a read from before a category switch can't overwrite the read made on return (F4). The refresh after each action is a newer read, so it always wins. Release still checks `latest.current` before sending, and only the newest read can set that now. So a row brought back by a stale read can no longer send a Release to a later attempt. One race is left, and it is unavoidable. A poll that starts while an action is still running can briefly show the state from before the action. The buttons are disabled at that point, and the action's own refresh replaces it. **Regression tests** (in `MaintenanceSection.test.tsx`), each holding an older response back until a newer one has landed: - **F3:** a poll is held, Release goes through and its refresh shows nothing held, then the old poll answers. The released row and its Release button stay gone. - **F4:** a poll is held, the user switches category and back, the newer read shows the later cancelled attempt, then the old poll answers with the earlier one. The later attempt stays, its "Publish the cancelled work" box is unticked, and Resume sends no `authorizeCancelled`. - A first read that is overtaken and then fails doesn't show its error. All three fail on the previous code and pass now. **Checks:** all of these pass: - all 34 Settings unit test files (317 tests). - ESLint with zero warnings. - `tsc --noEmit`. - the Playwright `held-followups.pw.ts` suite at 1440 and 390. There is no visible change, so I didn't make previews. PR: #3615 Comment by: @propr-ultrafix (ID: 0) Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR substantially improves Maintenance usability, but needs a targeted correction before merge: the new cancellation authorization can apply to a different attempt than the administrator selected. ✅ Clearer decisions — Released follow-ups are read-only, recovery rows omit Resume, and Release requires confirmation. ✅ Read ordering protections — Generation checks prevent superseded list responses from restoring obsolete rows or consent. ✅ Focused coverage — Added tests exercise cancellation choices, replacement attempts, confirmation withdrawal, and background failures. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F5: 🔴 Bind cancellation authorization to the selected attempt
SuggestionsThese are optional follow-ups and are not sent to S4: 🟢 Skip hidden post-action reads
ScoreThe presentation changes and asynchronous-response tests are strong, but cancellation consent still lacks server-enforced attempt binding. Supplied current-head checks show 15 passed, none failed, and one pending; this review used static analysis only, as requested. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 8a50dd8
Summary of ChangesI've fixed F5. Consent to publish cancelled work is now tied to the attempt it was ticked for, and the server checks this, not just the screen. The scenario from the finding (A ticked, a new command swaps in B before the next read, then Resume) now gets a refusal: B is not authorized and no recovery runs. What changed
New tests
Checks run
Found separately, not changed (outside this PR's scope): three other ways to authorize cancelled work still send no attempt id, so they act on whatever handoff is current: the CLI ( Review digestRisk-tiered paths
Validation evidence
Diff size: 12 files changed, +161/−20 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…d to the attempt it was ticked for, and the server checks this, not just the screen. The scenario from the finding (A ticked, a new command swaps in B before the next read, then Resume) now gets a refusal: B is not authorized and no recovery runs.
I've fixed F5. Consent to publish cancelled work is now tied to the attempt it was ticked for, and the server checks this, not just the screen. The scenario from the finding (A ticked, a new command swaps in B before the next read, then Resume) now gets a refusal: B is not authorized and no recovery runs.
**What changed**
- **Server check** (`src/jobs/followupHandoffOperator.ts`): `authorizeCancelledFollowupHandoff` takes an optional `expectedTaskId`. It refuses when the pull request's current handoff belongs to a different task. It checks this both on the first read and on the row re-read while holding the pull request's lease, so a replacement that lands just before the call can't pick up the consent.
- **Route** (`packages/api/routes/followupHandoffRoutes.ts`): the resume request accepts an optional `taskId` string (1–200 characters, otherwise 400) and passes it on. When the authorization is refused and the current task differs from `taskId`, the reply is 409 with code `superseded`, and no recovery runs. That second read only picks the wording; the refusal itself was already decided under the lease.
- **API docs**: `taskId` is added to `FollowupHandoffResumeRequest` and to the 400/409 descriptions. I regenerated the OpenAPI file and the client types.
- **UI**: an authorized Resume now sends `{ authorizeCancelled: true, taskId }` (`propr-ui/src/api/followupHandoffsApi.ts`). If the server answers `superseded`, `MaintenanceSection.tsx` shows "This follow-up changed in the meantime. Check the list and try again." It clears the ticked box even if the next list read fails, and the existing re-read after every action refreshes the list. The administrator has to tick the box again.
**New tests**
- **Operator:** a mismatched task id is refused, leaving the row held, unauthorized and with no lease left behind. A matching one is authorized. A replacement made while the lease is being taken is refused.
- **Route:** `taskId` is passed through, a mismatch gives `superseded` with no recovery pass, and bad `taskId` values give 400.
- **UI:** the request names the ticked attempt. After `superseded`, the box is unticked whether the re-read shows the replacement or fails, and the next Resume sends no authorization. I also updated the existing expectations in the unit tests and in `held-followups.pw.ts`.
- **Negative checks:** with the server's task-id comparison disabled, the operator mismatch test fails. With the UI's handling of `superseded` removed, the failed-re-read case fails. One caveat: the replacement-during-lease test also passes without the new comparison, because the lease's existing check on the re-read row already catches a task change.
**Checks run**
- **Passing:**
- the operator serialization, cancelled-claims and recovery tests (80 of 80)
- the route tests (11 of 11)
- the API's `openapiRouteCoverage` suite
- all 34 Settings unit test files (319 tests)
- `held-followups.pw.ts` at 1440 and 390
- lint with zero warnings on every changed file
- typecheck for the root, the API package and the UI
- `gen:openapi:check`
- **Hang at exit:** `mcpMaintenance` (2 tests) and `openapiResponseConformance` (11 tests) pass every test, then the process doesn't exit before the timeout. This is the usual exit hang in the API package's node tests, not a failure.
- **Size limits:** two files went over the 400-line lint limit, so I folded the new schema field onto the existing object line and merged the two new UI tests into one table-driven test.
`taskId` is optional, so existing clients keep working. No previews, since the only visible change is an existing message shown in a rare race.
**Found separately, not changed (outside this PR's scope):** three other ways to authorize cancelled work still send no attempt id, so they act on whatever handoff is current: the CLI (`packages/cli/src/api/followupHandoffs.ts`), the MCP `resume_followup_handoff` tool (`packages/api/mcp/toolsMaintenance.ts`) and `scripts/followup-handoff-recovery.ts --authorize-cancelled`. They can use the new `taskId` / `expectedTaskId` whenever you choose to tighten them.
PR: #3615
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR substantially delivers the Maintenance UI improvements, but the new Release confirmation does not reliably bind the decision to the displayed attempt. A localized correction is needed before merge. ✅ Cancellation consent is fenced — Resume sends the selected task ID, and authorization checks it again on the row read under the PR lease. ✅ Stale reads are discarded — Request generations prevent older list responses from overwriting newer results or restoring rows after an action. ✅ Focused regression coverage — Added tests cover visibility-gated loading, replacement attempts, cancellation consent, and out-of-order responses. This review used static analysis of the supplied code; no commands were run. The supplied current-head status reports 28 passed checks, no failures, and one pending check. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F6: 🔴 Bind Release confirmation to its attempt
SuggestionsThese are optional follow-ups and are not sent to S5: 🟢 Avoid promising unchanged stateThe new generic error text in ScoreThe implementation has substantial targeted coverage and useful concurrency protections, but Release still needs server-side attempt binding to make the new confirmation reliable. Current checks show no failures. 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit 691b397
Summary of ChangesI've fixed F6. A Release confirmed for one attempt can no longer release a different attempt on the same pull request. The request now names the attempt that was confirmed, and the server refuses it for any other. The scenario from the finding (A confirmed, A released elsewhere, B created and held, then the dialog is confirmed without a list read in between) now gets a What changed
New tests
Checks run, all passing
No previews: the only visible change is an existing message shown in a rare race. Found separately, not changed (outside this PR's scope): three other ways to release still send no attempt id, so they act on whatever handoff is current:
They can pass Review digestRisk-tiered paths
Validation evidence
Diff size: 13 files changed, +189/−20 lines 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…onger release a different attempt on the same pull request. The request now names the attempt that was confirmed, and the server refuses it for any other. The scenario from the finding (A confirmed, A released elsewhere, B created and held, then the dialog is confirmed without a list read in between) now gets a `superseded` refusal and B stays held.
I've fixed F6. A Release confirmed for one attempt can no longer release a different attempt on the same pull request. The request now names the attempt that was confirmed, and the server refuses it for any other. The scenario from the finding (A confirmed, A released elsewhere, B created and held, then the dialog is confirmed without a list read in between) now gets a `superseded` refusal and B stays held.
**What changed**
- **Server check** (`src/jobs/followupHandoffOperator.ts`): `releaseFollowupHandoffRecord` takes an optional `expectedTaskId`. If the current handoff belongs to a different task, it returns `superseded` before anything else runs: no liveness check, no failed-closed record, no worktree change and no lease. It also checks the row it re-reads under the release lease. The check comes before the "already released" shortcut, so consent for A can't be reported as a release of B.
- **Route** (`packages/api/routes/followupHandoffRoutes.ts`): the release request accepts an optional `taskId`, validated the same way as on resume (bad values get 400), and passes it through. A mismatch answers 409 `{ released: false, reason: 'superseded' }`. Without `taskId`, nothing changes, so existing callers keep working.
- **API docs**: `taskId` is added to `FollowupHandoffReleaseRequest` and to the 400/409 descriptions. I regenerated the OpenAPI file and the client types, and `gen:openapi:check` passes.
- **UI**: `releaseFollowupHandoff` sends `taskId`, and `MaintenanceSection.tsx` passes the confirmed attempt's id. On `superseded` it shows the existing "…changed while you were deciding. Nothing was released; check it and choose again." It also unticks that attempt's force box, even if the next list read fails.
**New tests**
- **Operator:** the finding's sequence on a real row is refused with no side effects, then a release naming B works. A second test replaces the attempt while the release takes the lease, and that is refused too.
- **Route:** `taskId` is passed through, a mismatch gives `superseded`, and invalid ids give 400 without reaching the release.
- **UI:** a new `MaintenanceSection.release.test.tsx` covers a replacement no read ever shows, because the re-read after the action fails too. The request names A, the stale message appears and the force box is unticked. It's a separate file because adding it to `MaintenanceSection.test.tsx` put that file over the 400-line limit. I also updated four existing release expectations there and one in `held-followups.pw.ts`.
- **Negative checks:** with the server's task-id comparison disabled, the operator test fails. With `taskId` removed from the UI request, the new UI test fails, and so does the UI test with the `superseded` handling removed. As with F5, the replacement-during-lease test also passes without the new code, because the lease's existing re-read check already catches a task change.
**Checks run, all passing**
- the operator serialization suite (9) and the cancelled-claims, recovery and usage-limit suites (85)
- the route tests (12) and `openapiRouteCoverage`
- all 35 Settings unit test files (320 tests)
- `held-followups.pw.ts` (3 tests)
- lint with zero warnings on every changed file, and typecheck for the root, API package and UI
No previews: the only visible change is an existing message shown in a rare race.
**Found separately, not changed (outside this PR's scope):** three other ways to release still send no attempt id, so they act on whatever handoff is current:
- the CLI's `releaseFollowupHandoff` (`packages/cli/src/api/followupHandoffs.ts`)
- the MCP release tool (`packages/api/mcp/toolsMaintenance.ts`)
- `scripts/followup-handoff-recovery.ts` release
They can pass `taskId` / `expectedTaskId` whenever you want to tighten them. The automatic releases (stale-hold and closed-PR) are system-driven, not operator consent, and I left them alone.
PR: #3615
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
|
|
/ultrafix goal=8 max=3 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 3) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR is merge-ready within the reviewed scope. It improves Maintenance usability and adds focused protection against applying release or cancellation consent to a replacement attempt. ✅ Attempt-bound consent — Release and cancelled-work authorization validate the selected task ID before mutation and again under the operator lease. ✅ Stale-response protection — List generations prevent obsolete reads from restoring replaced rows or consent; regression tests cover these orderings. ✅ Focused UI coverage — Tests cover visibility-gated loading, release confirmation, cancelled-work authorization, released-row filtering, and mobile inventory layout. This assessment is based on static review of the supplied diff and context. No commands were run. The authoritative current-head status reports 29 passed checks, no failures or pending checks, and 16 neutral/skipped checks. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S6: 🟢 Clarify where released commits remainIn ScoreThe implementation addresses the requested UI behavior with substantial regression coverage and guarded server mutations. Static review found no demonstrated merge blockers, and current-head checks have no failures. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3602
Branch:
3602/claude-opus-5-5-settings-maintenance-held-20261117-0125-3f2Commits: ✅ Changes committed (cba7f73)
AI Processing Completed
Execution Details:
Summary:
I've implemented all eight points from issue #3602. Unit tests (the 38 Settings files plus the loading-state check), lint and typecheck pass, and so do the Playwright suites for held follow-ups, Instance data and the Settings layout. I didn't change the handoff API, the CLI output or what Resume/Release do on the server.
Held follow-ups (
MaintenanceSection.tsx)authorizeCancelled: trueonly when it's ticked. No CLI flag appears anywhere in the UI.heldFollowupText.ts./tasks/:idand the worktree path is gone. Times show as relative ("3 hrs ago") using the task list's formatter, with the full date in a tooltip. I didn't find a single app-wide relative/absolute formatter, so the task list's one is the closest match.AgentConfirmDialog. The force checkbox reads "Also release if it has unpublished work", and its refusal uses the wording from the issue.ListSkeleton. Later reads are silent: after each action, and every 60 seconds while the section is on screen. If a later read fails, the last rows stay. The Refresh button is gone.settingsSectionVisibility.tstells each section whether it is on screen (SettingsNavigation.tsxprovides it). The list is now fetched only when Maintenance is open or a search shows the section.Instance data (
InstanceStorageSection.tsx)e2e/instance-storage.pw.ts, which tested sideways scrolling and swiping of the table: it now checks that the inventory fits the screen. I also updated its expected cleanup message.Also changed
followupHandoffsApi.ts): the server's refusal codes are mapped to plain messages, and the server's own CLI-oriented error text is no longer shown.docs/docs/operations/maintenance.mdthat quoted the old checkbox text.e2e/held-followups.pw.tsruns at 1440 and 390 and checks that nothing is requested from another category. It also checks the order, the hidden server path and CLI flag, the release dialog with its refusal, and Resume with the checkbox ticked.The previews show the held follow-ups list and the Release dialog at 1440 and 390, and Instance data at desktop and 390.
Review digest
Risk-tiered paths
propr-ui/src/api/followupHandoffsApi.ts(+30/−17)propr-ui/src/pages/SettingsPage/InstanceStorageSection.tsx(+30/−10)propr-ui/src/pages/SettingsPage/MaintenanceSection.tsx(+163/−90)propr-ui/src/pages/SettingsPage/SettingsNavigation.tsx(+4/−1)propr-ui/src/pages/SettingsPage/heldFollowupText.ts(added, +103/−0)propr-ui/src/pages/SettingsPage/settingsCategoryGuides.ts(+1/−1)propr-ui/src/pages/SettingsPage/settingsDataSections.tsx(+12/−11)propr-ui/src/pages/SettingsPage/settingsSectionVisibility.ts(added, +11/−0)docs/docs/operations/maintenance.md(+1/−1)propr-ui/e2e/held-followups.pw.ts(added, +134/−0)propr-ui/e2e/instance-storage.pw.ts(+14/−38)propr-ui/src/pages/SettingsPage/InstanceStorageSection.test.tsx(+5/−5)propr-ui/src/pages/SettingsPage/MaintenanceSection.test.tsx(+156/−31)Validation evidence
Diff size: 13 files changed, +664/−205 lines
Detailed Logs:
fe521f14-9303-4b69-b3cf-18a79350df57Log files stored at:
/usr/src/app/logs/executions/issue-3602-2026-11-17T01-44-23-897Z-conversation.json/usr/src/app/logs/executions/issue-3602-2026-11-17T01-44-23-897Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3602.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!
Visual preview
Held follow-ups — 1440px
Settings → Maintenance at 1440px: two held follow-ups with plain reasons and next steps, the cancelled one offering “Publish the cancelled work”, and the released ones expanded read-only.
Full-size original
Held follow-ups — 390px
Settings → Maintenance at 390px: two held follow-ups with plain reasons and next steps, the cancelled one offering “Publish the cancelled work”, and the released ones expanded read-only.
Full-size original
Release confirmation — 1440px
Release asks for confirmation before it unblocks the pull request.
Full-size original
Release confirmation — 390px
Release asks for confirmation before it unblocks the pull request.
Full-size original
Instance data — desktop
Instance data at desktop width with shortened texts and labelled categories and protection reasons.
Full-size original
Instance data — mobile
Instance data at 390px: shortened texts, labelled categories and protection reasons, and the inventory reflowed into stacked rows instead of an off-screen column.
Full-size original