Skip to content

Resume page: no approval actions when the execution is unavailable#1266

Merged
RhysSullivan merged 1 commit into
mainfrom
ux/resume-unavailable-state
Jul 2, 2026
Merged

Resume page: no approval actions when the execution is unavailable#1266
RhysSullivan merged 1 commit into
mainfrom
ux/resume-unavailable-state

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Opening a resume link for an unknown or expired execution showed USER APPROVAL REQUIRED, the text A paused tool call is waiting for your decision, the unavailable notice, and enabled Approve / Decline / Cancel buttons, all on one screen. For a surface whose job is a human safety decision, it was contradicting itself.

In the unavailable state the page now drops the approval copy and buttons entirely and shows only the unavailable notice with a Go home action.

Verified manually with bogus execution ids. Typecheck is green.

Stacked on #1265.

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes the resume-approval page to hide the "USER APPROVAL REQUIRED" copy, the description paragraph, and the Approve/Decline/Cancel buttons when the execution is unavailable (atom failure state), replacing them with a simple "Go home" CTA. The change is scoped to a single file and derives a new unavailable boolean from !nextPaused && AsyncResult.isFailure(paused).

  • The unavailable guard is added as a computed flag and applied consistently to the header label, the description paragraph, and the footer button area.
  • The footer ternary checks unavailable before done, which means if the paused atom re-fetches and enters a failure state after the user has already received a successful resume response, unavailable wins and the "Copy prompt" CTA is replaced by "Go home" — dropping the prompt the user needs to return to their agent.

Confidence Score: 4/5

Safe to merge for the unavailable-state fix itself, but the ordering of the footer ternary leaves a latent path where a reactive atom re-fetch after a successful resume drops the 'Copy prompt' button.

The footer ternary evaluates unavailable before done. Once the user successfully approves an execution, the paused atom may re-subscribe and return a failure (the execution is no longer paused), flipping unavailable to true while done is also true. At that point 'Go home' renders instead of 'Copy prompt' — exactly when the user needs the prompt text to hand back to their agent. The fix (checking done first) was surfaced in a prior review pass and the ordering remains unchanged in this diff.

packages/react/src/pages/resume-approval.tsx — specifically the footer ternary at line 300.

Important Files Changed

Filename Overview
packages/react/src/pages/resume-approval.tsx Adds an unavailable derived flag to hide approval copy and action buttons when the execution atom is in a failure state, replacing them with a "Go home" CTA. The unavailable branch is checked before done in the footer ternary, so a reactive re-fetch failure after a successful resume clobbers the "Copy prompt" button.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Open Resume Link] --> B{paused atom state}
    B -->|AsyncResult.isInitial| C[Loading skeletons\nHeader: USER APPROVAL REQUIRED]
    B -->|AsyncResult.isSuccess| D[Show pending request details\nHeader: USER APPROVAL REQUIRED\nButtons: Approve / Decline / Cancel]
    B -->|AsyncResult.isFailure| E{nextPaused?}
    E -->|yes| D
    E -->|no - unavailable=true| F[Header: Resume execution\nBody: unavailable message\nButton: Go home]
    D --> G{User submits action}
    G --> H{API result}
    H -->|failure| I[status=failed\nError banner shown]
    H -->|paused - chained| J[nextPaused set\nLoad next execution]
    H -->|completed| K[status=done\nConfirmation banner\nButton: Copy prompt]
    K --> L{paused atom re-fetches?}
    L -->|isFailure & !nextPaused| M[unavailable=true\nGo home replaces Copy prompt]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Open Resume Link] --> B{paused atom state}
    B -->|AsyncResult.isInitial| C[Loading skeletons\nHeader: USER APPROVAL REQUIRED]
    B -->|AsyncResult.isSuccess| D[Show pending request details\nHeader: USER APPROVAL REQUIRED\nButtons: Approve / Decline / Cancel]
    B -->|AsyncResult.isFailure| E{nextPaused?}
    E -->|yes| D
    E -->|no - unavailable=true| F[Header: Resume execution\nBody: unavailable message\nButton: Go home]
    D --> G{User submits action}
    G --> H{API result}
    H -->|failure| I[status=failed\nError banner shown]
    H -->|paused - chained| J[nextPaused set\nLoad next execution]
    H -->|completed| K[status=done\nConfirmation banner\nButton: Copy prompt]
    K --> L{paused atom re-fetches?}
    L -->|isFailure & !nextPaused| M[unavailable=true\nGo home replaces Copy prompt]
Loading

Reviews (4): Last reviewed commit: "Hide resume actions when execution is un..." | Re-trigger Greptile

Comment thread packages/react/src/pages/resume-approval.tsx
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 074d005 Commit Preview URL

Branch Preview URL
Jul 02 2026, 08:21 PM

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 074d005 Jul 02 2026, 08:23 PM

@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1266

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1266

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1266

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1266

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1266

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1266

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1266

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1266

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1266

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1266

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1266

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1266

executor

npm i https://pkg.pr.new/executor@1266

commit: 45539b1

@RhysSullivan RhysSullivan force-pushed the ux/join-invite-validation branch from b0f4737 to bc8b745 Compare July 2, 2026 17:52
@RhysSullivan RhysSullivan force-pushed the ux/resume-unavailable-state branch from 826e586 to e62899a Compare July 2, 2026 17:52
@RhysSullivan RhysSullivan force-pushed the ux/join-invite-validation branch from bc8b745 to f1afa78 Compare July 2, 2026 17:55
@RhysSullivan RhysSullivan force-pushed the ux/resume-unavailable-state branch 2 times, most recently from 45539b1 to 97559dc Compare July 2, 2026 18:20
@RhysSullivan RhysSullivan force-pushed the ux/join-invite-validation branch 2 times, most recently from 2695ec3 to a521c37 Compare July 2, 2026 18:21
@RhysSullivan RhysSullivan force-pushed the ux/resume-unavailable-state branch from 97559dc to 4d35a3c Compare July 2, 2026 18:21
@RhysSullivan RhysSullivan force-pushed the ux/join-invite-validation branch from a521c37 to e977b28 Compare July 2, 2026 18:21
@RhysSullivan RhysSullivan force-pushed the ux/resume-unavailable-state branch 2 times, most recently from fcc2b6e to e502c2f Compare July 2, 2026 18:21
@RhysSullivan RhysSullivan force-pushed the ux/join-invite-validation branch from e977b28 to 2c1d30c Compare July 2, 2026 18:21
@RhysSullivan RhysSullivan force-pushed the ux/resume-unavailable-state branch from e502c2f to 074d005 Compare July 2, 2026 18:22
@RhysSullivan RhysSullivan changed the base branch from ux/join-invite-validation to main July 2, 2026 18:22
@RhysSullivan RhysSullivan merged commit 2e9d746 into main Jul 2, 2026
18 of 21 checks passed
@RhysSullivan RhysSullivan deleted the ux/resume-unavailable-state branch July 2, 2026 18:23
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.

1 participant