Commit Graph
2875 Commits
Author SHA1 Message Date
Eric Traut d6093d3228 Offer explicit recovery for incompatible background servers (#47318)
## Why

Automatic daemon launches could silently fall back to embedded mode when shared feature settings differed from the session's requirements. Changing those settings affects other clients, and restarting the server may interrupt active or queued work.

## What changed

- Offer interactive choices to run without the daemon, restart with the required settings, or cancel. Default to cancel and require explicit confirmation for restart.
- Allow restart only for managed daemons with a feature mismatch, then recheck compatibility once. Noninteractive required-daemon failures return an error with `--no-daemon` guidance; optional attachment retains its fallback behavior.
- Preserve saved feature overrides on startup and require confirmation before applying requested shared-feature disables, including on fresh starts.
- Merge confirmed settings under the lifecycle lock, persist changes after the old process stops, and avoid restarting when the saved overrides already match.

## Testing

Add recovery-menu snapshots and confirmation tests, compatibility tests for required and optional attachment, daemon ownership and settings-preservation tests, and CLI terminal tests for cancellation, embedded fallback, confirmed restart, and disabling shared features.

GitOrigin-RevId: d50a6cf7e476b9647237431e8fc0fc6041ed17db
2026-09-22 16:07:38 +00:00
Eric Traut 7e6c4c20fd Enable /import in remote and local daemon sessions (#47317)
## Why

`/import` was unavailable in remote sessions and when connected to the local app-server daemon. Shared servers also broadcast import completions from other clients, which must not clear this client's pending import or report its completion.

## What changed

- Allow external setup migration through the connected app server in both session types.
- Detect setup using the active thread's working directory, or the remote working-directory override before a thread starts. Use home-only detection when no remote directory is available.
- Track the returned `import_id` and only clear the pending import and report completion for a matching notification.
- Skip refreshing configuration from local disk after import completion in remote workspaces.

## Testing

Add shared-transport coverage in embedded and remote modes for detection with and without a working directory, retrying failed imports, rejecting overlapping imports, and matching interleaved completion notifications queued before the import response.

GitOrigin-RevId: 864ed9fe87e5c554da79907ed80a01f0c9948392
2026-09-22 16:06:30 +00:00
victor-openai a1f40f3f13 Expose hosted plugin extensions in app-server summaries (#47263)
## What changed

- Request installed-plugin metadata with `includeExtensions=true` and carry optional `extensions` through the cache into `PluginSummary`.
- Add typed declarations for global, settings, thread, and file entrypoints, quick actions, settings tools, icons, and search mention providers. Update JSON schemas and TypeScript and Python bindings.
- Accept supported snake_case aliases and emit camelCase fields. Discard incompatible extension declarations without invalidating the installed-plugin inventory.

## Testing

Add an integration test covering extension metadata preservation, field normalization, and unknown entrypoint and quick-action types across live and cached `plugin/installed` reads. Update pagination assertions to require `includeExtensions=true`.

GitOrigin-RevId: b73b0d13c151a30dc1fb9cda70b5cd6d7e3e2441
2026-09-22 11:29:58 +00:00
alexsong-oai 064e701b0f Add explicit gateway OAuth sign-in to app-server (#47207)
## Why

Clients with a gateway sign-in UI need to control when browser authorization starts and inspect credential readiness before making authenticated requests.

## What changed

- Add `initialize.capabilities.explicitGatewayOauth` to require explicit login while allowing existing credentials to refresh. Preserve automatic authorization for clients that omit the capability, and prevent later connections from undoing explicit opt-in.
- Add `account/gatewayOAuth/read`, `account/gatewayOAuth/login`, and `account/gatewayOAuth/cancel`, plus `account/gatewayOAuth/changed` notifications. Send the authorization URL only to the initiating connection and cancel its login on disconnect.
- Check gateway authentication before returning cached results from `model/list`, with restart guidance when provider settings have changed.
- Update protocol schemas, TypeScript and Python bindings, and document capability probing and the sign-in lifecycle.

## Testing

Add tests for passive readiness reads, credential reuse after login, token exchange failures, cancellation and immediate retry, connection ownership, legacy versus explicit login, and model-list authentication checks.

GitOrigin-RevId: a26e116a62c9f3db84dc238a40b7f4e816eb1594
2026-09-22 06:36:09 +00:00
Eric Traut 639d2478cc Render aligned equations and optimization notation in TUI math (#47191)
## Why

Aligned equations and common optimization notation previously fell back to TeX source. Scripts without Unicode equivalents also prevented otherwise supported expressions from rendering.

## What changed

- Add display layouts for `aligned` and `\boxed`, preserving fraction geometry and alignment with surrounding math.
- Stack sum limits and `\underset`/`\overset` annotations in display math, with compact forms for inline math and nested arguments.
- Support `\substack`, uppercase `\mathcal`, and single-grapheme `\widehat`.
- Preserve scripts without Unicode equivalents using explicit grouping, such as `x_{gpt}` and `x^{q+1}`.
- Keep layouts bounded and retain source fallback for unsupported input or expressions that do not fit.

## Testing

Add snapshots and regression tests for optimization models, display limits, grouped scripts, fraction alignment, narrow-width fallback, malformed input, and layout bounds. Add streaming coverage comparing character-by-character output with complete rendering at wide and narrow widths in rich and raw modes.

GitOrigin-RevId: 83937880a309375f472228368ebe885d4f50bf9c
2026-09-22 04:33:58 +00:00
Felipe Coury d1092865f8 Allow forking conversations locked by another app in the TUI (#47185)
## Why

Conversations open in another app disable the composer. Let users continue in an editable fork while the original conversation remains owned by that app.

## What changed

- Add an `f`/`F` shortcut and footer hint to the locked conversation view, preserving local drafts and queued prompts in the fork.
- Show “Forking conversation…” while a fork is pending, block additional key input, and discard buffered input after forking from the locked view.
- Replace the previous session summary after a fork with “Fork created. You can continue here.”
- Keep the locked view and draft intact if the fork request fails.

## Testing

Add tests for shortcut ownership and modifiers, repeated input, editable forks that preserve drafts and queued prompts without taking the source lease, and failure recovery. Add snapshots for fork progress, completion, and the updated footer.

GitOrigin-RevId: 2ecdb0b7fc7e82d8295097faa567995d7a2f7d92
2026-09-22 03:49:43 +00:00
Eric Traut 75ec81c862 Enable automatic daemon startup by default (#47179)
## What changed

Promote `daemon_auto_start` to stable and enable it by default for eligible interactive launches. Remove its entry from `/experimental`.

## Testing

Update daemon startup, `--no-daemon`, and startup failure tests to exercise the default without explicitly enabling the feature. Disable daemon startup in unrelated TUI and path-safety test fixtures.

GitOrigin-RevId: 107d71108b96d09431148d7d61f10c6381929e05
2026-09-22 03:20:27 +00:00
Eric Traut 5106a5234f Enable the fullscreen transcript by default (#47178)
## What changed

Default `tui.fullscreen_transcript` to `true`, including when the `[tui]`
section is absent, and apply the same default to the first frame. Update the
configuration schema to match. Alternate-screen restrictions still take
precedence, and `tui.fullscreen_transcript=false` restores terminal scrollback.

## Testing

Update configuration and startup tests for the new default, including an empty
`[tui]` section and `--no-alt-screen`. Adjust PTY tests to cover default fullscreen
entry and explicit opt-out to terminal scrollback.

GitOrigin-RevId: e460dcd058d52c50da2abc5113bbb678e845d5fc
2026-09-22 03:20:04 +00:00
Alex Kotliarskyi b23324986d Expose HTTP origins in MCP server status (#47159)
## What changed

Add nullable `httpOrigin` to `McpServerStatus`, derived from the effective configured endpoint for both configured and plugin-provided servers. Return only the HTTP(S) origin, excluding credentials, path, query, and fragment; return `null` for stdio transports, invalid URLs, and non-HTTP(S) schemes. Update the generated protocol schemas and TypeScript and Python types.

## Testing

Extend status integration tests to cover configured and plugin-provided HTTP servers, verify that endpoint paths and query parameters are omitted, and assert `null` for a stdio server. Update protocol tests to check null serialization and compatibility with older inventory responses.

GitOrigin-RevId: 033ebdeefe829e3a48b2d4ab7d8866dac4cda5c5
2026-09-22 02:24:25 +00:00
Eric Traut bf7c87a7b7 Ignore stale thread-close notifications after resuming a thread (#47155)
## Why

A queued close notification from an old runtime can arrive after the same thread has been resumed. Because thread IDs survive reloads, handling that notification can incorrectly exit the TUI or switch away from the displayed thread.

## What changed

Confirm the displayed thread's status with `thread/read` before handling its close notification. Ignore the notification if the thread is still loaded. Bound verification to five seconds and retry an internal server error once.

If verification fails, reconnect remote sessions. Preserve close handling for embedded sessions, unreadable unpersisted threads, and servers that do not support the request.

## Testing

Add regression tests for stale and genuine close notifications, plus disconnects, timeouts, transient and persistent server errors, embedded-session fallback, and unsupported requests.

GitOrigin-RevId: 783433b11ed268aed521f3b2cc4d0aa3a36a3836
2026-09-22 02:15:01 +00:00
Ian MacLeod 720a21ae66 Prevent horizontal transcript selection from triggering autoscroll (#47137)
## Why

Dragging horizontally along the top or bottom transcript row could trigger autoscroll, moving the text under the pointer while selecting it.

## What changed

Require vertical pointer movement from the initial press row before selection autoscroll can begin. Remember that movement so a vertical drag can return to its starting edge and still autoscroll, and preserve the original pointer row across wheel scrolling.

## Testing

Extend regression tests and snapshots for horizontal selection at both edges, stable selected text across repeated ticks, wheel scrolling before the first drag, and autoscroll after a vertical drag returns to its starting edge.

GitOrigin-RevId: e13f3a80adbead1eecbeb281301667c8e12e1541
2026-09-22 00:38:29 +00:00
Won Park 26cb4d73e2 Add extra policy configuration for Guardian reviews (#47125)
## What changed

- Add `auto_review.extra_policy` and the managed `guardian_extra_policy` requirement to supply policy text alongside the resolved tenant policy. Nonblank managed values take precedence; blank values are ignored.
- Render the additional text through `{{ extra_policy }}` in Guardian reviewer templates and append it to the tenant policy for Guardian v2 classification before truncation.
- Preserve placeholder-like text inside supplied policies literally.

## Testing

Add coverage for configuration precedence, blank values, template substitution, and classifier prompts, plus a scenario verifying that managed tenant and extra policies reach the Guardian reviewer together.

GitOrigin-RevId: 180d8d716c63fe96a92ec5bfbd22db4ddccd4f1f
2026-09-21 23:06:36 +00:00
chiam-oai 772abc9425 Preserve and expose thread item lifecycle timestamps (#47114)
## What changed

- Persist producer-recorded item start and completion times in thread history, preserving existing non-null values on updates.
- Return nullable `startedAtMs` and `completedAtMs` Unix millisecond timestamps from `thread/items/list`, and update the generated schemas and TypeScript and Python types.
- Leave timestamps unknown for existing rows and older writers.

## Testing

Add coverage for exact timestamp persistence, protocol round trips with present and missing timestamps, paginated item responses, and compatibility with older database writers.

GitOrigin-RevId: 894853481085782ff54db1704799e41446d15e51
2026-09-21 22:23:26 +00:00
Felipe Coury bf91058b81 Lowercase the retry hint for conversations open in another app (#47112)
Change `R to Retry` to `r to retry` in the TUI notice and update the
corresponding rendering snapshots.

GitOrigin-RevId: f7971ba0f76ac446a5fea53b44390f65aa965be4
2026-09-21 21:10:30 +00:00
Eric Traut 8e7f50cba9 Preserve assistant answers in bounded TUI task responses (#47100)
## Why

The 999-byte response budget and blanket string truncation could discard assistant answers alongside supporting history. Thread lists could also lose entries when shortened to fit the budget.

## What changed

- Raise the response budget to 8,000 bytes and remove the separate 2,000-character cap on assistant messages in `read_thread` and `wait_threads`.
- Compact oversized read responses around each turn's latest assistant message, and retain every wait target and returned list entry with pagination cursors intact.
- Shorten only content fields when further reduction is needed, preserving valid JSON and protocol values such as IDs, cursors, phases, and statuses. Mark compacted responses and shortened content with `truncated`.
- Request archived thread pages at the requested limit without retrying with smaller pages to meet the response budget.

## Testing

Add regression coverage for oversized wait responses with Unicode and escaped text, list entry and cursor preservation, and an oversized read whose assistant answer survives into the next model request. Extend read and wait tests to verify assistant messages longer than 2,000 characters are retained when they fit.

GitOrigin-RevId: 459fa522d02fbe4cd877b9afe8e66c9358b7bbce
2026-09-21 19:55:40 +00:00
Felipe Coury e8cd975a55 Keep TUI hints immediately above the composer (#47096)
## Why

Activity indicators and queued input previews could separate usage notices and
reading controls from the composer.

## What changed

- Reserve the shared hint row below activity and previews in the owned transcript
  layout, and use its rendered position for hints and reading controls.
- Clip spacing and hints before activity and previews when vertical space is tight.
- Fit usage notice details within half the row, allowing the shortest complete
  warning to use more space on narrow terminals.

## Testing

Expand regression tests and snapshots for running turns, queued inputs, multiline
drafts, short terminals, follow-control clicks, and hidden actionable banners.
Cover five-hour and weekly usage notice width thresholds.

GitOrigin-RevId: e73b3614839ce35c5b0a009901514627a77d4190
2026-09-21 19:40:21 +00:00
Ahmed Ibrahim 09bb3d6942 Disable unused default dependency features (#47088)
## What changed

- Disable default features for `sentry`.
- Disable default features for `syntect`, explicitly enable `parsing`, `plist-load`, and `regex-onig`, and switch `two-face` to `syntect-onig` in `codex-rs/tui`.
- Remove the resulting unused dependencies from the Cargo and Bazel lockfiles, including Actix, Sentry integrations, `ureq`, and `yaml-rust`.

GitOrigin-RevId: b3ca6610fdc60ab99909660f56099fbb4093b9c5
2026-09-21 18:58:55 +00:00
Felipe Coury c37b7307db Format analytics credit usage with consistent decimal precision (#47086)
## Why

Chat analytics displayed raw credit strings, exposing values such as `0E-10` for plan-covered tasks and unnecessary trailing decimal zeros.

## What changed

Format ordinary credit amounts with two decimal places and thousands separators. Round directly from decimal digits to avoid floating-point rounding errors, so `1.005` becomes `1.01`. Normalize zero to `0.00`, while preserving the original strings for nonzero sub-cent amounts and values outside the safe conversion range.

## Testing

Add assertions for decimal and scientific notation, signed zero, rounding boundaries, tiny adjustments, and large values. Update the chat analytics snapshot to cover a plan-covered task showing `0.00` credits.

GitOrigin-RevId: f946cb408c2c37291447f90de02ebbb557fbc662
2026-09-21 18:38:18 +00:00
andrewgu-oai deb0a08f24 Update model catalog descriptions and GPT-5.6-Sol priority (#47085)
## What changed

- Describe GPT-5.6-Sol as a reliable agentic workhorse for everyday tasks and change its catalog `priority` from `6` to `4`.
- Describe GPT-5.5 as a proven previous-generation model for coding and general work.
- Refresh model picker, migration prompt, and agent tool snapshots to reflect the catalog updates.

GitOrigin-RevId: b39f51c22862b8cef585ed76f3973c9f4b670c27
2026-09-21 18:36:13 +00:00
Eric Traut 2fe4a2b4d8 Show the voice toggle in the TUI shortcut overlay (#47082)
## What changed

Add a Voice entry using the configured `toggle_voice` binding (`F8` by default). Show it only when voice commands are enabled and no side conversation is active.

## Testing

Update footer and shortcut overlay snapshots to include the Voice entry.

GitOrigin-RevId: ba92f5af1ce1a06d9700d31dcc90e5acb1613803
2026-09-21 18:19:34 +00:00
Anthony Tafoya f3037cafd3 Refresh host-supplied cloud skills at turn startup (#47074)
## What changed

- Replace the built-in orchestrator skill provider with a host-supplied cloud provider, using `cloud` authority and `c` root aliases in skill tools and prompts.
- Add `cloud.skills.enabled`, defaulting to true but requiring a supplied provider. Keep `orchestrator.skills` accepted as a legacy no-op setting, and remove the app server's automatic orchestrator provider registration.
- Discover cloud skills once per turn during cancellable startup. Serve catalog snapshots to prompts and tools without triggering discovery or retries.
- Scope cached catalogs and resources to authentication state. Preserve them on refresh failures within the same scope, invalidate them when that scope changes, and reject late discovery or read results from replaced cache generations.
- Reuse executor discovery catalogs only when successful discovery inputs and bundled-skill settings match.

## Testing

Add coverage for per-turn refresh, skill removal, same-account failures and reconnects, authentication changes, and stale in-flight results. Update configuration and tool tests for cloud authority, provider gating, and resource reads without an executor.

GitOrigin-RevId: c57e38ec7dcc880c0d4c8a2995adfd3e28301079
2026-09-21 17:28:14 +00:00
Eric Traut f07aaf920b Highlight selected newlines in the transcript view (#47068)
## Why

Transcript selections could include a newline without showing it in the highlight, making `code` and `code\n` look identical.

## What changed

Highlight one trailing cell for selected hard line breaks when space permits, including newline separators between transcript entries. Track logical line endings so soft wraps and synthetic rows do not receive newline highlights.

## Testing

Add selection snapshots for hard breaks within and between entries, plus layout coverage for empty lines, wrapping, trailing whitespace, and synthetic rows. Update the app selection test to assert the leading newline highlight.

GitOrigin-RevId: d6f332c472598a3f79557b7ebb41730c6acc7820
2026-09-21 16:42:35 +00:00
Eric Traut a4c8fc7a6b Deduplicate deprecation notices in the TUI transcript (#47065)
## Why

Global deprecation notices can be delivered again by hidden threads, creating duplicate transcript entries.

## What changed

Skip incoming deprecation notices whose summary and details match a notice already in retained history. Preserve notices with different summaries or details, and allow notices to appear again after clearing history or rebuilding the transcript during a thread switch.

## Testing

Add a regression test and transcript snapshot covering repeated live and replayed notifications, an open transcript overlay, distinct notice content, and delivery after clearing history or switching threads.

GitOrigin-RevId: 9c0512f588dfb54f7934380119211b57b0df0ee4
2026-09-21 16:36:01 +00:00
teddywyly-oai a6fdb11eda Preserve metadata in native user verification requests (#46952)
## Why

Native `openai/userVerification` requests need to carry optional `_meta` to clients for extension-specific presentation.

## What changed

- Accept optional metadata objects with the same validation as MCP elicitation.
- Restore metadata from the MCP request context, excluding `progressToken`, and forward it through `mcpServer/elicitation/request`.
- Update protocol types, schemas, and documentation while retaining support for requests without metadata. Challenge bytes and acceptance proofs remain unchanged.

## Testing

Add coverage for metadata validation, transport context restoration, and protocol round trips. Extend MCP integration tests to check that verification metadata reaches the client.

GitOrigin-RevId: 5d04004244cf33effac675c19e543157c48d1504
2026-09-21 07:01:52 +00:00
Eric Traut 774d642582 Populate the agents overview from background tool responses (#46946)
## Why

Tool responses can arrive without a `thread/started` notification, leaving background threads missing from the agents overview.

## What changed

Register metadata returned by background thread creation, forking, and resumption as a fallback, then refresh and repaint the overview. Clear turn history before registration and exclude ephemeral threads.

Preserve existing metadata and track archived or deleted threads so delayed tool responses cannot restore removed rows. Clear that removal tracking when a thread starts or is unarchived.

## Testing

Extend tests to cover tool-created and forked thread registration, missing start notifications, and delayed responses alongside metadata refreshes and lifecycle removals.

GitOrigin-RevId: a6f892f1c839dc69fac24b00c34927a7c5f8ce84
2026-09-21 06:09:42 +00:00
Eric Traut a86631502d Add independent TUI rendering toggles for Mermaid, math, and tables (#46938)
## What changed

Add `tui.rendering.mermaid`, `tui.rendering.math`, and `tui.rendering.tables`, all enabled by default and independent of animation settings. Disable individual renderers to display their source instead of diagrams, Unicode math, or formatted tables.

Apply preferences to streaming and completed responses, startup previews, and session changes. When table rendering is disabled, preserve pipe syntax, cell markup, and enclosing Markdown fences. Keep HTML clipboard formatting independent of terminal rendering preferences.

## Testing

Add coverage for individual defaults, source preservation, nested table fences, session settings, and clipboard behavior. Verify incremental rendering and emitted output match completed rendering across all eight toggle combinations.

GitOrigin-RevId: 48d765eac20a82881eed94f186bf5b025ff4f0db
2026-09-21 03:38:46 +00:00
Eric Traut 57567b8d9e Use shared, keymap-aware tips in the fullscreen composer (#46931)
## Why

Fullscreen composer hints used a small, fixed rotation, while catalog shortcut tips hard-coded default bindings. Tips should reflect the user's configured shortcuts and expose the shared catalog with working links.

## What changed

- Select complete, single-row catalog tips that fit the composer gap, keeping selection stable across redraws and varying it across sessions and turns.
- Prefer eligible startup announcements until a user turn begins, without restoring them after history is cleared. Cache parsed announcements while reevaluating eligibility.
- Resolve `{key:context.action}` placeholders using current primary shortcuts and chords; skip tips with invalid or unbound actions.
- Expand the tip catalog and share Markdown rendering between composer and session tips, preserving hyperlinks and supporting Ctrl/Super-click in the composer gap.
- Keep usage notices and interaction controls ahead of tips, and respect `show_tooltips` and idle, empty input.

## Testing

Add tests and snapshots for remapped shortcuts, unbound actions, stable tip selection, announcement dismissal, narrow layouts, styled links, and removal of stale link targets.

GitOrigin-RevId: 64751293d9f91e4444b112361540a73234f1d51d
2026-09-21 03:02:45 +00:00
Eric Traut 05f39d7346 Remove the Error prefix from TUI config.toml load errors (#46929)
GitOrigin-RevId: 8867014609ebd3c40e68c13da5438f222e8f463c
2026-09-21 02:46:32 +00:00
Felipe Coury bb054a2b03 Keep quota warnings visible in the TUI (#46912)
## Why

Quota warnings were hidden from normal transcript rendering, leaving no persistent reminder of remaining usage near the composer.

## What changed

- Show the most constrained quota window in the existing composer hint row, using the existing plan-specific warning thresholds. Include remaining usage, reset time, and `/status` when space permits.
- Keep the notice visible while typing or running a turn, even with tooltips disabled. Yield to interaction controls and blocking banners, and suppress the notice when usable credits are available.
- Preserve quota metadata across sparse updates and thread switches. Require a fresh account usage read to confirm recovery, ignore reads made stale by newer rolling updates, and clear notice state on account changes.
- Render quota warning history cells in both transcript modes while retaining warning counts and replay deduplication.

## Testing

Add unit, integration, and snapshot coverage for warning thresholds, narrow layouts, unchanged composer geometry, suppression, recovery, overlapping reads, account changes, and native transcript replay.

GitOrigin-RevId: e45dc94a6e7a9dad50307840b9fdb15978d053dc
2026-09-21 00:22:58 +00:00
Eric Traut ee2149a9b4 Preserve transcript position when opening settings pickers (#46910)
## Why

Opening a settings picker while reading older messages should preserve the
reading position. Settings errors and confirmations still need to be visible.

## What changed

- Keep the transcript anchored when opening `/model`, `/theme`, `/keymap`,
  `/memories`, `/title`, and `/statusline` without arguments.
- Resume transcript following for settings actions that report confirmations
  or errors, including save failures and unavailable commands.
- Keep inline commands and commands with arguments following their output.

## Testing

Add regression tests for picker open/close behavior, settings save failures,
confirmation output, and `/model` before startup completes. Include snapshots
of the preserved reading position and a visible theme save error.

GitOrigin-RevId: 0680e6414d43b8b5d2a3ab9a2df187abfb727d49
2026-09-21 00:16:33 +00:00
Eric Traut 88ef37c649 Identify local background servers in /status (#46905)
## What changed

Rename the `/status` connection row from `Remote` to `Server`. For local daemon connections, display `Local background server` instead of the socket address and version. Keep the address and version for remote connections, including explicitly configured Unix sockets.

## Testing

Add a local background server snapshot and coverage distinguishing local daemon connections from remote Unix sockets. Update daemon startup and worktree tests to expect the new label.

GitOrigin-RevId: 9460415fe1ec16d90f575917c1a4ce1bf19faaaf
2026-09-20 23:23:13 +00:00
Felipe Coury eaff9a5f14 Hide Back to bottom when the current transcript tail is visible (#46902)
## Why

Pausing transcript following can leave the current final row visible, making the “Back to bottom” control unnecessary after copying text, closing find, or enlarging the viewport.

## What changed

Base control visibility on whether the current transcript tail is visible, and hide it for an empty viewport. Keep the control available when a paused view shows an older live revision with new activity.

## Testing

Add regression coverage for empty viewports, copying at the bottom, closing find at the bottom, and resizing a paused view. Extend live-revision assertions and update the composer-gap snapshot to keep the gap blank in the paused detailed view at the tail.

GitOrigin-RevId: d33b4279f5f5f43ae76c34466c18e89b61ad766c
2026-09-20 23:15:50 +00:00
Felipe Coury 4ca8e7afff Make transcript list spacing uniform after streaming (#46899)
## Why

Adding blank lines only after multiline items gives lists uneven spacing. Completed lists in redrawable transcript views can use consistent spacing based on their rendered width.

## What changed

- Keep assistant and plan lists compact while streaming in the fullscreen transcript, without holding back completed list rows.
- On completion or interruption, separate all sibling items if any item spans multiple rows; keep single-line lists compact and recompute spacing on resize.
- Preserve the reader's displayed content when consolidating streamed cells, and include spacing policy in the Markdown render cache key.
- Retain existing list spacing for native terminal scrollback.

## Testing

Add regression and snapshot coverage for streaming completion and interruption, width-dependent reflow, reader position, nested and quoted lists, item paragraphs, and preservation of links and source metadata.

GitOrigin-RevId: b2230aaf76ae798ebb6bf15563f8b8dcb6f3d19d
2026-09-20 22:55:19 +00:00
Eric Traut d99213289f Honor the effective terminal color level in activity charts (#46897)
## Why

Activity charts bypassed the terminal color adjustments used elsewhere in the TUI, so Windows Terminal could receive a low-color fallback despite supporting truecolor.

## What changed

Use `effective_stdout_color_level()` when building the token activity palette so it honors the existing terminal adjustments and `FORCE_COLOR` override handling.

## Testing

Add a regression test with scoped terminal colors that asserts the current palette uses color and snapshots all five daily activity levels with RGB colors.

GitOrigin-RevId: c5a474bacb1416df754d71285106926f46a38e09
2026-09-20 22:23:09 +00:00
Felipe Coury 2db0ab7af1 Add right-click copying for transcript and composer selections (#46895)
## What changed

Allow right-clicking inside the transcript or composer to copy its selected text using the existing clipboard status messages. Clear the selection only when the right-click copy is confirmed; retain it after failed or unconfirmed copies. Keyboard copies continue to retain composer selections.

Preserve the draft, cursor, and transcript reading position. Refresh composer layout before checking mouse coordinates, and respect modal and transcript input ownership.

## Testing

Add regression tests and snapshots covering copy outcomes, selection retention, reading position, editor bounds after layout changes, and input ownership.

GitOrigin-RevId: 322b303394378a20b2a25b3d218777c9ea65c92b
2026-09-20 22:11:51 +00:00
Eric Traut 9fdff739ea Enable plain clicks on transcript links and style bare URLs (#46884)
## Why

Transcript links required a modified click to open, and bare URLs lacked the visual styling of explicit Markdown links.

## What changed

- Open links on release after an unmodified, stationary left click. Cancel activation after dragging, scrolling, or releasing elsewhere so text selection remains usable.
- Apply Markdown link styling to bare URLs while preserving surrounding prose, existing emphasis, Unicode, and table wrapping.

## Testing

Add gesture tests for bare and Markdown links at narrow and wide widths, drag and scroll cancellation, and existing modified-click behavior. Add styling tests and snapshots covering punctuation, emphasis, tabs, Unicode, and wrapped table URLs.

GitOrigin-RevId: 23d12c901932d7e3586d841e5a0ece00e422fccd
2026-09-20 20:47:14 +00:00
Felipe Coury 2f34d236f5 Add /tui to choose the terminal UI mode for the next launch (#46883)
## What changed

Add a picker for Scrollback and Fullscreen modes that requires explicit
confirmation and saves `tui.fullscreen_transcript` to the selected user config
file. Keep the running renderer unchanged and explain that a restart is required
and launch overrides still apply. Report save failures without changing the
stored preference in memory.

## Testing

Add picker snapshots and tests for confirmation, cancellation, selected-config
persistence, and failed saves. Add a PTY test covering mode changes in both
directions across restarts while verifying that the current session stays in
its original mode.

GitOrigin-RevId: 7f231ab37c89e2168133fcfd6aaee54775aa7972
2026-09-20 20:38:26 +00:00
Eric Traut 93b44c3a73 Streamline agent command-center shortcuts and layout (#46882)
## What changed

- Group shortcut help into Navigate, Tasks, and View sections using the shared shortcut renderer, adapting to one, two, or three columns and indicating when more height is needed.
- Show movement hints in the footer, move the new-worktree hint into help, and remove the idle search row. Give task-list column headers consistent styling.
- Change the default task-deletion binding from `Delete` to `Backspace`, while preserving text editing in search and rename inputs.

## Testing

Add snapshots for responsive help layouts, custom bindings, and active search. Add regression coverage for `Backspace` editing without deleting tasks, and update keymap conflict tests for the new default.

GitOrigin-RevId: 45d7f122c9474f1c054450800dcca5a9b2bbbcc5
2026-09-20 20:20:00 +00:00
Eric Traut 8b79d8a5f5 Count TUI launches by fullscreen transcript configuration (#46879)
## What changed

Increment `codex.tui.fullscreen_transcript` after final startup configuration resolution, tagging `enabled` with the configured `tui_fullscreen_transcript` value regardless of screen policy. Emit the metric only when analytics are not explicitly disabled, a metrics exporter is configured, and a global metrics client is available.

GitOrigin-RevId: 59732bc33dfa25f2fb1947ceec2e300e8e0045ca
2026-09-20 20:11:25 +00:00
Felipe Coury e29eceb751 Preserve streamed answers when subagents finish (#46867)
## Why

Subagent activity can arrive while the parent answer is still streaming. Rendering it immediately flushes the answer stream before the authoritative message completes.

## What changed

- Defer subagent activity until the answer stream finishes, preserving one complete answer before the activity row.
- Drain queued lifecycle activity when a turn ends without opening queued prompts.
- Show late subagent activity after the turn stops even when unresolved prompts remain queued.

## Testing

Add regression coverage for completion before or between answer deltas, a missing final delta, interrupted and failed turns, and late activity with queued questions. Extend dynamic activity coverage to verify that turn finalization leaves queued prompts unopened.

GitOrigin-RevId: f0577b9ac47cf652c7c75b3aace38c10dccada18
2026-09-20 18:26:57 +00:00
Eric Traut b48232f975 Enable mouse navigation in the TUI usage view (#46866)
## What changed

- Enable mouse input for the usage overlay, with clickable tabs and report controls that invoke the same actions as keyboard shortcuts.
- Scroll the report, dashboard, or help body with the mouse wheel in bounded three-line steps, preserving separate reading positions.
- Limit clicks to rendered targets and ignore stale targets after refreshes, control changes, or surface transitions.

## Testing

Add coverage for mouse event routing, clipped targets, remapped or disabled keybindings, stale targets, bounded scrolling, and retained reading positions. Exercise the business token model filter through a mouse click.

GitOrigin-RevId: be839695d46609b6df7062f99711701372335907
2026-09-20 18:26:14 +00:00
Eric Traut d6d43270bd Improve usage report layouts and preserve reading positions (#46864)
## Why

Switching reports reset their scroll positions, and resizing could pull users back to a selection they had deliberately scrolled away from. Small terminals also need room for usage details, while larger terminals can show more of the chart.

## What changed

- Retain independent scroll positions for each report, the dashboard, and help. Keep visible selections on screen during resizing while respecting manual scrolling.
- Hide plots in small report areas, expand charts to use available height, and place breakdown tables beside plots in wide focused reports.
- Highlight selected chat and plan rows with the shared picker style, preserving padding after wrapping.
- Show dated plan periods in the dashboard and collapse expanded plan details before closing with `Esc`.

## Testing

Add regression tests and snapshots for responsive layouts, reading-position restoration across tabs and help, selection visibility during resizing, and highlighted chat-row padding.

GitOrigin-RevId: e18a472ff4356324fed71e496f47762a7ccf657d
2026-09-20 18:18:42 +00:00
Eric Traut 46f7d99d0e Stabilize usage dashboard navigation and add keyboard help (#46863)
## Why

Wrapping navigation and contextual hints can shift report content as the displayed state changes, especially on narrow terminals.

## What changed

- Use compact report tabs, fixed control rows, and two footer hint rows to keep report geometry stable.
- Show the account plan in the `Usage` heading and move date ranges, grouping, model filters, sort controls, and update timestamps above reports.
- Add scrollable `?` help with an independent scroll position, preserving report selection, expanded details, and reading position when dismissed.
- Share control availability between keyboard actions and help, and preserve configured keybindings when they conflict with the help shortcut.

## Testing

Add regression coverage for stable tabs after request failures, help state preservation, dashboard selection scrolling, date and update-time controls, and custom keybinding precedence. Update layout snapshots for the revised navigation and narrow help view.

GitOrigin-RevId: ab89ed2fd346171362f487c64af7206d9123859a
2026-09-20 18:18:19 +00:00
Eric Traut 5e5cadad6b Refresh analytics on identity changes and compact usage menus (#46862)
## Why

Analytics must discard previously loaded reports when account identity checks fail. Usage actions also need to remain readable on narrow terminals and reflect customized list bindings.

## What changed

- Track identity invalidation across analytics reports and refresh the view to clear stale data and reload the account and reports.
- Recheck identity around chat and task loading, including after asynchronous work, before accepting results.
- Shorten `/usage` labels and use picker layouts that hide descriptions when space is limited. Show action-specific `open`, `choose`, and `confirm` hints using the active list keymap.

## Testing

Extend regression coverage for account switches during report loading, clearing and reloading reports, and retrying account discovery with `R`. Add a narrow usage-menu snapshot and update usage and reset-dialog expectations.

GitOrigin-RevId: 0c60a0f930c6b00457aa897711bd5a496c7decde
2026-09-20 18:17:27 +00:00
Eric Traut d2d196bd6a Remove analytics TUI snapshots (#46861)
## What changed

Remove analytics snapshot assertions, saved snapshots, and snapshot-only setup and serialization code. Retain targeted behavior and rendering assertions, and add explicit checks for narrow-screen dollar amounts, negative usage values, metric selection, and summary scrolling.

GitOrigin-RevId: 58f43f8037818d5f6d55630b0bf670b017efd8be
2026-09-20 18:17:05 +00:00
Eric Traut ad538e1c2d Limit the welcome logo animation to onboarding (#46859)
## What changed

- Remove the animated logo and its redraw scheduling from fresh conversations while retaining conversation lifecycle tracking.
- Enlarge the onboarding logo stage from 48×17 to 60×21 cells and raise the minimum terminal size to 64×41.
- Keep the final onboarding pose at full opacity after the spin finishes, without a completion fade or further redraws.

## Testing

Update snapshots for the fresh conversation header and larger onboarding logo. Add coverage for the full-color settled pose and verify that hidden or clipped frames preserve the remaining animation time.

GitOrigin-RevId: a1914ca01a49a6641e16d9fda8673826a975d70d
2026-09-20 18:06:04 +00:00
Eric Traut e39839509a Add mouse selection and editing to the fullscreen composer (#46858)
## What changed

- Support click-to-position, drag selection, double-click word selection, and triple-click logical line selection in the composer, respecting wrapping, scrolling, and atomic grapheme and placeholder boundaries.
- Copy selected draft text through the existing clipboard status flow without changing the draft or selection, before interrupt and exit shortcuts consume the key.
- Replace or delete selected text with editor input, flush buffered typing before mouse edits, and reconcile removed paste and image placeholders.
- Coordinate composer gestures with transcript selections, completion popups, and modals. Use generic retry messages for copy failures.

## Testing

Add coverage for Unicode and wrapped-text hit testing, selection highlighting and editing, multiclick dragging, placeholder cleanup, history navigation, and fullscreen copy and input ownership.

GitOrigin-RevId: 939ef461ec67855b3e87c3c7ddd8a60a3250c7cd
2026-09-20 17:58:42 +00:00
Eric Traut f3f07753ca Extract shared text selection helpers for the TUI (#46857)
## What changed

Move selection units, word and logical-line boundaries, click counting, and copy-key detection into `text_selection`, and update the transcript view to use them. Clamp selection offsets to valid UTF-8 boundaries and exclude key-release events from copy-key detection. Make `TranscriptView::cancel_search` accessible throughout the crate.

## Testing

Update existing text-layout tests to exercise the shared selection ranges for wrapped lines, combining characters, and empty logical lines.

GitOrigin-RevId: 6a8b44b4aa97fe2965a5e330121dc22fddc335b5
2026-09-20 17:58:19 +00:00
Eric Traut 2426ed7684 Support stadium nodes in Mermaid terminal diagrams (#46856)
## Why

Flowcharts containing stadium nodes such as `A([Start])` currently fall back to source text instead of rendering in the TUI.

## What changed

Parse stadium declarations and render them with rounded box corners in every supported flowchart direction. Track node shapes explicitly so repeated declarations must agree on both label and shape. Document the supported `([label])` syntax.

## Testing

Add parser and snapshot coverage for repeated references, conflicting declarations, malformed syntax, Unicode labels, mixed shapes, and width limits across all four directions. Add a TUI snapshot for a stadium flowchart and verify source fallback when the diagram is too wide or malformed.

GitOrigin-RevId: 5ebd8babfd25ab4429b3e6c408cb7be8d7f1bb8e
2026-09-20 17:36:48 +00:00
Eric Traut 7c1e485c87 Increase the default terminal probe timeout from 100 ms to 250 ms (#46855)
GitOrigin-RevId: 72cef75de204dec80de4dac6388f6fefc50cc80a
2026-09-20 17:25:15 +00:00