feat(markdown-review): enable per-list-item commenting - #16
Merged
Conversation
Investigate how meatcheck's markdown block rendering treats lists as single atomic blocks and what changes are needed to enable commenting on individual list items. Covers goldmark AST traversal, rendering API, template click handling, comment projection, CSS styling, and external tool comparison.
Create implementation plan to enable users to click individual markdown list items and leave comments anchored to that item's line range. Current system treats entire lists as single blocks. Plan covers backend (model struct changes, renderMarkdownBlocks() splitting logic), frontend (template wrapper tags, CSS styling), and comprehensive tests with TDD approach. Also merge per-list-item commenting requirements into existing review-ui requirements file, including 8 Gherkin acceptance criteria covering happy path, error cases, and edge cases (ordered lists, task lists, nested lists). - docs/plans/list-item-commenting.md (new): 5 implementation tasks across model, rendering, template, CSS, and tests. Stage 1 TDD workflow with parallel test creation and sequential implementation phases. - docs/requirements/review-ui.md (updated): add 8 EARS requirements and 8 Gherkin scenarios for per-item list commenting feature
…l selection Split markdown list nodes into per-item blocks with ListOpen/ListClose wrapper tags. Each list item now independently selectable and commentable. Ordered list numbering fixed via CSS counters. Includes refactored resolveLineRange() helper, buffer reuse optimization, and image parsing fast-path. All tests passing with 7 new test functions.
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.
What changed
Splits markdown
ast.Listnodes into per-itemMarkdownBlockentries withListOpen/ListClosewrapper tags, addsresolveLineRange()helper to eliminate duplicated byte-to-line resolution, and styles list-item blocks with CSS counters for correct ordered list numbering.Requirements
Functional Requirements (EARS):
<ul>or<ol>HTML tag for proper list styling.startattribute on the<ol>tag.Acceptance Criteria:
Risk Profile
Overall: HIGH — Size and Files are both Medium, and Test coverage is Moderate. Three signals at level 2+ escalate the floor from Medium to High.
Suggested Review Order
model.goListOpenandListClosefields toMarkdownBlockstructassets.goast.Listinto per-item blocks, extractsresolveLineRange()helper, adds image-parse fast-pathtemplate.htmlListOpen/ListClosewrapper tags around.md-blockdivsstyles.cssmarkdown_test.go