Commit 08fcaaf
feat: Interactive checkboxes with annotation tracking (#423)
* 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 <223556219+Copilot@users.noreply.github.com>
* 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 <223556219+Copilot@users.noreply.github.com>
* 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 <223556219+Copilot@users.noreply.github.com>
* 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 <223556219+Copilot@users.noreply.github.com>
* fix: include section heading in checkbox annotation for disambiguation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* 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 <223556219+Copilot@users.noreply.github.com>
* refactor: extract removeAnnotation to avoid redundant override cleanup in checkbox toggle
* refactor: extract useCheckboxOverrides hook from App.tsx
---------
Co-authored-by: Yecats <Yecats@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 2d90d38 commit 08fcaaf
3 files changed
Lines changed: 170 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
805 | 806 | | |
806 | 807 | | |
807 | 808 | | |
808 | | - | |
| 809 | + | |
| 810 | + | |
809 | 811 | | |
810 | 812 | | |
811 | 813 | | |
812 | 814 | | |
813 | 815 | | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
814 | 835 | | |
815 | 836 | | |
816 | 837 | | |
| |||
1439 | 1460 | | |
1440 | 1461 | | |
1441 | 1462 | | |
| 1463 | + | |
| 1464 | + | |
1442 | 1465 | | |
1443 | 1466 | | |
1444 | 1467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| 143 | + | |
| 144 | + | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
| |||
572 | 577 | | |
573 | 578 | | |
574 | 579 | | |
575 | | - | |
| 580 | + | |
576 | 581 | | |
577 | 582 | | |
578 | 583 | | |
| |||
610 | 615 | | |
611 | 616 | | |
612 | 617 | | |
613 | | - | |
| 618 | + | |
614 | 619 | | |
615 | 620 | | |
616 | 621 | | |
| |||
967 | 972 | | |
968 | 973 | | |
969 | 974 | | |
970 | | - | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
971 | 983 | | |
972 | 984 | | |
973 | 985 | | |
| |||
992 | 1004 | | |
993 | 1005 | | |
994 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
995 | 1011 | | |
996 | 1012 | | |
997 | 1013 | | |
998 | 1014 | | |
999 | 1015 | | |
1000 | 1016 | | |
1001 | | - | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
1002 | 1023 | | |
1003 | | - | |
| 1024 | + | |
1004 | 1025 | | |
1005 | 1026 | | |
1006 | 1027 | | |
1007 | 1028 | | |
1008 | | - | |
| 1029 | + | |
1009 | 1030 | | |
1010 | 1031 | | |
1011 | 1032 | | |
| |||
1015 | 1036 | | |
1016 | 1037 | | |
1017 | 1038 | | |
1018 | | - | |
| 1039 | + | |
1019 | 1040 | | |
1020 | 1041 | | |
1021 | 1042 | | |
| |||
0 commit comments