Skip to content

Bug: Back navigation retargets an open automation Stop confirmation #3914

Closed

Description

@yannickmonney

Bug: Back navigation retargets an open automation Stop confirmation

Priority: P2.

Reproduce

  1. Have run B then run A of the same automation as consecutive browser-history entries, with B’s detail data available from the preceding visit.
  2. While viewing A, click Stop the run. The confirmation says “Stop this run?” and warns that it cannot be resumed. Do not confirm yet.
  3. Use browser Back. The replay uses the actual TanStack memory-history back() operation, with no direct component rerender. The route changes to run B while the same confirmation remains open.
  4. Confirm Stop the run. The mutation payload is { organizationId: 'audit-org', runId: 'B' }, even though the user opened the confirmation on A.

Expected: A confirmation records the run for which it was opened, or closes when the run identity changes. It must not silently acquire a different destructive target.

Root and controls

services/platform/app/features/automations/components/run-detail.tsx:95 keeps only a boolean confirmStop. The ConfirmDialog at lines 251–270 stays open across a runId prop change and reads the current runId in onConfirm at line 263. Both organization and project run route components render RunDetail without an identity key; the app router supplies no remount dependency.

The normal A confirmation control sends only run A. The navigation case checks that there were no mutation calls before confirming and then observes exactly the B payload. No real run was stopped. Screenshot: stop-back-retarget.png. Log case: stop-back-retarget.

Dedup

Baseline 102, additional ledger (106 at final snapshot), 256 all-state automation-related issues and targeted live Stop/navigation searches reviewed. No matching report found. #3677 is reporting success when sandbox cancellation fails, #3738 is a task-status/subtask choreography refusal, and #3721 is stale approval-refusal text; none concerns a confirmation changing its mutation target after route navigation.

Source SHA: 9ea59724df24d62729a9360f3902d964dab39b3e. Classification: local exploratory review, no product changes.

Replay from /Users/yannick/Documents/git/tale/services/platform:

bunx vitest --config /Users/yannick/.codex/notes/tale-1000-additional/automations-functional-next/vitest.browser.config.ts run run-state.browser.test.tsx --reporter verbose

Final result: exit 0, 9/9 observation/control cases passed. Test assertions record observed defective behavior; this is not a claim that product regression tests are green after a fix. Test source: run-state.browser.test.tsx. Log: run-state.replay.log.

Limits: Actual Chromium, RunDetail, RunAskCard, QuestionFlow, shared fields/dialog, i18n providers and TanStack Router execute. The minimal route wrapper reproduces the shipped route shape and useParams-to-RunDetail wiring; the authenticated shell and generated route tree are omitted. Query and mutation hooks are fixture seams, graph/inspector/log/import-continuation rendering is stubbed, and the memory-history entries are synthetic. Reads are immediately available cached-style snapshots; the same-run replacement is a synthetic reactive data update, not a running agent. Mutation spies record intended payloads only. No backend, database, provider, production, real stop, or real answer operation ran. The screenshots omit application CSS and prove DOM/content state only, not visual styling. Existing Vitest 4.1.11 / browser 4.1.10 emits a version warning; all final cases pass without hook errors.

Independent parent verification

Parent inspected the real route wrappers, router remount configuration, RunDetail, RunAskCard and question-flow state, reviewed all probe seams and dedup comparisons, and independently reran all nine Chromium cases. All passed with exit 0 (parent-browser.log). The same-ask refresh and fresh-target controls distinguish lost identity from ordinary draft preservation. No native cancel/answer action or real agent execution was attempted.

Activity

  1. yannickmonney commented on Sep 29, 2026

    @yannickmonney
    ContributorAuthor

    Current-main revalidation at b7f8ca02ec249c004652b1ee52e112d9cdfa53ea: the reported defect still reproduces.

    The actual router Back operation still retains the Stop dialog and retargets its captured cancellation request to B. The ordinary A confirmation control passed. The complete run-state replay passed 9/9 Chromium cases.

    The parent reran the local evidence against an isolated detached current-main checkout with current workspace source. Query/mutation boundaries remain controlled; no real cancellation, deletion, assignment, production test or provider action occurred. The original pinned-source evidence is retained. This revalidation does not add a finding.

  2. added
    agent-ready
    on Oct 29, 2026
  3. tale-code-bot commented on Oct 30, 2026

    @tale-code-bot
    Collaborator

    Already done on main, so the Development board's task for this issue (TALE-40) is cancelled and the issue closed as completed.

    Evidence:

    • Commit 4a77db7841d1681f72501e94174f3f21e02b5931, "fix(platform): recover automation run detail read failures" (fix(platform): recover automation run detail read failures #4288, 2026-10-05), is on main b2560c2d7d3294993e66129c891be4a059f3d6c4.
    • It renders the run body as <RunDetailBody key={props.runId} …/> in services/platform/app/features/automations/components/run-detail.tsx, with the confirmStop state inside that body.
    • A change of run therefore remounts the body, and an open Stop confirmation closes instead of sending the new run's id. That is the issue's expected behaviour: the confirmation closes when the run changes.

    If something is still missing, reopen this issue and say what.

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

    agent-readybugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions