Repository navigation
feat(panel): a comment under a changed line continues the line's band in Files changed - #4225
Merged
Merged
Conversation
… in Files changed A note's row under an added or removed line, and its buffer in the numbers' column, are marked with that line's band as Pierre draws the file (diff-view/annotation-bands.ts), read off the line's own type; the diff's look paints the row's code and numbers as the line's, mixed as Pierre mixes them, with the change bar beside them where bars mark a change, solid for an addition and striped for a deletion. With backgrounds off nothing is marked, and lit lines stay blue above while the band runs on behind the card. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
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
This is PR 3 of 3 for the approved "Code annotations: one card" design (v3). It follows #4203 and is independent of #4214. In Files changed, an annotation row under a changed line keeps that line's band, so a comment in the middle of an added block reads as standing in it rather than cutting it in two.
:has(slot[name=…])rules. Pierre 1.5.2 does not expose the line type on[data-line-annotation](its value ishunk,lineIndex), and its numbers-column buffer drops the line type too.[data-gutter-buffer="annotation"], with one attribute,data-band="addition|deletion"(diff-view/annotation-bands.ts). It does this in the list's existingonPostRenderdress, every time Pierre draws a file.data-line-type, read from the row right before the annotation, since Pierre always pushes a line and then its annotation row. That keeps the panel contract unchanged.[data-content]and its sibling[data-gutter].LOOK_CSS:pre[data-background]), so the row keeps the plain ground and a mark from before is taken off.pre { isolation: auto }fix: I saw no highlight painting over a card.Evidence
Screenshots come from a harness that runs the real
AgentPullRequestTab, with the real diff bundle (Pierre plus the highlight worker) and the builtstyles.css. The fixture is an added block with a comment on line 13, inside it.tsc --noEmit(panel): clean../scripts/oxlint.sh: 0 warnings, 0 errors.biome check: clean on the changed files.pnpm knip: clean../scripts/repository-checks.sh: passed. Every Pierre variable the rules read has a Luke-token fallback.vitest src/diff-view: 30/30.cd apps/desktop && node scripts/build.mjs: bundle budget passes.New test,
annotation-bands.test.ts(2 tests), on Pierre's unified markup:deletionandadditionon both the row and its buffer, and a note under a context line gets nothingScreenshots
Invariants
asassertion, raw async primitive, or Effect run outside the edges.diff-view/index.ts).PRIVACY.mdunchanged.Made with Luke