Repository navigation
feat(panel): Code tab and inbox code cards on Pierre, Luke's note under the lines - #4293
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
luke-agent Bot
added a commit
that referenced
this pull request
Oct 20, 2026
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
luke-agent Bot
added a commit
that referenced
this pull request
Oct 20, 2026
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…er the lines Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…ard does, so notesAfter and useLinesLook go Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…ry check takes Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…ands on the code's own ground Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
luke-agent
Bot
force-pushed
the
luke/pierre-code-cards
branch
from
October 21, 2026 00:13
7b7100d to
7daf953
Compare
…last of its callers Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
This was referenced Oct 21, 2026
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.
PR 4 of the approved "Pierre for File tabs and code snippets" plan. Built on #4283 (File tab and page source on Pierre), now merged; this PR targets
main.What it does
@pierre/diffs(code-snippet.tsx,code-snippet-model.ts).@@ -N,M +N,M @@), drawn through the bundle'smount. Review-thread previews already use this path, so line numbers match the file's.excerpt, with no indicators, backgrounds or inline diff. The lines Luke pointed at are lit throughsetSelectedLines.pooledonDiffViewProps. This is additive:mount's default is unchanged, so thread previews are not affected.FileNoteAnnotationon the sharedAnnotationCard:LINK_PLACE.TURN.MinimizedChipfloating at the end of its line. Hovering the chip lights the lines too.inbox-code-card.tsx) uses the same component. So does the File tab's refused-file snippet fallback, which still draws every note that falls in the snippet.usePrefetchDiffBundle), so the first card doesn't wait on the import. Only the module is imported; the worker pool starts on the first card's mount.diff-view.js(822 KB minified, about 243 KB gzipped). Here that was about 150 ms of fetch, parse and eval with no long task, plus about 7 MB of heap, once per window.What retires
highlightCodein the host (task-code.ts).TaskCodeShowing.codenow carries plain lines (ShownCode), still cut down bycodeExcerpt.compose-tasks.tsno longer colours shown code.CodeLinesincode-pane.tsx, the note above the lines (.code-card-noteand its CSS), andcopiedLines' token joining.notesAfter(file-note.tsx) anduseLinesLook(code-lines.tsx): their last caller was the snippet fallback. Their tests now drawFileNoteAnnotation. The two tests that only checkednotesAfter's row placement are deleted; placement is covered by this PR'scode-snippet.test.tsand feat(panel): File tabs and page source on Pierre, Luke's notes as annotations with the minimized chip #4283's whole-file tests.code-lines.tsxand its test, since feat(panel): a text file opened over the window is drawn on Pierre, as every code is #4285 landed first:runColoursmoves intotranscript-markdown.tsx, which still colours fences; the.code-lines*/.code-line*CSS,.file-note's dead margins and the--code-line-number*/--code-pointedtokens go; so do the now-unusedCodeTypeandisPointedexports.highlightFileand theTASKS_FILEcolouring step, still used by the File tab's commit probe and the inbox card's read. The File-tab agent's follow-up removes them.Measured
Throwaway harness, as in the plan: esbuild with production defines, the build's own highlight worker, the built
styles.css, headless Chromium, a 720px pane, 10 cards, median of 3. This PR against the base's card drawing (main). Main's colours are computed by the host before the view arrives, so main shows 0 ms of colouring in the window. The host spent 584 ms on the first card (highlighter load) and 1–213 ms on each card after.panel.js/diff-view.jsThese are Linux headless numbers; the plan measured the import at about 40 ms on a Mac. With the prefetch, the import happens before the first
show_codelands.Screenshots
Headless Chromium on the real built bundle and stylesheet (the harness above). Light and dark, wide (760px) and narrow (380px).
On a card that points at lines, the note is on exactly those lines, which are already lit at rest, so hovering it changes nothing visible there; that stays by design.
Tests
code-snippet.test.tsuses the real bundle in jsdom:Host test updated: shown code arrives with plain lines.
Checks run
Per-package
tsc(panel, host, voice, features, desktop, web); the panel's tests (190 files undersrc/tasks,src/diff-viewandsrc/desktop) plus the host's and features' affected tests; biome,./scripts/oxlint.sh,pnpm knip,./scripts/repository-checks.sh;node scripts/build.mjs.pnpm check:affectedran out of memory on the panel's typecheck, so that and the others were run one by one.No service change.
Made with Luke