Commit Graph
3793 Commits
Author SHA1 Message Date
Ian MacLeod 4487f68480 Show task-opening progress inline in the Codex TUI (#65126)
## Why

The task list already labels a visible task `Opening…`, but the spinner
appears in the footer, away from the task it describes.

## What changed

Place the spinner next to `Opening…` in the task's status column or
compact detail row, preserving the selection highlight. Keep the
`Opening task…` footer as a fallback when the inline status has no room
or the task is outside the visible list.

## Testing

Cover inline rendering, reverse-video selection styling, and the footer
fallback for short layouts and history results that disappear when
opening clears the search.

GitOrigin-RevId: 6a66b368fefb4c43aa0b27ffe9b24bb07d1839d3
2026-12-02 01:06:48 +00:00
Benjamin Carlsson 98e240bbf7 Show modifier layers and action labels in the TUI shortcut guide (#65112)
## Why

The keyboard view only highlighted unmodified shortcuts, so users had to
switch to the list to find modified bindings or see what a highlighted
key did.

## What changed

- Let users cycle through modifier combinations from the active bindings
  with a free key shown in the guide header. Leave existing bindings
  available.
- Label keys with their actions and show the full binding for two-key
  chords beside the first key.
- Try a compact keyboard when the roomy layout does not fit, then fall
  back to the shortcut list while keeping modifier navigation available.

## Testing

Add snapshots and assertions for Ctrl and Shift layers, remapped chords,
layout fallback, and keyboard help above the prompt in an 80×24 terminal.

GitOrigin-RevId: 0b37579c145fa5176ab83de392d9eb4905d06b81
2026-12-01 23:59:56 +00:00
Benjamin Carlsson 7b680b178a Keep TUI background work tied to its originating app server (#65108)
## Why

App servers can reuse the same request IDs. Tracking dynamic tool calls by
request ID alone lets one server's cleanup affect another server's call.
Background title and recap events also need to reach their originating server
when the TUI is displaying a different session.

## What changed

- Track dynamic tool calls by backend and request ID, and match completions
  to the specific call. Send replies through the original reply handle in the
  background and give pending writes time to finish on shutdown.
- Route background task registrations and title and recap events by backend.
  Check ownership before registering temporary threads or forwarding their
  notifications, and use the original connection for temporary-thread cleanup.

## Testing

Regression coverage checks that closing a side thread preserves another
backend's tool call with the same request ID, that a disconnected backend
cannot register a task thread, and that a title helper cannot replace a
temporary thread owned by another backend.

GitOrigin-RevId: 0878efba94f317c814ee131403f0c6e793dfc2c0
2026-12-01 23:22:59 +00:00
Felipe Coury fbb04fca5f Share composer copy handling across keyboard and mouse input (#65107)
## What changed

- Route keyboard and mouse copies of composer selections through the same
  plain-text copy helper.
- Check composer visibility separately when completing clipboard work
  and canceling primary selection. Use the overlay input check when
  deciding whether to end a composer drag.
- Convert external transcript links to view actions through the shared
  `ReaderLink` conversion.

GitOrigin-RevId: 7285acfe6d8911da806adbba7da8b79393389b08
2026-12-01 23:13:10 +00:00
Eric Traut 75c48af16f Support --search with the shared background server (#65103)
## Why

Launching Codex with `--search` forced the TUI into embedded mode, even when the shared background server was available.

## What changed

Treat `--search` as a per-thread request for live web search. Check daemon eligibility before applying the flag, and restore the launch setting when reconnecting to an unloaded conversation or reopening an unloaded saved side chat.

## Testing

Cover daemon startup with `--search` and verify that a conversation retains its history and search behavior across a daemon restart. Check that worktree launches honor the flag per invocation and that reattaching to an already loaded side chat leaves its search settings intact.

GitOrigin-RevId: 9d15ec3d103383d80442e07845442341f6da6727
2026-12-01 23:03:41 +00:00
Eric Traut 997204b7f9 Make /diff worktree-wide from subdirectories (#65094)
## Why

Running `/diff` from a subdirectory can omit untracked files elsewhere in
the worktree. With `diff.relative` enabled, it can also omit unstaged
changes to tracked files outside that subdirectory.

## What changed

Run Git from the discovered worktree root while retaining the session
directory for permission resolution. Pin the Git directory and worktree so
relative Git environment settings keep resolving to the same repository.

Decode Git's quoted untracked paths before generating patches. If a path
cannot be represented as UTF-8, warn that the diff is incomplete and
continue with the remaining files.

## Testing

Cover matching output from the root and a subdirectory with
`diff.relative` enabled and with an explicit Git directory and worktree.
Cover quoted UTF-8 filenames and warnings for invalid UTF-8 paths.

GitOrigin-RevId: 7dd604f543976f4ba88ae0facf9e9b573baa9c0f
2026-12-01 21:56:27 +00:00
Eric Traut a183b449e6 Use model-specific speeds for /model --speed (#65092)
## Why

Speed completion always suggested `flex`, even for models that did
not advertise it, and omitted other available tiers such as `priority`.

## What changed

Offer `standard` and the enabled service tiers advertised for the model
named in `/model`. When the command omits the model, use the current
model. Use the same choices in unavailable-speed errors.

Allow explicit use of unadvertised `flex` in `/model` and quick dials
when using the OpenAI provider with an API key. Keep completion limited
to `standard` and advertised tiers.

## Testing

Add coverage for model-specific completion and validation, including
clearing stale suggestions when the model catalog is cleared. Cover
saving and recalling a quick dial with unadvertised Flex using an
OpenAI API key and rejecting that speed on another provider.

GitOrigin-RevId: b5139d03561842eaf00511f018f6e626cf695bc5
2026-12-01 21:39:35 +00:00
Eric Traut a0676149ff Show custom provider rate limits in /status (#65091)
## Why

Custom providers can report quota during a turn, but `/status` only cached
quota from ChatGPT account usage. Users could see a quota warning while
`/status` showed no corresponding limits.

## What changed

Use provider turn snapshots and rolling updates from custom providers using
a saved API key to populate `/status`. Merge partial updates by limit ID,
preserving omitted windows with their original timestamps and carrying
forward an unexpired reset time when the window duration matches. ChatGPT
account usage remains authoritative for its status display.

## Testing

Extend TUI tests to cover weekly and five-hour limits after partial
updates, immediate status rendering for custom providers using a saved API
key, and preservation of ChatGPT account limits after a streamed update.

GitOrigin-RevId: acaed9880c020885cea97307d66d78f79c5b4c65
2026-12-01 21:38:53 +00:00
Eric Traut 6801507507 Preserve --add-dir when starting local TUI threads (#65087)
## Why

Selecting a permission profile for a new local thread could drop directories
explicitly supplied with `--add-dir`. Starting a thread in a different
directory could also lose those additions.

## What changed

Carry explicit additions into local thread starts. When a permission profile
is selected, send the working directory and the explicit additions as
runtime workspace roots. Require the app server to confirm each added
directory before accepting the thread. Decode local workspace roots as
native paths so tabs and newlines in directory names survive.

## Testing

Extend tests for startup, managed worktree creation, and permission-profile
selection. Cover an added directory with a tab in its name on Unix and the
error for an unconfirmed directory.

GitOrigin-RevId: 97beb528aa396b97d6d0ad664fde8abe3b9e2bbf
2026-12-01 21:18:55 +00:00
Eric Traut 1e832a92c2 Fix granular approval defaults at projectless TUI startup (#65086)
## Why

An `approval_policy` in the client's config could suppress the granular
default when starting a projectless session with server-owned defaults.

## What changed

Make the granular default available at startup so the launch code can
apply it when the invocation leaves the policy unset and the server
allows it.

## Testing

Extend the server-defaults startup test to set the client's policy to
`never` and verify that `thread/start` still requests granular approval.

GitOrigin-RevId: 770aa978e2372e1e30fe778b670ea25f9c3c1cd0
2026-12-01 21:01:05 +00:00
Eric Traut be972c162c Preserve the thread's selected workspace when the TUI starts a turn (#65084)
## Why

Another client can change a thread's workspace after startup. When the
TUI sends its local working directory with the next prompt, it can reset
the thread's selected environments before the TUI receives the update.

## What changed

Omit `cwd` and `runtimeWorkspaceRoots` from TUI `turn/start` requests
for both regular prompts and misalignment continuations so the turn
uses the thread's current workspace.

## Testing

Add a regression test that changes the thread's workspace before the
TUI receives the update and checks that the first prompt sent to the
model includes the newly selected working directory.

GitOrigin-RevId: b5cc23bce787f91058ede6aa7ee825e0e7a9518c
2026-12-01 20:47:55 +00:00
Felipe Coury 10cab5fad3 Keep the TUI responsive during WSL image paste (#65083)
## Why

A slow or stalled Windows clipboard helper can block the TUI while it
reads a pasted image.

## What changed

Read and stage clipboard images on a background worker in WSL. Give each
paste a five-second deadline and stop and reap the PowerShell helper if
the read is cancelled or times out.

Keep the draft editable while the paste is pending. Insert the image at
the original cursor or selection, preserve later edits outside that
range, and cancel the paste if an edit overlaps the range or the draft
is no longer current. Block submission while the paste is pending and
show a reminder to review the draft before sending.

## Testing

Add regression tests for insertion after continued typing, submission
blocking, stale completions, temporary file cleanup, and timeouts.
Cover helper cleanup after cancellation or timeout and rejection of
oversized clipboard output.

GitOrigin-RevId: d7b1d520b242244f9749f02e9d62a57d17821340
2026-12-01 20:45:18 +00:00
Felipe Coury eb79af452e Load TUI image previews in the background and downscale large JPEGs (#65079)
## Why

Composer thumbnails and transcript tool previews read and decoded files
during rendering. A JPEG whose decoded pixels exceeded the 32 MiB
allocation budget could lose its preview even when the encoded file fit
within the file size limit.

## What changed

- Load visible composer thumbnails and transcript previews on background
  workers and request a redraw when the result is ready. Reuse prepared
  tool previews when the viewport changes size.
- Share the sidebar's scaled JPEG fallback with composer and transcript
  previews. Preserve the oriented source aspect ratio and enforce the
  encoded file size limit separately from the decode budget.
- Check that the owning thread has a local workspace before reading an
  inspected image. Generated artifacts can still load from the daemon host.

## Testing

Cover large JPEG previews in the composer and transcript, thumbnail
refresh after an attachment is replaced, text fallback for oversized
PNGs, and an inspected path shared by local and remote workspaces.

GitOrigin-RevId: f2c8948a9abaa2527932423224b6ebeda3e122ae
2026-12-01 20:29:37 +00:00
Benjamin Carlsson 854e723882 Add --cloud to launch interactive Codex sessions on Cloud (#65063)
## What changed

- Select the Codex Cloud backend at startup with `codex --cloud`,
  `codex agents --cloud`, or `codex resume --cloud`.
- Use `--env <ENV_ID>` to select a saved Cloud environment for new
  threads. Resume by picker, most recent session, ID, or name using the
  thread's saved environment and model.
- Reject local execution overrides and managed execution requirements
  that Cloud cannot enforce. Recheck managed requirements for the
  ChatGPT workspace selected when connecting.

## Testing

Cover initial prompt delivery, resume by ID and name, and rejection of
unsupported settings, including managed execution requirements from a
workspace selected after startup configuration was loaded.

GitOrigin-RevId: 6144decb9679f903607a586466cff37e402ab4a4
2026-12-01 19:17:41 +00:00
Felipe Coury 4bc6a0ea93 Render web URLs in TUI file citations as hyperlinks (#65052)
## Why

The TUI treated URLs in file citations as local paths. This could prepend
the working directory and escape parts of the URL needed to reach the
cited resource.

## What changed

Render HTTP and HTTPS `codex-file-citation` paths as web links, preserving
percent escapes, query strings, and fragments in the displayed URL and
hyperlink destination.

## Testing

Regression tests compare file citations with equivalent Markdown links
with and without a working directory. A snapshot covers the rendered
text and hyperlink metadata for a spreadsheet URL.

GitOrigin-RevId: 2f3213192fced0e92ae87062d086a9015113b862
2026-12-01 18:23:08 +00:00
Eric Traut b6a53810db Add failure stages and OS error kinds to daemon startup metrics (#65049)
## Why

The TUI's daemon auto-start metric reports a failure reason, but broad
reasons such as `other` leave it unclear which startup step failed.

## What changed

Add `failure_stage` and `os_error_kind` to failed `codex.daemon.start`
attempts. For example, a missing executable reports `spawn` at
`process_spawn` with `not_found`. The metric uses a fixed set of error
categories and keeps raw OS codes and diagnostic text local.

Report Windows detached-launch restrictions as
`windows_detach_restricted`, matching the reason recorded when the TUI
falls back to an embedded app server.

## Testing

Cover missing executables, Windows launch restrictions, and preservation
of the underlying I/O error. An in-memory metrics test checks that a failed
attempt increments the counter once and maps an unknown OS code to `other`.

GitOrigin-RevId: c5976517e1178fb8d65257362a893ad6254a2ddd
2026-12-01 18:08:05 +00:00
Eric Traut 51f546979e Keep Sixel pets visible during composer sparkle redraws (#65040)
## Why

When composer stars fade, the terminal can clear to the end of the row and erase part of the Sixel pet image.

## What changed

Leave a strip of default background at the right edge of the composer where the Sixel pet is drawn, so star redraws can update the composer without clearing through the image.

## Testing

Add a terminal regression test that uses text markers to stand in for Sixel pixels. It checks that the markers survive while the stars are visible and after they disappear, and that disabling the pet restores the composer background in that area.

GitOrigin-RevId: 0f55d1e5594fa503edeb13d2d262e3c73bb0366b
2026-12-01 17:37:47 +00:00
Eric Traut e14750e0b9 Preserve the exit summary when Ctrl+C is pressed again on Windows (#65038)
## Why

Once the TUI restores the terminal, another Ctrl+C becomes a Windows
console event and can terminate Codex before it prints the exit summary,
including the resume hint when available. The npm launcher can also
force-terminate the child by forwarding a Ctrl+C that Windows already
delivered to it.

## What changed

Register a Windows Ctrl+C listener before restoring the terminal and keep
it alive until the CLI or standalone TUI finishes printing the exit
summary. Skip forwarding `SIGINT` from the npm launcher on Windows.

## Testing

Add a Windows regression test that simulates `SIGINT` in the npm launcher
and checks that the child can finish and report its own exit code.

GitOrigin-RevId: cd73a4a2ecc22812bc301787e67c349f7720a93b
2026-12-01 17:07:18 +00:00
Benjamin Carlsson 949cdb56ef Rank TUI slash commands by recent usage (#65034)
## Why

The slash menu uses a fixed order within each match tier, so frequently used commands can stay buried among equally good matches.

## What changed

Rank commands within each match tier by frequency over the last 50 dispatches, keeping the existing order for ties. Count `/quit` toward `/exit` and `/btw` toward `/side`. Store slash command usage locally in `slash_command_usage.json`, separate from `$` picker history, when history persistence is enabled.

If `/exit`, `/quit`, or `/logout` ranks first, require its full name or explicit menu navigation before Enter can run it.

## Testing

Cover ranking after queued and disconnected dispatches, exact-match priority, persistence after widget handoff, and explicit selection of shutdown commands.

GitOrigin-RevId: 152f2b642dcac1ece9c3347eb4541d03fc3a425c
2026-12-01 16:52:56 +00:00
Benjamin Carlsson 5c865592f4 Remember the TUI's Cloud environment choice per project (#65033)
## Why

Selecting a saved Cloud environment for a draft did not set a default
for future conversations in the same project.

## What changed

- Save the environment selected for a Cloud draft in the local user
  configuration under `tui.default_cloud_environments`, keyed by project
  and local user identity. Selecting Default clears the preference.
- Reuse the preference at startup, when creating a new Cloud conversation,
  and when switching to Cloud. Use the normal Cloud environment selection
  when the saved environment is absent from the catalog or the catalog
  cannot be loaded.
- Use the v2 environment catalog, filter for eligible saved environments,
  and deduplicate entries across personal and workspace results.

## Testing

Cover preference persistence and clearing, project scoping, reuse after a
config reload, fallback when the catalog is unavailable, and catalog
pagination, filtering, and deduplication.

GitOrigin-RevId: bc4f66842c5c83dc75c5b10840fd596feedd44df
2026-12-01 16:51:26 +00:00
Felipe Coury dcafb4c96f Honor the session directory when resuming after /cd (#65030)
## Why

Changing directories with `/cd` could force in-app resume to use the current
directory even when the saved preference was to use the session's directory.

## What changed

Use the `/cd` directory for the remembered Current choice. Explicit CLI and
remote directory overrides still select Current. If reloading configuration
fails, reuse the existing configuration only when it already belongs to the
resume directory.

## Testing

Update the in-app resume and agents overview cold-resume tests to cover using
the session directory after `/cd`.

GitOrigin-RevId: d87bc2ba96f7ca10d6fd0d5ec0414712d44238e6
2026-12-01 16:41:22 +00:00
Felipe Coury eb1c5108a3 Reject oversized remote sidebar file previews before reading (#65022)
## Why

A remote preview can exceed the WebSocket client's 128 MiB message limit
once the file is base64-encoded and wrapped in a JSON-RPC response.

## What changed

Check the file size with `fs/getMetadata` before calling `fs/readFile` for
remote previews. Allow for base64 expansion and reserve room for the
JSON-RPC envelope. If the reported size exceeds that budget, show a
preview error with the file's size.

Continue with the read if the server lacks `fs/getMetadata` or omits
`sizeBytes`. Apply the sidebar's existing path error handling to metadata
failures as well as read failures.

## Testing

Extend the remote preview test to cover an image at the size limit,
oversized image and text files, and both metadata compatibility fallbacks.

GitOrigin-RevId: a284b3b76d9c56fe7e80445d880ccc17d575681c
2026-12-01 16:07:34 +00:00
Dylan Hurd 697f9e5a5e Wait for complete PTY input in the TUI startup test (#65021)
## Why

A completed write to the PTY master can reach the slave in fragments.
The startup test could run its zero-time poll or input discard before
the full sequence arrived.

## What changed

Use `FIONREAD` to wait until the full paste boundary and the subsequent
action input are each queued on the PTY slave. The wait leaves the bytes
unread and reports how many arrived if it times out.

GitOrigin-RevId: 077715814c4e11e6dfd42e63238222b0204aff4d
2026-12-01 15:55:25 +00:00
Felipe Coury 8a8708c657 Preview large JPEGs in the TUI sidebar (#65007)
## Why

A JPEG can exceed the sidebar's 32 MiB decode budget even when its
thumbnail would fit comfortably.

## What changed

When a full JPEG decode hits the allocation limit, try building a
preview from JPEG block averages within the same budget. The fallback
supports sequential and progressive JPEGs, applies EXIF orientation,
and preserves the oriented source dimensions in the sidebar label.

## Testing

Add tests for a 6544 × 1721 sequential JPEG that produces a 768 × 202
preview and for a progressive fixture that exercises scan refinement,
restart markers, EXIF rotation, and allocation limits.

GitOrigin-RevId: 232b37d8c239fbaa602930d9032c9a784bd030e2
2026-12-01 15:14:52 +00:00
Dylan Hurd 187affbce3 Wait for the Command Center grouping header in the startup test (#65004)
## Why

Startup can send a `thread/list` request while the loading screen is still
visible. Reading the terminal buffer at that point can make the saved
grouping test fail before the Command Center header has rendered.

## What changed

Capture completed terminal frames through a test-only channel. Have
`agents_overview_startup_restores_saved_grouping` wait for the grouping
header and verify that it shows `Group: Status`, the saved preference.

GitOrigin-RevId: e4479039e0663483016637be0fe5bfff62f27044
2026-12-01 14:58:43 +00:00
Benjamin Carlsson 1ba4c7b4fb Recover Cloud sessions with paginated TUI history (#64932)
## Why

A Cloud session can have more history than the TUI scans on reconnect.
Requiring the full transcript prevents recovery even when the recent
history is enough to verify where the session left off.

## What changed

Allow recovery from a bounded history window in owned transcript mode
when it confirms the required turns and updates. Preserve completed
local history outside that window and keep older history pageable
without rendering prompts or replies twice.

Bound turn metadata lookups, including across turns without items.
Sample partial history again before restoring queued question answers
so a response from another client has another chance to appear.

## Testing

Extend reconnect tests to cover partial and overlapping history,
missing live updates, duplicate-free pagination, bounded metadata
lookups, and queued question answers.

GitOrigin-RevId: 2f12d64dc83a6e7e42ee3923baaea40ca7f663ab
2026-12-01 05:32:15 +00:00
Benjamin Carlsson 0ee8daa550 Discover local and cloud tasks together in the agents overview (#64930)
## Why

The agents overview could miss cloud tasks when opened from a local
session, even when the cloud backend was already connected.

## What changed

- Refresh tasks from connected backends when opening the overview, and
  have **Show more** fetch additional pages from each backend that has
  more results.
- Preserve pagination progress across refreshes when it still applies,
  and keep refresh errors visible until the affected backend recovers.

## Testing

Add coverage for discovering and paging through cloud tasks from a local
session, reopening the overview with pagination progress intact, and
refreshing after lifecycle events from a background backend. Add a
snapshot of the mixed local and cloud overview.

GitOrigin-RevId: 11d3108dbbd8c7033cd8fe43cfd045fb3eacccd4
2026-12-01 05:20:42 +00:00
Joe Savona 333bcaa7ff Preserve line breaks in plugin detail descriptions (#64891)
## Why

The plugin detail popup passes the entire description as a single line,
so it loses the author's line breaks.

## What changed

Render each nonblank description line separately and keep dim styling and
terminal-width wrapping. Skip blank and whitespace-only lines so extra
spacing in the description cannot inflate the popup header.

## Testing

Add snapshots at 40 and 100 columns and regression tests for LF and CRLF
line endings, whitespace-only lines, literal Markdown, Unicode, and
description fallbacks. Cover navigation to the install action with a long
description in a short viewport and verify that the plugin picker stays
closed when plugins are disabled.

GitOrigin-RevId: e2f988d6e9b743a4fe318bed8e56563f495da605
2026-12-01 02:54:25 +00:00
Felipe Coury 01cb497492 Size the transcript layout cache to the viewport (#64882)
## Why

On tall terminals, painting the transcript and measuring the preceding
screenful for pagination can exceed the fixed 64-entry cache. Hidden
reasoning entries in compact mode also take up cache slots, which can
force visible text to be laid out again on the next frame.

## What changed

Set the entry limit to twice the viewport height plus two, clamped to
64–512 entries, and trim the cache when the viewport shrinks. Keep the
existing byte budget and skip caching hidden reasoning in compact mode.

## Testing

Cover eviction after shrinking the viewport and verify that repeated
frames reuse visible layouts in an 88-row viewport with partial history
and 100 hidden reasoning entries.

GitOrigin-RevId: 194f39e3ad1eb72a223481c600e95463a5674fc4
2026-12-01 02:41:35 +00:00
Eric Traut 3496c2f99c Prompt before replacing an existing transcript export (#64822)
## Why

When a filename is already taken, saving a conversation with `/export` ends
with an error. Users have to restart the export to choose a different name.

## What changed

Show a conflict picker with options to choose another name, replace the
existing file, or cancel. Choosing another name pre-fills an editable
numbered filename, such as `notes-3.md` when `notes.md` and `notes-2.md`
already exist.

Offer replacement only for regular files. After confirmation, check the
directory and file identities and use an atomic rename to install the new
transcript.

## Testing

Cover the picker actions and numbered filename suggestion, verify that
replacement requires confirmation, and check that replacement rejects a
changed file or redirected directory.

GitOrigin-RevId: edcb2fad858bab15a7228c69bd27a8ffd18e8d05
2026-11-30 22:40:58 +00:00
Eric Traut debcc79621 Use destination app-server defaults for new TUI sessions (#64821)
## Why

A fresh session could send client-side execution settings as thread
overrides, even when the destination app server had its own defaults.
The TUI also needs the destination settings when preparing the first turn.

## What changed

Use the destination defaults to prepare the first turn for session
replacement, starts from the agents overview, and backend switches.
Keep explicit launch choices and managed new-thread defaults in the
start request, and let the server resolve its own model and reasoning
effort. When `config/read` is unavailable, omit implicit execution
overrides and avoid replacing server instructions with terminal
visualization text alone.

## Testing

Extend session replacement tests to check the start request and first
turn, including shadowed launch settings, server instructions with
terminal visualization enabled, and compatibility with older servers.

GitOrigin-RevId: d66d6d51495ee067282514a138f7e39abfd91f2f
2026-11-30 22:39:43 +00:00
Eric Traut 5eb0253e6f Preserve service tier intent when starting, resuming, and forking (#64820)
## Why

A TUI resume request could override a thread's saved service tier with a
configured tier, a model default, or the local Fast default opt-out.
CLI forks could also send a tier before the destination's settings were
resolved.

## What changed

- Send a tier on resume or CLI fork only when the invocation supplies a
  tier override. In-app forks carry the current session's tier.
- On fresh startup, use the invocation's tier choice first, then the
  managed default, then the startup configuration. Keep an explicit
  reset (`serviceTier: null`) distinct from omitting the field.
- Use the current local Fast default opt-out when resolving tiers for
  new sessions and honor feature gating for launch overrides.

## Testing

Extend request assertions to cover tier omission on resume and CLI fork,
`flex` on in-app fork, and both explicit reset and disabled Fast mode on
fresh startup.

GitOrigin-RevId: d74f0f5e98506a0d5a6ead7106e1042691d41d41
2026-11-30 22:25:03 +00:00
Eric Traut 4e6aae20fa Keep TUI launch model overrides independent (#64819)
## Why

Resuming with only a model or reasoning-effort override could also
send the other value from the TUI's resolved config, overriding saved
thread settings. Startup forks could similarly carry an unrelated
default into the destination.

## What changed

Build thread requests from explicit launch overrides. Resolve model
and reasoning effort independently from invocation options and the
selected profile, honoring config precedence. On resume, omit unset
fields so the app server can restore saved values. On startup fork,
let the destination config supply unset fields.

Carry accepted model migrations into resume requests and apply managed
new-thread model defaults on fresh starts without a launch model or
effort choice.

## Testing

Extend resume coverage for model-only and effort-only requests and for
a launch effort shadowed by higher-priority managed config.

GitOrigin-RevId: 5190d9b820a36c4da6a179fbdbca27591b1e8541
2026-11-30 22:08:33 +00:00
Joe Savona 1843a4df93 Expand the bundled MCP statusline authoring guide (#64814)
## Why

An unsupported UI tag or property invalidates the entire statusline
response, so providers need a fallback for clients whose rendering
capabilities are unknown.

## What changed

- Document the available UI elements with examples for wrapping rows,
  spacing fields, preserving whitespace, and displaying status badges.
- Explain how to use `app.cli_version` to check support for features such
  as `spacer` and `maxLines`, and return a plain string for the entire
  footer when support is unknown or absent. Carry the `spacer` guidance
  into the generated TypeScript reference.
- Clarify how to diagnose provider discovery failures with F2 and check
  `tools/list` metadata when a provider is missing from the picker.

## Testing

Update the scenario snapshot that verifies an explicit statusline skill
mention loads the bundled guide.

GitOrigin-RevId: 9c6ea1d356146c2d666359732d6a065ed41d9fee
2026-11-30 21:44:01 +00:00
Felipe Coury 8fe2646705 Enable mouse-wheel scrolling in the Agent command center (#64808)
## Why

The mouse wheel scrolls the help view, but browsing a long task list
requires keyboard navigation. Once the list can scroll independently of
the selection, task shortcuts need to account for an offscreen target.

## What changed

Scroll the task list without moving the selection, and keep task titles
reachable in short viewports. When the selection is offscreen, show a
reveal hint and make the first task shortcut bring the selection back
into view. Keyboard navigation resumes following the selection.

Suppress repeats from the key that revealed the task so holding a
shortcut such as Stop cannot immediately act on it. On Windows, peek at
queued console input to account for press/release pairs emitted by
legacy ConPTY input.

## Testing

Cover wheel paging and short viewports with a rendering snapshot, test
that Stop requires a fresh press after revealing a hidden selection,
and verify that the Windows release probe leaves queued input intact.

GitOrigin-RevId: ebd7c0993978de3fc07245adf930f9fc63b306c1
2026-11-30 21:19:57 +00:00
Felipe Coury 8860825f86 Make agent center help scrollable and status tabs clickable (#64807)
## Why

Short terminals can cut off agent center shortcuts and require a resize to
read them. Status filter tabs and their overflow arrows are visible but
require keyboard navigation.

## What changed

- Scroll help with the configured list navigation keys or mouse wheel.
  Show a scroll hint when help extends beyond the viewport.
- Click a status tab to filter tasks, or click an overflow arrow to
  select the adjacent hidden tab. Overflow arrows also work in Analytics.
- Display `/` as the primary search shortcut and retain `F3` as a binding.

## Testing

Extend regression tests for help scrolling, task paging after resizing
in help, and mouse clicks on filter tabs and overflow arrows.

GitOrigin-RevId: b01b465626a681ca48a6e20547a24cf715a9a406
2026-11-30 21:02:08 +00:00
Joe Savona e251a64500 Reject positional arrays for TUI tree elements and props (#64798)
## Why

Serde's derived decoders could accept positional arrays for values the UI
tree schema defines as objects. For example, row props could be written
as `[1, "red"]`, tying their meaning to the order of Rust fields.

## What changed

Require JSON objects for typed elements and their props while retaining
literal string nodes and child arrays. Pass object fields directly to
the derived decoders so duplicate and unknown fields are still rejected.

## Testing

Add regression cases for positional props, positional elements at the
root and inside children, and duplicate keys. Verify that named row
layout props round-trip through JSON.

GitOrigin-RevId: 81fbd048e8b7b1df6b453d97c9e16e8194a451a6
2026-11-30 19:39:47 +00:00
Felipe Coury da92371925 Use an in-memory clipboard in TUI tests (#64797)
## Why

TUI copy tests can verify the text sent to the clipboard and `PRIMARY`
without depending on the host clipboard or waiting for a background worker.

## What changed

Give each test TUI its own in-memory clipboard and `PRIMARY` selection.
Handle requests inline and expose completions through the normal worker
polling path.

## Testing

Assert copied text in transcript, sidebar preview, and turn tip tests.
Verify that a second TUI's copy leaves the first TUI's Markdown clipboard
text and plain-text `PRIMARY` selection available for paste.

GitOrigin-RevId: 159845b17f0dac26b4b12c3851c101afe8d21d2d
2026-11-30 19:37:56 +00:00
alexsong-oai 6324dcf85d Enable the Google Cloud Vertex AI setup wizard by default (#64795)
## What changed

Offer “Use Google Cloud Vertex AI” during eligible terminal onboarding
without requiring users to set `gcp_setup_wizard = true`.

## Testing

Use the feature default in the Google Cloud setup flow test and explicitly
disable the Google Cloud wizard in the gateway-only onboarding case.

GitOrigin-RevId: 098c3842623de13aa9c4852e188f225923c5c5d9
2026-11-30 19:22:33 +00:00
alexsong-oai 945cf1400b Enable the gateway setup wizard by default (#64791)
## What changed

Offer “Use a custom provider or gateway” in eligible terminal sign-in flows
without requiring users to set `features.gateway_setup_wizard = true`.

## Testing

Exercise the default in the gateway onboarding test, which verifies that the
selected gateway authenticates before receiving the first chat request.

GitOrigin-RevId: e140b13dc12ebe9b35f37711d5b088fd02a0707c
2026-11-30 19:07:18 +00:00
alexsong-oai 4c82954eb0 Select the Amazon Bedrock Runtime provider during TUI onboarding (#64790)
## Why

When the TUI omitted the provider ID, the app server defaulted to
`amazon-bedrock`. Bedrock onboarding needs to select `amazon-bedrock-runtime`
for the first thread.

## What changed

Pass `AmazonBedrockRuntime` explicitly when onboarding with an API key, an
AWS profile, environment credentials, or manually entered AWS credentials.

## Testing

Extend the daemon startup integration test to accept credentials detected in
the running daemon and verify that the first thread shows
`amazon-bedrock-runtime` in the status line. The test leaves the model unset
so the thread uses the selected provider's catalog.

GitOrigin-RevId: 57753a29c77b0bd1bcbb0494057770329cd0b67d
2026-11-30 19:06:01 +00:00
Eric Traut 1b06a7002e Preserve Git root casing in the folder trust prompt (#64777)
## Why

On Windows, a case-folded trust key can make a Git root appear as a
separate path in the folder trust prompt even when it is the current
directory.

## What changed

Display the Git root with its original casing when it matches the
current directory. Keep the selected trust key for saving the decision
and continue to show distinct trust targets.

## Testing

Cover mixed-case Git roots in trust resolution and verify that the
prompt displays a single path for a matching root while keeping
distinct targets visible.

GitOrigin-RevId: 95b459dbcb8acf0611da8b04a1a413e56663f1e4
2026-11-30 18:05:37 +00:00
Joe Savona 81425480f1 Fix blank gaps and backgrounds in TUI flex rows (#64775)
## Why

Blank gaps in nested rows can shift end-aligned text when a row is
clipped. Blank lines can also lose their inline code or flex background.

## What changed

Suppress unpainted gaps on blank lines in aligned rows while preserving
spacer padding that clipping can reclaim for the ellipsis. Paint inline
code gaps and fill explicit flex backgrounds through the visible height
of stretched bands.

## Testing

Add rendering regressions for clipped end alignment, ellipsis placement
next to a wide glyph, and background coverage on blank lines.

GitOrigin-RevId: 2fc9d4b651dbf8a3cd8f63867bc6730a3bebd3ac
2026-11-30 17:43:58 +00:00
Joe Savona e860a98090 Add named icons to custom statuslines (#64774)
## What changed

Render named `icon` elements inline with terminal text. Badges can
display an icon on its own or place it before or after a label. For
example, a success badge can show a `check` icon next to “passing”.

Keep icons intact when wrapping or truncating text, including icons
that span multiple cells such as `code` (`</>`). Expose the new
element and badge combinations in the bundled TypeScript contract.

## Testing

Add coverage for icon and badge rendering, whole-icon truncation,
invalid icon payloads, and badge children counting toward the UI tree
node limit. Update the TypeScript contract fixture to exercise a badge
with a leading icon.

GitOrigin-RevId: 8a5afb0662a71cf1b5d16400b9866cb414c11646
2026-11-30 17:43:15 +00:00
Joe Savona f57352c536 Add list elements to custom status lines (#64773)
## Why

Custom status lines need a way to display grouped entries with automatic
numbering and keep wrapped lines aligned with the item text.

## What changed

Add `list` and `list-item` to the UI tree and the bundled TypeScript
contract. Each direct child of a `list` is an item. Use `list-item` to
combine multiple elements under one marker.

Lists use bullets by default and accept `number` or `none` as alternatives.
Wrapped lines align with the item text, and nested numbered lists start
their own count.

## Testing

Add renderer tests for wrapping, nested numbering, marker placement in
rows, clipping, and background preservation. Extend the decoding and
TypeScript contract tests to cover invalid markers.

GitOrigin-RevId: 991d230357f035ccbe7e52956ef1cbfe5b1e2174
2026-11-30 17:42:37 +00:00
Felipe Coury f92681791d Open /status in an interactive TUI modal (#64772)
## Why

Rate limits and thread usage can arrive after `/status` is displayed.
Updating a status card already in terminal scrollback required rewriting
history and depended on where the card was rendered.

## What changed

- Show the report in a scrollable modal with Overview, Configuration, and
  Session tabs. Apply rate limit and thread usage results to the open report
  without writing status output to the transcript or terminal scrollback.
- Copy a selected field or the full report directly from the modal, and open
  usage settings from the same view. Remove status fields from the `/copy`
  picker.

## Testing

Add coverage for overlapping refreshes, dismissal during account or thread
changes, keyboard navigation and copying during an active turn, and scrolling
in a narrow terminal.

GitOrigin-RevId: 64961c4d013607e373d50a79182b74e3048c632f
2026-11-30 17:40:02 +00:00
Benjamin Carlsson f7184ab849 Recover cloud conversation history on idle TUI reconnect (#64770)
## Why

Reattaching a cloud reply stream after a disconnect can leave gaps in
the transcript. Queued follow-ups also need to wait until the TUI has
caught up and knows whether a turn is already running.

## What changed

- Automatically resume eligible idle cloud conversations with history
  recovery. Replay missed items and repair partial replies in place while
  preserving the draft and native terminal scrollback.
- Hold queued follow-ups until the reattached stream has delivered its
  pending events and any active turn has settled.
- Reconcile queued async question answers against recovered history.
  Drop answers already recorded and return unresolved unsent answers
  to the composer for review.

## Testing

Add regression coverage for transcript repair, scrollback preservation,
queued input during catch-up, and async question answer recovery.

GitOrigin-RevId: 3378479ff886204cdc473a701ef51b3fc8b6b5c0
2026-11-30 17:27:17 +00:00
Benjamin Carlsson ed33bb35af Enable /archive in TUI side chats (#64767)
## Why

Side chats disabled `/archive`, so users couldn't archive the current
side chat from the composer while the sidebar was hidden.

## What changed

Show a confirmation in the composer even when the sidebar is hidden.
Warn about stopping a running turn, discarding unsent input, or losing
temporary chat history when applicable.

On confirmation, return focus to the parent chat's composer. Archive
saved side chats and remove them from Side chats. Close temporary side
chats and discard their history after cleanup succeeds.

## Testing

Cover saved side-chat archiving, including retry after a failed archive,
and verify that a temporary side chat stays accessible with its queued
input when cleanup fails.

GitOrigin-RevId: 1bbe25a241719cdc2722bc8db915dea9111b6fc9
2026-11-30 17:14:19 +00:00
Felipe Coury 3506461cf4 Separate TUI transcript rendering from input handling (#64765)
## What changed

Let the transcript reader paint into a caller-provided frame and area,
returning the delay for the next search or history-loading frame. Split
event preparation, including clipboard completions and selection ticks,
from input dispatch so the app can refresh visible rows before handling
selection input.

Extract transcript reader construction and centralize the app's overlay
input checks. Route draft snapshot flushing through `ChatWidget`.

GitOrigin-RevId: c5e093f585e264c4ffea51ebfcff0b08a1c3ff93
2026-11-30 17:00:53 +00:00
Eric Traut f62d4836b8 Avoid unnecessary TUI redraws on terminal focus changes (#64752)
## Why

Switching away from an idle composer can write to the terminal even when
there are no animations to clear. Regaining focus already triggers a draw.

## What changed

On focus loss, request a redraw when composer sparkles are visible or
when an active empty-state replay is canceled.

## Testing

Add a PTY regression test that checks for zero terminal output after idle
focus loss and verifies that input is accepted immediately after focus
returns, in both inline and fullscreen modes.

GitOrigin-RevId: c961a4274049b98fff7307092f6ac89d51cf8e95
2026-11-30 16:25:43 +00:00