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
* feat(logs): add additional metadata for workflow execution logs * Revert "Feat(logs) upgrade mothership chat messages to error (#3772)" This reverts commit 9d1b976. * Fix lint, address greptile comments * improvement(sidebar): expand sidebar by hovering and clicking the edge (#3830) * improvement(sidebar): expand sidebar by hovering and clicking the edge * improvement(sidebar): add keyboard shortcuts for new workflow/task, center search modal, fix edge ARIA * improvement(sidebar): use Tooltip.Shortcut for inline shortcut display * fix(sidebar): change new workflow shortcut from Mod+Shift+W to Mod+Shift+P to avoid browser close-window conflict * fix(hotkeys): fall back to event.code for international keyboard layout compatibility * fix(sidebar): guard add-workflow shortcut with canEdit and isCreatingWorkflow checks * feat(ui): handle image paste (#3826) * feat(ui): handle image paste * Fix lint * Fix type error --------- Co-authored-by: Theodore Li <theo@sim.ai> * feat(files): interactive markdown checkbox toggling in preview (#3829) * 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 * improvement(home): position @ mention popup at caret and fix icon consistency (#3831) * improvement(home): position @ mention popup at caret and fix icon consistency * fix(home): pin mirror div to document origin and guard button anchor * chore(auth): restore hybrid.ts to staging * improvement(ui): sidebar (#3832) * Fix logger tests * Add metadata to mothership logs --------- Co-authored-by: Theodore Li <theo@sim.ai> Co-authored-by: Waleed <walif6@gmail.com> Co-authored-by: Theodore Li <theo@sim.ai>
Summary
Type of Change
Testing
Tested manually
Checklist