Repository navigation
feat(extensions): add hunk_viewed and note_changed events - #939
Merged
Merged
Conversation
Let extensions observe settled hunk attention and saved ReviewStore note mutations, including agent comments, without deriving them from selection ids or TUI-only note events.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryAdds extension API v14 lifecycle events for settled hunk attention and saved-note mutations.
Confidence Score: 5/5The PR appears safe to merge; no concrete blocking or independently actionable non-blocking issue was identified. The new event paths preserve reload baselines, react to all store-backed note mutations, and distinguish file replacement from settled hunk navigation as documented. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Navigation[Selection settles] --> SelectionEvent[selection_changed]
SelectionEvent --> FileCheck{File object changed?}
FileCheck -->|Yes| FileEvent[file_viewed]
SelectionEvent --> HunkCheck{File and hunk changed?}
HunkCheck -->|Yes| HunkEvent[hunk_viewed]
Store[ReviewStore mutation] --> Project[Project saved notes]
Project --> Generation{Same review generation?}
Generation -->|Yes| Diff[Diff previous and current notes]
Diff --> NoteEvent[note_changed]
Generation -->|No| Seed[Seed reload baseline]
Reviews (1): Last reviewed commit: "feat(extensions): add hunk_viewed and no..." | Re-trigger Greptile |
1 task
This branch was successfully deployed
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.
Summary
hunk_viewedso extensions can observe settled hunk attention, including[/]within a file.file_viewedstill fires only when the selected file object changes.note_changed(created/updated/removed) for saved ReviewStore notes, including agent session comments and user deletes. Drafts and reload remaps stay out of this event.hunk_viewed.Test plan
bun test src/extensions/reviewSnapshot.test.ts src/ui/hooks/useExtensionReviewEvents.test.tsx src/extensions/events.test.ts src/extensions/runExtension.test.ts src/extensions/publicApiRobustness.test.tsbun run lintbun run deps:checkexamples/extensions/review-triage, walk hunks with]inside one file, confirm viewed marks advance