Repository navigation
fix(watch): reload direct files outside repositories - #1054
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile SummaryThis PR restores reload support for direct-file comparisons when no repository root safely contains the inputs.
Confidence Score: 5/5The PR appears safe to merge; it restores the intended reload behavior while retaining exact-file and repository-transition boundaries. The changed bounds canonicalize both initial resources and reload candidates, internal manual and watch refreshes omit unnecessary source paths, and the new tests cover successful reloads plus the important rejection cases. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Direct-file session starts] --> B{One repository root safely contains both files?}
B -->|Yes| C[Permit reloads within repository root]
B -->|No| D[Record the two canonical files]
D --> E{Reload requests the same exact files?}
E -->|Yes| F[Permit manual or watch reload]
E -->|No| G[Reject filesystem access]
D --> H{Repository-backed reload requested?}
H -->|Yes| G
Reviews (1): Last reviewed commit: "fix(watch): reload direct files outside ..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Direct-file reviews launched outside a Git repository could not reload. Automatic
--watchrefreshes and the manualrshortcut both passed through session reload bounds with no permitted roots or files, so updates were silently left stale until Hunk was reopened.Approach
The VM's root user was not the determining factor; the missing repository root was.
Validation
bun run typecheckbun run lintbun run deps:checkbun run test:integration— 163 passed, 1 skippedbun run test— 2,049 passed, 2 skipped; one unrelated environment-sensitive failure because this checkout is nested in a Jujutsu workspace and the existing test expects Git detectionThis PR description was generated by Pi using GPT-5.6-sol