Skip to content

get clicking dismiss on a run row in /?section=overview in the console web ui to remove the row from view faster #2302

Closed

Description

@JacobStephens2

right now there is delay, which can make the user wonder whether it worked or not

Activity

  1. added
    enhancement
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 19, 2026
  2. JacobStephens2 commented on Nov 19, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Make clicking Dismiss on a one-line run row in the Console Inbox (/?section=overview) remove that row from view immediately, instead of after the save and refresh complete, so the user no longer wonders whether it worked.

    Diagnosis (confirmed from code)

    • In console.js, the form[data-dismiss] submit handler sets the Dismissing… pending state, then awaits fetch(form.action, …) (lines 526–529) and, on success, await refresh() (line 542). The row is only removed when that refresh's server HTML is morphed into #inbox by morph() (line 67). Removal therefore waits for: the server mutation, the POST response, and a second full Inbox page fetch plus morph. For HTML form posts the POST also follows the redirect in dismiss.rs, whose body the script discards.
    • The server mutation itself (dismiss::request in dismiss.rs) snapshots the user's records, evaluates the Inbox, writes the *.dismiss.json file and cleans retained scratch (crate::scratch::dismiss), so the round trip is not trivial.
    • Current feedback is only the Dismissing… text and a disabled button via showDismissal() (console.js); the row itself, the thing the user acted on, stays on screen. Glossary: a Dismissal takes a row out of Needs you or Ready for review (GLOSSARY.md); in Overview the dismissed row later reappears under Done via the refresh, folded by default (folds.js).

    Required change

    1. In the same submit handler, for an inline row Dismiss (row && !undo): remove (or hide) the row immediately on submit, before awaiting the POST, and move selection/focus to the next visible row as the current success path does (lines 533–537). The d keyboard path submits the same form, so it gets this for free.
    2. Preserve server truth: keep the existing dismissals pending map and duplicate-submit guard; on success keep showing the Dismissed <subject> · Undo notice and still run the existing refresh() so counts, section placement (Done/Resolved) and other tabs reconcile.
    3. On failure: restore the row (at its prior position where practical) with the existing inline error Could not save the dismissal: … on its form, button re-enabled, no dismissal notice. The existing held-request and 409 tests in inbox.test.cjs define this feedback contract.
    4. Guard the race with live updates: a refresh()/morph that lands while the Dismiss request is still in flight must not resurrect the optimistically removed row before the request settles; after a failed request the normal server-rendered row must be able to return.
    5. Scope: inline Inbox rows only (including fleet rows, which carry the machine hidden input in row.html). Do not change Peek (#peek-content) Dismiss/Undo behaviour, the no-JavaScript form post + redirect fallback, src/logs/dismiss.rs persistence semantics, or Undo behaviour beyond keeping its current pending/error feedback.

    Tests and docs

    • Extend console/tests/inbox.test.cjs: with /dismiss held by a route promise (pattern already used at lines 1229–1250), assert the row is gone from view before the request is released, then release and assert the Undo notice and reconciled row; with /dismiss fulfilled as 409, assert the row is restored with the error and an enabled button. Existing dismissal tests (keyboard d, notice Undo, failed Dismiss retry, Peek pending) must keep passing: node --test console/tests/inbox.test.cjs (after building, per console/tests/playwright.cjs setup).
    • Update the Dismiss paragraph in console/README.md to state the row leaves view immediately and returns if the save fails.
    • Out of scope: speeding up the server mutation or dropping the post-save refresh; optimistic removal alone fixes the perceived delay.
  3. added
    ready-for-agent
    in-progress
    and removed
    in-progress
    ready-for-agent
    on Nov 19, 2026
  4. removed
    in-progress
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions