Skip to content

fix(tui): handle hidden app git directives#21946

Open
fcoury-oai wants to merge 1 commit intomainfrom
fcoury/handle-app-events
Open

fix(tui): handle hidden app git directives#21946
fcoury-oai wants to merge 1 commit intomainfrom
fcoury/handle-app-events

Conversation

@fcoury-oai
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai commented May 9, 2026

Why

The desktop App treats ::git-* directives as hidden control messages: it keeps them out of the visible transcript while still using them to react to successful git actions. When the TUI replays App-authored sessions today, it treats those directives as ordinary assistant markdown instead, which both leaks internal control text to the user and leaves the two clients with different handling for the same assistant output.

image

What changed

  • Added TUI support for the App's existing git action directives.
  • Hide those directives from live assistant output, consolidated stream history, copied / notification fallback text, replayed transcripts, and resume previews.
  • Replayed directives are render-only: they are hidden from transcript surfaces but never trigger workspace probes or metadata updates.
  • For live git-create-branch directives, re-read the actual workspace branch through the existing workspace-command path before syncing stored thread metadata, so local and remote sessions both use workspace state as the source of truth.

How to Test

  1. Start a Codex session in the desktop App and complete a turn that emits a git directive such as ::git-push{...}.
  2. Resume that session in the TUI.
  3. Confirm the assistant response is shown without the raw ::git-* line.
  4. Also inspect the resume picker preview for the same session and confirm the internal directive is omitted there too.
  5. For a live git-create-branch directive, verify the stored thread branch follows the branch actually checked out in the workspace, without adding any visible transcript text.

Targeted tests:

  • cargo test -p codex-tui git_action --no-fail-fast

@fcoury-oai fcoury-oai changed the title tui: hide app git directives in transcripts tui: handle hidden app git directives May 9, 2026
@fcoury-oai fcoury-oai force-pushed the fcoury/handle-app-events branch from c869ec7 to ea5565d Compare May 9, 2026 17:39
@fcoury-oai fcoury-oai changed the title tui: handle hidden app git directives fix(tui): handle hidden app git directives May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant