Skip to content

fix(dashboard): report a partial Older Sessions Delete all - #20807

Merged
chenmingwei23 merged 1 commit into
mainfrom
fix/13083-delete-all-partial-failure
Oct 16, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
fix/13083-delete-all-partial-failure

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: When the Older Sessions "Delete all" leaves sessions on disk, the dashboard says so instead of looking like it worked.

"Delete all" in the Older Sessions pane always looked like a success. The gateway answers DELETE /api/sessions with 200 and puts the outcome in the body (ok, failed, undeletable). The sidebar never read that body. And ok was failed == 0, so a row reported in undeletable still gave ok: true.

Why it matters

The reader asked to delete their closed sessions forever, and the confirm dialog says it cannot be undone. When some stay on disk, a silent "success" is worse than a visible failure: they have no way to tell, and no hint of the remedy.

Not a goal

  • Changing which rows the bulk delete takes, skips or refuses.
  • Giving failed rows an id in the response.
  • A new notice component: the existing refused-delete notice is reused.

What changed (motivation → approach → change)

A partial or refused "Delete all" now shows the same notice a refused single delete shows, above the chat.

Delete all outcome What the reader sees, one line per part
everything deleted nothing new
one named row left the single-delete sentence for that row, with its remedy; when others were deleted, the count line first
several rows left "N older sessions were not deleted." (plus "M were deleted." when some went) / up to three named rows' sentences / "To retry, press Delete all again." when a left row is not named
refused: cron store unreadable "Could not delete the older sessions: …" with the repair step
refused: anything else "Could not delete the older sessions. Press Delete all to try again."

Root cause: the click handler awaited api.clearSessions() and moved on, so a 200 shortfall read as success; and the gateway's ok ignored undeletable.

The fix has two parts. In dashboard/handlers/sessions.py, ok is now failed == 0 and not undeletable. In the dashboard, a new clearHistorySessions thunk (store/chat/lifecycle.ts) reads the body and rejects with a value on either failure, into the existing undeletableHistory state. historyDeleteRefusalMessage (utils/historyDeleteRefusal.ts) renders it, so a left-behind row reads like the single delete. Five new strings go to every locale catalog, worded with each locale’s own "Older sessions" and button labels (pluralKeys.json lists the two plural ones; the deleted-count variant reads cleared from the 200 body). The spec line in learn-cron-dashboard.md names the ok rule.

Backwards compatibility

Breaking: DELETE /api/sessions now answers ok: false when undeletable is not empty (it was true). Writer sweep on origin/main @ a790373: the only caller is website/src/api/client/sessions.ts clearSessions, used once by ChatSidebar.tsx, which this PR changes to read ok. No CLI, MCP tool or app calls it. The tests pinning the old value (test/test_dashboard_sessions_clear.py, test/test_remove_slot_for_history_key_owner_sweep.py) are updated.

Removes nothing: no key, row, route or field is removed; one boolean's value narrows.

Tests

  • test/test_dashboard_sessions_clear.py, test/test_remove_slot_for_history_key_owner_sweep.py: a clear with an undeletable row answers ok: false. prove.py: PROVEN (red with the old ok).
  • website/src/test/ChatSliceCoverageSecondPass.test.tsx: clearHistorySessions records nothing on full success; names rows and counts failed on a 200 shortfall; records a refused request by code; clears the notice on the next attempt.
  • website/src/test/historyDeleteRefusal.test.ts: each bulk sentence, plural forms, the deleted-count opening line, the unreadable remedy on a refused request, the three-row cap, one part per line, and the retry line only for rows not named, and the one-row case equal to the single delete.
  • website/src/test/ChatSidebarCoverage.test.tsx: clicking "Delete all" with a 200 shortfall sets the notice. Red on the old handler, green on the fix.
  • website/src/store/chatSlice.ownership.test.ts, website/src/store/chatSlice.publicSurface.test.ts: pin the new clearHistorySessions export and its chat/clearHistorySessions action type.
  • Locale style gates (src/i18n/style/*Style.test.ts, run with I18N_BASE_REF): the new strings keep each locale’s informal register and the fr U+202F spacing.

Determinism: the changed frontend files passed 3 shuffled runs (--sequence.shuffle, seeds 11/22/33, 170/170 each). The two backend files passed 3 repeats under xdist and one shuffled node-id order (72/72 each). No timers, sleeps or wall clocks in the new tests.

Manual verification

Rendered the real built SPA with stubbed /api/** (no gateway), same technique as scripts/capture-history-delete-refusal.mjs: opened Older sessions, clicked "Delete all", accepted the confirm. Checked three answers: a several-row shortfall, a one-row shortfall, and a refused request. Each rendered the notice text in the table above.

Screenshots / video

Several rows left behind (2 deleted, 2 failed, 1 undeletable), one part per line:

Delete all left three sessions

One named row left behind while two were deleted:

Delete all left one session

Whole request refused with no known cause:

Delete all refused

Whole request refused because the cron store could not be read:

Delete all refused, cron store unreadable

Related Issues

Closes #13083

Pattern harvest

Rule candidate: review-prompt
Pattern: a client awaits an endpoint that answers 200 with its own ok: false outcome and never reads the body.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 15, 2026 11:49
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (8 items) — 8 justified

Intent: when "Delete all" in Older Sessions leaves sessions on disk, the person who clicked it finds out instead of seeing a fake success. FIX (closes #13083).

  1. A "Delete all" that left sessions behind now shows a notice above the chat — justified
  2. The gateway's DELETE /api/sessions answers ok: false when any row was undeletable; its one consumer is clearHistorySessions (via sessions.ts:100) — justified
  3. A refused "Delete all" (non-2xx) now shows a notice instead of failing silently — justified
  4. Up to three left-behind rows are named, each with its single-delete remedy — justified
  5. A "M were deleted" count joins the not-deleted line when some sessions went — justified
  6. A retry line appears when some left-behind row is not named — justified
  7. Starting a new "Delete all" clears the previous refused-delete notice — justified
  8. The learn-cron-dashboard spec states the new ok rule — justified

[FIRST-PRINCIPLES-REVIEWED] bd42c46

Description read

[DESCRIPTION-READ] a80f3077bfeb2e0a0bfde94f39c9851917c68682057ef7e24c9ead31af839e20

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm that the agent hand-off from a "Delete all" notice works without a session key; the 200-shortfall refusal has key: '' and no report.

[DESIGN-REVIEWED] bd42c46

Description read

[DESCRIPTION-READ] 997852b59ed5aa69be5142269de751886aed6b006a2f7e790cd857091ca999fa

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

The several-row notice doesn't tell readers which fix applies: it gives one reason for three kept sessions, then says both "repair first" and "just press Delete all again."

Watch

  • Two of the three kept sessions get no reason, and the advice conflicts. Rows the server returns without an id are only counted. They get the generic retry_delete_all line ("To retry, press Delete all again."), which sits right under a named row's "repair …, then delete again." In shot-01 the blind reader "can't tell whether pressing it again without fixing anything is useful" and found "3 were not deleted, but only one reason is given." Every partial clear with unnamed rows shows this. The user either retries uselessly or gives up on rows a retry would clear. Fix: tie the retry line to the unnamed rows, e.g. "2 others could not be deleted for another reason. Press Delete all to retry them."
  • The new cron-store string uses a term users don't know and gives them no way to act on it. "Repair the cron store, then delete again" names an internal file and offers no route to fix it. In shot-04 the reader had "no idea how to 'repair the cron store'… There's no button to repair anything." This only appears on a rare failure, but when it does the user is stuck. Fix: say what is broken and point to the agent hand-off, e.g. "Could not delete the older sessions: the scheduled-jobs file could not be read. Use Ask the agent to repair it, then press Delete all again."

Suggestions

  • closed_sessions_not_deleted + older_sessions_deleted_count: put the success first and name the button's scope, e.g. "2 older sessions were deleted; 3 were not." Then the kept sessions read as the remainder of the same action.

[UX-REVIEWED] bd42c46

Description read

[DESCRIPTION-READ] 3ec52b1793be8346d3389e20cf69f2f2349e9457f0b478a535f0b51ae78cc517

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] bd42c46

Verdict parsed from the review's SHA-scoped output markers for commit bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2.

False positive or not applicable? A repository writer can comment:
/ai-review override fable bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] bd42c46

False positive or not applicable? A repository writer can comment:
/ai-review override gpt bd42c461f212c1f0bdd24ab081e3f9d3211ae8d2: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 15, 2026
@iamwhatever
iamwhatever force-pushed the fix/13083-delete-all-partial-failure branch from 11b3586 to c638b88 Compare October 15, 2026 12:33
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Check before merge: the narrower ok on DELETE /api/sessions is a wire change.

rebutted (already satisfied): the writer sweep is re-run on fresh origin/main 8f07eea. The only reader of the DELETE response is website/src/api/client/sessions.ts clearSessions, called once by ChatSidebar.tsx, which this PR changes to read ok.
pod-e2e.sh:593 is a GET auth probe, not a reader of this body. The body's Backwards compatibility section carries the Breaking: line and sweep.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 15, 2026
@iamwhatever

iamwhatever commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: retry sentence for left-behind rows the notice does not name

  • span=6fe651e7fa66 Two of the three left-behind sessions get no reason or remedy.

fixed in c638b88: bulkDeleteRefusalMessage (website/src/utils/historyDeleteRefusal.ts) now adds "N more could not be deleted. Try Delete all again." for every row the named sentences do not cover (left - named), which covers unnamed failed rows and rows past the 3-row cap.
With no named row at all, the count sentence ends with "Try Delete all again." instead. The one-named-row case still reads exactly like the single delete.
Tests: historyDeleteRefusal.test.ts covers unnamed-only, past-the-cap plus failed, one named of three, and all-named (no "more" sentence).

@iamwhatever

iamwhatever commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: bulk notice strings

  • span=1eccb9034cb1 The new strings say "closed sessions" but the pane is labelled "Older Sessions".

fixed in c638b88: every bulk notice string now says "older sessions", in each of the 13 catalogs using that locale's own pages.chatSidebar.older_sessions term, so it matches the pane heading the reader clicked.
The retry sentence names each locale's own pages.chatSidebar.clear button label rather than a literal "Delete all".

@iamwhatever

iamwhatever commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: bulk cron-store-busy refusal string

  • span=658729c68900 could_not_delete_closed_sessions_cron_store_busy: drop the mechanism clause.

fixed in c638b88: the busy sentence now reads "Could not delete the older sessions right now. Try again in a moment." in English, translated likewise in every catalog.
The unreadable sentence keeps "cron store": its remedy is to repair that file, so the reader needs its name to act.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=d1aceaf11585 The rows that stayed behind look like every other row.

rebutted (out of goal): the frozen goal is that a partial "Delete all" says so instead of looking like it worked. The notice names each left-behind row by its sidebar title, the same way the single delete's notice does from the same site, so the reader can match it to the list.
Marking rows in Older Sessions, or moving the notice next to its header, is a new sidebar surface and a UI-placement change this PR's goal does not settle. The refused single delete has the same placement today; a change there should cover both deletes together, in its own PR.

@iamwhatever
iamwhatever force-pushed the fix/13083-delete-all-partial-failure branch from c638b88 to 6af05e8 Compare October 15, 2026 12:57
@iamwhatever

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: one line per part of the bulk notice

  • span=9a434f3d184b Several failures run together as one paragraph.

fixed in 6af05e8: bulkDeleteRefusalMessage (website/src/utils/historyDeleteRefusal.ts) joins the parts with a line break, and ErrorNotice renders its message with whitespace-pre-wrap. The count is the first line, each named row's sentence its own line, and the retry its own last line.
The one-named-row case is unchanged and still equals the single delete. Tests pin one line per part.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: retry sentence wording

  • span=e8e31d992605 The reader won't follow the retry advice.

fixed in 6af05e8: the retry now says what a retry does: "N more could not be deleted. Delete all asks first, then tries only the sessions still listed." Both facts hold in code: clearClosedSessionsWithConfirm always calls confirm() first, and the clear acts on the closed sessions still in the list.
It does not guess why the unnamed rows failed: the gateway reports them only as a count, with no cause.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: generic bulk refusal next step

  • span=f1f458aad602 could_not_delete_closed_sessions has no next step.

fixed in 6af05e8: a refused request with no recognised cause now reads "Could not delete the older sessions." followed by the retry line on its own line. The busy and unreadable refusals keep their own remedies.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Check by hand that a cron_ownership_unknown row left by "Delete all" still shows the single-delete remedy once the history refresh drops it.

rebutted (holds as written): clearClosedSessionsWithConfirm (website/src/pages/ChatSidebar.tsx) awaits clearHistorySessions() before it dispatches fetchHistory(false), and the thunk (website/src/store/chat/lifecycle.ts) reads each row's title from chat.history before any refetch and stores it in the rejected payload's bulk.rows.
fetchHistory.fulfilled never touches undeletableHistory; only the next Delete all (pending) or a dismiss clears it, and ChatPaneNotices.tsx renders from that stored payload. The row is still on disk, so the refresh keeps it listed.
A row outside the loaded history pages has no title and falls back to its key; its remedy sentence still renders.

@iamwhatever
iamwhatever force-pushed the fix/13083-delete-all-partial-failure branch from 6af05e8 to 59cbca3 Compare October 15, 2026 13:23
@iamwhatever

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: single retry line (replaces two retry sentences)

  • span=2b364a4a9463 Retry sentence fails the cold read.

fixed in 59cbca3: one retry line, in the lane's suggested words: "To retry, press Delete all again. It only tries the sessions still listed." It replaces both earlier retry sentences, and shows only when a left-behind row is not named.
Each locale names its own button label (es «Borrar», the label of pages.chatSidebar.clear in es.json).
Retrospective at round 3: the earlier two retry sentences (round 0 and round 1 wording) were removed rather than reworded again; the class is one retry line, worded by the lane.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

self-added: yes
mechanism: deleted-count opening line from the 200 body's cleared

  • span=62bf4a81a5ac The notice doesn't say whether anything was deleted.

fixed in 59cbca3: when the clear deleted some sessions (cleared > 0 in the 200 body, carried into the notice by clearHistorySessions), the first line reads "N older sessions were not deleted. The others were deleted."

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=250a85114568 Change try_delete_all_again to "To retry, press Delete all again. It only tries the sessions still listed."

fixed in 59cbca3: adopted word for word as the single retry_delete_all line; try_delete_all_again and the separate more_older_sessions_not_deleted_* sentence are removed.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=abc55d3464c1 When some sessions were deleted, open the bulk notice with how many: "Deleted N older sessions; 3 were not deleted."

rebutted (disproportional): the same answer ships with one count. "N older sessions were not deleted. The others were deleted." tells the reader something was deleted, and the list shows what is left.
Two counts in one sentence would need two plural forms in each of 13 catalogs for the same fact, on a rare path.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=e5bc8c9b85f7 The retry line conflicts with the named remedy.

rebutted (deliberate, by case; same as span=6088115bdc6f and span=e3165ff2fcf1): the retry line is added only when left > named.length, so it is there for the unnamed failed rows, which have no known cause. The named row keeps its own fix-first sentence. Shot-02, with only a named row, shows no retry line. Final wording is a maintainer call at review.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=fe5859373706 The cron-store remedy gives no way to act.

rebutted (matches the single delete): same as span=6ed2b38595cf, span=15c2bb3e486a and span=69ff0a9b7f33. The remedy is the single delete's own could_not_delete_cron_store_unreadable wording, reused so both deletes agree. A plainer cron-store remedy should change both together, outside this PR's goal. "Ask the agent" hands over the error report.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Check that a bulk-delete notice left over in undeletableHistory can't be mistaken for a later single-delete refusal; both now write the same slot.

rebutted (holds as written): both deleteHistorySession.pending and clearHistorySessions.pending set undeletableHistory = null (store/chat/lifecycle.ts), so a leftover bulk notice is gone the moment a single delete starts. Only that delete's own refusal can then fill the slot.
The two shapes also read differently: the bulk notice leads with the count line, and a single refusal is one sentence naming its row.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Check before merge: the DELETE /api/sessions ok value now narrows to false when undeletable is non-empty. The only in-repo caller (clearSessions) is updated; outside scripts reading it are unverified.

rebutted (no outside reader to break; same as at fc8482e and 7872625): api_sessions_clear refuses app callers first (_app_bulk_history_refusal), the route sits behind the gateway's token auth with no documented public API, CLI or MCP tool, and the dashboard bundle from the same build is its only reader.
A client that read ok: true as success was already misled when rows stayed on disk.

@iamwhatever
iamwhatever force-pushed the fix/13083-delete-all-partial-failure branch from eb37384 to 770fa1d Compare October 16, 2026 03:12
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased onto origin/main b9d1104c74 (head 770fa1dc29). Prior head eb37384350 had 97/98 checks green with 0 failing; PR Readiness stayed pending after all runs finished, and main had moved 10 commits with no change to this PR's files. Related tests re-run on the rebased tree: backend 127 passed, frontend 1219 passed, tsc, i18n-check, check-i18n-keys clean. No code change.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Check that a refused "Delete all" (non-2xx) still refreshes history in ChatSidebar, so rows that were deleted before the refusal disappear from the sidebar.

rebutted (holds as written): clearClosedSessionsWithConfirm in ChatSidebar.tsx runs await dispatch(clearHistorySessions()); dispatch(fetchHistory(false)). A Redux Toolkit createAsyncThunk dispatch resolves with the rejected action rather than throwing, and clearHistorySessions catches the api.clearSessions throw itself and returns rejectWithValue. So the refetch runs on success, on a 200 shortfall and on a non-2xx refusal alike.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=c0551632e705 Unnamed failures get no explanation.

rebutted (recurring class, not a defect): same as span=188c2ff5f0f8, span=ac4467f3a133 and span=c03b2a0fa052. failed rows reach the dashboard as a bare count with no id and no cause, and ids for them are in this PR's Not a goal. The notice gives both counts, names every row it has an id for, and offers the retry for the rest.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=fc479356a76c The notice is far from the button it reports on.

rebutted (out of goal; same class as span=5adac905519b and span=d1aceaf11585): the notice is the existing refused-delete notice, which the single delete already renders at that site. Moving it next to the Older Sessions header is a UI-placement change this PR's goal does not settle, and should move both deletes' notices together.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=9cb038c5bfb6 Name the pane in retry_delete_all and could_not_delete_closed_sessions.

rebutted (copy preference; same class as span=fc479356a76c): "Delete all" appears only in Older Sessions, and the count line already says "older sessions", so the reader has the pane's name. Another reword across 13 catalogs is copy preference; final copy is a maintainer call at review.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=ffcf7be94e11 "Repair the cron store" gives no starting point.

rebutted (matches the single delete): same as span=fe5859373706 and span=6ed2b38595cf. The remedy is the single delete's own could_not_delete_cron_store_unreadable wording, reused so both deletes agree. The notice already carries the "Ask the agent" button, which hands over the error report. A plainer cron-store remedy should change both deletes together, outside this PR's goal.

@iamwhatever
iamwhatever force-pushed the fix/13083-delete-all-partial-failure branch from 770fa1d to b86412e Compare October 16, 2026 04:08
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased onto origin/main 0600e28044 (head b86412e33c). Prior head 770fa1dc29 had 97/98 checks green with 0 failing; PR Readiness stayed on "waiting on CodeQL (skipped)" because the default-setup CodeQL run never posted on that head, and main had moved 6 commits with no change to this PR's files. Related tests re-run on the rebased tree: backend 127 passed, frontend 1219 passed, tsc, i18n-check, check-i18n-keys clean. No code change.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Check that api.clearSessions()'s thrown error carries body as a string, so a refused request on an unreadable cron store shows the repair step and not the generic sentence.

rebutted (holds as written): clearSessions is del('/api/sessions').then(j), the same transport as deleteSession, which throws ApiError on any non-2xx with readonly body: string, the raw response text (api/apiError.ts). clearHistorySessions reads it exactly as deleteHistorySession does: parseErrorCode(typeof errBody === 'string' ? errBody : undefined).
ChatSliceCoverageSecondPass.test.tsx pins it: "records a refused Delete all by code and clears it on the next attempt" rejects with a string body carrying code: 'cron_store_busy' and asserts that code reaches undeletableHistory.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=d89b9d09ace3 The count and the reasons don't match.

rebutted (recurring class, not a defect): same as span=c0551632e705, span=188c2ff5f0f8 and span=ac4467f3a133. failed rows reach the dashboard as a bare count with no id and no cause, and ids for them are in this PR's Not a goal. The notice gives both counts, names every row it has an id for, and offers the retry for the rest.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=7c7166ea6d01 Each case tells the user to retry with different words.

rebutted (deliberate, by case; same as span=6088115bdc6f and span=e5bc8c9b85f7): the row sentence is the single delete's own copy, reused unchanged so a row reads the same in both deletes. The bulk retry line and the refused generic each name the "Delete all" button because that is the action they point to. The retry text has been reworded across several rounds on this lane's asks; final copy is a maintainer call at review.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • span=b2a811721564 The reused row sentence, read alone in bulk, makes no sense to a newcomer.

rebutted (out of goal; same as span=2acf5485a2eb): the sentence is the shared single-delete copy for cron_ownership_unknown, unchanged by this PR; the bulk notice reuses it so a row reads the same in both deletes. Rewording it changes the single delete too, which this PR's goal does not cover.
"Ask the agent" is on the notice and hands over the whole notice text. A plainer cron remedy belongs in its own change covering both deletes.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 16, 2026
@iamwhatever
iamwhatever force-pushed the fix/13083-delete-all-partial-failure branch from b86412e to bd42c46 Compare October 16, 2026 07:13
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased onto origin/main 91570bf4d7 (head bd42c461f2), which carries #21075 (4fd63b36e9): the fork error-code ratchet now expects 27 sites. The prior head's 4 reds (Backend Tests (3.12, 6), Backend Tests (Windows) (6), Coverage Gate, PR Readiness) all came from that test failing on main, not from this PR.
Related tests re-run on the rebased tree: backend 152 passed (the 127-test related set plus test/test_chat_fork_error_codes.py), frontend 1219 passed, tsc, i18n-check, check-i18n-keys clean. Clean rebase, no code change.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 16, 2026

@chenmingwei23 chenmingwei23 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.

Approved: readiness: passed, no conflicts, checks green.

@chenmingwei23
chenmingwei23 merged commit 9f15459 into main Oct 16, 2026
102 checks passed
@chenmingwei23
chenmingwei23 deleted the fix/13083-delete-all-partial-failure branch October 16, 2026 15:40
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 16, 2026
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.

Older Sessions: Delete all reports success on a partial failure

2 participants