feat: auto-approve non-duplicate extension requests in headless mode#385
Merged
SuperCoolPencil merged 7 commits intomainfrom Apr 20, 2026
Merged
feat: auto-approve non-duplicate extension requests in headless mode#385SuperCoolPencil merged 7 commits intomainfrom
SuperCoolPencil merged 7 commits intomainfrom
Conversation
3e4df89 to
4787f9c
Compare
2656584 to
c1a1ba3
Compare
…plicate downloads
…te setting when extension prompt is enabled
…figuration to support headless mode requirements
… improve test state isolation
c1a1ba3 to
79dccf0
Compare
Member
Author
|
this is already resolved. |
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.
Close #384
Greptile Summary
This PR adds headless-mode (no TUI) auto-approval logic for extension download requests: non-duplicate URLs are approved automatically, while duplicates are rejected with 409 Conflict. To support this,
CheckForDuplicatewas refactored to always perform its DB scan and delegate policy decisions (warn, block, auto-approve) entirely to the caller.update_input.go(line 99) andupdate_modals.go(line 86) callcheckForDuplicatewithout aWarnOnDuplicateguard, so withCheckForDuplicatenow always scanning, these TUI paths will surface the duplicate warning dialog even when the user hasWarnOnDuplicate=false.Confidence Score: 4/5
Safe to merge once the TUI regression from the CheckForDuplicate refactor is resolved
The headless-mode logic in root_downloads.go and all three new tests are correct. However, the prior-review P1 finding — that removing the WarnOnDuplicate early return from CheckForDuplicate breaks the unguarded TUI call sites in update_input.go and update_modals.go — remains unaddressed in this revision, keeping the score at 4.
internal/processing/duplicate.go and internal/tui/helpers.go (and its callers update_input.go:99, update_modals.go:86)
Important Files Changed
Comments Outside Diff (1)
cmd/root_downloads.go, line 244-248 (link)After this change, the 409 path is only reachable when
isDuplicate=true— non-duplicates are now auto-approved above. The "or approval required" clause in the message no longer corresponds to any real code path and will confuse callers trying to diagnose a rejection.Prompt To Fix With AI
Reviews (6): Last reviewed commit: "refactor: standardize global state clean..." | Re-trigger Greptile