-
Notifications
You must be signed in to change notification settings - Fork 7.6k
fix: update file search directory when session CWD changes #9279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update file search directory when session CWD changes #9279
Conversation
a1419c7 to
f1c1328
Compare
|
@codex review |
There was a problem hiding this comment.
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: f1c1328972
ℹ️ 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".
|
@yuvrajangadsingh, thanks for the contribution. Please take a look at the code review comment from Codex. |
f1c1328 to
d39591e
Compare
|
Thanks for the review! I've addressed the feedback:
This ensures old searches from the previous workspace can't pollute the new session. |
|
@codex review |
There was a problem hiding this comment.
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: d39591ee7f
ℹ️ 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".
d39591e to
d9583a7
Compare
|
Addressed the second review comment as well: Fix: Moved Before: @codex review |
There was a problem hiding this comment.
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: d9583a7a34
ℹ️ 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".
d9583a7 to
7d9c72c
Compare
|
Addressed the third round of feedback: Fix: Skip search if This handles the case where @codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
fa5e774 to
9718a48
Compare
d1300b0 to
5a5df25
Compare
|
Mirrored the changes to tui2 as requested. Both tui and tui2 now have:
All tests pass for both packages. |
|
@etraut-openai Changes mirrored to tui2 as requested. Ready for another look! @codex review |
There was a problem hiding this comment.
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: b5c56fb2f4
ℹ️ 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".
|
Addressed the P3 feedback: added a generation counter to invalidate stale debounce threads after session changes. How it works:
This prevents duplicate searches when user types a new query before the old debounce fires. @etraut-openai @codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
c5b2960 to
5c29b91
Compare
|
Rebased on latest main to resolve conflicts. @codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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 All changes addressed - generation counter added to prevent duplicate debounce searches, mirrored to tui2. Conflicts resolved, CI passing, Codex review clean. Ready for final review. |
5c29b91 to
387d9eb
Compare
|
Rebased again on latest main to resolve new conflicts. @codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
b582b70 to
511983c
Compare
|
Rebased on latest main - tui2 was removed upstream, changes now only apply to tui. @codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
19327e7 to
c08722b
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Add `update_search_dir` method to FileSearchManager that updates the search directory and drops the current session so it will be recreated with the new directory on the next query. Replace the FileSearchManager recreation in the Resume case with a call to this new method for more efficient CWD updates.
352790e to
d8f6284
Compare
etraut-openai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking pretty good. One small change request.
|
@etraut-openai Fixed the docstring - now only mentions resume. Ready for another look. |
Summary
Fixes #9041
Problem
The FileSearchManager was created once with the initial search_dir and never updated. When a user:
This caused no matches to be returned even when files existed in the current workspace.
Solution
Update FileSearchManager.search_dir whenever the session working directory changes:
Test plan