Repository navigation
Margin marks - 8000 #89
Merged
Merged
Margin marks#89
Conversation
marginMarks(tree, highlights), beside the Callout's pure functions, gives one entry per top-level block where an open, attached Finding begins. The Highlight plugin draws each as a zero-height widget between top-level blocks, with a button hung into the column's right padding: the obelus and its count in blue pencil, out of the Tab order and labelled with its count. A click reports its Finding ids through the Highlight-click path, so the Callout opens and the Current Finding and the Rail stay put (ADR 0011). Adds Margin mark to CONTEXT.md. Part of #57. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FjB3Gu8vhg5enkAneTdqga
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 26, 2026
Closed
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.
Part of #57. Closes #65.
What changed
marginMarks(tree, highlights)insrc/editor/callout.ts, next tocalloutFindings. It is a pure function from the Document and the resolved Highlights to{ blockIndex, findingIds }[], with one entry per top-level block where an open, attached Finding begins. It reads only ids and intervals, never a Finding's text. It renders the Document once and uses a binary search, so hundreds of Highlights cost one walk.src/editor/highlight.ts) draws each entry as a widget between top-level blocks, never inside a textblock. The widget is a zero-height holder with abutton(tabIndex=-1,aria-label"N Finding(s)") positioned into the column's right padding. It shows÷Ninvar(--color-mark). The plugin maps marks through edits along with the Highlights. The restyle path (mid-pause) drops Finding ids that are no longer drawn, so a mark whose last Finding left the queue goes away.{findingIds, blockStart}through an extension option.DocumentEditorturns that into the sameonHighlightClickreport a Highlight click makes. The Callout is anchored at the start of the marked block's prose. The shell opens the Callout withcalloutFindings, and the Current Finding does not move (ADR 0011)..obelus-margin-markinsrc/index.css::has()selector.contain, so a keystroke doesn't lay out or repaint them..obelus-highlight*edits.CONTEXT.md: adds Margin mark, with the note on why it's kept despite mark under the Anchor entry's Avoid. Callout now names the Margin mark as a second way to open it.No App.tsx change, no Dexie migration, findings schema unchanged, no DOM test layer, no prompt change.
Acceptance criteria
marginMarksis tested — verified. Six tests insrc/editor/callout.test.tscover:reResolveFindings)÷6mark opened the Callout labelled "6 Findings" with 6 entries. The Current Finding row, its Highlight, the Rail's scroll position, the caret position and the focused element were all unchanged.÷1mark and choosing Addressed in the Callout removed that mark once the verdict was saved (under 1.5s); the other marks were unchanged.tabIndex=-1). The accessibility snapshot showsbutton "1 Finding",button "4 Findings",button "6 Findings". I did not test with an actual screen reader.contenteditable=false,ignoreSelectionandstopEvent, which is the placement the spec chose to avoid Safari's caret problem.origin/v 8000 1.3. Median keystroke is about 38.1ms here vs 36.9ms before (about 3%), and the means overlap within run-to-run noise. Before I addedcontain, the marks cost about 7%.Visual checklist (performed in headless Chromium)
mark(rgb(3,105,161) light, rgb(56,189,248) dark).🤖 Generated with Claude Code
Generated by Claude Code