feat(review): token-level code selection for annotations#500
Merged
backnotprop merged 2 commits intomainfrom Apr 6, 2026
Merged
feat(review): token-level code selection for annotations#500backnotprop merged 2 commits intomainfrom
backnotprop merged 2 commits intomainfrom
Conversation
Add the ability to click individual syntax tokens in the diff viewer to create annotations with precise code context. Uses Pierre v1.1.12's onTokenClick/onTokenEnter/onTokenLeave callbacks. - Click a token → toolbar opens with token text in header - Click same token again → deselects - Gutter line selection still works independently - Token metadata (charStart, charEnd, tokenText) stored on CodeAnnotation - Sidebar shows token badge, export includes token context For provenance purposes, this commit was AI assisted.
…nment - Persist tokenSelection in drafts so token context survives file switches - Include char offsets in exported feedback for duplicate token disambiguation - Escape backticks in token text to prevent broken markdown fences - Align sidebar token truncation to 30 chars (matching toolbar header) For provenance purposes, this commit was AI assisted.
b4352b5 to
14432a1
Compare
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
onTokenClick/onTokenEnter/onTokenLeavecallbacksLine 47: `processOrder`)charStart,charEnd,tokenText) stored onCodeAnnotationand surfaced in sidebar badges + feedback exportStacked on
feat/hook-up-review-ai— will auto-retarget tomainwhen parent merges.Test plan
bun run dev:review— hover tokens, confirm underline appearsbun run build:hook— clean build