Commit Graph
3665 Commits
Author SHA1 Message Date
Benjamin Carlsson a0995c2b2b Fix account refresh for new cloud sessions (#63171)
## Why

When a provider change triggers an account refresh for a new cloud session,
the TUI tries to read configuration that the cloud backend does not expose.
The cloud account belongs to the authenticated connection and is independent
of the thread's model provider.

## What changed

Use the cloud backend's `account/read` response directly and skip
`config/read` during the refresh.

## Testing

Add a regression test covering both a pending provider change and a different
provider returned by the new thread. It checks that the TUI sends only
`account/read`, attaches the thread, and applies the returned authentication
and plan details.

GitOrigin-RevId: a195fc6735227ff65e0347d6dd9588b64dbb6ada
2026-11-22 18:24:22 +00:00
Eric Traut 104d256418 Preserve the host terminal's cursor shape in default TUI sessions (#63152)
## Why

Sending the terminal's default cursor shape can overwrite a shape
already set by the host, even when Codex never requested a custom shape.

## What changed

Leave the cursor shape alone during draws that use the default shape
until Codex applies an override. Track whether an override was applied
so cleanup resets the shape only when needed and still makes the
cursor visible.

## Testing

Check that default sessions and sessions using terminal scrollback emit
no cursor-shape reset. Keep exercising cursor repair with an explicit
shape override.

GitOrigin-RevId: 1f6f1cad0bfc04307896cea1d75b9535fc21031d
2026-11-22 16:32:37 +00:00
Eric Traut b46c087c7e Count wide-character wraps when inserting TUI history (#63151)
## Why

A double-width character moves to the next row when only one column
remains. Dividing the line's display width by the terminal width misses
that unused column and can undercount the rows occupied by a long URL.

## What changed

Use the same row count to reserve space for history and clear rows before
writing. Include the unused column when a wide character wraps, while
allowing clusters that start with a narrow character to cross the edge.

## Testing

The VT100 snapshot checks that a three-row URL with wide characters
appears directly below the preceding prompt. A unit test checks that
clusters starting with narrow characters can straddle the right edge.

GitOrigin-RevId: 15e76b00f280b0d9e82f5d81fbfa54c1ed8462ca
2026-11-22 16:22:42 +00:00
Felipe Coury 227fa4e805 Show task loading progress in the docked agent command center (#63146)
## Why

The current task can already be visible while initial discovery is still
running. Opening a different task can also involve several backend requests,
leaving the user waiting without an indication that their selection took effect.

## What changed

- Show “Loading additional tasks…” in the footer during initial discovery,
  with “Loading tasks…” in narrower layouts.
- Mark the selected row “Opening…” and show “Opening task…” in the footer
  during resume, including across backends. Keep the outgoing frame visible
  until the destination is ready to draw.
- Draw the replayed transcript before scanning for loaded subagents, then
  replay their pending requests. Suppress repeats of the selection key so a
  held key cannot act on an approval dialog opened during replay.

## Testing

Add regression coverage for the discovery footer, cross-backend opening
progress and held-key suppression, and replay of a pending subagent request
after discovery.

GitOrigin-RevId: 7c5088edd620a76c5157919c63566b95ad456664
2026-11-22 15:50:07 +00:00
Felipe Coury 69ee78825e Keep task status visible and fix paging in the agent command center (#63145)
## Why

Narrow task lists can hide status, and paging by a fixed number of rows
can skip tasks when group headings and detail rows take up viewport space.

## What changed

Show status and any branch beneath the task title in narrow lists when
there is room for a second row. In wider lists, size the Status and
Updated columns to their contents within their existing limits, leaving
more room for titles when the metadata is short.

Base Page Up and Page Down on how many selectable entries fit in the
current viewport. Keep the selected task's detail row in view when
space allows, and update the scroll position even when another page key
arrives before the next render.

## Testing

Cover paging through dense and single-task groups in wide and narrow
layouts, consecutive page keys before redraw, and restoration of the
first group heading when paging back to the top.

GitOrigin-RevId: 9e1be32338b5131d3be6b352c9ce2afbbbc227cc
2026-11-22 15:48:47 +00:00
Eric Traut cf3ff1530d Show a loading indicator while the resume picker starts (#63102)
## Why

`codex resume` can wait for the app server connection and login status
before the session picker opens, leaving the terminal blank while they wait.

## What changed

Display “Loading sessions…” during startup using the same styling as the
picker. Clear the inline indicator after the login status check or when
startup fails or is canceled.

## Testing

Add a terminal test that holds open a Unix socket to stall the connection,
checks that `codex resume --no-alt-screen` displays the loading indicator,
then closes the socket and verifies that the error replaces the indicator.

GitOrigin-RevId: 04b1a40343be284e2c56fd9519bb57a2b2fa6ecd
2026-11-22 08:27:26 +00:00
Eric Traut 1476a08f1b Prevent TUI startup hangs when a launcher restores blocking input (#63089)
## Why

A launcher that shares stdin with Codex can clear `O_NONBLOCK` on the
terminal probe's duplicated descriptor. After reading a partial reply,
the probe can then block waiting for more input past its deadline.

## What changed

Poll for readable input with a zero timeout before every probe read.
When no bytes are ready, return to the probe's deadline-aware wait.

## Testing

Add a pseudoterminal regression test that clears `O_NONBLOCK`, answers
only the cursor position query, and checks that the startup screen
appears without another keystroke.

GitOrigin-RevId: 7b6e11db6ac3634f77147ab1251f5321be4355cb
2026-11-22 07:02:39 +00:00
Eric Traut 618d501ea0 Preserve fenced code source in TUI transcript copy mode (#63085)
## Why

An indented code block or a bare table displayed as code can match the
normalized text of a later fenced block. Copy mode could assign the fenced
block's original text to the earlier target, leaving the fenced block without
its original line endings or trailing whitespace.

## What changed

Track fenced code in both raw and rendered transcript layouts. Only match
original fenced code against copy targets that came from a fence.

## Testing

Extend copy-mode regression tests with an indented block and a bare table
that each precede a fenced block with matching normalized text.

GitOrigin-RevId: fbbce8e0feb71a449bb978aca65e1d2202da812e
2026-11-22 06:47:14 +00:00
Eric Traut f12fa0fbc5 Keep the TUI transcript selection cursor visible (#63056)
## Why

Moving the selection cursor below the viewport could jump the transcript so
the cursor landed at the top. Resizing the viewport could also leave the
cursor offscreen.

## What changed

Scroll just enough to reveal the cursor, accounting for the row occupied by
a pinned prompt header. Recheck visibility when the viewport changes size
or text rewraps. When rendering an inactive pane, preserve its saved scroll
position and recheck cursor visibility when it becomes active again.

## Testing

Extend transcript tests to cover scrolling past the bottom edge, shrinking
and narrowing the viewport, reactivating a pane, and moving the cursor
around a pinned prompt header.

GitOrigin-RevId: 8772a79316fb31e758986d1f71a0d776fc5ff2b5
2026-11-21 23:25:56 +00:00
Eric Traut 17cb2e3a7f Suppress TUI completion popups in shell mode (#63054)
## Why

Shell syntax such as PowerShell's `$env:HTTP_PROXY` can trigger Codex
completion menus while the user is typing a shell command.

## What changed

Keep completion popups closed in `!` shell mode and cancel any active
file search. Preserve popup dismissals when entering and leaving shell
mode.

## Testing

Cover literal submission of shell commands containing slash-command,
skill, and file completion tokens. Verify that a dismissed file popup
stays closed when a leading `!` is typed and then removed.

GitOrigin-RevId: 6053c23db8710704d6f8c19cf2c114252a459566
2026-11-21 23:13:11 +00:00
Felipe Coury 9302bb553e Select and copy Markdown blocks in the transcript (#63047)
## What changed

Press `m` in transcript selection mode to mark the Markdown block at the cursor. Move between sibling blocks with `h` and `l`, or extend the selection with `j` and `k`. Use `Tab` to expand to an enclosing block or heading section and `Shift+Tab` to shrink the selection.

Copy with `y` to retain Markdown structure, including list markers, code fence languages, and table formatting. For example, you can copy a fenced code block on its own from inside a blockquote.

## Testing

Add coverage for wrapped blocks, nested lists and sections, table selection, copying from the displayed revision during streaming, and conflicts with customized keybindings.

GitOrigin-RevId: 5d4d873c0e378294128c128f472e4dae122831c6
2026-11-21 21:51:31 +00:00
Benjamin Carlsson 59edd0d512 Complete named settings for TUI slash commands (#63036)
## Why

Slash-command completion only suggested positional arguments, leaving users
to recall named flags and their accepted values.

## What changed

Suggest flags for `/model`, `/permissions`, `/title`, `/statusline`, and
`/mcp login` using the same flag definitions as command parsing. Tab
completes known values in both `--name=value` and `--name value` forms.
For example, `/model --speed=f` completes to `/model --speed=flex`.

Named completion also works in multiline drafts and filters out flags
already present in the command.

## Testing

Add composer tests for both value forms, multiline completion, duplicate
flags, and quoted arguments, plus a snapshot of the `/model` flag popup.

GitOrigin-RevId: f874f67c4601012252775e811ddf496dbc6c4817
2026-11-21 20:41:19 +00:00
Eric Traut 140815f19c Fix clipboard text fallback and guard pending pastes in the TUI (#63022)
## Why

On X11, a clipboard owner can answer an image request with text, causing the image read to fail even though text is available. Submitting or queueing a draft while its clipboard read is pending can also send it without the intended paste.

## What changed

- Enable `Ctrl+V` text fallback on local Linux outside SSH and WSL, and allow `Shift+Insert` text fallback across platforms.
- Try text after eligible Linux image-read failures. Report the original image error if the fallback yields no text.
- Keep pending pastes alive across key releases. While a paste targets the current draft, intercept submit and queue shortcuts and show a reminder to review the draft before sending.

## Testing

Extend clipboard worker coverage to exercise submit during an active read and queue after a read completes but before its text reaches the draft. Snapshot the pending-paste reminder.

GitOrigin-RevId: 21bec5e405e13631a2a72f440482338611307ff3
2026-11-21 19:08:29 +00:00
Eric Traut 586bd4b891 Support the Orca integrated terminal (#63013)
## What changed

Recognize Orca from `TERM_PROGRAM=Orca` and report it in `codex doctor`.

Render Markdown links as clickable labels in Orca and keep destinations
visible under terminal multiplexers. Enable Kitty graphics for pet images
only when Orca advertises `ORCA_IMAGE_PROTOCOL=kitty` and the session
passes the direct-terminal checks.

## Testing

Cover Orca detection, Markdown link rendering and multiplexer fallback,
and pet image capability checks.

GitOrigin-RevId: 978a9cd99a8090bfe9198611e9ae7e0dd2709c3b
2026-11-21 17:25:41 +00:00
Felipe Coury a0436d69ff Make Command Center easier to navigate in the TUI workspace (#62990)
## Why

The docked Command Center has a fixed width, and mouse clicks can
focus the pane but cannot open a task. Moving between the task list
and the conversation should work with the workspace shortcuts.

## What changed

- Open or focus Command Center with `leader a` by default. Use the
  workspace pane shortcuts to move between Command Center and the
  conversation, with matching Agents bindings taking precedence in
  Command Center.
- Drag the divider to resize Command Center. Show each docked task's
  status and Git branch, when available, on a second line. Click either
  line to open the task, or click **Show more** to load older tasks.
- Animate the dock opening and closing.

## Testing

Extend the TUI tests to cover mouse activation and workspace keyboard
navigation, including preservation of the conversation draft and
reading position.

GitOrigin-RevId: e78aa4afb68e9971de51859221ce996b13750e13
2026-11-21 15:29:34 +00:00
Felipe Coury 1731314b3b Dock the Agent Command Center beside the conversation (#62986)
## Why

Opening the Agent Command Center in a modal interrupts the conversation
view. Docking it keeps the transcript and draft visible while browsing
tasks when the terminal has room for both panes.

## What changed

With `features.tui_workspace` enabled in owned transcript mode, the
Command Center opens to the left of the conversation on wide terminals.
On narrow terminals, the focused pane fills the screen. Opening a task
returns focus to the conversation and keeps the dock open. Other
transcript modes continue to use the modal Command Center.

## Testing

Add coverage for draft and reading-position preservation, wide and narrow
layouts, queued results arriving after a focus change, and selecting a
new session when its task appears in the dock.

GitOrigin-RevId: d07c9cad3bb8685167b5995e550c406948d7a6e3
2026-11-21 15:14:53 +00:00
Adam Perry @ OpenAI 43d8b78241 Fix reasoning summary config lookup and request snapshot (#62932)
## What changed

Pass `None` for the resumed working directory when the TUI reads
effective reasoning summary settings, so the call matches the
`startup_config_cwd` signature.

Update the indexed search rollout snapshot to expect
`stream_options.reasoning_summary_delivery` set to `sequential_cutoff`.

GitOrigin-RevId: 66225aa15dcfe5da43b397a96a7da4b4712f0b55
2026-11-21 08:38:44 +00:00
Eric Traut 556901ba72 Forward TUI clipboard copies to Rex clients (#62931)
## Why

A client can attach to a Rex session after Codex starts. A successful
native clipboard write can update the host clipboard without reaching
the attached client.

## What changed

Use shared terminal detection to select OSC 52 forwarding in Rex, even
when native copying succeeds. Keep environment-based routing for tmux,
Herdr, and SSH. Use the same terminal detector to recognize VS Code for
keyboard handling, with the existing Windows probe as a fallback.

## Testing

Cover OSC 52 selection for Rex without SSH or tmux and verify that
forwarding runs after a successful native copy.

GitOrigin-RevId: 47db5868d87aaf2aeee9cdd59307aa1be532c11e
2026-11-21 08:37:40 +00:00
Eric Traut f63f8b9bc6 Add a reasoning summary picker to /config (#62905)
## What changed

Choose Auto, Concise, Detailed, or None under Sessions in `/config`.
The picker saves `model_reasoning_summary` through the connected app server
for new chats. The panel shows the effective value and reports when a config
or launch setting overrides the saved choice.

## Testing

Add coverage for the picker and for saving Auto explicitly when the setting
was previously unset. Verify that the active chat keeps its setting and
that the panel reflects a profile override.

GitOrigin-RevId: cd027a6b16879a656b8d8b21488f0588c98f9077
2026-11-21 05:56:42 +00:00
Eric Traut 553c7f8ea6 Use automatic reasoning summaries by default in the TUI (#62904)
## Why

The TUI left the reasoning summary unset on turn submission, so OpenAI
requests could use `concise` even when the user had chosen no summary
setting. Embedded WebSocket prewarming and the first turn need to use
the same summary setting to reuse the warmup response.

## What changed

- Send the configured `model_reasoning_summary` with TUI turns, defaulting
  to `auto` for OpenAI providers. Use the same fallback when prewarming
  through the in-process app server.
- Read reasoning summary settings and custom provider definitions from
  the app server's effective config while honoring explicit launch
  settings. When resuming a remote session, use its working directory
  for the config lookup unless a remote directory override is set.

## Testing

Cover summary defaults and explicit settings in Responses requests,
and verify that the first embedded WebSocket turn uses `auto` and
reuses the warmup response.

GitOrigin-RevId: 1a2edfa44abdd031691a0d421eba077b0796ebe1
2026-11-21 05:55:23 +00:00
Eric Traut 58952e0c39 Enable concurrent reasoning summaries by default (#62903)
## What changed

Mark `concurrent_reasoning_summaries` as stable and enable it by default.
When requesting reasoning summaries from OpenAI, Codex now sets
`stream_options.reasoning_summary_delivery` to `sequential_cutoff` by
default.

## Testing

Exercise summary rendering with the default configuration and update
request assertions and snapshots to expect `sequential_cutoff`. Explicitly
disable the feature in tests that exercise legacy reasoning events.

GitOrigin-RevId: 04310fd271ced11c3a22e8ff6275a387c9c22fc2
2026-11-21 05:42:40 +00:00
Winston Howes 4739e94260 Add an opt-in indexed web search default (#62894)
## What changed

Add `features.web_search_indexed_default` to let restricted turns use
`indexed` search in place of the implicit `cached` default when the
provider and managed requirements allow it. Full-access turns still
prefer `live` search when allowed, and an explicit `indexed` selection
retains its existing precedence.

Forward the flag through the TUI and keep the default implicit when
launch overrides disable legacy search flags.

## Testing

Cover mode selection across permission profiles, explicit settings, and
managed requirements. Verify that the first model request advertises
indexed search and that permission changes take effect on the next turn.

GitOrigin-RevId: 08a6279c447c517c50b9e6a544ecdf681b81bf50
2026-11-21 04:05:41 +00:00
Ned Howley 566020b724 Allow new threads to opt out of Daybreak propagation (#62879)
## Why

App-server clients that prepare threads for later use need to be able
to skip Daybreak propagation for an individual thread when the server
configuration enables it.

## What changed

With `experimentalApi`, pass `daybreakProgramPropagationEnrolled: false`
to `thread/start` to opt a new root thread out. Managed requirements
take precedence. Omitting the field or passing `null` or `true` uses the
configured enrollment rule.

The same field on `Thread` reports actual enrollment for the live
session, including in the start response and `thread/started`
notification. Reusing a live session preserves its enrollment. A thread
returned from stored metadata alone reports `null`, and resuming it
from storage in a new session reports `false`.

## Testing

App-server tests cover enrollment under enabled, required, and disabled
configuration, as well as reporting across live reads and resumes,
unload, and resume from storage. A core test checks that opting out
prevents native helpers from inheriting the root's saved Daybreak choice.

GitOrigin-RevId: f9aae9ff76702b1e5a38d45120cd889a26f8ece5
2026-11-21 01:14:17 +00:00
Sidharth Lakshmanan 0bfb8467da Preserve per-image metadata in app-server image generation items (#62871)
## Why

App-server clients lose metadata supplied by the image backend when
Codex turns the response into a completed image generation item.

## What changed

Expose the backend's `image_metadata` as optional `imageMetadata` in
app-server items and preserve nested values through thread persistence,
resume, and legacy history replay and migration. Keep this metadata out
of model tool output.

Omit empty metadata and discard non-object, oversized, or deeply nested
metadata without dropping the generated image.

## Testing

Extend coverage for per-image parsing, metadata limits, and round trips
through app-server completion, persisted history, and thread resume.

GitOrigin-RevId: 7211a9db1149cb05e6176b08b0462ca173ac72d5
2026-11-21 00:23:59 +00:00
cooper-oai e346540867 Use runtime authentication for TUI WebRTC calls (#62870)
## Why

The TUI creates WebRTC calls locally, and that request path did not use
runtime agent authentication even when runtime agent instances were enabled.

## What changed

- Reuse local credential and runtime managers across calls while the login
  configuration stays the same. Reload first-party credentials before
  creating a call and keep network policy under the primary account owner's
  control.
- Use the shared provider request resolver for call authentication and HTTP
  transport. Apply the WebRTC base URL override before resolving credentials
  so runtime authentication is selected for the actual destination.

## Testing

Add mock-server coverage for concurrent calls sharing a runtime with fresh
assertions, credential changes, and both dual-header and assertion-only
modes. Cover the feature toggle, custom call destinations, network policy
permits, and provider credentials when the local login file is malformed.

GitOrigin-RevId: 6503b3375c79d3126911d1d7c1aea898face37b9
2026-11-21 00:20:14 +00:00
arnavpatidar-OAI b392250f48 Define the startup OAuth protocol for config servers (#62859)
## What changed

Add the optional `target` field to `account/gatewayOAuth/login`.
The startup protocol defines `{"kind":"configServer"}` as a target
for `--startup-oauth`, mutually exclusive with `modelProvider`.
The regular app-server login handler rejects explicit targets.

Define `StartupGatewayOAuthChangedNotification` with the target,
status, and authorization URL for the browser handoff. Export the
new types in the JSON schemas, TypeScript bindings, and Python SDK.

## Testing

Update the TUI device login regression test to expect `target: null`
when signing in to a resumed thread's saved gateway.

GitOrigin-RevId: fb3ce66a143cad9ad56c93f3ac37f8b6f1abdb0e
2026-11-20 23:24:10 +00:00
Benjamin Carlsson beac2ef8fc Keep Cloud threads current in the Agents overview (#62858)
## Why

The Agents overview can go stale when Cloud threads change from another
client, especially when the TUI has no conversation stream attached.

## What changed

- Use Cloud stream notifications to update thread status and refresh the
  thread list. Poll every 10 seconds while the overview is visible and
  no stream is attached.
- Refresh the history already shown while preserving the `Show more`
  cursor. Use fresh list metadata for thread names, recency, and unread
  state, and restore rows when a refresh catches a missed unarchive.

## Testing

Cover Cloud inventory notifications, polling while detached, pagination
across refreshes, and recovery from a missed unarchive.

GitOrigin-RevId: 63c98438b6ddd2e47dd2d1f419c2a676508c6d91
2026-11-20 23:23:32 +00:00
Dylan Hurd 941e1dcade Defer built-in Default mode instructions until after Plan mode (#62857)
## Why

Threads that stay in Default mode carry a collaboration-mode prompt even
though they have no Plan mode instructions to supersede.

## What changed

Omit bundled and model-catalog Default mode instructions until a thread
uses Plan mode. Emit Plan mode instructions on entry and Default mode
instructions when switching back. Preserve eligible caller-provided
instructions and carry the active mode through compaction and resume.

## Testing

Cover prompt contents before, during, and after Plan mode in core and
app-server tests, including compaction and resume in the core tests.

GitOrigin-RevId: b734767da15be53c4eccae71994e46eba63a9ecc
2026-11-20 23:12:16 +00:00
Charlie Marsh 5bee962f5e Reuse one syntax highlighter when building TUI Markdown styles (#62840)
## Why

Building Markdown styles clones the active syntax theme and constructs a new
highlighter for each foreground lookup.

## What changed

Borrow the active theme and use one highlighter for all foreground lookups
in `MarkdownStyles`. Preserve the readability adjustment for text styles
and the accent-color fallback for inline code.

GitOrigin-RevId: 8ddfad7e61e2dc7968398ff3bdecd3b389c1bb07
2026-11-20 21:29:06 +00:00
Ryan Taylor a1afa12273 Let required hooks block continuation on failure (#62831)
## Why

A required hook check can fail to run or return a usable result. Continuing
after that failure can let an action proceed without a completed check.

## What changed

Add per-handler `onFailure` for command and MCP tool hooks. The default
`continue` preserves existing behavior. On supported synchronous hooks,
`block` applies the event's blocking behavior and reports the reason while
preserving failure diagnostics. For example, a failed `PreToolUse` check
prevents the tool from running, while a failed `PostToolUse` check withholds
the result of a tool that already ran.

Expose the policy in the app-server's `configRequirements/read` response.

## Testing

Add tests for command and MCP failures under both policies, and scenario
coverage for blocked tool execution, withheld results, and completion after
a `Stop` hook recovers.

GitOrigin-RevId: 20d6ebda0094382fe052bbf34338edb994cc7bd3
2026-11-20 20:24:34 +00:00
Felipe Coury d402acbeba Reset TUI thread-switch state on reconnect (#62807)
## Why

Reconnect replaces the app event queue, so queued thread-switch events can be
discarded while their resets are still counted as pending.

## What changed

- Clear the pending thread-switch reset count when replacing the event queue
  and use a shared accessor for the displayed thread during reconnect.
- Box the app event dispatch future and extract helpers for choosing the side
  conversation target and rendering the composer pane.

GitOrigin-RevId: 6bb14443952262b6a0df7fdf05db053038c7ce2d
2026-11-20 17:45:15 +00:00
Eric Traut 0e8c7683c4 Match TUI task mentions by displayed title (#62691)
## What changed

Use state database-backed `thread/list` requests for task mentions without
searching conversation contents. Merge title-filtered results with recent
threads by thread ID so a full filtered page cannot crowd out recent
candidates. Native Cloud uses the recent list because it lacks a title filter.

Fuzzy-match the displayed title in the picker. Keep the working directory
visible as a description and exclude it from matching.

## Testing

Cover remote listing, retention of recent candidates when the filtered page
is full, and fallback when the filtered request times out. Check that a
directory-only match stays out of the picker.

GitOrigin-RevId: ec2a5ae9f046e533104251fd82f6683343854ee0
2026-11-20 07:15:35 +00:00
Eric Traut 0f3a4756f9 Let administrators disable Codex daemon updates (#62690)
## Why

The daemon's automatic update preference still permits manual updates.
Administrators need a policy that covers both paths.

## What changed

Set `features.daemon_updates = false` in managed `requirements.toml` or
local MDM policy to block scheduled updates and manual daemon package
replacements. Updates are allowed by default. User configuration cannot
override the policy, and cloud-delivered requirements reject the setting.

When policy blocks updates, the TUI hides update actions in `/daemon`,
suppresses update offers in version notices, and directs users to their
administrator where a newer daemon is required.

## Testing

Add coverage for the default, disabled, and invalid policy cases,
rejection of the setting in cloud requirements, and the TUI with daemon
updates disabled.

GitOrigin-RevId: de9e50c4acc4dc8e83bbd2b9a5e902deb8c6f477
2026-11-20 07:14:27 +00:00
Eric Traut 45ace810b3 Copy pasted image files into temporary TUI attachments (#62687)
## Why

A pasted image path could become unreadable before submission if the
original file was moved or deleted.

## What changed

Copy the image into a private temporary file at paste time and use that
copy as the attachment. Apply a 1 GiB limit when saving image files and
clipboard PNGs. If copying a pasted image path fails, show an error and
preserve the draft.

## Testing

Cover attachment readability after deleting the original file and verify
that an oversized image paste reports an error and preserves the draft.

GitOrigin-RevId: 5f797979f36173fb3355345e0f124b81fcf86d01
2026-11-20 07:03:05 +00:00
Ian MacLeod 64026788f3 Hide the warning navigation hint for a single warning (#62642)
Show the TUI warning navigation hint only when there are multiple
warnings to browse. Update the single-warning snapshots to reflect the
shorter footer.

GitOrigin-RevId: 8bcea7841d9fd84e037f59a6afa3e4ef2de6f01e
2026-11-20 02:01:03 +00:00
Joe Savona 78f6b11303 Add center and end alignment to status line rows (#62637)
## Why

Status line authors can start rows at the leading edge or distribute
extra space between items. They also need to center or right-align a
group while keeping its configured gaps.

## What changed

Add `justify: "center"` and `justify: "end"` to the row renderer and
TypeScript contract. Align each wrapped line independently within its
available width.

Leading padding uses the row background, stays outside hyperlink
targets, and leaves blank lines unpainted. When the last visible line
fills the width and more lines follow, the renderer can reclaim a
padding cell for the overflow ellipsis.

## Testing

Add rendering coverage for wrapped and nested rows, wide characters,
blank lines, hyperlink boundaries, and overflow. Extend the TypeScript
contract check to cover both new values.

GitOrigin-RevId: 85dd907fe60b5d2cfb759b32058d0876430dd9e6
2026-11-20 01:34:16 +00:00
Ian MacLeod d0264b756e Share slash command argument range mapping in the TUI (#62624)
## What changed

Use `slash_args_elements` in both the chat composer and slash command
dispatch. The shared helper converts text element byte ranges to offsets
relative to the command arguments and clips them to the argument bounds.

GitOrigin-RevId: 72e2fa42bf0d3fc385a58cc13fb6741c896db900
2026-11-19 23:55:41 +00:00
Felipe Coury 81ef12b617 Refresh open sidebar file previews when files change (#62583)
## Why

Sidebar previews load a snapshot of the file when opened, so edits on disk
leave the open tab showing stale content.

## What changed

Watch each previewed file’s parent directory through the app server so the
preview refreshes even when an editor saves by atomically replacing the file.
Poll every three seconds when a watch cannot be registered, and resubscribe
when reconnecting to the same backend.

Preserve the text preview’s reading position across reloads, including when
the file temporarily becomes unreadable and then returns.

## Testing

The sidebar test covers atomic saves and recovery after moving a directory
away and back. It checks that the tab shows updated content at the existing
reading position.

GitOrigin-RevId: d5f7507d1a81a118fb10a0febf5e274c18f19d81
2026-11-19 20:13:14 +00:00
Eric Traut 2f0374456f Render LaTeX underbraces in TUI display math (#62577)
## Why

An unsupported `\underbrace` leaves the display equation as LaTeX source,
so readers have to interpret which terms each label groups.

## What changed

Render `\underbrace{expression}_{label}` with a Unicode brace that spans
the expression's terminal columns and a label centered below it. Keep
surrounding math aligned with the expression. Inline math, unsupported
arguments, and layouts that exceed the available width still use the
existing fallback.

## Testing

Add a snapshot for labeled Boolean clauses, short expressions, and labels
wider than their expressions. Check fallback for inline, malformed,
nested, multiline, and over-width cases.

GitOrigin-RevId: 8fbe92d512d06c73cf21247343ad869743bebd0c
2026-11-19 19:54:13 +00:00
Benjamin Carlsson 6eea328081 Use the cloud emoji for cloud thread labels (#62573)
## What changed

Request emoji presentation for the cloud marker in thread labels.
Preserve the emoji variation selector immediately after the cloud
symbol in Unicode terminal titles and keep GNU Screen titles ASCII.

## Testing

Update rendering snapshots for the task overview, side panes, mentions,
resume picker, and thread identity displays. Extend the terminal title
test to cover the cloud marker in both title encodings.

GitOrigin-RevId: 15959a0760f63a45d8fff917df2e008cda7536a5
2026-11-19 19:04:56 +00:00
Joe Savona 99870c4f49 Add justification to custom statusline rows (#62569)
## Why

A fixed gap cannot keep two statusline groups at opposite edges as the terminal width changes.

## What changed

Set `justify: "between"` on a root `row` to distribute spare footer columns between its items on each line, in addition to the configured `gap`. Nested rows size to their content within the available width, so they can keep related fields together.

Use `justify: "start"` to pack items at the leading edge with the configured gap. Both explicit modes group adjacent bare strings into one item. Separate `text` or `row` elements can be positioned independently. Omitting `justify` preserves the existing gaps between authored children.

## Testing

Add renderer tests for edge alignment during resizing, spacing on wrapped lines, and root versus nested rows. Extend the row decoding tests and the TypeScript contract fixture to cover `justify`.

GitOrigin-RevId: 3319e688f3adfe6d35709ef279345f1db3eb9693
2026-11-19 18:53:03 +00:00
Felipe Coury 308ab1b895 Document how to render TUI shortcut labels (#62560)
## What changed

Use `esc close` to show how to combine the Escape binding's display
label with the action text and use the shared shortcut styling in
views and mockups.

GitOrigin-RevId: 0bb0dc94e503932443076dbe2495e5494e3df5b2
2026-11-19 18:05:07 +00:00
Eric Traut 325123ae4a Render \widetilde in terminal Markdown math (#62554)
## What changed

Apply the same Unicode combining tilde as `\tilde` when the
`\widetilde` argument is a single grapheme.

## Testing

Extend the Unicode math snapshot to cover both `\widetilde{I}` and
`\widetilde I` in fraction numerators.

GitOrigin-RevId: e6976f998bb0955ba9c73117bd19dd814b07399a
2026-11-19 17:12:52 +00:00
Eric Traut 76aa618787 Render multiline Mermaid flowchart edge labels (#62550)
## Why

The terminal renderer already supports line breaks in flowchart node
labels. The same syntax in an edge label causes the diagram to fall
back to source text.

## What changed

Treat `<br>`, `<br/>`, and `<br />` as line breaks in edge labels.
For example, `A -->|"Review<br/>order"| B` renders the label on two
lines. Reserve space for each line and preserve blank lines without
erasing edge connectors.

## Testing

Add snapshots for all four layout directions and update the terminal
Markdown snapshot to include a multiline edge label. Test blank lines
and terminal width limits.

GitOrigin-RevId: 277525d92c6c1f105bc34516893c67eccc22a22c
2026-11-19 16:44:44 +00:00
igorrybalka-oai 1826d80eca Expose Daybreak availability in model discovery (#62499)
## Why

Clients need to distinguish a caller who must enroll in Daybreak from a
model that does not support it. The list of accepted access programs
alone cannot express that distinction.

## What changed

Carry the server-resolved status for each caller and model from the
model catalog into `model/list` as `availableAccessPrograms.daybreakAvailability`.
Update the JSON schemas, TypeScript bindings, and Python SDK to expose
the field.

Rust decoders use `default` for missing or unrecognized statuses. The
Python SDK also defaults missing statuses and preserves new strings
from newer hosts.

## Testing

Cover catalog decoding, app-server response serialization, and Python
SDK round trips with known, missing, and future status values.

GitOrigin-RevId: c1e5ddef68fd19b25e583bb6996a93fd78ab9d18
2026-11-19 12:28:34 +00:00
Benjamin Carlsson 9274511443 Reconcile unfinished Cloud replies in the TUI transcript (#62403)
## Why

Cloud turn and item pages can reflect different points in time. A reply
restored from history may still be unfinished even when its turn is marked
complete. When the final text arrives, the TUI can leave a stale prefix in
the transcript or put the final reply after intervening tool output.

## What changed

Track Cloud replies by turn and item across history replay, pagination, and
live streaming. Reserve a transcript position even for an unfinished reply
with no visible text. When it completes, replace its fragments in place or
remove them if the final text contains only hidden directives. Keep late
completions from interrupting another reply's stream.

Preserve transcript order when choosing the latest copyable reply. When a
turn completion notification has no response text, fall back to the latest
completed response from that turn.

## Testing

Cover replies restored from older history pages, late completions during
another stream, and directive-only completions that remove a visible prefix.
Check the resulting transcript order, copy text, and notification fallback.

GitOrigin-RevId: a0abb75bf1378524461a519fe9a0656e15bca4bf
2026-11-19 02:26:51 +00:00
Felipe Coury aadb51b2b6 Test saved chat hover highlighting in the sidebar chooser (#62400)
## Testing

Add a regression test that checks that hovering over a saved chat's
preview highlights both its title and preview without moving the
selection. Moving to the title keeps the highlight without requesting
another redraw, and moving to the Side chats heading clears it.

GitOrigin-RevId: d54501f28c00112281389f67bb3671dfa6b18513
2026-11-19 02:08:25 +00:00
Felipe Coury b5e1f3ae9d Highlight clickable links and controls on hover in the fullscreen TUI (#62390)
## Why

The pointer shape can signal that transcript links are clickable, but the
text itself does not change on hover. A foreground change makes the
clickable region visible.

## What changed

Change the foreground color of hovered transcript and status-line
links, transcript disclosure controls, and the warning notice. Use the
rendered link spans so the highlight follows the visible text, including
wide characters. Recompute the highlight on redraw so it follows the
content under a stationary pointer as the transcript scrolls or updates.

## Testing

Add a mouse-motion regression test that checks highlight and restore
behavior for transcript links, including wide characters and Markdown
table links, as well as status-line links, disclosure controls, and the
warning notice. The test also checks that a URL in the editable draft
keeps its original styling.

GitOrigin-RevId: 4c7da58705e2ad4c710ec6c55727d5a064f3cf1f
2026-11-19 01:16:44 +00:00
Joe Savona 2d58165651 Expose custom status lines in /experimental (#62387)
## Why

Custom status lines previously depended on a feature flag in the TUI
client's configuration. When the TUI connects to a separate app server,
that flag can differ from the setting in the server's active profile.

## What changed

Add **Custom status line** to `/experimental` as an opt-in feature. Save
the toggle on the connected app server, restart the TUI, then use
`/statusline` to choose a provider.

Read `tui_extensions_statusline` from the app server's effective
configuration at startup. Keep that value when switching conversations
or reloading local status line preferences, so toggling the feature
takes effect on the next TUI launch.

## Testing

Add a menu snapshot and regression coverage for saving the toggle in a
server profile while preserving the active provider across a thread
change.

GitOrigin-RevId: 4025c9771e560d6d7b1e6bd97236bffc44201556
2026-11-19 00:59:23 +00:00
Felipe Coury f7dece07d0 Centralize transcript overlay input routing (#62384)
## What changed

Use `Overlay::input_transcript` to determine which overlay handles
transcript interaction keys and which keymap context applies during
search and selection. Apply runtime keymap bindings through `Overlay`
so the app can refresh them without matching the transcript variant
directly.

GitOrigin-RevId: 3592ddb62a6bddb760e2923604faff41a28cd150
2026-11-19 00:06:45 +00:00