Skip to content

Approval Center: a bulk run that ends after leaving the page leaves a sticky toast whose "Show all" opens nothing #37328

Done
1 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Filing gate ① — a user-visible defect with a named location. Source: fleet (nit from the seat's L1 of PR #37282, hand-off 7165958218; listed by the seat for filing). Follow-up of #36855, merged in PR #37282.

Grading: area:ux · Bug · p3 (a dead button on a leftover toast; nothing is lost) · reach: read from code · evidence: read.

What happens

ApprovalsInboxPage dismisses the sticky partial-failure toasts it has raised when the page unmounts (ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx:1118–1124). A bulk approve or reject that is still running when the user leaves the page finishes afterwards and raises its sticky toast then. That toast was never registered for dismissal, and its "Show all (M)" action calls the unmounted page's setBulkFailures / setBulkFailuresOpen (:1551–1552), so the toast stays on screen and its button opens nothing.

Expected

A run that finishes after the page has unmounted either raises no sticky toast, or raises one whose action still shows that run's failed rows (for example, by navigating back to the Approval Center with the list).

Done when

  • A pin starts a bulk run, unmounts the page before the run settles, and asserts the chosen behaviour, with a control on a run that settles while mounted.
  • An ablation of the fix turns the pin red.

Why

A decider who starts a large bulk approve and moves on gets a toast saying rows failed, with a button that does nothing, and no way to see which rows or why.

Reader: the area:ux zone (a4-C) dispatches it to an os-dev. Dedupe: bulk approve toast → 70 hits, 0 open on this mechanism; toast show all unmount → 9 hits, 0 open.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    bug
    pm:queue
    domain:ui
    on Nov 25, 2026
  2. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    First touch 2026-11-25T17:36Z. Bug · area:ux · domain:ui · p3 → p2.

    • area:ux has no p3. A user-visible card is either raised to p2 or moved out of ux, and this one is user-visible: a decider sees a toast whose only action does nothing. So it is raised.
    • State: pm:queue. No seat today: repo:objectstack#4 and Migrate from npm to pnpm #6, the area:ux seats, are both winding down.
  3. added
    priority:p2
    and removed on Nov 25, 2026
  4. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ux · domain:ui · Bug · priority:p2 (raised from p3) · pm:queue · size S; rationale: a decider sees a sticky toast whose only action does nothing. It is user-visible, and UX has no p3.

    This restates the first touch of 2026-11-25T17:36Z (7169742197) in the audit-record shape, at the request of repo:objectstack#5 (7177731206).

  5. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca6EBDpTBZk8v46Jjv

    Claim: PM loop round 1 · zone o5-U (area:ux p1/p2; the maintainer, verbatim, 2026-11-25T23:27Z project thread: 「再开两个专区,接ai ux 的 p1 p2 任务」) · 2026-11-26T11:46Z · filed for zone a4-C (seat 4), which is winding down and left it in pm:queue; the ux p1/p2 queue is zone o5-U's (seat 5 lease row in #35217)
    Session: session_01Utp6Ca6EBDpTBZk8v46Jjv
    Account: os-bill
    Area: o5-U
    Branch: claude/issue-37328-approvals-late-toast
    Worktree: objectstack-issue-37328
    Domain: domain:ui
    Seat: repo:objectstack#5
    File surface: ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx (the bulk-run toast and unmount dismissal, ~:1118–1124 and ~:1551–1552), one new pin test file named for this card, root .changeset/. Stop on breach and report.
    Container & model: S, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate", effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the Approval Center's bulk-run toast (objectstack, ui/apps/console) | the sticky partial-failure toast and its unmount dismissal from PR #37282 (#36855) | a decider who starts a large bulk approve and leaves the page
    Thread-read: 7177896237
    Premise: holds — read from code on origin/main 276174ab0c; the dev confirms the late toast's action calls the unmounted page's setters before fixing
    Serial constraints cleared: no open PR touches ApprovalsInboxPage.tsx at claim
    Pre-claim lane: domain:ui
    Pre-claim deps: none
    Prior rulings read: approvals,bulk,toast → 0 hits; none; thread: none; repo: objectstack-ai/objectstack

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  7. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca6EBDpTBZk8v46Jjv
    os-dev-report

    {
      "issue": 37328,
      "status": "done",
      "branch": "claude/issue-37328-approvals-late-toast",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37541",
      "head": "cc5fe18c450ef397dd0675ea64a3ab72e82c3e9b",
      "session": "session_01Utp6Ca6EBDpTBZk8v46Jjv",
      "premise_still_valid": true,
      "summary": "I confirmed the premise on origin/main 276174ab0c: runBulk's toast action called setBulkFailures and setBulkFailuresOpen even after the inbox had unmounted, and so did its settle block (setBulkRunning, setSelectedRowIds, load, refreshBadge). This takes the card's second arm, as dispatch A1 leaned: a mounted ref decides at settle time. A run that settles while the page is mounted behaves as before. A run that settles after unmount touches no page state, and its sticky toast's Show all navigates back to the inbox path recorded at run start, with that run's failed rows in react-router history state (BULK_FAILURES_STATE_KEY). The inbox opens its failures dialog on them once per location key and then replace-navigates to drop the key. Writer and reader are both in this file, so no shared state was added outside it. Card assignee not touched; the PR is assigned to os-bill by pr_create.",
      "files_changed": [
        "ui/apps/console/src/pages/system/ApprovalsInboxPage.tsx (+87 -12)",
        "ui/apps/console/src/pages/system/ApprovalsInboxPage.lateBulkToast-37328.test.tsx (+241, new)",
        ".changeset/37328-approvals-late-bulk-toast.md (+12, new; '@object-ui/console': patch)"
      ],
      "line_budget": "340 added, 12 deleted across 3 files; all inside the claim's file surface (the page, one new pin named for the card, root .changeset/)",
      "tests": "At head cc5fe18c45, under os-verify-lock: (1) pnpm --dir ui exec vitest run --maxWorkers=2 apps/console/src/pages/system/ApprovalsInboxPage => Test Files 22 passed (22), Tests 122 passed (122), VERDICT command-exit 0. (2) The new pin plus inlineActionsVisible-34587, stateInUrl-36966 and approvalsInboxComponentRef => Test Files 4 passed (4), Tests 25 passed (25), VERDICT command-exit 0. Ablations, rerun at head cc5fe18c45 through scripts/ablation-replace.mjs (mutation landed: anchor 1 -> 0, blob changed; restored: blob == HEAD ad2d02c59649 and git diff HEAD empty; independent hash check HASH-MATCH). The test imports the page from source, so no dist rebuild was needed. A) 'const live = mounted.current;' -> 'const live = true;': the pin goes red with 'expected \"vi.fn()\" to be called 1 times, but got 3 times' (the gone page's list and badge were re-read); Tests 1 failed | 1 passed, the control green. B) 'onClick: live' -> 'onClick: true' (late toast calls the gone page's setters): the pin goes red with 'Unable to find an element by: [data-testid=\"approvals-inbox-table-scroller\"]' (Show all opened nothing); Tests 1 failed | 1 passed, the control green. eslint on the 2 changed files: 0 errors; the page has 14 warnings, the same count and rule mix as the base blob (one new react-hooks/exhaustive-deps warning was fixed by capturing the set inside the effect).",
      "gates": "Local: node scripts/pm/dispatch-gates.mjs --commands derived 37 families at cc5fe18c45; 37 of 37 ran, every one exit 0. 'pnpm --dir ui exec vitest run scripts/' ran under the lock, VERDICT command-exit 0. Reconciliation: dispatch-gates --ran with each line recorded as 'COMMAND :: exit N' => '37 derived famil(ies) accounted for, 37 run, 0 NOT-MEASURED (a DERIVED zero)'; that run exited 0. overlap-check --branch=HEAD: VERDICT clean exit 0 (origin/main merges cleanly, 0 PR heads overlap). CI on PR #37541, head cc5fe18c45: 45 check-runs, all completed, 0 failure/cancelled/timed_out; 32 success and 13 skipped (selector or opt-in), commit statuses: none. Required contexts: Lint & Repo Gates, TypeScript Type Check, Test Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI (shards 1-3/16), Build & E2E UI, Live E2E UI and Dogfood Regression Gate are success. Build Core is skipped because the selector found no core diff, and a skipped context counts as success. Other check-runs that succeeded: Check Changeset, Check PR Size, PR-body guards. NOT MEASURED locally: console tsc --noEmit, because the unbuilt @object-ui/* packages give TS2307 cascades in this worktree; CI Type Check UI = success is the reading.",
      "dogfood_battery": "n/a: the PR title has no `!` and there is no (narrowing) arm (Clause-②: no)",
      "readings": "Premise read from code on origin/main 276174ab0c: runBulk's overflow action onClick called setBulkFailures(failures) and setBulkFailuresOpen(true) unconditionally, and the unmount effect dismissed only the ids in bulkFailureToasts. react-router-dom 7.18.5, useNavigateUnstable: activeRef is set true in a layout effect and never reset on unmount, and navigator.push runs on the BrowserRouter history. So the navigate of an unmounted page still navigates; the pin measures this end to end in MemoryRouter.",
      "acceptance": [
        "Pin starts a bulk run, unmounts before it settles, asserts the chosen behaviour: PASS. ApprovalsInboxPage.lateBulkToast-37328.test.tsx, first case: Show all lands on the inbox and lists Bulk Invoice 1..5; listRequests is not re-read after unmount; the history key is dropped.",
        "Control on a run that settles while mounted: PASS. Second case: the dialog opens in place with the same 5 rows; router location count unchanged; the list reloads.",
        "Ablation of the fix turns the pin red: PASS. Two ablations (A: live forced true; B: action forced to call setters), both red on the first case and green on the control, both restored and verified.",
        "A2, no setter of an unmounted page is called: PASS. Pinned via listRequests call count (load and refreshBadge are the setters' feeders); the action's setter path is pinned by ablation B."
      ],
      "mcp_calls": "0",
      "api_writes": "2 relay dispatches via scripts/pm/fleet-write and post-stamped: (1) pr_create, which made POST /repos/objectstack-ai/objectstack/pulls (draft) and POST /issues/37541/assignees [os-bill]; read-back reported 5912 bytes sent and 5912 stored, identical. (2) The os-dev-report comment: POST /repos/objectstack-ai/objectstack/issues/37328/comments. git push is not a REST write.",
      "deviations": [
        "Commit trailers use the model-free pair (Claude-Session + Co-authored-by: Claude). The harness reminder asked for a model-named Co-Authored-By, but AGENTS.md and the dispatch forbid a model name, so I followed them. Reported only.",
        "The dispatch says to wait for PR check-runs before reporting, but os-dev.md says not to wait on CI. I treated the dispatch as the per-card exception os-dev.md allows and waited in the foreground; the checks had completed by the first read.",
        "The local console typecheck was not measured (reason in gates); CI Type Check UI is cited instead.",
        "test:repo was not run locally: the diff does not touch the repo project, and it belongs to CI (Test Core = success)."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxbugdomain:uipm:dispatchedpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions