Skip to content

Reduce TUI legacy core dependencies - #26711

Merged
etraut-openai merged 2 commits into
mainfrom
etraut/tui-reduce-legacy-core
Jun 9, 2026
Merged

Reduce TUI legacy core dependencies#26711
etraut-openai merged 2 commits into
mainfrom
etraut/tui-reduce-legacy-core

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Why

The TUI still reached through app-server-client::legacy_core for thread-name normalization and project-instruction filename details. In particular, checking the TUI's local filesystem for /init is incorrect for remote app-server sessions, where the server owns the working directory and instruction discovery.

What changed

  • use the instruction source paths supplied by the app server to decide whether /init should avoid overwriting project instructions
  • keep the small thread-name normalization helper local to the TUI
  • remove the now-unused instruction filename constants, utility module, and other unused legacy_core re-exports
  • make status helper tests independent of concrete instruction filenames

Verification

  • just test -p codex-app-server-client
  • just test -p codex-tui slash_init_skips_when_project_instructions_are_loaded
  • just test -p codex-tui ran 2,799 tests; 2,797 passed and two unrelated guardian feature-flag tests failed reproducibly in untouched code

Manual test

Started an app server over WebSocket with a remote workspace containing AGENTS.md, then connected the TUI using --remote. After confirming thread/start returned the file in instructionSources, deleted AGENTS.md and ran /init in the existing session.

The TUI still reported that project instructions already existed and skipped /init. The trace contained no turn/start request, confirming the decision came from app-server session state rather than a new client-local filesystem check.

@etraut-openai
etraut-openai marked this pull request as ready for review June 6, 2026 01:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df080a9d33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/chatwidget/slash_dispatch.rs Outdated
Comment thread codex-rs/tui/src/chatwidget/slash_dispatch.rs Outdated
etraut-openai added a commit that referenced this pull request Jun 6, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02c37810b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/tui/src/chatwidget/slash_dispatch.rs
@etraut-openai etraut-openai changed the title [codex] Reduce TUI legacy core dependencies Reduce TUI legacy core dependencies Jun 6, 2026
@etraut-openai
etraut-openai force-pushed the etraut/tui-reduce-legacy-core branch from 8d2efbb to 08811b5 Compare June 8, 2026 16:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08811b5e35

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -1,4 +1,5 @@
Generate a file named AGENTS.md that serves as a contributor guide for this repository.
Before writing, check whether AGENTS.md already exists in the current working directory. If it does, do not overwrite or modify it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Add integration coverage for /init behavior

Under AGENTS.md Test authoring guidance, agent-logic changes need integration coverage. This line changes /init model behavior by requiring an existing-AGENTS.md check before writing, but the diff only verifies that the TUI queues the prompt, so regressions in the actual agent behavior can still pass. Please add an integration test for existing-AGENTS.md handling.

Useful? React with 👍 / 👎.

@etraut-openai
etraut-openai merged commit 8e69d29 into main Jun 9, 2026
31 checks passed
@etraut-openai
etraut-openai deleted the etraut/tui-reduce-legacy-core branch June 9, 2026 20:26
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants