Skip to content

feat: Interactive checkboxes with annotation tracking - #423

Merged
backnotprop merged 8 commits into
backnotprop:mainfrom
Yecats:feature/interactive-checkboxes
Mar 29, 2026
Merged

backnotprop merged 8 commits into
backnotprop:mainfrom
Yecats:feature/interactive-checkboxes

Conversation

@Yecats

@Yecats Yecats commented Mar 29, 2026 •

Copy link
Copy Markdown
Contributor

Adds clickable checkbox toggling in the plan viewer. Users can check/uncheck task items directly in the rendered plan, with each toggle creating a COMMENT annotation that captures the action, section context, and task text. Toggling back to the original state cleanly removes the override and deletes the annotation.

Resolves issues #413

Yecats and others added 8 commits March 28, 2026 10:34
Checkboxes in rendered markdown task lists are now clickable.
Toggling is visual-only (does not modify source markdown) and
automatically creates a comment annotation noting the change.

Co-authored-by: Copilot <[email protected]>
When toggling back to the original state, the checkbox override is
deleted and the associated annotation is removed — acting as an undo.

Co-authored-by: Copilot <[email protected]>
1. Fix annotation prefix collision: match on blockId field instead of
   string prefix to avoid block-1 matching block-10, block-11 etc.
2. Fix rapid toggle orphans: delete ALL existing checkbox annotations
   for the block before creating a new one, preventing duplicates.
3. Fix stale overrides: useEffect cleans up checkboxOverrides entries
   when their block IDs no longer exist in the current blocks array.

Co-authored-by: Copilot <[email protected]>
Annotations now read 'Mark as completed: {item}' or 'Mark as not
completed: {item}' so the AI knows to action on them.

Co-authored-by: Copilot <[email protected]>
When a user deletes a checkbox annotation via the annotation panel,
the checkboxOverrides entry is now cleared so the checkbox reverts
to its original visual state. Previously only toggling the checkbox
itself would revert the override.

Co-authored-by: Copilot <[email protected]>
@backnotprop
backnotprop merged commit 08fcaaf into backnotprop:main Mar 29, 2026
5 checks passed
backnotprop added a commit that referenced this pull request Mar 29, 2026
Integrate useCheckboxOverrides + removeAnnotation helper with
external annotation source-routing in handleDeleteAnnotation.

For provenance purposes, this commit was AI assisted.
stk-code pushed a commit to stk-code/plannotator that referenced this pull request Mar 31, 2026
* feat: interactive checkboxes — click to toggle with annotation

Checkboxes in rendered markdown task lists are now clickable.
Toggling is visual-only (does not modify source markdown) and
automatically creates a comment annotation noting the change.

Co-authored-by: Copilot <[email protected]>

* fix: uncheck checkbox removes override and deletes annotation (undo)

When toggling back to the original state, the checkbox override is
deleted and the associated annotation is removed — acting as an undo.

Co-authored-by: Copilot <[email protected]>

* fix: address all code review issues for checkbox feature

1. Fix annotation prefix collision: match on blockId field instead of
   string prefix to avoid block-1 matching block-10, block-11 etc.
2. Fix rapid toggle orphans: delete ALL existing checkbox annotations
   for the block before creating a new one, preventing duplicates.
3. Fix stale overrides: useEffect cleans up checkboxOverrides entries
   when their block IDs no longer exist in the current blocks array.

Co-authored-by: Copilot <[email protected]>

* fix: use actionable annotation text for checkbox toggles

Annotations now read 'Mark as completed: {item}' or 'Mark as not
completed: {item}' so the AI knows to action on them.

Co-authored-by: Copilot <[email protected]>

* fix: include section heading in checkbox annotation for disambiguation

Co-authored-by: Copilot <[email protected]>

* fix: revert checkbox override when annotation is deleted from panel

When a user deletes a checkbox annotation via the annotation panel,
the checkboxOverrides entry is now cleared so the checkbox reverts
to its original visual state. Previously only toggling the checkbox
itself would revert the override.

Co-authored-by: Copilot <[email protected]>

* refactor: extract removeAnnotation to avoid redundant override cleanup in checkbox toggle

* refactor: extract useCheckboxOverrides hook from App.tsx

---------

Co-authored-by: Yecats <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants