Skip to content

Warn when trusting Git subdirectories#18602

Merged
etraut-openai merged 3 commits intomainfrom
etraut/tui-git-subdir-trust-warning
Apr 20, 2026
Merged

Warn when trusting Git subdirectories#18602
etraut-openai merged 3 commits intomainfrom
etraut/tui-git-subdir-trust-warning

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented Apr 20, 2026

Addresses #18505

Summary

When Codex is launched from a subdirectory of a Git repository, the onboarding trust prompt says it is trusting the current directory even though the persisted trust target is the repository root. That can make the scope of the trust decision unclear.

This updates the TUI trust prompt to show a yellow note only when the current directory differs from the resolved trust target, explaining that trust applies to the repository root and displaying that root. It also removes the stale onboarding TODO now that the warning is implemented.

@fcoury-oai
Copy link
Copy Markdown
Contributor

I found a potential issue. Even if I am not on a .git subdirectory (in this case I am in packages/app) it still says I am in a Git subdirectory. Since this happens for any subdirectory, maybe we need to change the message?

image

@etraut-openai etraut-openai force-pushed the etraut/tui-git-subdir-trust-warning branch from b09edb8 to 5a78160 Compare April 20, 2026 22:40
@etraut-openai
Copy link
Copy Markdown
Collaborator Author

[codex] Addressed in the latest push: the note now says "You’re in a subdirectory of a Git project" instead of "Git subdirectory", so it applies to regular nested directories like packages/app without implying the directory itself contains .git.

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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 similar comment
@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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".

@etraut-openai etraut-openai merged commit 216e7a0 into main Apr 20, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/tui-git-subdir-trust-warning branch April 20, 2026 23:43
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 20, 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