Improve the comment and question feedback flow in visual-docs - #6
Merged
Conversation
…ield Radios in single-select question fences could not be unselected once picked, and typing in the free-text box after picking an option silently joined them into one answer with no indication. Now: - Clicking an already-selected radio clears it (checkboxes keep native toggle behavior). - The free-text field's label/placeholder switch live between "write your own answer" (nothing picked) and "add an optional comment to your answer" (an option is picked), so the field's role is always visible. - Submit semantics: option only -> option; text only -> text; option + text -> "<option> — <text>" (joined options for multi-select). Nothing picked and no text is still a no-op. Verified headless: radio deselect, live label switch, stored comment text for option+note/custom-only/multi+note, and answers rehydrating correctly on reload, with no console errors.
Hovering an <li> (top-level or nested) now targets that item specifically instead of the whole list — the deepest li under the pointer wins, and the whole-list target stays reachable by hovering where no li is hit. A list item's own text excludes any nested sub-list, so a two-level item's quote doesn't swallow its children's text.
…cknowledged comments The "commenting on ..." context bar stuck around after a successful submit, making the next comment look anchored to stale text. Clear the drawer target once the POST succeeds (failures still keep it so the user can retry). Also let users double-click a comment the agent hasn't acknowledged yet to fix a typo or add detail before the agent starts on it, via a new POST /api/comments/edit endpoint (409s once a comment is acknowledged).
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.
This PR rounds out the review feedback loop based on hands-on usage. Submitting a comment now clears the "commenting on" bar once the save succeeds (it stays put on failure so you can retry), so the next comment doesn't accidentally inherit a stale target. Comments the agent hasn't acknowledged yet can be edited in place — double-click one in the drawer, change the text, and save; edited comments carry an
editedAttimestamp and an "(edited)" marker, the newPOST /api/comments/editendpoint refuses (409) once a comment is acknowledged or resolved, and the original anchor is preserved so quote highlighting andpath:lineresolution keep working.The gutter comment button now targets individual list items instead of only whole lists: hovering an
<li>— including nested ones, where the deepest item under the pointer wins — offers "Comment on this list item" anchored to that item's own text (excluding its sub-list), so the stored quote and resolved source line point at exactly the bullet you meant. Headings, components, code blocks, tables, and the text-selection affordance behave as before.Interactive
questionfences got the UX polish they needed: clicking a selected radio deselects it, so changing your mind is possible; the free-text field's label adapts live — it reads as your custom answer when no option is picked and as an optional accompanying comment when one is — and submissions store all three intents cleanly (Option A, custom text alone, orOption A — your note). Answers still post as ordinary component-anchored comments, so the agent digest, re-hydration on reload, and even editing your answer afterwards all work unchanged. The plugin version is bumped to 1.2.0 so installed copies pick up the release.