Text comments in the rendered Preview (Markdown) view - #84
Merged
Conversation
Text selection produced no Comment button in the rendered Markdown view — the directive was wired only to the code/diff view. Wire lvt-fx:text-select onto the .md-view with data-surface="block": a selection anchors to the touched blocks' source line range with the exact phrase quoted (rendered text can't map to source columns, so FromCol/ToCol are 0). - Template: lvt-fx:text-select + data-surface="block" on .md-view. - LineSpan/SelectionLabel: text comments with 0 columns render as a plain line span (L42), not L42:0-0. - Card shows the quoted phrase (Comment.Snippet); handoff stream carries it (StreamComment.Text) so the LLM sees what was selected. - Rendered-HTML preview keeps region-select (its text is in a sandboxed iframe the page can't read). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ey41dRwDpRgLtVHZjhYLKt
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.
Follow-up to #83. Text selection produced no Comment button in the rendered Markdown Preview —
lvt-fx:text-selectwas wired only to the code/diff view. Reported: selecting a phrase in Preview did nothing (v0.15.0). This wires it to the rendered view.What's new
lvt-fx:text-select+data-surface="block"on.md-view: a selection anchors to the touched[data-from]/[data-to]blocks' source line range with the exact phrase quoted. Rendered text can't map to source columns (**bold**→bold), soFromCol/ToCol = 0— line precision, phrase captured.LineSpan/SelectionLabel: text comments with 0 columns render as a plain line span (L42), notL42:0-0.Comment.Snippet,.ic-snippet) and in the handoff stream (StreamComment.Text) so the LLM sees what was selected.Not applicable
<iframe>the page can't read a selection from — keeps its draw-a-region (region-select). Documented in CLAUDE.md.Tests
E2E
TestE2E_TextSelectRenderedMarkdown(the reported scenario: select prose → button → composer → save → card + CSVkind=text,...,0,0). Existing markdown block-commenting + keyboard + code-view text-select e2e all still green; unit CSV/MarkRanges/LineSpan/drift green; client jest 789.🤖 Generated with Claude Code