This repository was archived by the owner on Aug 6, 2026. It is now read-only.
fix(mobile): show stopped cloud runs as stopped, not failed (port #3697) - #3750
Merged
Merged
Conversation
Ports the desktop fix (#3697) to the mobile app. A cloud run the user deliberately stops (backend status `cancelled`) was being collapsed into `failed`, so the end-of-run banner read "Run failed" with a Retry button. Map `cancelled` to a new terminal outcome `stopped`: the banner now reads "Run stopped" with neutral/success styling and offers Continue. Introduces a shared `TerminalStatus` type and extracts the banner into `TerminalStatusBanner` for isolated testing. Generated-By: PostHog Code Task-Id: 880d3028-60e8-4893-b5f6-2b31f4a44456
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Contained mobile UI fix that maps a backend "cancelled" status to a distinct "stopped" outcome instead of "failed"; diff matches the description, includes new unit tests, and touches no risky territory (no auth, billing, migrations, deps, or CI).
- Author wrote 2% of the modified lines and has 23 merged PRs in these paths (familiarity MODERATE).
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 130L, 5F substantive, 213L/7F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1c-medium (213L, 7F, single-area, fix) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ f057f43 · reviewed head 65baa10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The mobile app already lets you stop a running cloud task, but a deliberately-stopped run (backend status
cancelled) was being treated as a failure. The end-of-run banner showed a red "Run failed" with a Retry button — as if something had gone wrong — even though the user chose to stop it.Why: this ports the desktop fix in #3697 ("Show stopped cloud tasks as completed") to mobile, where users hit this regularly since the stop-run action shipped.
Changes
mapTerminalStatusnow mapscancelledto a distinctstoppedoutcome instead of collapsing it intofailed.TerminalStatustype intypes.ts(used by the store, session-activity helper, and the banner) to replace the inline union that was being repeated.TerminalStatusBannercomponent so its wording is unit-testable in isolation.How did you test this?
mapTerminalStatuscoveringcompleted/failed/cancelled/ in-flight / nullish inputs.TerminalStatusBannertests covering the banner wording and action for each terminal outcome, and that a stopped run is never labelled failed.taskSessionStore,TerminalStatusBanner,TaskStatusIcon,sessionActivity— 41 tests passing),tsc(no new errors in touched files), andbiome check(clean).Automatic notifications
Created with PostHog Code