Commit Graph
2663 Commits
Author SHA1 Message Date
Benjamin Carlsson 9c9451131f Add /voice settings to choose a voice for future conversations (#44622)
## Why

The TUI has no voice picker, and realtime start requests omit the voice preference. Voice selection also needs to reflect the active project's effective server settings, which can differ from cached local settings.

## What changed

- Add `/voice settings` with the server's voice catalog and current effective selection, falling back to the built-in catalog when unavailable.
- Save `realtime.voice` through the app server and reread effective settings before confirming the selection. Report save failures and overrides.
- Resolve the effective voice for each realtime start. Apply selections to the next voice conversation without interrupting live audio, and retain compatibility with servers that lack `config/read` or return unknown voice names.

## Testing

Add picker and confirmation snapshots, plus request tests covering persistence, server defaults, catalog fallback, unknown voices, config read failures, overrides, and project settings after thread switches.

GitOrigin-RevId: d47e3da6c1164053c5be9d1da0f5932f2a09261f
2026-09-10 19:14:57 +00:00
Owen Lin 196964ef10 Preserve root turn attribution in turn-start events (#44611)
## Why

Persisted turn-start events lack the originating root turn ID, so they cannot directly associate child turns with the root turn that initiated them.

## What changed

- Add optional `root_turn_id` to `TurnStartedEvent`. Use the inherited root turn ID when available, otherwise the turn's own ID.
- Centralize turn-start emission for regular turns, shell commands, and manual compaction so they record attribution consistently.
- Carry attribution into `ThreadHistoryTurnChange` when processing turn-start events and retain it through completion in the history builder.
- Keep older records compatible by defaulting missing attribution to `None`.

## Testing

Add coverage for root and child turn attribution, persistence when tool collisions fail a turn before sampling, history change propagation, and deserialization of older turn-start records.

GitOrigin-RevId: 54a80b828ca7d1c4c19f13d468c01d052e1b9130
2026-09-10 18:24:13 +00:00
joeytrasatti-openai 3319d9b296 Add app-server APIs for stored thread attachments (#44564)
## What changed

- Add `thread/attachment/add`, `thread/attachment/list`, and `thread/attachment/remove` to manage durable resource references without loading the owning thread or changing conversation history.
- Identify attachments by thread, `attachmentType`, and `identityKey`. Repeated adds return the existing attachment; repeated removals succeed without emitting another update. Listing supports cursor pagination.
- Broadcast `thread/attachment/updated` after creation or deletion, after responding to the requester. Serialize attachment mutations with thread lifecycle operations and reject stores that do not support attachments.
- Update protocol schemas, TypeScript and Python bindings, documentation, and TUI notification handling so attachment updates do not add untracked threads to the agent picker.

## Testing

Add coverage for unloaded threads, pagination, idempotent addition and removal, reattachment, invalid inputs, unsupported stores, response-before-notification ordering across clients, and TUI notification routing.

GitOrigin-RevId: 0d29cf903afd4e931a70a9cf96300475213b34aa
2026-09-10 15:52:09 +00:00
Eric Traut b348fc2667 Add archive and delete actions to the agents overview (#44433)
## What changed

- Add `Ctrl+E` to archive the selected task and its child agents, and `Delete` to permanently delete their history. Both actions require confirmation, with Cancel selected by default.
- Expose `agents.archive` and `agents.delete` in keymap configuration and the shortcut picker. Default bindings yield to existing custom bindings and chords.
- Show progress while requests run, keeping rendering responsive and blocking task switching. Refresh overview state afterward and keep the dashboard open when the current task is removed.
- Report failures and preserve the current attachment and draft when a rejected operation leaves the task loaded.

## Testing

Add coverage for confirmation and cancellation, active and background task removal, child-agent attachments, stale refresh invalidation, failure recovery, and draft preservation. Add progress input-isolation tests, shortcut conflict tests, and snapshots for confirmation, errors, progress, and keymap rendering.

GitOrigin-RevId: b327bb8834699d0058f9ffb903ace525ae270500
2026-09-10 06:06:21 +00:00
Eric Traut bf5ebd98c5 Add a hide shortcut to the agents overview (#44424)
## What changed

- Add `Ctrl+W` to hide the selected task without stopping it. Hidden tasks stay hidden through activity and metadata refreshes until explicitly resumed or the TUI restarts.
- Expose `agents.hide` in keymap configuration and the shortcut picker, and let the default binding yield to existing custom shortcuts.
- Wrap overview footer hints while keeping shortcuts and their labels together when they fit.

## Testing

Add coverage for hiding filtered tasks across statuses, visibility through activity and refreshes, explicit resume, existing keybinding compatibility, and custom chord footer rendering at narrow widths.

GitOrigin-RevId: 980726e1095b8d5bad8901be919decdde8c0f925
2026-09-10 05:41:54 +00:00
Eric Traut a62e98d18c Return focus to the agents overview composer on Escape (#44360)
## Why

Pressing `Esc` in the agents overview task list dismissed the overview or
exited Codex when no primary thread existed, instead of returning to the draft.

## What changed

Make list cancellation return focus to the composer, including while
reconnecting, preserving the draft and cursor position.

## Testing

Add regression coverage for returning from the list to the composer with Vim
mode enabled or disabled, both online and reconnecting. Verify draft and cursor
preservation, resumed text entry, and the absence of app events.

GitOrigin-RevId: 8920677c42b0c9ff5023979e198f069abcfcf54b
2026-09-10 01:06:18 +00:00
Eric Traut e2a9ee05f4 Extract shared footer hint wrapping in the TUI (#44354)
## What changed

Replace duplicated footer wrapping in the MCP elicitation and request-user-input overlays with `wrap_hint_rows`. Preserve whole-hint grouping, display-width and separator accounting, oversized hints, and the single empty row for empty input.

## Testing

Add unit tests for Unicode display widths, whole-hint wrapping, oversized hints at zero width, and empty input.

GitOrigin-RevId: 4d8ead0acbfa3bf9241baedb86d2476566d26ebc
2026-09-10 00:57:33 +00:00
Eric Traut 3ef3cecd20 Open tasks with Right from the agents overview (#44344)
## What changed

Allow `Right` to open the selected task from the task list or an empty, focused composer. Preserve editor keybindings and guard against pending input, active popups, and offline state. Keep metadata editing unaffected and show the shortcut in navigation hints.

## Testing

Add regression tests for opening the current or highlighted task, preserving cursor movement and renaming, and preventing navigation while offline. Update snapshots to cover the new hints.

GitOrigin-RevId: 9fc01b62ad0829b964509ae6286a041fc4936b9d
2026-09-10 00:07:20 +00:00
Eric Traut d390f0a09c Return to the agent command center after archiving on shared servers (#44337)
## Why

`/archive` exits the TUI even when connected to a local daemon or remote app server, interrupting access to other tasks.

## What changed

- Keep the TUI running after a successful archive on local daemon and remote connections, and reopen the agent command center.
- Shut down side conversations before archiving, then clear the archived thread's local state, transcript, and unsent draft.
- Preserve exit-on-archive behavior for the embedded app server and remove the exit promise from `/archive` help and confirmation text.

## Testing

Add coverage for local daemon and remote connections, including side-thread cleanup, archive requests, cleared session state, and the resulting command center snapshot. Retain coverage for embedded archive success and failure.

GitOrigin-RevId: 36c61ec76a13a3fc1b5d6725e3b8f42a97fe6793
2026-09-09 23:50:28 +00:00
Benjamin Carlsson e722303e38 Expose voice conversations in experimental features (#44331)
## What changed

- Mark `realtime_conversation` as experimental, keeping it disabled by default, and label it “Voice conversations” in `/experimental`.
- Add an announcement directing users to enable the feature, restart Codex, and run `/voice`.
- Hide server-discovered voice entries and the announcement when the client lacks native voice runtime support.

## Testing

Add tests and snapshots for voice discovery and announcement visibility with and without runtime support, and update the experimental features popup snapshot.

GitOrigin-RevId: 709655f3733cb88191eb78b40ac1f67e27c9816e
2026-09-09 23:16:06 +00:00
Ian MacLeod 2808a9c348 Clear pending TUI questions when accepting a new prompt (#44328)
## Why

Unanswered questions from the previous prompt remain visible after a new follow-up. Clear them when the user moves on to new work.

## What changed

- Clear pending questions when a model prompt is submitted or queued, and when a review starts. Clear again on queued prompt delivery to remove questions that arrived while waiting.
- Retain seen question IDs so replay cannot restore cleared questions.
- Track question answers separately from prompts through queues, retries, thread restoration, and reconnects so delivering an answer preserves other pending questions.
- Preserve questions for local commands and rejected submissions.

## Testing

Add regression tests for immediate and queued follow-ups, replay suppression, slash prompts, reviews, rejected input, and answer preservation across delivery and recovery. Add a snapshot of the composer after questions are cleared.

GitOrigin-RevId: 76353c6ee098c1505678ac43b1dc6391ea9fa738
2026-09-09 22:51:36 +00:00
Eric Traut a3ba42b010 Remove the Windows /sandbox-add-read-dir slash command (#44259)
## What changed

Remove the TUI command introduced in https://github.com/openai/codex/pull/11512 for granting sandbox read access to additional directories, along with its event handlers and non-elevated read-root grant helper.

## Testing

Enable the existing voice command popup snapshot test on Windows as well as macOS.

GitOrigin-RevId: 8a3a06b76749420101e34aa6587a8beab8eb5fdd
2026-09-09 18:11:39 +00:00
rhan-oai eb7bd64ef9 Remove retired model entries while preserving migration prompts (#44250)
## Why

Saved model selections can outlive their bundled catalog entries and still need migration guidance.

## What changed

- Remove `gpt-5.2` and `gpt-5.4-mini` from the bundled model catalog.
- Preserve migration from saved `gpt-5.4-mini` selections to `gpt-5.6-luna` when the old model is absent, while respecting catalog-provided migration metadata.
- Update tests and snapshots to use current models or explicit test fixtures, and remove the obsolete prompt fixture.

## Testing

Extend migration tests to cover catalog metadata precedence, saved selections, replacement model and reasoning-effort persistence, acknowledged prompts, and missing or hidden migration targets.

GitOrigin-RevId: 82beea504cc4a15699677c28a61ec0939af3069c
2026-09-09 17:56:33 +00:00
Benjamin Carlsson ccf470c060 Preserve voice indicator styles during composer sparkle effects (#44198)
## Why

Rendering the voice strip over sparkle stars can leave voice indicators with a star's color even when their glyphs are unchanged.

## What changed

Render the voice strip after effort ignition and before sparkle effects so stars skip its text and preserve its styles.

## Testing

Add a regression test comparing all nonblank composer cells, including their styles, across 80 sparkle frames while confirming stars still appear. Add a snapshot of the active voice composer.

GitOrigin-RevId: 48774408646c1281df3a6f7b1e12ab9d03a1babd
2026-09-09 16:43:50 +00:00
Eric Traut c77c34ed33 Reduce TUI stack usage during session transitions (#44176)
## Why

Session transitions need stack headroom to rebuild configuration and the chat widget. Tokio stores task outputs inline even when it boxes the task future, so returning a large `Config` adds stack pressure during task allocation.

## What changed

Box the configuration build result inside the runtime worker and unbox it after joining. Box the `App::run` future to keep the large event loop out of enclosing startup futures.

## Testing

Extend the production-stack TUI integration test to enter `/side`, verify the process remains running, and return to the saved conversation with Ctrl+C.

GitOrigin-RevId: 44975300bb837bf3645ff762cf7bcdc44a277f41
2026-09-09 15:20:47 +00:00
jif 73a1148c9c Coordinate rollout compression with active thread writers (#44138)
## Why

Cold rollout files can still have active writers. Compression must not replace their files while writes are pending, including background work that outlives the local thread store.

## What changed

- Share cross-process writer locks between the rollout compressor and local thread store. Skip busy threads and recheck file state under coordination before publishing compressed files.
- Retain writer ownership through recorder background I/O and compressed rollout materialization. Wait for writers to exit on shutdown or discard, and stop queued file work before deletion.
- Route rollout metadata patches through owned recorders, reject competing writers before updating SQLite, and serialize metadata appends with shutdown.

## Testing

Add regression coverage for compression with live and detached writers, parallel cold-file compression, publication locking, metadata ownership conflicts, updates to compressed rollouts, concurrent shutdown, and discarding deferred items.

GitOrigin-RevId: c52f4037eb2019e8095b554e29bf531af95aa4bd
2026-09-09 12:30:07 +00:00
alexsong-oai fe52d795c9 Add AWS credential export commands for Amazon Bedrock (#44028)
## What changed

Support `model_providers.amazon-bedrock.aws.credential_export` with `command`, `args`, and `timeout_ms` to supply SigV4 signing credentials from a command's JSON output. Accept both flat credential-process output and nested STS `Credentials` objects.

Cache credentials in memory, refresh before expiration, and share exports across sessions with matching AWS configuration. On recoverable authentication failures, run the optional `aws.auth_refresh` command before exporting fresh credentials, coalescing concurrent recovery attempts.

Bound command execution time and output size, and keep credential values out of errors. Reject combining `aws.credential_export` with `aws.profile`. Bedrock setup and login reject changes while an exporter is configured, preserving configuration and saved credentials.

## Testing

Add coverage for output formats, expiration, credential precedence, caching, concurrent recovery, command failures, and secret redaction. Integration tests verify request signing with rotated credentials, bounded recovery attempts, and setup/login rejection across configuration layers.

GitOrigin-RevId: 4ef799f88ab5e3b2578f8f41a5e56e4f30e2cd81
2026-09-09 03:17:48 +00:00
Eric Traut 2ce38ae6d8 Support image attachments in agents overview background tasks (#44027)
## Why

The agents overview submitted background task prompts as plain text, without image attachments or their text elements.

## What changed

- Enable image pasting in the overview composer and include attachments and text elements in the first task prompt.
- Resolve local image paths and send image bytes when using a remote workspace.
- Reject image inputs for models declared text-only before starting a thread.
- Restore unsent text and attachments after failures, or show image reattachment paths when a newer draft prevents restoration.

## Testing

Add tests for attachment rendering and submission, remote image payloads, draft recovery without overwriting newer text, and text-only model rejection.

GitOrigin-RevId: 08e3db8bace51ec007f5741f1b2be94658cbaea4
2026-09-09 03:12:46 +00:00
Eric Traut b831057106 Clear stale transcript history when switching threads (#43994)
## Why

History events queued by the previous thread can repopulate the transcript after a thread switch, mixing old content into the new thread's replay.

## What changed

- Reset the transcript immediately and queue another reset before replaying the new thread, covering both snapshot switches and app-server thread replacement.
- Leave the alternate screen when resetting, and pause terminal event handling until queued resets finish.
- Process queued resets even when the transport is offline.

## Testing

Add regression tests for both switch paths, including queued history, an open transcript overlay, and a disconnect before replay events are handled. Snapshot the replacement transcript to verify it contains only the new thread's content.

GitOrigin-RevId: b68b07fb10ff35e908c2c184f80859dda637f977
2026-09-09 02:26:50 +00:00
dermanyang-oai dafb6781ee Heap-allocate the resume future in the legacy history test (#43966)
Use `Box::pin` in
`cached_legacy_resume_revalidates_history_across_migration_settings` to
keep the large resume future off the Windows test thread's stack.

GitOrigin-RevId: 2539b7733e9f92e65a27bbea8f75170ce01b1884
2026-09-09 01:40:29 +00:00
alexsong-oai 4e09b0c1f1 Increase the TUI thread capability test stack to 12 MiB (#43956)
Raise the Tokio worker thread stack size from 8 MiB to 12 MiB in
`selected_and_resumed_threads_use_server_capability_for_v1_and_v2_children`.

GitOrigin-RevId: 5f2462e50f0d67eeb1f5668d196431c7dc08d27f
2026-09-09 00:54:25 +00:00
Chris Dong 929389f596 Preserve per-image generation IDs in image generation analytics (#43953)
## What changed

Parse optional `generation_id` values from image API responses and carry the selected image's ID through the image generation tool into analytics events. Keep the ID out of serialized extension items, JSON schemas, and TypeScript types. Responses without an ID remain supported.

## Testing

Add coverage for distinct IDs in multi-image responses and responses without IDs. Extend analytics and app-server tests to verify that the selected image's ID reaches analytics, and item tests to verify that it is omitted from serialization and TypeScript types.

GitOrigin-RevId: 70a600856990140b76fdbda51a0d73b3414338b1
2026-09-09 00:34:45 +00:00
Benjamin Carlsson 973dcd80fc Show worktree owner details and add confirmed deletion (#43942)
## What changed

- Display owner thread titles, relative update times, and archived or unavailable status in the managed worktree browser. Offer resume only for resumable owners, including those with compressed thread history.
- Add a delete action with a confirmation dialog that defaults to Cancel and preserves thread history.
- Restrict removal to managed worktrees in the current repository. Refuse the current checkout, including path aliases, and checkouts containing local changes, untracked files, or ignored files.

## Testing

Add browser snapshots and tests for owner states, deletion confirmation, and compressed thread history. Add worktree removal coverage for unrelated checkouts, current-directory aliases, untracked and ignored files, and successful removal of a clean checkout.

GitOrigin-RevId: e5867f1540d5d5bc8130acc76875e51e3d8b3b6a
2026-09-08 23:37:26 +00:00
Eric Traut 1032738aa0 Tag TUI startup metrics with terminal and multiplexer categories (#43937)
## What changed

Add `terminal_name` and `multiplexer` attributes to `codex.tui.start` alongside `app_server_mode`. Use fixed terminal categories rather than versioned or user-provided identifiers, with `unknown` for unrecognized terminals. Report the multiplexer as `tmux`, `zellij`, or `none`.

## Testing

Extend the CLI worktree test to parse metric payloads and assert the exact startup attributes for an unrecognized terminal without a multiplexer. Keep coverage that no metrics are sent when analytics is disabled.

GitOrigin-RevId: 024c82653098b9bddd6c5e8d7133ff798b58dcd1
2026-09-08 22:39:16 +00:00
Benjamin Carlsson fba22e9a2a Track voice session lifecycle metrics in the TUI (#43934)
## What changed

- Record voice session starts, connections, failures, endings, and active duration under `codex.voice.session.*`.
- Deduplicate failure accounting and distinguish errors during startup retry cleanup from errors during a requested stop.
- Record failures on rejected voice operations and disconnects, and clear the owned session when a stop request is rejected.

## Testing

Add regression tests for failure accounting during retry cleanup and session cleanup after rejected stop requests, including replay-only threads.

GitOrigin-RevId: d67cab5ff1e8fc85ce7a3d61a1763d38a5d537f0
2026-09-08 22:21:01 +00:00
Felipe Coury 9ec33e1926 Show streaming reasoning summaries in the TUI status row (#43921)
## What changed

- Update the status heading from the latest usable reasoning line and retain it through tool activity and empty reasoning items. Keep completed reasoning in the expanded transcript only.
- Restore active reasoning after resume, thread switches, and session refreshes, including when earlier events have left the replay buffer.
- Default new embedded TUI threads to `model_reasoning_summary = "detailed"`, honoring explicit summary settings. Keep `concurrent_reasoning_summaries` opt-in and disable it when summaries are `none`.
- Persist the request's captured reasoning summary setting in context updates and local and remote compaction checkpoints.
- Animate status text with a smooth, grapheme-aware shimmer that respects terminal colors and reduced motion.

## Testing

Add regression coverage for reasoning status updates, transcript visibility, resume and buffered replay, outbound summary configuration, and summary settings across all three compaction modes. Add shimmer snapshots and checks for smooth brightness changes and Unicode grapheme preservation.

GitOrigin-RevId: 725c7de20f23166d7a3da6daeca617add5cbc600
2026-09-08 21:41:02 +00:00
Ahmed Ibrahim f046cf35df Scope model catalog caches to the current provider and auth identity (#43906)
## Why

Switching providers or authentication could reuse a previous identity's model catalog, including its default service tier. An in-flight refresh could also overwrite a newer account's catalog after cache storage completed.

## What changed

- Require a matching provider and auth identity for disk and in-memory catalog reuse. Treat legacy entries without an identity as cache misses and fall back to bundled metadata when the in-memory identity no longer matches.
- Recheck identity after fetching and storing a catalog before publishing it.
- Renew cache freshness only when the client version, identity, and ETag match the stored entry.
- Update cache fixtures to include the configured provider and auth identity.

## Testing

Add regression coverage for provider and auth switches, credential rotation, legacy and mismatched cache entries, conditional TTL renewal, and an account switch during cache storage. Verify that API-key requests do not inherit a ChatGPT catalog's default `service_tier`, while explicit tier selection still works.

GitOrigin-RevId: e15d7ffff238d951d7a1c6a68381cbb479994146
2026-09-08 20:37:30 +00:00
Benjamin Carlsson 095da4b7e8 Fix transcript viewer restoration and half-page scrolling (#43889)
## Why

Repeated alternate-screen entry can overwrite the saved inline viewport, and half-page scrolling can use a different height from the rendered transcript.

## What changed

- Make alternate-screen entry idempotent to preserve the inline viewport for restoration.
- Defer transcript reflow after raw output mode changes while an overlay is open, preserving queued history until the overlay closes.
- Use the last rendered content height for half-page scrolling, matching full-page scrolling.

## Testing

Add regression coverage for restoring the inline viewport and draft after closing the transcript with pending history and a raw output mode change, plus half-page scrolling when the rendered height differs from the terminal viewport.

GitOrigin-RevId: 30847df4b6383db26791ebda20470c9b169f9680
2026-09-08 19:06:42 +00:00
Benjamin Carlsson dd9512c000 Include completed commentary in the /copy picker (#43846)
## Why

During an active turn, `/copy` could still offer the previous final response even after a new commentary message had completed.

## What changed

Record every completed agent message with non-empty visible Markdown for copying, including commentary. The picker can then offer the latest completed commentary as a whole response and expose its code blocks.

## Testing

Add a regression test and picker snapshot covering completed commentary during an active turn after a previous final response. Verify that selecting “Whole response” copies the commentary and that the picker lists its shell code block.

GitOrigin-RevId: 0ea1d5e3952ccac21f2ee951d482619de82f28e0
2026-09-08 16:15:24 +00:00
riley-oai c7f81afc19 Enable MCP user verification in the TUI (#43712)
## Why

The TUI automatically canceled MCP user verification requests, preventing users from completing verification and approving them.

## What changed

- Show verification prompts for active and inactive threads, with actions to verify and approve or cancel.
- Run approved verification through the local app-server's `userVerification/verify` RPC and return the proof to the original request. Cancel on failure and show a warning in the requesting thread; remote workspaces remain unsupported.
- Deduplicate prompts, preserve foreground streaming when another thread requests verification, and surface queued prompts when returning from a side conversation.
- Cancel verification when its thread is discarded and ignore stale results after cancellation.

## Testing

Add RPC, routing, and snapshot tests covering successful verification, unsupported binaries and remote workspaces, cancellation and late proofs, prompt replay, side conversation switching, and foreground stream preservation.

GitOrigin-RevId: 2ae12f47c443e17de25f4ec033f6078ac28b1e03
2026-09-08 05:39:17 +00:00
riley-oai 95327467c3 Add TUI request bookkeeping for user verification (#43708)
## What changed

- Track verification parameters and attempt IDs with cancellation tokens so callers can reject stale results after cancellation, server resolution, or reconnect.
- Add `ResolveUserVerification` to send acceptance proofs or cancellation through MCP elicitation responses, omit proofs from session recordings, and remove resolved prompts from thread replay.
- Add typed verification error messages with safe fallbacks that omit raw provider diagnostics.

## Testing

Add unit coverage for attempt invalidation, duplicate attempt prevention, proof serialization, resolved prompt replay, and safe error messages.

GitOrigin-RevId: 3466c9a83fe5f512a861fec062bef10dcd3025c8
2026-09-08 05:12:10 +00:00
riley-oai 54e04f25db Add a TUI user verification prompt component (#43702)
## What changed

Add a presentation-only `UserVerificationView` with explicit verify and cancel choices, request details, and a waiting state. Report decisions through a callback, suppress duplicate approvals while waiting, and allow cancellation before or during verification. Dismiss the view when its matching MCP elicitation request resolves.

Add a full-screen request details overlay that can be opened without making a decision. Wrap prompt text and long URLs for narrow terminals. The view is not yet connected to incoming verification requests.

## Testing

Add tests and snapshots covering prompt and waiting rendering, narrow layouts, long URLs, duplicate approval suppression, cancellation, matching request dismissal, and full-screen inspection and scrolling.

GitOrigin-RevId: de1ff80d0defb3707b641e9bfccff9e2b91255ec
2026-09-08 04:47:42 +00:00
Benjamin Carlsson 6b6fdc3572 Preserve split-flap animation state when voice transcripts scroll (#43699)
## Why

Trimming the live voice transcript to its 1,024-byte window could restart
animations for retained words or skip animations for new text that repeats
existing text.

## What changed

Track discarded prefix bytes and render the retained text to identify which
tiles survive. Preserve their arrival times and animation phase so only new
tiles begin animating. Start fresh when the speaker changes or the retained
text no longer matches.

## Testing

Add regression coverage for repeated text, retained-word visibility, Unicode
and Markdown rendering, reduced motion, and replaced or changed-speaker windows.

GitOrigin-RevId: dd33f76441baa4d7787d0a9a1e72b281476acb4c
2026-09-08 04:39:31 +00:00
Eric Traut 49a9d78999 Make older app-server notices configurable in the TUI (#43698)
## What changed

Add `tui.show_server_version_notice`, enabled by default. Set it to `false` to suppress informational notices about older stable app servers at startup, on reconnect, and in the agents overview. Compatibility errors and version status remain unaffected.

Refresh the overview notice when local settings change, clearing pending notices when the setting is disabled.

## Testing

Add coverage for disabling and re-enabling overview notices, clearing pending notice state, and preserving remote version status. Extend reconnect and local-settings tests to cover the new setting.

GitOrigin-RevId: d50dcf4472ee221ce31cdd7ab2cd766f901a8039
2026-09-08 04:35:21 +00:00
Benjamin Carlsson 9a3af22d01 Stabilize realtime voice meter sampling across redraws (#43695)
## Why

Footer updates and transcript animation can trigger redraws before more audio arrives, consuming peaks too early and adding spurious quiet samples. Old peaks also linger in the meter after a channel becomes quiet.

## What changed

- Sample microphone and speaker peaks at most once every 100 ms, preserving accumulated peaks on early redraws and scheduling the next sampling frame.
- Clear each channel's meter history on its first quiet sample without clearing the other channel.

## Testing

Add regression tests for early redraw scheduling, peak preservation, independent channel silence, delayed sampling, and sampling after a conversation reset. Snapshot the meters at wide and narrow widths and after each channel becomes quiet.

GitOrigin-RevId: d7b116af2c099a2eaeb6db0d66bca93b230db970
2026-09-08 04:21:46 +00:00
Benjamin Carlsson 45305dd229 Make the voice mute shortcut configurable in the TUI (#43690)
## Why

Voice mute used a hard-coded `Ctrl+X` shortcut and footer hint, so keymap customization could not change or disable it.

## What changed

- Wire `tui.keymap.chat.toggle_voice_mute` into runtime keybindings and the keymap picker, supporting custom keys, chords, and unbinding.
- Keep `Ctrl+X` as the default, but let existing configured shortcuts and overlapping chord prefixes take precedence. Validate explicitly configured mute bindings for conflicts.
- Activate voice chords only when the microphone shortcut is available, excluding pagers and overlays.
- Refresh the voice footer when bindings change, showing the configured shortcut or `/voice mute` when unbound.

## Testing

Add regression tests for binding resolution, conflicts, voice chord context, and live keymap updates. Add footer snapshots covering custom keys, chords, and unbinding in muted and listening states at wide and narrow widths.

GitOrigin-RevId: ec9385f3956aa268bba34dcf2cc2b0c92a31bfec
2026-09-08 04:03:42 +00:00
Benjamin Carlsson 98c7c0415b Move voice controls into a dedicated composer strip (#43683)
## Why

Voice controls replaced the normal footer and could be truncated at narrow widths. Give them dedicated space while keeping the status line visible.

## What changed

- Render voice status, `ctrl+x` mute/unmute, and `/voice stop` above the draft, with separate microphone and Codex audio history meters.
- Keep control positions stable across mute states, prioritize stop at narrow widths, and hide the strip when vertical space is needed for the draft and cursor.
- Reflect actual microphone capture in the recording indicator, respect reduced motion, and allow muting during connection once the audio handle is available.
- Preserve speaker history when muting the microphone and clear speaker samples when playback is suppressed.

## Testing

Add layout and snapshot regressions for voice states, narrow and clipped composers, recording colors, independent audio histories, and status-line visibility. Extend coverage for audio intensity scaling and spoken transcript rendering.

GitOrigin-RevId: 9deb432654f4328cc8a577b8896eee088a0a1d5e
2026-09-08 03:39:58 +00:00
Benjamin Carlsson 3caf9f9586 Style spoken prompts and link workspace files in voice transcripts (#43676)
## What changed

- Render spoken user prompts with a bold red chevron, preserving its color during live transcript animation. Trim leading whitespace for display while retaining the raw transcript text.
- Underline and link file references such as `src/lib.rs:42` in spoken assistant transcripts using terminal hyperlinks. Preserve existing links and support Windows-style relative separators.
- Restrict generated file links to existing files with allowed extensions inside the workspace, rejecting hidden paths, traversal, and symlink escapes.

## Testing

Add rendering and transcript tests for the spoken marker, raw text preservation, file links, Unicode column offsets, and Windows-style paths, plus validation tests for rejected file destinations.

GitOrigin-RevId: 5fa180aa606acdc579a916441520602cb2bf3655
2026-09-08 03:15:37 +00:00
Benjamin Carlsson 4e93cf9b4e Animate live voice transcripts with split-flap tiles (#43656)
## What changed

Render live voice transcripts with a split-flap effect, a black background, and brief speaker-colored highlights as characters settle. Preserve settled characters when text is appended and include animation ticks in the active transcript cache key so frames refresh.

Respect `animations = false`, preserve Unicode graphemes and raw transcript text, and keep completed transcripts as ordinary history cells. Stop requesting animation frames once the effect settles.

## Testing

Add frame snapshots and regression coverage for row styling, speaker colors, appended text, reduced motion, Unicode width, frame scheduling, and unchanged final transcript history.

GitOrigin-RevId: 934f577c7279158f9161d6232634087ab32b0ea3
2026-09-08 02:46:14 +00:00
Benjamin Carlsson 4b0d9669cc Add voice mute shortcut and recording activity indicators (#43651)
## What changed

- Add `Ctrl+X` to toggle the microphone for the active voice session on the current thread, with a footer hint and guards for modals, popups, and repeated key events.
- Show a recording dot in the terminal title's activity indicator while the microphone is listening, respecting title settings and clearing it when capture stops.
- Replace the microphone and speaker bars with compact Braille meters showing four recent amplitude samples.
- Briefly show `heard` when voice input interrupts speech, when animations are enabled.

## Testing

Add regression tests for shortcut routing, amplitude glyphs, interruption acknowledgment, and terminal title lifecycle, plus updated voice footer snapshots.

GitOrigin-RevId: e1dc0c1744667e646e0040e247c5a0409b416075
2026-09-08 02:29:17 +00:00
Benjamin Carlsson 6fee98cc85 Expand TUI regression coverage for realtime voice conversations (#43645)
## What changed

- Add app-to-RPC tests for voice startup, shutdown, thread switching, speech delivery, and rejected or stale speech, using a recording app server without audio hardware.
- Cover session retries, typed and voice handoffs, reasoning visibility, and recovery of undelivered answers in focused chat widget test modules.
- Add transcript and buffered replay tests for caption reconciliation, partial transcript preservation, and voice output ownership across thread changes, with rendering snapshots.

GitOrigin-RevId: 8a76523907289f94f257fe97386db7d2e7f33ca5
2026-09-08 02:09:29 +00:00
Eric Traut 530383e36d Warn when the connected Codex service is older than the CLI (#43622)
## What changed

Show an older-service notice at startup and reconnect when both versions are official stable releases. Display it in conversation history or the agents overview, with wrapping and a compact fallback for small terminals.

For the implicit local daemon, suggest `codex app-server daemon update` and warn that updating may interrupt active or queued work. Suppress repeated notices for the same service and version pair, and defer fresh-session notices until session attachment.

## Testing

Add coverage for version notice eligibility, local-only update guidance, service identity, startup ordering, reconnect deduplication, and overview rendering at narrow and short sizes.

GitOrigin-RevId: e0a5b306e0a4d405544c5f6eaa72f77df6d68e6d
2026-09-07 23:52:29 +00:00
Eric Traut c977cc0c19 Add a stable TUI/app-server version comparison helper (#43619)
## What changed

Add `is_official_server_older` to check whether a stable TUI version is newer than the app-server version. Require both versions to contain exactly three numeric components without leading zeros, and return `false` for source builds (`0.0.0`), prereleases, and malformed versions.

## Testing

Add unit coverage for older, equal, and newer server versions, plus invalid versions in either argument.

GitOrigin-RevId: afcc90b56e188df1bf410c69ca238765b4658000
2026-09-07 23:28:57 +00:00
Felipe Coury 7d2c58e6e0 Recover missed tmux resize notifications in the TUI (#43603)
## Why

Lost tmux resize notifications can leave the TUI using stale terminal dimensions.

## What changed

Add a background size monitor for tmux on Unix that checks terminal dimensions every 500 ms and delivers detected changes as resize events. Queries run off the UI thread so a slow query does not block input.

Pause monitoring during terminal handoffs and discard samples invalidated by newer geometry or pause/resume transitions. Ignore unchanged, invalid, or failed samples, and stop monitoring without waiting for a blocked query.

## Testing

Add tests for missed-resize recovery and text wrapping, input responsiveness during blocked queries, stale sample rejection, pause/resume handling, nonblocking shutdown, and tmux-only activation.

GitOrigin-RevId: 461f09bf792f1d9760672dd33b125ecdf0ebd1e0
2026-09-07 22:03:58 +00:00
felixxia-oai a444546564 Remove a stale transcript field assignment from the TUI (#43584)
`TranscriptState` has no `had_work_activity` field. Remove the assignment
from computer tool call completion handling to fix the resulting compile
error.

GitOrigin-RevId: 2adb15a213992e40a58dc6f217d7ae8d64c48154
2026-09-07 20:33:54 +00:00
Benjamin Carlsson b01c3986fd Add live WebRTC voice conversations to the TUI (#43581)
## What changed

- Add feature-gated `/voice`, `/voice mute`, and `/voice stop` commands with local WebRTC audio and app-server signaling.
- Show live transcripts, conversation status, and microphone and speaker levels. Preserve captions and undelivered answers across thread switches.
- Speak final answers from voice handoffs while keeping delegated reasoning and commentary hidden and typed answers unspoken.
- Retry eligible startup failures once and clean up voice sessions on thread switches and disconnects.
- Stop voice and block late handoffs after a misalignment policy violation. Remove realtime event payloads and spoken text from receipt and debug logs.

## Testing

Add coverage for voice command mapping, rejected starts, disconnect cleanup, delegated final-answer speech, late handoff rejection, and transcript and footer rendering.

GitOrigin-RevId: 11def1f86b0e023b21d0d92072d6636ccad89815
2026-09-07 20:25:30 +00:00
Felipe Coury 4110342321 Group adjacent computer actions in the TUI (#43576)
## What changed

Render adjacent `cua_repl` calls as a compact “Using computer” or “Used computer” group with action and failure counts. Show the current action while running, and prioritize failures and screenshots in completed previews while preserving their chronological order.

Keep full call arguments and output in the expanded transcript, with a `ctrl+t` hint for hidden actions. End groups at other history items and turn boundaries, preserve completed results when pending actions are interrupted, and use the same grouping for live events and history replay.

## Testing

Add unit and snapshot coverage for live/replay parity, grouping boundaries, out-of-order completion, interruption, failure and screenshot previews, full transcript details, and narrow-terminal and Unicode rendering.

GitOrigin-RevId: 8e61ccf4c9f6d1a4d56d674a6d41ca5160d42c82
2026-09-07 20:01:28 +00:00
Felipe Coury 333c41eef6 Show completion timestamps after successful TUI turns (#43558)
## What changed

Replace horizontal turn separators with dim completion metadata after the final answer, including plain conversational answers. Show local completion times such as `done 2:32 PM`, adding the date for other days and the year for other years. Retain `Worked for` durations above sixty seconds and runtime metrics, and wrap metadata on narrow terminals.

Restore saved completion metadata when resuming conversations or loading older history. Keep each footer after its turn's items and deduplicate it across repeated notifications and overlapping pages. Only live completions fall back to the current time when a saved timestamp is unavailable. Failed, interrupted, and in-progress turns do not receive success footers.

Avoid submitting queued input or emitting completion notifications while replaying history.

## Testing

Add unit and snapshot coverage for timestamp formatting, duration thresholds, muted styling, narrow layouts, live and replayed completions, missing metadata, and pagination boundaries with overlapping pages.

GitOrigin-RevId: 308c35c6720720da43c9a391aa5a68c1b231c9a5
2026-09-07 19:01:08 +00:00
jif b1205c12d5 Set recursion_limit to 256 for app-server, exec, and TUI (#43519)
GitOrigin-RevId: 62707b30a8a786143739300f307875e615d81acc
2026-09-07 17:09:04 +00:00
jif e1eb98461c Route approvals through the extension decision API (#43432)
## What changed

- Let approval extensions choose between cached approval, synchronous review, and a user prompt for tool and permission requests, while core enforces mandatory Guardian and fresh-review requirements.
- Carry an optional `review_reason` on Guardian assessment events and use it to trigger strict-review notifications, retaining the fallback for older events.
- Require synchronous review when cached evidence has an unusable encrypted parent compaction.

## Testing

Add regression coverage for manual prompts and cached approvals with non-UTF-8 working directories. Update approval contributors in existing tests to use the decision API.

GitOrigin-RevId: a4e66416070bdaa881daa41429c49021629f44c1
2026-09-07 11:07:28 +00:00