feat(files): interactive markdown checkbox toggling in preview#3829
feat(files): interactive markdown checkbox toggling in preview#3829waleedlatif1 merged 8 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Preview behavior is adjusted so checkbox interactivity is only enabled when Written by Cursor Bugbot for commit 51163c6. Configure here. |
Greptile SummaryThis PR adds interactive markdown checkbox toggling to the file preview panel — users can click checkboxes in the rendered preview to check/uncheck them without touching the raw editor. The changes integrate cleanly with the existing streaming/committed/incoming architecture. Key changes:
Confidence Score: 5/5Safe to merge — all previously reported counter/regex issues are resolved, no new bugs found. Both previously raised P1 concerns (ordered-list regex gap and counter index drift) have been addressed in follow-up commits. The interactive path correctly short-circuits the streaming reveal logic, No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant CB as Checkbox (preview-panel)
participant MP as MarkdownPreview
participant HCT as handleCheckboxToggle
participant TMC as toggleMarkdownCheckbox
participant HCC as handleContentChange
U->>CB: click checkbox (index N)
CB->>MP: onCheckedChange(newChecked)
MP->>HCT: onCheckboxToggle(N, Boolean(newChecked))
HCT->>TMC: toggleMarkdownCheckbox(contentRef.current, N, checked)
TMC-->>HCT: updated markdown string
HCT->>HCC: handleContentChange(toggled) [only if changed]
HCC-->>MP: setContent(value) + contentRef.current = value
MP-->>CB: re-render with updated checked prop from parsed markdown
Reviews (5): Last reviewed commit: "fix(files): move useMemo above condition..." | Re-trigger Greptile |
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/file-viewer.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx
Show resolved
Hide resolved
bc84926 to
a7e9399
Compare
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx
Outdated
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/file-viewer.tsx
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx
Outdated
Show resolved
Hide resolved
|
@cursor review |
|
@greptile |
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx
Show resolved
Hide resolved
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx
Show resolved
Hide resolved
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/file-viewer.tsx
Show resolved
Hide resolved
|
@cursor review |
* feat(files): interactive markdown checkbox toggling in preview * fix(files): handle ordered-list checkboxes and fix index drift * lint * fix(files): remove counter offset that prevented checkbox toggling * fix(files): apply task-list styling to ordered lists too * fix(files): render single pass when interactive to avoid index drift * fix(files): move useMemo above conditional return to fix Rules of Hooks * fix(files): pass content directly to preview when not streaming to avoid stale frame
Summary
Type of Change
Testing
Tested manually
Checklist