Commit Graph
11084 Commits
Author SHA1 Message Date
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
Eric Traut d1e3f9dfe3 Fix realtime V3 transcript reconciliation for handoffs (#46922)
## Why

Interleaved speaker transcripts can fragment handoff context, and delayed final transcripts can overwrite newer speech.

## What changed

- Reconcile V3 transcript deltas and finals with the latest entry for the same speaker.
- Replace accumulated text only when the final transcript extends it, preserving newer speech when a final arrives late.
- Start a new entry after each completed utterance, keeping repeated speech and final-only turns distinct even when empty deltas arrive.
- Preserve live transcript notifications and legacy protocol behavior.

## Testing

Add unit coverage for interleaved speakers across reconnects, either completion order, repeated utterances, final-only turns, and empty deltas. Add app-server integration coverage for expanded and delayed finals, checking live notifications and reconciled handoff context.

GitOrigin-RevId: 961729281f61b95fd3e0c5cc3ec72512987980b3
2026-09-21 02:02:41 +00:00
alexsong-oai 75db67bbc6 Enforce current provider requirements for the model catalog (#46917)
## Why

The app server retains its startup model provider, but managed provider requirements can change while it is running. Catalog reads and background refreshes must check those requirements even when models are cached.

## What changed

- Gate `model/list` and background refreshes through a shared catalog that validates the startup provider against current requirements.
- Return JSON-RPC error `-32600` with restart guidance when the provider no longer complies, and skip background requests to that endpoint. Requirement load failures also block catalog access.
- Log only the error kind for blocked refreshes to avoid exposing credentials in parser diagnostics.

## Testing

Add coverage for cached catalog access after provider selection or definition changes, invalid requirements, cloud configuration load failures, and recovery when requirements allow the retained provider again. Extend refresh tests to cover startup provider overrides, blocked endpoint requests, and credential-safe logging.

GitOrigin-RevId: 03127bba46f1f59f2a8b1dc37391eab75f9be23c
2026-09-21 01:19:40 +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 282d655def Preserve voice playback across pauses and packet bursts (#46880)
## Why

A second audio ring can overwrite late speech with silence, and valid RTP
bursts can exceed the jitter buffer's 60 ms reordering window and be dropped.

## What changed

- Forward decoded PCM directly from a GStreamer `BaseSink` to the bounded
  CPAL queue, letting CPAL pace playback and handling partial writes.
- Disable `drop-on-latency` so valid queued speech survives packet bursts;
  existing ingress permits continue to bound retained packets and bytes.
- Cancel blocked writes on native flushes while preserving speaker epoch
  isolation, and remove the obsolete playback delay accounting.

## Testing

Add regression tests for preserving PCM across a pause, forwarding all admitted
packets in an RTP burst, and cancelling a blocked speaker write on an unexpected
flush.

GitOrigin-RevId: c299c6289563d6b4d943362bc3463dbfce9289e7
2026-09-20 20:16:51 +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
Rennie c45ea25ffb Allow subagents to request MCP elicitation input (#46877)
## Why

MCP requests requiring user input previously failed in subagents with guidance to ask the parent agent, blocking browser sign-in, form input, and interactive tool approval in the child thread.

## What changed

Remove the root-only MCP elicitation guard and `allow_user_interaction` plumbing so subagents can surface prompts and wait for responses under the existing approval policy and automatic review rules. Connector authentication can now return retry guidance after acceptance or preserve the original failure when declined.

Keep legacy tool approvals through `request_user_input` restricted to the root thread.

## Testing

Update unit and integration coverage for subagent prompt resolution, form responses, connector authentication acceptance and decline, automatic approval, strict review, and approval-policy updates on reused connections. Update the browser sign-in scenario snapshot to show the subagent continuing after an accepted response.

GitOrigin-RevId: c226fc6dfde724ed22b91dc04dd32bbc15245bee
2026-09-20 19:42:18 +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
Eric Traut a2de8fedcc Move fullscreen transcript control to TUI configuration (#46849)
## What changed

Use `tui.fullscreen_transcript` to opt into the fullscreen transcript, including scrolling, selection, and search. It defaults to `false`; `--no-alt-screen` and `tui.alternate_screen = "never"` still take precedence.

The new preference controls both the first frame and application startup. Boolean CLI overrides for it are allowed during daemon startup. The old `features.transcript_v2` flag is deprecated and ignored, with a notice directing users to the new setting; it does not migrate into or override the preference.

## Testing

Add coverage for default terminal scrollback, fullscreen persistence through startup, alternate-screen restrictions, daemon override validation, and independence from the deprecated flag. Update existing history and activity tests to use the new preference.

GitOrigin-RevId: 4117bf1ee548fa8d101a594f9506673d87c74c15
2026-09-20 16:59:00 +00:00
Eric Traut 79ef00ded1 Honor the system clock preference in TUI completion timestamps (#46845)
## Why

Completion timestamps always used a 12-hour clock, even when the host preferred 24-hour time.

## What changed

- Detect the clock preference from native settings on macOS and Windows, and from `LC_ALL`, `LC_TIME`, then `LANG` on Linux with glibc.
- Render completion times in the detected format, such as `14:32` instead of `2:32 PM`, for both live turns and restored history.
- Cache detection without changing the process locale, and retain 12-hour output when the preference cannot be determined. Recognize standard `C` and `POSIX` locales as 24-hour on Linux and Android.

## Testing

Add tests for locale precedence, unavailable locales, and clock pattern parsing, plus snapshot coverage for 24-hour timestamps with dates and line wrapping. Update completion timestamp normalization to handle both clock formats.

GitOrigin-RevId: eb338e67de627cbb992de16058884ece2b4b9ff7
2026-09-20 16:52:02 +00:00
Eric Traut 15312c326c Select read-only permissions for temporary structured threads (#46844)
## Why

Managed permission profiles take precedence over the legacy sandbox override, so a managed `:workspace` default can prevent temporary structured threads from starting with the required read-only permissions.

## What changed

Set `default_permissions` to `:read-only` when starting a temporary structured thread without a custom permission profile. Preserve existing custom profile handling.

## Testing

Add coverage for a managed `:workspace` default, verifying read-only permissions when allowed and rejection when read-only is disallowed. Extend recap request assertions to check the read-only sandbox and permission configuration.

GitOrigin-RevId: 865a0f67d81a6729622cb1889c50f17c0ef7f531
2026-09-20 16:51:37 +00:00
Eric Traut 724cdfbd32 Simplify agent command center hints and back navigation (#46840)
## Why

The command center's shortcut footer consumes several rows in narrow terminals, leaving less space for tasks. The overview also ignores attempts to dismiss it with `Esc`.

## What changed

- Keep primary actions in a single-line footer and show task and navigation shortcuts in a `?` help view.
- Respect configured bindings, suppress conflicting hints, and ignore key repeats when toggling help.
- Let the configured cancel key close help or cancel search and rename before dismissing the overview.
- Track overview dismissal while disconnected and clear stale connection notices after reconnecting.
- Use picker defaults for task action and error dialogs, and the theme accent color for agent status titles.

## Testing

Add coverage for help rendering, cancel navigation, custom shortcut conflicts, and overview dismissal during reconnection. Update snapshots for the compact footer and narrow layouts.

GitOrigin-RevId: 457b1e667dd87be2e8216936c5402eb6ab70fde1
2026-09-20 16:44:47 +00:00
Eric Traut eef77aa211 Add status filter tabs to the agent command center (#46839)
## What changed

- Replace status totals with counted tabs for All, Needs you, Working, Ready, and Inactive tasks.
- Cycle filters with `Tab` and `Shift+Tab`, respecting configured task and list bindings. Combine status filtering with search and retain the active filter across refreshes.
- Keep a task visible while renaming it if its status leaves the active filter. Preserve the rename target and draft on failure, and reconcile selection when editing ends.

## Testing

Add coverage for filter navigation, narrow tab rendering, configured shortcut precedence, and rename cancellation, submission, and failure recovery after a status change.

GitOrigin-RevId: 935a8eadbd3fa970a573614ba653c13ff6541167
2026-09-20 16:43:59 +00:00
Eric Traut 569888ac65 Refine the agent command center layout and metadata editing (#46838)
## What changed

- Show the active grouping in the header and place the search hint or active search/rename field above the task list.
- Move connection, worktree creation, refresh error, and server version notices to the footer, preserving the title and task counts. Give active key chord hints priority over notices.
- Clip long search and rename input at grapheme boundaries and position the cursor using the visible suffix.
- Show `Loading tasks…` while the initial task refresh is pending.
- Use standard picker defaults for the agent sign-in selection.

## Testing

Add regression coverage for long Unicode search and rename input, including combining characters, joined emoji, and cursor placement. Update layout snapshots and assertions for footer notices, key chord priority, and search editing during reconnection.

GitOrigin-RevId: 57da83c4c0beaa89fe88d3be03b468a9f2a739c6
2026-09-20 16:43:41 +00:00
Eric Traut d4cb75357f Improve agent command center rows and page navigation (#46837)
## What changed

- Align task titles, status, and relative update times in columns, hiding metadata at narrow widths. Highlight the full selected row and show explicit empty states.
- Share grouped row layout between rendering and paging so `PageUp` and `PageDown` move by the visible viewport, account for group headings, and stop at either end. Support paging while searching.
- Show filtered group counts, shorten long project paths, and indicate additional rows above or below the viewport.
- Display system errors as `Error` and unloaded tasks as `Inactive` instead of `Finished`.

## Testing

Add a column-layout snapshot and paging regression coverage for short lists, multiple project groups, filtered tasks during reconnection, and boundary clamping. Update existing command center snapshots for the new layout and labels.

GitOrigin-RevId: b2bfaf26a48f7a02a48be6e1499357a79c09cede
2026-09-20 16:42:29 +00:00
Eric Traut b05b3e180b Respect reduced motion in the voice UI (#46835)
## Why

Voice meters and partial user transcripts continued updating with `tui.animations = false`.

## What changed

- Hide microphone and speaker meter histories when animations are disabled, and size the composer to fit the remaining voice controls.
- Keep partial user transcripts out of the conversation until finalized while preserving transcript tracking and final history entries.
- Skip footer updates caused solely by audio meter changes when animations are disabled, while retaining speaker activity transitions.

## Testing

Update transcript, replay, and rendering tests to cover hidden partial transcripts and finalized history. Adjust voice composer snapshots and clipped-layout coverage for the reduced height.

GitOrigin-RevId: fb1939d6d8b3edc60fdd0a33ba7798d37bd9337c
2026-09-20 16:26:34 +00:00
Eric Traut bba48e5ce8 Add independent controls for TUI visual effects (#46832)
## What changed

Replace `tui.whimsy` with `[tui.effects]` preferences for `starfield`, `shimmer`, `welcome`, `effort`, `progress`, and `title`. Each defaults to `true` and remains subordinate to the `tui.animations` master switch.

Wire the preferences into composer effects, welcome artwork, status and loading text, progress indicators, and terminal-title animations. For example, disable shimmering text while keeping progress animations:

```toml
[tui.effects]
shimmer = false
```

Keep retired `tui.whimsy` entries loadable but ignore their value. Update the configuration schema to expose the new preferences.

## Testing

Add and extend coverage for independent shimmer and progress effects, master-switch precedence, welcome and starfield controls, terminal-title blinking, and strict configuration loading with the retired setting.

GitOrigin-RevId: 28b37ba52872133b8954543cabe9ff424147f1c5
2026-09-20 16:16:46 +00:00
Eric Traut 5c5308fc9a Add an animated Codex logo to fresh conversations and onboarding (#46752)
## What changed

- Render a rotating Codex logo in unused space above the composer on fresh conversations, without moving content or the cursor.
- Fade and pause the logo while drafting or unfocused, hide it on alternate views, and dismiss it after submission or conversation activity. Respect disabled animations and stop after three rotations with a fade out.
- Replace the onboarding ASCII frame variants with the shared logo renderer, retaining a faded logo after the animation ends and allowing the existing shortcut to replay it.

## Testing

Add rendering and integration tests for logo placement, visibility, pause/resume timing, completion, and preservation of the draft, cursor, header, and footer. Add snapshots for fresh conversations and the onboarding welcome layout.

GitOrigin-RevId: b98c7dd10acea3ef25d6c1495ed22c24202d6280
2026-09-20 03:02:48 +00:00
Eric Traut 6b0a1a8325 Add a warning footer and dedicated warnings viewer to the TUI (#46751)
## Why

Keep diagnostics accessible without adding warning rows to the live conversation or changing the composer layout.

## What changed

- Show a deduplicated warning count in the passive footer, yielding to interactive hints.
- Open warning details with `F2`, `/warnings`, or a click on the warning notice. Support navigation, scrolling, and copying individual diagnostics while preserving the draft.
- Retain startup, runtime, MCP, and deprecation diagnostics in the full transcript. Group MCP details by server and preserve warnings during replay.
- Respect existing custom bindings and chord prefixes when enabling `F2`.
- Show an immediate explanation when `/pets` is unavailable.

## Testing

Add regression tests and snapshots for warning counts, draft preservation, viewer navigation and copying, narrow layouts, terminal scrollback, and keybinding conflicts.

GitOrigin-RevId: 2bc586430da60347cfbaa5bf128bc48f7f9dc777
2026-09-20 03:02:25 +00:00
Eric Traut 9ed1b74699 Preserve startup drafts and submit them when the session is ready (#46750)
## Why

The startup composer accepted edits but ignored submission. Its first frame also preceded configured screen settings, and startup failures could leave typed text unavailable.

## What changed

- Honor configured submit bindings during startup, retaining one confirmation until the session and protected input screens are ready. Repeated submit keys do not duplicate the message; edits, `Esc`, disconnects, or destination changes cancel confirmation while preserving the draft.
- Apply local screen, status-line, keymap, and paste settings before the first editable frame. Anchor the composer at the bottom in owned-screen mode and retain the loading frame until resumed history is ready to render.
- Keep an in-memory recovery copy through submission acknowledgment. On startup failure, restore the terminal before printing unsent text, expanding paste placeholders and escaping terminal control characters.

## Testing

Add regression coverage for deferred single submission, configured key chords, cancellation, protected input, paste handling, draft recovery, initial screen settings, and loading-frame handoff, plus a startup layout snapshot.

GitOrigin-RevId: 1eb4c63027f7d59af5d42d8545cd5cb5c3594306
2026-09-20 03:02:02 +00:00
Eric Traut de6ae71ad4 Stabilize transcript and composer interactions in the TUI (#46749)
## Why

Composer suggestions and transient hints should preserve the draft and transcript context. Submitting a local command while reading older history should reveal its output.

## What changed

- Separate persistent status from transient footer hints in the owned transcript, sharing layout calculations for rendering, measurement, and cursor placement.
- Overlay command and mention suggestions on history without moving the composer; hide retained suggestions while transcript interactions own input.
- Show responsive, grouped shortcut help above the composer and let `Esc` dismiss it before interrupting a task or navigating history.
- Resume transcript following for submissions, slash commands, and last-response copy results while preserving the reading position during background updates.
- Reset transcript interaction state after prompt reverts and refresh retained usage information without rewriting terminal history.

## Testing

Add regression tests and snapshots for popup placement, clipped layouts, footer focus, shortcut dismissal, local-command scrolling, prompt reverts, and pagination while browsing prompts.

GitOrigin-RevId: 890147313d53f050503165a57610c381ffb93ef5
2026-09-20 02:59:37 +00:00
Eric Traut 551844b3ef Add compact transcript browsing and prompt navigation to the TUI (#46739)
## What changed

- Make double `Esc` enter compact prompt browsing in the owned transcript view and inline overlay. Use left/right arrows to select prompts, up/down arrows to scroll, `Ctrl+T` to toggle details, and `Enter` to rewind and edit. `Esc` cancels browsing and restores the original reading position and presentation.
- Add a responsive browsing footer, a pinned prompt header for answer context, and contextual composer tips that respect `show_tooltips` and configured shortcuts.
- Load older history as prompt navigation needs it, preserve the selected prompt across pagination, and resolve rewind requests by cell identity. Reject remote prompt restoration when it contains local image paths or command syntax.
- Bound initial owned-transcript history loading to a budget of three screenfuls plus an item scan limit, independently of terminal scrollback settings.

## Testing

Add regression tests and snapshots for browsing, rewind, cancellation after resize and pagination, custom key bindings, search and selection precedence, offline input, prompt headers, composer tips, and history hydration.

GitOrigin-RevId: 1d9ef7b627f47c3def43e7aee7148b5909f6d357
2026-09-20 00:34:38 +00:00
Eric Traut df7f717c85 Add transcript search and per-activity detail controls (#46734)
## What changed

- Add incremental, case-insensitive literal search across transcript details, loading older history as needed. Use `F3` to start Find, or `/` in the transcript pager, and navigate matches in either direction. Closing Find restores the previous presentation and reading position.
- Add clickable activity detail controls and `F4` keyboard focus for inspecting individual activity groups in the owned transcript. Preserve expansion state as live activity becomes history.
- Expose configurable `global.find_transcript`, `global.focus_activity`, and `pager.find` bindings under `tui.keymap`. Let new defaults yield to existing custom bindings and show available completions for pending chords.

## Testing

Add regression coverage for Unicode matching, bounded scanning, paginated and changing history, selection during search, composer input isolation, activity controls, and custom shortcut conflicts.

GitOrigin-RevId: 5bcbcdfbca7c5c296c635ec9b079ccd7a908e336
2026-09-20 00:06:25 +00:00
Eric Traut f1feda2299 Integrate the interactive transcript into the alternate-screen TUI (#46733)
## What changed

- Render transcript history and live output above the composer when `features.transcript_v2` is enabled and alternate-screen rendering is available. Handle scrolling, selection, copying, links, and older-history pagination in the main view.
- Add a clickable return-to-latest control with new-activity hints and temporary clipboard status. Let plain Enter return to latest when the composer is empty.
- Reflow retained transcript content during drawing and preserve the launch-selected screen mode across configuration reloads and session transitions, including `--no-alt-screen` restrictions.
- Enter the alternate screen with its first synchronized frame, and box CLI startup futures to reduce stack usage during session transitions.

## Testing

Add regression coverage for transcript layout, input routing, follow controls, clipboard status, and screen-mode persistence. Add a PTY test for the first alternate-screen frame and clean exit, and extend session-transition coverage through the CLI dispatcher.

GitOrigin-RevId: 1daf077826c7744b0f57399d10d159923dc87a97
2026-09-20 00:06:00 +00:00
Eric Traut d7d9f2b9b5 Add selection and copying to the transcript viewer (#46732)
## What changed

- Add mouse selection, word and line selection, drag autoscrolling, and keyboard selection with `Ctrl+Space`. Support copying selected text and opening links with a modified click.
- Anchor reading positions and selections to source text so resizing, streaming completion, and history pagination preserve the displayed content. Preserve hard line breaks, indentation, tabs, and graphemes when copying, while excluding display gutters and soft wraps.
- Rejoin activity groups split across history pages while retaining the reader's displayed revision.
- Distinguish confirmed clipboard writes from unconfirmed terminal requests, and retain native clipboard ownership after the transcript overlay closes.
- Manage mouse capture and keyboard modes across overlay transitions, editor handoffs, and suspend/resume.

## Testing

Add regression tests for selection during live updates and pagination, source-text copying across resize, clipboard confirmation and lifetime, and terminal mode restoration.

GitOrigin-RevId: 6b2438f576567cbba755b2405915a25acf009b8d
2026-09-20 00:04:04 +00:00
Eric Traut 6ba6b73657 Render dynamic tool activity and preserve TUI history ordering (#46731)
## Why

The TUI ignored dynamic tool items, and replayed tool activity could differ from live output. Concurrent tool completion also needs to preserve transcript order when writing to terminal scrollback.

## What changed

- Retain dynamic tool rows, update them when calls finish out of order, and mark unfinished calls interrupted when a turn ends.
- Queue terminal output behind unfinished dynamic tools and drain settled rows in bounded batches. Preserve queued output through stream consolidation, resize, and rollback without emitting it twice.
- Align replayed file changes, MCP results, and exploration groups with live rendering. Keep hidden reasoning and terminal interaction details within compatible activity groups, and preserve finalized plan fragments.
- Ignore stale history-page responses, bound turn metadata requests to missing turns, and insert older history after session headers. Keep hidden review prompts as activity-group boundaries.

## Testing

Add regression tests and snapshots for out-of-order tool completion, interruption, ordered scrollback emission, rollback, deferred usage updates, replay consistency, overlapping history, and repeated hidden prompts.

GitOrigin-RevId: a3636cfcf4c9c43a0a5bc52a842b80a7834f1409
2026-09-20 00:03:43 +00:00
Eric Traut 392f56a611 Cancel pending transcript Home jumps on subsequent navigation (#46722)
## Why

Pressing `Home` while older transcript history is loading leaves a pending jump to the beginning. Subsequent navigation should supersede that jump so arriving history does not override the user's new reading position.

## What changed

Cancel the pending jump when scrolling, jumping to the latest entry, or navigating prompts in the read-only transcript viewer. Keep the in-flight history page by switching from `LoadingBeginning` to `LoadingOlder`. Handle navigation before the first draw as well as after rendering, while preserving pending jumps during passive highlight restoration.

## Testing

Add regression coverage for navigation after `Home` before and after the first draw, checking that arriving older history preserves the expected viewport. Extend prompt backtracking tests to verify that navigation clears the pending jump.

GitOrigin-RevId: 438c3289afee2719655b11dbc43a3ccb006a5fa3
2026-09-19 21:44:00 +00:00