feat(session connect): Claude Code-style boxed composer + spend/status footer#43
Merged
Conversation
…s footer - Frame the composer with a full-width rule above and below (top/bottom borders only), with the › prompt between them. - Persistent footer status line: clickable session id (OSC 8 link to the app), current status, and running spend — cumulative total plus the cost of the last turn (Last step: $x.yz), folded from result events. - Render sandbox lifecycle inline like Claude Code (creating sandbox → spawning agent process → …) on each status transition, with a status poll backstop so phases show even before the socket attaches. - Unify start --connect: drop the separate pre-connect wait spinner and drop straight into the connect UI, which now owns the lifecycle and reports a terminal-before-running gate. - New pure helpers (resultCostUsd/foldCosts/statusSystemLine/hyperlink) with unit tests.
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.
Reshapes the `agent session connect` / `session start --connect` UI to look and behave like Claude Code, and unifies the startup flow so everything renders in one place.
What you see now
Boxed composer — the `›` prompt is framed by a full-width rule above and below (top/bottom borders only, spanning the terminal).
Persistent footer status line (dim, Claude-Code-style):
```
session_1Bacr9… · running · $0.44 total (Last step: $0.03)
```
Lifecycle system lines — on each status transition a dim `●` line lands in the transcript: `creating sandbox` → `sandbox ready · spawning agent process` → `retrying…` / `session complete`.
Flow unification
`start --connect` no longer runs a separate pre-connect braille spinner and then hands off — it drops straight into the connect UI, which now renders the whole sandbox-creation lifecycle itself. A backstop status poll keeps the phase fresh even before the socket attaches, and a terminal status reached before the sandbox ran (a preflight/budget gate) is reported and exits cleanly.
New pure, tested helpers
Note
Footer spend is Claude Code's `total_cost_usd` (Anthropic list price — the number shown in the turn footers today), not the billed session cost (`cost_tokens + sandbox + fee`). It's already in the stream, so no extra polling. Easy to switch to billed cost if preferred.
Testing