Commit Graph
3386 Commits
Author SHA1 Message Date
Felipe Coury e8e3197e84 Make side conversation panes resizable and interactive (#59527)
## What changed

- Allow dragging the pane divider and save the preferred width in `tui.sidebar_width_percent`, defaulting to one third of the terminal. Defer reflow until release when retained images are present.
- Support scrolling and loading older history in the unfocused pane, opening links, copying selections, and clicking its composer to switch focus while preserving the clicked text position.
- Keep assistant replies, running command completion, and turn status current in the unfocused pane without duplicating answers or completion metadata when focus returns.

## Testing

Add regression coverage for divider previews and saved widths, image-aware resizing, composer clicks, unfocused history pagination and copying, and streaming replies and command completion across focus changes.

GitOrigin-RevId: a26accc0f8df3c17f53bc915db29a11c8de3c480
2026-11-05 00:19:26 +00:00
Joe Savona 47172f064f Validate UI trees at decode time and simplify display elements (#59518)
## Why

UI tree limits previously applied during rendering, silently dropping content
beyond the budgets. Validate the whole JSON tree before rendering so oversized
inputs are rejected, including content outside the visible line.

## What changed

- Add a `UiTree` string parser that limits JSON to 64 KiB, nesting depth to 16,
  non-null nodes to 256, and total string content to 16 KiB of UTF-8.
- Represent text as string leaves or `text` elements with children. Remove node
  keys, `spacer`, and `divider` elements.
- Require an explicit `row` gap as a non-negative JavaScript-safe integer measured
  in terminal columns. Bound rendered spacing by the viewport and skip empty
  children when inserting gaps.
- Update footer content and built-in status lines to use the revised tree format.

## Testing

Add coverage for malformed elements and gaps, whole-tree size boundaries, URL
length limits, large-gap rendering, and bounded UTF-8 prefixes for directly
constructed text. Update hyperlink and footer clipping tests for the new format.

GitOrigin-RevId: 3c00881d3e7f2d79d11aa188f64f0725cd47ee68
2026-11-04 23:31:55 +00:00
Dmitriy Kovalenko 08511817f3 Simplify pending interactive request tracking in the TUI (#59517)
## What changed

Replace parallel lookup sets and per-turn maps with a single arrival-ordered list of pending interactive requests. Centralize request matching for replay filtering and cleanup, deduplicate repeated requests, and resolve user input answers against the oldest pending question for the turn.

GitOrigin-RevId: c02115c289718a39359a6e6653d1dc7d588d2f90
2026-11-04 23:31:31 +00:00
Eric Traut 4b94e6cf26 Use server model defaults for fresh TUI sessions on every connection (#59510)
## What changed

- Extend server-owned fresh-start bootstrap to embedded connections, preserving explicit profile and launch overrides.
- Require `config/read` to succeed before starting a fresh thread, including on servers that do not support the method.
- Prefetch `model/list` alongside `hooks/list` and reuse the result during bootstrap.

## Testing

Extend startup coverage for managed model and reasoning-effort defaults across embedded, daemon, and remote connections. Verify startup failure shuts down all initial backends, and directory-trust startup requests the model catalog exactly once while `hooks/list` is outstanding.

GitOrigin-RevId: c96edfbc13c98203b7c2a809a87d225e05cf5f1b
2026-11-04 22:58:01 +00:00
Abhinav e115d5f90d Keep threads on their saved model provider when defaults change (#59503)
## Why

Changing the default model provider should not prevent users from resuming or continuing a thread that uses another configured provider.

## What changed

- Resolve cold resumes using the thread's saved provider and reject explicit attempts to switch it on resume.
- Use retained provider configuration for loaded threads without reloading the current default selection, while continuing to enforce managed provider policy.
- Preserve errors for missing provider definitions and policy conflicts.

## Testing

Update app-server and TUI coverage for resuming with a different default, recovering after restoring a missing provider definition, preserving drafts across resume retries, and continuing loaded threads with malformed system defaults.

GitOrigin-RevId: c5bf3b03cacde7349480c94c2f10bac827a0eb1f
2026-11-04 22:20:18 +00:00
Felipe Coury 4f6acbf02d Preserve transcript interaction when switching panes with arrow keys (#59472)
## Why

Directional pane switching cleared the parent conversation's transcript selection or Find state, so returning to it interrupted the interaction.

## What changed

Route left/right pane switches through the existing conversation toggle to park and restore each pane's transcript interaction. Explicitly focusing the main composer still clears transcript interaction.

## Testing

Extend the side-conversation test to cover restoring selections, Find text and caret position, and composer input after scrolling. Add a snapshot verifying that Find remains editable after switching away and back.

GitOrigin-RevId: 172f9be0df15517fbfe7f3773b63cbd1cef1cc77
2026-11-04 18:56:44 +00:00
Eric Traut ba057e4375 Drain queued side-conversation events before switching focus (#59458)
## Why

Pressing `Ctrl-/` immediately after `/btw` must not switch focus before the queued side-conversation prompt is dispatched.

## What changed

Wait for queued app events to drain before reading terminal input when the displayed thread belongs to a parent/side conversation pair, even when side retention is disabled. This keeps queued prompts and transcript updates ahead of focus changes.

## Testing

Extend the side-conversation startup test to toggle focus at the earliest allowed opportunity and verify that the turn starts on the side thread. Also check that a queued request to reopen the side conversation blocks terminal input until handled.

GitOrigin-RevId: cb46636d35de97b02994ed68a32eb971cd7bf6db
2026-11-04 17:23:44 +00:00
Eric Traut 65c83ea5a2 Restore the daemon auto-start feature flag (#59447)
## What changed

Honor `features.daemon_auto_start` as a stable, default-enabled setting instead of ignoring it with a deprecation warning. Apply it to interactive daemon auto-start and remote-control daemon eligibility, and accept it in managed feature requirements.

Preserve explicit `false` values when saving the setting, even when the server reports a disabled default. Record the setting and disabled auto-start outcomes in launch telemetry.

## Testing

Update coverage for restarting a discovered daemon with auto-start disabled and for persisting an explicit opt-out when the server default is disabled. Adjust embedded-backend tests to disable auto-start through configuration.

GitOrigin-RevId: cbf079e3e27b4a7e6e802bf8f19dae653dd7472c
2026-11-04 16:46:21 +00:00
Dmitriy Kovalenko 021fccb046 Stabilize cross-platform tests and directory-change fork permissions (#59369)
## Why

Tests need to distinguish slow subprocess startup from operation timeouts and wait for asynchronous work before asserting results or cleaning up fixtures.

## What changed

- Synchronize subprocess readiness, queued-turn completion, and matching UI events; allow more time for cold startup and separate startup from shutdown deadlines.
- Adapt Windows fixtures and permission expectations, provide the voice-host test runtime DLL path, and normalize platform paths and animated status snapshots.
- Use current configuration permissions when changing directories in embedded TUI sessions, while retaining saved permissions for remote sessions.
- Allow the release prompt-prefix comparison to accept the exact image-tool description update that removes image detail options, and refresh the corresponding tool snapshot.

## Testing

Extend inherited-session metadata coverage to both legacy and paginated thread history, including persisted history mode and revision-aware resume.

GitOrigin-RevId: 0afb38403fc0adb0d83175344749584f0cdf9979
2026-11-04 09:51:28 +00:00
Benjamin Carlsson 93b4e5b4c6 Stop TUI voice calls when the OS session locks (#59330)
## What changed

- Monitor session lock state on Linux, macOS, and Windows, checking the initial state before starting audio.
- Abort local media on lock, including while connecting, retrying, or running a parked call, and display why voice stopped.
- Keep lock monitoring across startup retries and ignore stale lock notifications after a call restarts.
- Document lock behavior and platform limitations. After unlocking, users must run `/voice` to start a new call.

## Testing

Add lifecycle tests for already-locked startup, parked-call media shutdown, stale notifications, and locks during retry cleanup, plus a macOS test for password grace-period expiry.

GitOrigin-RevId: fea4b4a7903a48727c546ee3b7bd06e957a9b885
2026-11-04 06:15:53 +00:00
Eric Traut 3a2788e6fc Restore background terminals from the displayed thread's live state (#59319)
## Why

Replaying a fork's inherited command history can make the TUI show background terminals belonging to its parent thread.

## What changed

Fetch the displayed thread's background terminals after history replay instead of treating replayed commands as live terminals. Read all pages, merge without duplicating tracked processes, and exclude terminals that exit while the request is pending. Clear terminal tracking and invalidate pending restoration when resetting thread state or stopping background terminals.

## Testing

Add a regression test verifying that `/ps` shows a resumed fork's own terminal, excludes inherited commands, and does not restore a terminal that exited during the list request.

GitOrigin-RevId: aca9ae9cde877f03143f8fbeea11affcc34dc372
2026-11-04 05:25:12 +00:00
Felipe Coury db3c44414c Add directional conversation focus shortcuts in workspace mode (#59287)
## What changed

- Add configurable `focus_pane_left` and `focus_pane_right` actions, defaulting to `leader left` / `leader h` and `leader right` / `leader l`.
- Move focus to the parent or open side conversation without reopening a hidden pane. Preserve the current interaction when no neighbor is available, and accept fresh typing after a no-op shortcut while suppressing reported key repeats.
- Expose the actions in the keymap picker and configuration schema, and prevent workspace-only pane bindings from claiming keys in classic mode.

## Testing

Add regression coverage for pane navigation, preserved transcript selection and search, fresh typing after a no-op, key capture, and binding conflicts and limits.

GitOrigin-RevId: 7f7629d15cffcd35d1353b36c5c9208dbb1034e8
2026-11-04 01:40:12 +00:00
cooper-oai f39e45e4a6 Support API workload identity authentication (#59275)
## Why

Workload identity authentication assumed every token exchange resolved to ChatGPT, preventing API service accounts from using the same flow.

## What changed

- Accept `wif_product: "api"` responses with organization, project, and service account metadata. Preserve ChatGPT compatibility when `wif_product` is omitted.
- Resolve API workload identity tokens as API key authentication and apply login restrictions to the resolved product. Read the actual login status during TUI startup instead of assuming ChatGPT.
- Preserve auth ownership across token renewal for the same API identity, and reject product or identity changes during refresh.
- Redact API keys from debug output.

## Testing

Add coverage for both exchange products, malformed metadata, assertion rotation and unauthorized recovery, identity changes, login and workspace restrictions, and CLI login status under both forced login methods.

GitOrigin-RevId: f4fc4da74b86e4a9ae47b28221d3e065500f5b6e
2026-11-04 00:52:58 +00:00
ioanbudea-OAI c141c31323 Preserve requested approval reviewers across policy overrides (#59272)
## Why

A model requirement can force `auto_review` even when the requested reviewer is `user`. Persisting or sending that effective value back as an explicit choice loses the original selection, so removing the requirement cannot restore it on resume.

## What changed

- Retain `requested_approvals_reviewer` separately from the effective reviewer in configuration and thread settings, with a fallback for older histories.
- Restore the requested reviewer on resume while applying current model requirements and reviewer allowlists.
- Let ordinary TUI turns, continuations, retries, and forks inherit the server's reviewer instead of echoing its effective value as an explicit request.
- Preserve a worker's requested reviewer when reloading it rather than inheriting the sender's selection.

## Testing

Extend resume coverage for explicit `auto_review`, removal of a model requirement, and a tightened reviewer allowlist. Update TUI assertions for omitted reviewer overrides and verify worker reload preserves its reviewer.

GitOrigin-RevId: d8c9c3a7b89e55e63f0e8ae210d6a87cb5547933
2026-11-04 00:31:24 +00:00
Dmitriy Kovalenko b34808060a Normalize loading bullets in the safety recourse snapshot test (#59263)
GitOrigin-RevId: 8c900fede2eb7eba58404e78b2d736a358c82ec8
2026-11-03 23:58:08 +00:00
Eric Traut b59f2e27a0 Preserve prompt contrast when terminal colors are unavailable (#59257)
## Why

Submitted prompts need readable foreground and background colors when the terminal does not report its default colors.

## What changed

- Use a contrasting gray pair for truecolor and 256-color terminals when default colors are unavailable. Keep terminal defaults for 16-color terminals and unknown color support.
- Preserve voice markers, inline element accents, and asynchronous reply code colors when applying prompt styles to native history.

## Testing

Add contrast coverage for each color level and terminal rendering regressions for inline elements and asynchronous reply code colors. Update prompt snapshots to cover the fallback colors.

GitOrigin-RevId: dcda0fc3e2b12a5dc9046322a4d82c61986e3ecd
2026-11-03 23:36:55 +00:00
Eric Traut d582332d03 Add OSC 777 notifications and improve approval notification text (#59256)
## What changed

- Support `tui.notification_method = "osc777"` with a `Codex` title and tmux passthrough.
- Replace control characters in OSC notification bodies and escape semicolon delimiters for OSC 777. Limit Ghostty bodies to 255 bytes, preserving UTF-8 boundaries and adding an ellipsis when truncated.
- Remove the 30-grapheme command limit from approval notifications, strip shell wrappers, and describe terminal input and network access requests explicitly.

## Testing

Add coverage for notification method selection, OSC 777 output with and without tmux, control character handling, Ghostty truncation, and approval notification text.

GitOrigin-RevId: e15fa7fdb007c38a148217f6aa0bbcc5e7371f9e
2026-11-03 23:36:34 +00:00
Eric Traut f2e0bf2d62 Clarify TUI reconnect status for HTTP 429 stream errors (#59253)
## What changed

For live, retryable `ResponseStreamDisconnected` errors with HTTP status `429`, replace `Reconnecting... <attempt>` with `Server is busy, reconnecting <attempt>` in the TUI status header.

## Testing

Update the stream recovery test to assert `Server is busy, reconnecting 2/5` and verify that the previous status is restored when streaming resumes.

GitOrigin-RevId: 7fb97f61b856a830565b86ec1bac2ef8608875b8
2026-11-03 23:22:03 +00:00
yuning-oai 0ed9d6fa4b Handle budget_reached as a terminal session budget error (#59228)
## What changed

Map provider `budget_reached` errors to `SessionBudgetExceeded` for HTTP 400 responses and streaming failures. End SSE streams immediately on this error, ignoring retry headers and later completion events, and display `budget reached` in the TUI.

## Testing

Add coverage for HTTP error classification, immediate SSE termination without retries, WebSocket error delivery and subsequent request recovery, and TUI error rendering and task-state cleanup.

GitOrigin-RevId: 6a62d699cdb9cb446214cacfacd0c9ed68bf21a6
2026-11-03 21:02:34 +00:00
Felipe Coury 6b2a2757de Add shortcuts to focus the main composer and side conversation (#59208)
## What changed

- Add configurable `focus_main_composer` and `focus_sidebar_content` actions, with default `leader c` and `leader s` bindings in workspace mode.
- Let users return to the main composer while keeping the side pane open, or focus the side conversation and hide it when already focused.
- Clear transcript search, selection, and activity focus when returning to the main composer, including when hiding the side pane.

## Testing

Extend tests for focus switching, blocked thread switches, offline composer focus, key capture, and binding conflicts.

GitOrigin-RevId: da624ce7e00a63c4f13870e55c4bc95f09b32cc4
2026-11-03 18:55:44 +00:00
jif c0d2a6fac4 Clarify token-count and screen-ownership arguments in tests (#59161)
GitOrigin-RevId: 90687303b7a36d1da9b5233b3fe24fbf02abc7ce
2026-11-03 13:38:35 +00:00
Oystein Eftevaag 9630fcfc13 Clarify test failures and annotate a backend registration invariant (#59131)
## What changed

- Replace `unwrap()` calls with descriptive `expect()` messages in rollout budget and web search scenario tests.
- Add a targeted `clippy::expect_used` exemption in `BackendSessions::set_preference_key`, documenting that preference keys are assigned only after backend registration.

GitOrigin-RevId: 5ff63e9abb4ea728371874ed121043e9e00438a0
2026-11-03 12:08:52 +00:00
Felipe Coury eb15d3a0f5 Add a shortcut to hide the focused side conversation pane (#59130)
## What changed

Add `tui.keymap.global.hide_pane`, defaulting to `leader -` in workspace mode. Hiding a focused side conversation returns to its parent while retaining the conversation, drafts, and view state for reopening.

Expose the action in the workspace keymap picker, validate binding conflicts, and suppress held shortcut keys after switching focus.

## Testing

Add coverage for hiding and reopening at split-pane and narrow widths, preserving conversation state, shortcut availability, key capture, and repeat/release handling.

GitOrigin-RevId: 6897c34b208041e6f90ae0e18c781eebd62566bd
2026-11-03 12:08:29 +00:00
Eric Traut 9e23a4708a Enable Bedrock onboarding through the local daemon (#59068)
## Why

Bedrock onboarding previously forced an embedded server and was unavailable when connected to a local daemon. Credential discovery uses the server environment, which can differ from the launching shell.

## What changed

- Allow the Bedrock setup wizard to use the local daemon while keeping GCP onboarding on the embedded server.
- Clarify that detected AWS credentials come from the server environment.
- Direct users who export AWS credentials in their shell to run `codex --no-daemon` in that shell.

## Testing

Update wizard eligibility tests and onboarding snapshots, and extend daemon startup coverage to verify discovery of a Bedrock API key available only to an already running daemon.

GitOrigin-RevId: 9502ffaa59250210e8f8bc8db6f82b0803cb6cac
2026-11-03 05:55:13 +00:00
Eric Traut dbaead0106 Classify daemon auto-start failures in TUI telemetry (#59058)
## What changed

Add a `failure_reason` tag to failed TUI auto-start events in `codex.daemon.start`, distinguishing `install`, `spawn`, `early_child_exit`, `readiness_timeout`, and `other` failures. Preserve the original error diagnostics through a classified startup API.

Detect managed child exits during process identity recording and distinguish exits before readiness from readiness timeouts.

## Testing

Extend daemon tests to assert classification of installation failures, spawn failures, early child exits, and readiness timeouts.

GitOrigin-RevId: 7c626f278e9e7f2ecd61b3fd1a90829a113eb232
2026-11-03 04:20:50 +00:00
Dmitriy Kovalenko 3f958ac2fe Run Bazel CI locally without BuildBuddy credentials (#59055)
## What changed

- Remove automatic BuildBuddy configuration and credential forwarding from Bazel CI, release, SDK, and voice builds. Strip remote execution CI configs in the shared wrapper while retaining explicit remote configurations for local use.
- Use native Windows host tools and audio dependencies for Windows Bazel actions, forwarding the required toolchain and environment settings.
- Initialize message-board MCP servers through a per-session `OnceCell` so server startup does not hold the shared registry lock across an await.
- Expose the message-board test helper to the core Bazel package and update the runtime-auth test call for the `reauth` argument.

GitOrigin-RevId: 5d5c1f4d71fa841090dea8eec8006380981fb65b
2026-11-03 04:08:59 +00:00
aojiao-oai 16ddd538bd Expose assistant content token counts in completion notifications (#59041)
## What changed

Add optional `contentTokenCount` metadata to `item/completed` notifications, carrying the producer-supplied token count for each completed assistant message in default and plan modes. Counts include any sampled footer and are `null` when unavailable.

Keep this telemetry separate from stored thread items and omit it from subsequent model requests. Update the protocol schemas and generated TypeScript and Python types.

## Testing

Add coverage for per-message counts, including zero, in default and plan modes; missing and malformed metadata; backward-compatible notification decoding; and exclusion from subsequent model requests.

GitOrigin-RevId: 35973037a42650fa2d7569da8e88cb81215cf971
2026-11-03 02:26:29 +00:00
Benjamin Carlsson 26f73fba8f Add host cycling and saved defaults for new TUI conversations (#59007)
## What changed

- With multi-backend support enabled, show the current host before the first submission and use `leader b` to cycle through available connections. Expose the shortcut as `tui.keymap.global.change_host`.
- Preserve the conversation name and composer draft, including cursor position, attachments, pending pastes, and literal versus shell-command interpretation of `!`.
- Save explicit host choices in user-only `tui.default_hosts`, scoped to the local project and user identity. Use the saved host for new conversations, falling back to the first available connection when it is unavailable.
- Prepare the destination and check directory trust before replacing the current conversation. Block switching during voice calls and active turns, and remove replaced blank conversations from the session overview.

## Testing

Add coverage for shortcut visibility and remapping, draft and name preservation, project/user preference isolation, unavailable-host fallback, destination trust and startup failures, and voice-call guards.

GitOrigin-RevId: def7b088951336bec8fe3962954fba9b861f91c6
2026-11-02 23:19:03 +00:00
Tamir Duberstein adca203576 Preserve steering when returning to a long-running turn (#58998)
## Why

Switching back to a running thread can lose the active turn's state after its `TurnStarted` notification falls out of the bounded replay buffer, breaking steering.

## What changed

Retain the evicted active turn and include it in replay snapshots when it is missing from the stored turns. Clear the retained turn when turns are replaced, the active turn completes, or the thread closes.

## Testing

Add a regression test that evicts the turn-start notification, restores the thread, and submits two steering messages while preserving a queued follow-up. A snapshot verifies the steering messages and queued input remain visible.

GitOrigin-RevId: a4302a2e0990b907207c229361cbcec68ebbbdc4
2026-11-02 22:25:54 +00:00
Felipe Coury db227aed42 Add opt-in side conversation panes to the TUI (#58992)
## What changed

- Add the disabled-by-default `tui_workspace` feature for the owned transcript view. At terminal widths of at least 100 columns, show the parent conversation beside its side conversation, with only the focused composer accepting input.
- Retain the inactive conversation's transcript, draft, and status, and restore reading and search state when switching focus.
- Keep drawing and input paused until history replay completes, while refreshing skills in the background.

## Testing

Add snapshots and regression tests for pane resizing and composer styling, retained streaming output, history search after replay, pending skills refreshes, and modal input protection.

GitOrigin-RevId: 68938f263353b0cd3a9e9562e06293bfc8251cc6
2026-11-02 21:47:45 +00:00
Ian MacLeod 23bc6e5f2a Preserve modified Ctrl+C keys in active TUI views (#58990)
## Why

The keypress inspector could not display `ctrl-alt-c` or `ctrl-shift-c` because these keys bypassed the active view as if they were plain `Ctrl+C`.

## What changed

Require the modifier set to be exactly Control for the `Ctrl+C` exception when routing keys to active views. Keys with additional modifiers now reach the active view.

## Testing

Add regression coverage verifying that the inspector displays `ctrl-alt-c` and `ctrl-shift-c`, while plain `Ctrl+C` still closes it for either uppercase or lowercase `C`.

GitOrigin-RevId: cdad4dc73c096e6f07d1a951123db981c4837eac
2026-11-02 21:37:43 +00:00
Ian MacLeod 7accd27956 Fix Escape handling in memory reset confirmation (#58971)
## Why

Pressing `Esc` in the memory reset confirmation could also close the memories settings popup instead of returning to it.

## What changed

Stop forwarding `Esc` to a view's key handler when its cancellation handler has already handled the event, even if the view remains open.

## Testing

Extend the memory reset confirmation test to verify that the first `Esc` returns to settings and the second closes the popup.

GitOrigin-RevId: b842fdaed69a1ac2a6af6fc454e02be2ac8946e6
2026-11-02 20:26:25 +00:00
Eric Traut 8a1d42537d Keep automatic thread title saves off the TUI event loop (#58970)
## Why

Saving a generated title awaited thread metadata reads and name writes in the TUI event handler, delaying its return to keyboard polling.

## What changed

Move automatic title persistence into the background title-generation task. Make metadata reads cancellable and serialize automatic writes with manual renames so a manual name takes precedence, including when an automatic write is already in flight.

## Testing

Extend title tests to check that completion dispatch returns immediately, canceled metadata reads finish, and manual renames wait for in-flight automatic writes. Retain coverage for saving titles to the originating thread after switching threads and preserving existing names.

GitOrigin-RevId: b284a06ca3f0fdcf22fd2fc87b07447f8ab754c0
2026-11-02 20:26:01 +00:00
Eric Traut 6ff7f31cac Avoid unnecessary rendering during TUI history loading and insertion (#58969)
## What changed

- Skip rendered-row counting during history hydration when there is no row budget or no next item page.
- Return early when checking history insertion prefixes if there is no active cell or the placeholder session header must remain active.

GitOrigin-RevId: 669ebf0ceb0fc01c8a7bfd8d2addbcbb6fc6a364
2026-11-02 20:24:40 +00:00
Eric Traut a5c4092437 Retire the daemon_auto_start feature flag (#58940)
## What changed

Eligible interactive launches now start or reuse the shared daemon regardless of `features.daemon_auto_start`. Remote-control daemon eligibility also no longer checks this flag. Use `--no-daemon` to run without the shared background server.

Treat `daemon_auto_start` as removed: ignore configured values with a migration notice, ignore managed requirements with a warning, and hide the flag from experimental feature discovery. Remove its launch telemetry tag.

## Testing

Extend retired-feature requirement coverage and add a migration-notice snapshot. Update CLI and TUI integration tests for daemon startup and explicit `--no-daemon` usage.

GitOrigin-RevId: e0290e5acd4bc0169a0f71c3296c567e46269ce3
2026-11-02 18:31:19 +00:00
Felipe Coury 8a17396d13 Fix live stream reflow at the allocated conversation width (#58927)
## Why

Streaming answers and plans need to wrap to the conversation's allocated width, which can differ from the terminal width. Resizing while reading earlier output should not report new activity unless new output has arrived.

## What changed

Reflow live streams when preparing the owned conversation layout, using its allocated width. Update the observed live revision after presentation-only reflow so it does not trigger `New activity`, while preserving notifications for unseen output.

## Testing

Add regression coverage for streaming answer and plan tables across width changes, including a narrow-layout snapshot, preservation of the reading position, and activity notifications when new output arrives before a resize.

GitOrigin-RevId: a9831c5a1a5ffb7477e7868d4ecca430d6ee50f3
2026-11-02 16:56:09 +00:00
jif 8806313db4 Scope local history discovery to the current ChatGPT account (#58918)
## What changed

- Add `currentAccountOnly` to `thread/list` and `thread/search`, defaulting to `false`, and enable it for TUI history discovery, resume pickers, and task mentions.
- Mark newly created threads as account-scoped and require each recorded creator user or account ID to match the current login. Older threads and threads without creator IDs remain shared; API-key logins continue to see all local history.
- Preserve account scope through resume and revert, including fallback to original rollout metadata when an older binary drops the marker. Forks receive new-thread scope.
- Skip unreadable rollout headers in scoped discovery and filter search candidates before reading snippets. Direct access by thread ID remains available.

## Testing

Add coverage for account matching, shared legacy history, list page refilling, search pagination, API-key visibility, and scope preservation across reverts. Extend rollout lookup coverage to compressed active and archived files.

GitOrigin-RevId: aa374f5e69165be5a71c0716ded1b105f5fb51e0
2026-11-02 16:00:20 +00:00
Eric Traut a09812981d Validate /fork before consuming the composer draft (#58767)
## Why

MCP startup alone should not block `/fork`, and rejecting a fork while foreground work is pending should preserve the draft and its image attachments.

## What changed

- Defer `/fork` draft consumption until dispatch validates the thread state, as for `/review`.
- Allow `/fork` during MCP startup when no user turn or review is pending or running, and clear the composer after validation succeeds.
- Preserve drafts and attachments when these commands are rejected in side conversations.

## Testing

Extend regression coverage for `/fork` and `/review` draft preservation during MCP startup, successful fork dispatch and composer clearing, rejection during an active review, and attachment preservation in side conversations.

GitOrigin-RevId: d152ba6659e4507d8750cb6bd3073d9f8b293538
2026-11-01 23:27:06 +00:00
Eric Traut b8c5102431 Distinguish update handoffs in TUI startup telemetry (#58766)
## Why

Accepting the startup update prompt exits before connecting to an app server, so launch telemetry previously reported `unconfirmed`.

## What changed

Record `app_server_mode=update_requested` when handing off to the updater. Continue recording `in_process`, `local_daemon`, or `remote` after a successful connection, and use `unconfirmed` for other early exits.

## Testing

Extend the launch telemetry test to verify exactly one recording for a connection, an update handoff, or an early return.

GitOrigin-RevId: 10dd29246218e1a86a396ab073305402a0b44d38
2026-11-01 23:25:39 +00:00
Benjamin Carlsson 54201ea65a Add naming and navigation helpers for TUI backend sessions (#58722)
## What changed

Add `BackendSessions` helpers to name the displayed listening backend, find the first listening backend, and cycle through listening backends in registration order. Cycling wraps around, skips closed streams, and excludes the current backend. Display names use `Local` for the initial session and `Backend N` for additional sessions; a closed displayed stream has no name.

## Testing

Extend backend session tests to cover cycling with a single backend, wraparound across three backends, and skipping a closed stream.

GitOrigin-RevId: e8f3fcc38a178b6b91d385d65d899fdd042062c5
2026-11-01 15:59:49 +00:00
Tamir Duberstein 181b4a853d Prioritize pending approvals in the subagent picker (#58720)
## What changed

- Group threads needing approval first in `/subagents`, mark them with `(needs approval)`, and initially select the first waiting thread.
- Refresh the open picker and approval notice as requests and agent metadata change, preserving the selected thread when rows move.
- Use consistent agent labels across the picker and approval notice, preferring agent paths and using UUID suffixes to distinguish unnamed agents.
- Track approval requests that arrive before thread metadata and refresh pending approvals after reconnecting.

## Testing

Extend the picker test and snapshots to cover approvals arriving while the picker is open, agent paths arriving later, and selection staying on the same thread after reordering.

GitOrigin-RevId: b7dd943d151ce98d1978f7c6b9f5e16903b9075b
2026-11-01 15:51:11 +00:00
Felipe Coury 8c811e8d93 Support rendering TUI conversations within an inset area (#58718)
## What changed

Split conversation rendering into preparation, painting, and post-draw steps. Use the supplied conversation bounds for transcript wrapping, composer layout, suggestion overlays, cursor placement, and the empty-state animation.

Preserve surrounding text and image placements during input-triggered redraws. Keep centered dialogs relative to the full viewport and restore neighboring content when they close.

## Testing

Extend regression tests and add a snapshot for conversations rendered at an offset, covering selection, link hit testing, cursor placement, scroll preservation, neighboring images, and dialog dismissal.

GitOrigin-RevId: 0dbca3f8d1064f2d58856c3bc77a4dab1c099cdd
2026-11-01 15:50:25 +00:00
Eric Traut 5e07d1f694 Support OSC 52 clipboard forwarding through GNU screen (#58716)
## What changed

Detect GNU screen via `STY` when `TMUX` is absent and wrap OSC 52 clipboard sequences in DCS passthrough strings. Split the sequence into 252-byte chunks to stay below screen's older 256-byte string limit while forwarding one continuous OSC 52 sequence to the outer terminal.

Prepare the terminal sequence in the clipboard worker and retain it for deferred delivery.

## Testing

Add coverage for short text and a longer Unicode payload, checking that each passthrough chunk stays below the limit and that reassembling the chunks reproduces the complete OSC 52 sequence.

GitOrigin-RevId: 1a042ed4fed817179e98459f4f4b2b847b160721
2026-11-01 15:39:52 +00:00
Eric Traut f7f1f0196c Sort agent center tasks by recency within status groups (#58714)
## What changed

Keep unpinned tasks ordered by descending update time within each status group as tasks arrive, change status, or refresh. Clearing a search or status filter also reflects timestamp changes to hidden tasks.

Keep pinned tasks at the top of their respective status groups in pin order, and mark their titles with 📌 instead of placing them in a separate Pinned group when grouping by status.

## Testing

Update ordering tests and snapshots to cover arrivals, status transitions, rediscovered tasks, filters, pins, and adjacent selection after hiding tasks.

GitOrigin-RevId: 2f3320a17b1932294f421dd28af848f0e0be45ef
2026-11-01 15:39:27 +00:00
Benjamin Carlsson 456ae93b63 Extract fresh session adoption from TUI session startup (#58713)
## What changed

Bundle the started thread, configuration, and local settings in
`PreparedFreshSession`, and move session activation into `adopt_fresh_session`.
The helper preserves input state, switches threads, applies settings, names the
session, and attaches the chat widget with a caller-supplied presentation.

`start_fresh_session` delegates to the helper with
`ThreadAttachPresentation::Fresh`, preserving its existing behavior.

GitOrigin-RevId: c4fdb6b5024a024f6baa48610e62a8e6628de30a
2026-11-01 15:38:07 +00:00
Benjamin Carlsson 1da2aefe00 Enable cross-backend session switching in the TUI (#58457)
## Why

The session picker can list conversations from multiple backends, but selecting a conversation owned by another backend was rejected.

## What changed

- Resume selected conversations through their owning backend, preparing the destination before replacing the current conversation. Preserve drafts and restore the destination's settings, account state, model catalog, and workspace services.
- Block backend switches during an active turn and retain the current conversation when destination preparation fails.
- Queue background backend requests until that backend is displayed, removing requests that are resolved or disconnected. Isolate background events from the displayed conversation while continuing to deliver notifications to a background voice session.
- Track backend ownership for thread detachment, startup results, and reconnect attempts.
- Remove the `yaml-rust` advisory exception from `codex-rs/deny.toml`.

## Testing

Add regression coverage for backend handoff errors, detaching through the source connection, clearing stale provider errors, deferred request delivery and cleanup, and voice-session closure on a background backend.

GitOrigin-RevId: 1bba84f16831af1d5295c1404f48803ce0608d3d
2026-10-30 23:56:12 +00:00
Eric Traut a795f961be Make viewed image paths clickable in the TUI (#58446)
## What changed

- Add terminal file hyperlinks to viewed image filenames and transcript paths, including older history loaded through pagination.
- Enable links only for local workspaces outside SSH sessions. Require a local regular file with a recognized image extension on both the original and resolved paths, and reject Windows reparse points.
- Preserve links when summaries are truncated or transcript paths wrap.

## Testing

Add coverage for local versus remote workspace links and for hyperlink destinations and column ranges in compact and expanded image rows.

GitOrigin-RevId: a7dff255c280ad4e609644e6f5ef5e130d9a55fb
2026-10-30 22:30:53 +00:00
Philipp Spiess 0ffae14a43 Add interactive controls and refresh inline visualization styles (#58436)
## What changed

- Add tab switching with keyboard navigation and a `.viz-carousel` variant picker with previous/next controls and screen reader announcements.
- Support touch tooltip toggling and tooltip triggers inside shadow roots.
- Refresh typography, tables, buttons, and form controls; add widget and progress styles and larger touch targets.

## Testing

Add a viewer snapshot test covering embedded tab and carousel scripts, generated control markup, and selected CSS rules.

GitOrigin-RevId: 3b85ef816fe307e8ac9903f176a0b81430e48f3f
2026-10-30 21:27:28 +00:00
Hung 2546265e3e Add audio file references with explicit runtime rejection (#58430)
## What changed

- Allow audio inputs to carry uploaded file references via `fileId` in the app-server API and `file_id` in model content, preserving existing inline audio shapes and Python class names.
- Preserve mixed inline and file-backed audio ordering through history reconstruction and migration, and budget file-backed audio conservatively when duration is unknown.
- Keep uploaded audio disabled at runtime: reject it before inference or raw history injection, preserve accompanying text, and prevent rejected attachments from reaching follow-up or resumed requests.

## Testing

Add coverage for wire-format round trips, SDK compatibility, mixed audio history ordering, and rejection during turn start, steering, task completion, and raw injection.

GitOrigin-RevId: 70895c47a2494c0c9936348ad1250eb1b7b892a6
2026-10-30 20:53:25 +00:00
alexsong-oai 22b3365156 Group alternative sign-in methods in a submenu (#58427)
## What changed

Move OpenAI API key, Amazon Bedrock, and Google Cloud Vertex AI options under “Sign in another way” during onboarding. Keep ChatGPT and device code sign-in on the main menu, and let `Esc` return from the alternative methods menu.

Guard activation keys across menu transitions so holding `Enter` or a numeric shortcut cannot advance through multiple steps or save a prefilled API key without a fresh confirmation.

## Testing

Add regression coverage for held activation keys and update onboarding tests and snapshots for submenu navigation, provider availability, and returning with `Esc`.

GitOrigin-RevId: b5aa56e48f10b490cc8f04b5d4288d21b76d2c61
2026-10-30 20:26:22 +00:00