Repository navigation
Show running background shells above the composer - #112
Merged
Merged
Conversation
The composer chip now counts running background shells next to
subagents, with desktop's wording ("1 shell", "1 subagent · 2 shells").
Shells come from transcript shell calls that started in, or moved to,
the background; the server's shell status decides whether each still
runs. Foreground shells stay in the transcript.
A shell row opens a page in the sheet with its command, run time, the
last 40 lines of output, and a confirmed Stop that removes the shell on
the server. Once it ends, Stop gives way to how it ended. Android back
returns to the list; an iOS swipe closes the sheet. Stale connections
and failed refreshes read as last known, without Stop.
To match the OpenCode iOS app, collapsed tool groups read "Used N
tools" with no status or chevron, background subagent launches fold
into them, and only the Working line and the chip animate. The chip
announces background subagent changes once, and the ticking run time
stays outside every live region.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #89. On the phone there was no way to see that a background shell was still running, how long it had run, or what it printed, and no way to stop it.
shellcalls that started in the background (input.backgroundormetadata.background) or were moved there, and recorded ametadata.shellID.GET /api/shell/{id}decides whether each one still runs. Foreground shells stay in the transcript, as on desktop and in the OpenCode iOS app.DELETE /api/shell/{id}. After the shell ends, Stop gives way to "Exited", "Exited with code N", "Timed out" or "Stopped", and the run time freezes. The page stays open until Back or until the sheet closes.WorkingIndicator animated={false}).removeOpenCodeShellto the adapter. The fake API now removes configured shells onDELETE, and later reads return not found.Earlier revisions of this change were published as EAS Updates to
preview(runtime 0.1.6). No changed file is a native fingerprint source. The final revision is published from this branch's commit.Known limits:
Verification
pnpm check(1566 mobile tests, adapter tests, both Hermes exports)pnpm native:doctor(18/18)pnpm crap --threshold 30docs/COMPATIBILITY.md.TODO.mdreflect the resulting behavior.Council review
Rounds: 4
Two small fixes the reviewers suggested in round 4 were applied afterwards and not re-reviewed: background rows in the sheet have no Android live region, and the chip's count is dimmed when its status is uncertain.