feat(panel): Luke's File-tab notes on the annotation card, under the last line
Merged
DA
13d ago+388+388+012345678901234567890123456789-299-299-012345678901234567890123456789
Summary
This is PR 2 of 3 for the approved "Code annotations: one card" design (v3). It stacks on #4203.
- Luke's File-tab notes now use the shared
AnnotationCard. Luke is recognisable by his wing mark (transcript-luke-mark, at 20px) and his name in--voice-luke, not by a different box. The card has no footer. It shows no lines in the header and no preview when folded. - Placement: the card sits below the range's last line (
notesAfter), not before its first. It starts at the code column, past the 48px line-number gutter, or at a 12px inset with line numbers off. In a place under 440px it sits at the pane's 8px inset. With unwrapped lines it still stays in view, sticky-left within the pane. - ⋯ menu, replacing "Show in Code":
- View in conversation opens the turn of Luke's Work that showed those lines.
- Copy link copies that turn's Luke link (
LINK_PLACE.TURN,/plan/<id>/work/<shownAt>), an existing link place. I found no link place for the note itself, so nothing new was added. - "Show in Code" and its whole chain are removed:
FileNotes.onShow,FileView.onShowNote, side-panelshowNote/codeReveal, andCodePane'sreveal/onRevealed.
- Hover: pointing at a note, or moving into it with the keyboard, lights its lines with the lines' pointed style (
data-pointed, throughCodeLineRows' newlitrange). The range the user arrived at stays lit as before. - Kept as before: the folded state is still remembered per tab, and ⌘F still finds a folded note's words.
Evidence
Screenshots come from a harness that runs the real FileTab, with fixture lines and a note on lines 6–10, under the built styles.css.
tsc --noEmitforpackages/panelandapps/desktop: clean../scripts/oxlint.sh: 0 warnings, 0 errors.biome check: clean on the changed files.pnpm knip: clean../scripts/repository-checks.sh: passed.- vitest: the note, link, File tab, side panel and code card suites pass.
file-note.test.ts is rewritten. It covers:
- Placement: the note stands after line 5, the last line of its range, and before line 6. On a file since shortened inside the range, it stands after the file's last line; one wholly past the end stands nowhere.
- Folded: a folded note shows no words, and a find still reaches them once.
- Head press: pressing the head tells the tab.
- ⋯ menu: it offers exactly View in conversation and Copy link. View opens
TURN {planId, at: shownAt}. Copy link copieshttps://tryluke.dev/acme/plan/<id>/work/<shownAt>. - Hover and focus: the pointer or keyboard focus reports the note's lines, and leaving lets them go.
- Lit lines: lines a note lights are drawn
data-pointedbeside the pointed ones.
Screenshots
| Before | After | |
|---|---|---|
| File tab, 900px, dark | ![]() | ![]() |
| File tab, 900px, light | ![]() | ![]() |
| File tab, 360px, dark | ![]() | ![]() |
| File tab, 360px, light | ![]() | ![]() |
| Hover (lit lines) | Folded | ⋯ | 360px, unwrapped (sticky) |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() |
Invariants
- Every behavior change has, in this PR, the test that fails without it; no change-detector test added.
- No new
astype assertion, raw async primitive, or Effect run outside the edges. - Test count:
file-note.test.tsgoes from 2 tests to 7. - Doc comments naming the changed parts are edited (
file-note.tsx,file-tab.tsx,code-pane.tsx,tasks.css). -
PRIVACY.mdunchanged.
Notes
- Minimize inline comments for Luke's notes in a File tab is not in this PR. The File tab's View settings offer only Wrap and Line numbers, so it would need a new File-view setting and a folded form for notes. I've sent that to the orchestrator to decide.
Made with Luke















