Commit Graph
1252 Commits
Author SHA1 Message Date
Charles Cunningham 6ead619cae tui: clarify plan popup latch semantics 2026-03-02 16:37:37 -08:00
Charles Cunningham 8023f9c8b7 tui: remove dead local history flag 2026-03-02 16:36:25 -08:00
Charles Cunningham c9d15add61 tui: preserve pending steer mention bindings 2026-03-02 16:34:40 -08:00
Charles Cunningham 238d2fa00f tui: move interrupt restore comment 2026-03-02 16:29:56 -08:00
Charles Cunningham 4a03589330 core: emit leftover user-message lifecycle 2026-03-02 16:15:27 -08:00
Charles Cunningham 625ed448f3 tui: remove stale steer comment 2026-03-02 16:14:52 -08:00
Charles Cunningham 2117d1c365 tui: avoid duplicate replayed assistant messages 2026-03-02 16:14:52 -08:00
Charles Cunningham 4a377df0ec tui: reset plan popup state after steer 2026-03-02 16:14:52 -08:00
Charles Cunningham 5f141c3485 tui: restore pending steers on interrupt 2026-03-02 16:14:52 -08:00
Charles Cunningham 0409dfeea4 tui: share text element rebasing helper 2026-03-02 16:14:52 -08:00
Charles Cunningham d7e52bc3b2 tui: clear pending steers on interrupt 2026-03-02 16:14:52 -08:00
Charles Cunningham 90b671fbea tui: normalize pending steer keys directly 2026-03-02 16:14:52 -08:00
Charles Cunningham 76c2da4f96 tui: rename queued messages in pending preview 2026-03-02 16:14:52 -08:00
Charles Cunningham a8a4b7cc17 tui: render committed pending steers 2026-03-02 16:14:52 -08:00
Charles Cunningham d849e0d7a8 tui: clarify pending steer snapshot text 2026-03-02 16:14:52 -08:00
Charles Cunningham 8d59837ccd tui: reconcile pending steers on item completion 2026-03-02 16:14:51 -08:00
Charles Cunningham 85321ce850 rename nudge to steer 2026-03-02 16:14:31 -08:00
Charles Cunningham 5a548d14b1 tui: refactor assistant message finalization 2026-03-02 16:14:31 -08:00
Charles Cunningham 5b0322599e tui: ignore mirrored live agent messages 2026-03-02 16:14:31 -08:00
Charles Cunningham 0f5a58be65 tui: avoid duplicate user prompt rendering 2026-03-02 16:14:31 -08:00
Charles Cunningham 659768831d tui: simplify pending nudge submit gating 2026-03-02 16:14:31 -08:00
Charles Cunningham a4025aa62e tui: inline pending nudge submit helper 2026-03-02 16:14:31 -08:00
Charles Cunningham f3bfc7a07e tui: match pending nudges in queue order 2026-03-02 16:14:31 -08:00
Charles Cunningham 507ea2c601 tui: canonicalize pending nudge matching 2026-03-02 16:14:31 -08:00
Charles Cunningham 6bea79630c tui: drop stale legacy message snapshot test 2026-03-02 16:14:31 -08:00
Charles Cunningham 4fe09d4434 tui: ignore live legacy agent messages while streaming 2026-03-02 16:14:30 -08:00
Charles Cunningham d566192a01 tui: align pending nudges with core acceptance 2026-03-02 16:14:30 -08:00
Charles Cunningham 781ad5968f tui: simplify interrupt op test helper 2026-03-02 16:13:52 -08:00
Charles Cunningham cca2112626 tui: flush pending nudges after manual interrupt 2026-03-02 16:13:52 -08:00
Charles Cunningham ed3606e65b Revert "tui: avoid loop-shaped op drain helpers in tests"
This reverts commit ac277351ad41bad7161ba0b9671890e40c083b59.
2026-03-02 16:13:51 -08:00
Charles Cunningham 4c79524820 tui: avoid loop-shaped op drain helpers in tests 2026-03-02 16:13:51 -08:00
Charles Cunningham 253eeb16b5 tui: format rebased bottom pane imports 2026-03-02 16:13:51 -08:00
Charles Cunningham 985283b7f4 tui: rename preview snapshots 2026-03-02 16:13:51 -08:00
Charles Cunningham 1d5cad006f tui: rename pending input preview 2026-03-02 16:13:51 -08:00
Charles Cunningham dbb69dd163 tui: submit pending nudges after message boundaries 2026-03-02 16:13:51 -08:00
Ahmed IbrahimandCodex b20b6aa46f Update realtime websocket API (#13265)
- migrate the realtime websocket transport to the new session and
handoff flow
- make the realtime model configurable in config.toml and use API-key
auth for the websocket

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-02 16:05:40 -08:00
jif-oai f8838fd6f3 feat: enable ma through /agent (#13246)
<img width="639" height="139" alt="Screenshot 2026-03-02 at 16 06 41"
src="https://github.com/user-attachments/assets/c006fcec-c1e7-41ce-bb84-c121d5ffb501"
/>

Then
<img width="372" height="37" alt="Screenshot 2026-03-02 at 16 06 49"
src="https://github.com/user-attachments/assets/aa4ad703-e7e7-4620-9032-f5cd4f48ff79"
/>
2026-03-02 18:37:29 +00:00
Charley CunninghamandCodex 7979ce453a tui: restore draft footer hints (#13202)
## Summary
- restore `Tab to queue` when a draft is present and the agent is
running
- keep draft-idle footers passive by showing the normal footer or status
line instead of `? for shortcuts`
- align footer snapshot coverage with the updated draft footer behavior

## Codex author
`codex resume 019c7f1c-43aa-73e0-97c7-40f457396bb0`

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-02 10:26:13 -08:00
jif-oai 9a42a56d8f chore: /multiagent alias for /agent (#13249)
Add a `/mutli-agents` alias for `/agent` and update the wording
2026-03-02 16:51:54 +00:00
jif-oai 2a5bcc053f fix: esc in /agent (#13131)
Fix https://github.com/openai/codex/issues/13093
2026-03-02 15:49:06 +00:00
jif-oai b08bdd91e3 fix: /status when sub-agent (#13130)
Fix https://github.com/openai/codex/issues/13066
2026-03-02 11:57:15 +00:00
gabec-openaiandCodex 9685e7d6d1 Improve subagent contrast in TUI (#13197)
## Summary
- raise contrast for subagent transcript labels and fallback states
- remove low-contrast dim styling from role tags and error details
- make the closed-agent picker dot readable in dark theme

## Validation
- just fmt
- just fix -p codex-tui
- cargo test -p codex-tui

Co-authored-by: Codex <noreply@openai.com>
2026-03-02 12:16:49 +01:00
0aeb55bf08 Record realtime close marker on replacement (#13058)
## Summary
- record a realtime close developer message when a new realtime session
replaces an active one
- assert the replacement marker through the mocked responses request
path

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Charles Cunningham <ccunningham@openai.com>
2026-03-01 13:54:12 -08:00
xl-openai 752402c4fe feat: load from plugins (#12864)
Support loading plugins.

Plugins can now be enabled via [plugins.<name>] in config.toml. They are
loaded as first-class entities through PluginsManager, and their default
skills/ and .mcp.json contributions are integrated into the existing
skills and MCP flows.
2026-03-01 10:50:56 -08:00
jif-oai 2b38b4e03b feat: approval for sub-agent in the TUI (#12995)
<img width="766" height="290" alt="Screenshot 2026-02-27 at 10 50 48"
src="https://github.com/user-attachments/assets/3bc96cd9-ed2c-4d67-a317-8f7b60abbbb1"
/>
2026-02-28 14:07:07 +01:00
Eric Traut e6032eb0b7 Fix CLI feedback link (#13086)
Addresses #12967

About a month ago, I updated the Github bug report templates to
accommodate the (at the time) new Codex app. The `/feedback` code path
in the CLI was referencing one of the old templates, and I didn't
realize it at the time. This PR updates the link so users don't get an
empty bug template when using `/feedback`.
2026-02-27 19:02:40 -07:00
Ahmed Ibrahim ec6f6aacbf Add model availability NUX tooltips (#13021)
- override startup tooltips with model availability NUX and persist
per-model show counts in config
- stop showing each model after four exposures and fall back to normal
tooltips
2026-02-27 17:14:06 -08:00
Eric Traut 61c42396ab Keep large-paste placeholders intact during file completion (#13070)
Addresses https://github.com/openai/codex/issues/13040

Fixes a regression in 0.106.0 introduced in
https://github.com/openai/codex/pull/9393

Summary
- replace only the active completion range so unrelated text elements
(e.g., large-paste placeholders) stay atomic and can still expand
- add a regression test verifying large paste placeholders persist
through completions and submit
- could not fetch issue details via GitHub API because network access is
disabled in this sandboxed environment
2026-02-27 17:19:11 -07:00
Felipe Coury c3c75878e8 fix(tui): theme-aware diff backgrounds with fallback behavior (#13037)
## Problem

The TUI diff renderer uses hardcoded background palettes for
insert/delete lines that don't respect the user's chosen syntax theme.
When a theme defines `markup.inserted` / `markup.deleted` scope
backgrounds (the convention used by GitHub, Solarized, Monokai, and most
VS Code themes), those colors are ignored — the diff always renders with
the same green/red tints regardless of theme selection.

Separately, ANSI-16 terminals (and Windows Terminal sessions misreported
as ANSI-16) rendered diff backgrounds as full-saturation blocks that
obliterated syntax token colors, making highlighted diffs unreadable.

## Mental model

Diff backgrounds are resolved in three layers:

1. **Color level detection** — `diff_color_level_for_terminal()` maps
the raw `supports-color` probe + Windows Terminal heuristics to a
`DiffColorLevel` (TrueColor / Ansi256 / Ansi16). Windows Terminal gets
promoted from Ansi16 to TrueColor when `WT_SESSION` is present.

2. **Background resolution** — `resolve_diff_backgrounds()` queries the
active syntax theme for `markup.inserted`/`markup.deleted` (falling back
to `diff.inserted`/`diff.deleted`), then overlays those on top of the
hardcoded palette. For ANSI-256, theme RGB values are quantized to the
nearest xterm-256 index. For ANSI-16, backgrounds are `None`
(foreground-only).

3. **Style composition** — The resolved `ResolvedDiffBackgrounds` is
threaded through every call to `style_add`, `style_del`, `style_sign_*`,
and `style_line_bg_for`, which decide how to compose
foreground+background for each line kind and theme variant.

A new `RichDiffColorLevel` type (a subset of `DiffColorLevel` without
Ansi16) encodes the invariant "we have enough depth for tinted
backgrounds" at the type level, so background-producing functions have
exhaustive matches without unreachable arms.

## Non-goals

- No change to gutter (line number column) styling — gutter backgrounds
still use the hardcoded palette.
- No per-token scope background resolution — this is line-level
background only; syntax token colors come from the existing
`highlight_code_to_styled_spans` path.
- No dark/light theme auto-switching from scope backgrounds —
`DiffTheme` is still determined by querying the terminal's background
color.

## Tradeoffs

- **Theme trust vs. visual safety:** When a theme defines scope
backgrounds, we trust them unconditionally for rich color levels. A
badly authored theme could produce illegible combinations. The fallback
for `None` backgrounds (foreground-only) is intentionally conservative.
- **Quantization quality:** ANSI-256 quantization uses perceptual
distance across indices 16–255, skipping system colors. The result is
approximate — a subtle theme tint may land on a noticeably different
xterm index.
- **Single-query caching:** `resolve_diff_backgrounds` is called once
per `render_change` invocation (i.e., once per file in a diff). If the
theme changes mid-render (live preview), the next file picks up the new
backgrounds.

## Architecture

Files changed:

| File | Role |
|---|---|
| `tui/src/render/highlight.rs` | New: `DiffScopeBackgroundRgbs`,
`diff_scope_background_rgbs()`, scope extraction helpers |
| `tui/src/diff_render.rs` | New: `RichDiffColorLevel`,
`ResolvedDiffBackgrounds`, `resolve_diff_backgrounds*`,
`quantize_rgb_to_ansi256`, Windows Terminal promotion; modified: all
style helpers to accept/thread `ResolvedDiffBackgrounds` |

The scope-extraction code lives in `highlight.rs` because it uses
`syntect::highlighting::Highlighter` and the theme singleton. The
resolution and quantization logic lives in `diff_render.rs` because it
depends on diff-specific types (`DiffTheme`, `DiffColorLevel`, ratatui
`Color`).

## Observability

No runtime logging was added. The most useful debugging aid is the
`diff_color_level_for_terminal` function, which is pure and fully
unit-tested — to diagnose a color-depth mismatch, log its four inputs
(`StdoutColorLevel`, `TerminalName`, `WT_SESSION` presence,
`FORCE_COLOR` presence).

Scope resolution can be tested by loading a custom `.tmTheme` with known
`markup.inserted` / `markup.deleted` backgrounds and checking the diff
output in a truecolor terminal.

## Tests

- **Windows Terminal promotion:** 7 unit tests cover every branch of
`diff_color_level_for_terminal` (ANSI-16 promotion, `WT_SESSION`
unconditional promotion, `FORCE_COLOR` suppression, conservative
`Unknown` level).
- **ANSI-16 foreground-only:** Tests verify that `style_add`,
`style_del`, `style_sign_*`, `style_line_bg_for`, and `style_gutter_for`
all return `None` backgrounds on ANSI-16.
- **Scope resolution:** Tests verify `markup.*` preference over
`diff.*`, `None` when no scope matches, bundled theme resolution, and
custom `.tmTheme` round-trip.
- **Quantization:** Test verifies ANSI-256 quantization of a known RGB
triple.
- **Insta snapshots:** 2 new snapshot tests
(`ansi16_insert_delete_no_background`,
`theme_scope_background_resolution`) lock visual output.
2026-02-27 16:44:56 -07:00
Jeremy Rose bc0a5843df Align TUI voice transcription audio with 4o ASR (#13030)
## Summary
- switch TUI push-to-talk transcription requests to
`gpt-4o-mini-transcribe`
- prefer 24 kHz mono `i16` microphone configs and normalize voice input
to 24 kHz mono before upload/send
- add unit coverage for the new downmix/resample path

## Testing
- `just fmt`
- `cargo test -p codex-tui`
2026-02-27 18:22:48 +00:00