SIGN IN SIGN UP

feat(richtext): tappable checklist checkboxes in rich messages

Tap a task-list checkbox in a rendered rich message (RichTextMessageAttribute /
InstantPage, drawn by ChatMessageRichDataBubbleContentNode via the InstantPage V2
renderer) to toggle it; when the message is editable the toggle persists via a
message edit.

- InstantPage.togglingCheckbox(at:to:): pure transform that rebuilds the block
  tree following a structural [Int] path and flips the target list item's checked.
- InstantPageV2Layout: InstantPageV2ListMarkerItem gains checkboxPath; a pathPrefix
  threaded through the layout recursion stamps each .checklist marker with its
  root->item path (block-array index at page/details/blockQuote/list-item-blocks
  levels; item index at list level), decoupled from <details> expand state.
- InstantPageRenderer: marker view installs a tap gesture when interactive, flips
  its CheckNode optimistically, and routes (path, newValue) up via
  InstantPageV2View.checkboxTapped (mirrors detailsTapped).
- ChatControllerInteraction: canEditMessageRichText (sync gate, mirrors
  canSetupReply) + toggleMessageRichTextCheckbox (edit action), defaulted so only
  the real chat wires them.
- ChatController: implements the closures; toggle looks up the message, re-checks
  canEditMessage, applies the transform, and submits via
  pendingUpdateMessageManager.add(text: "", richText:) (the composer's rich-edit
  path; native-todo toggle is the template).
- ChatMessageRichDataBubbleContentNode: gate makes checkboxes interactive only when
  the rendered page is the primary attribute.instantPage (not translation /
  fullInstantPage / pending-edit) AND the message is editable; forwards taps.

Also nudges the rich-data bubble header spacing to 8.0. Docs: new tap-to-toggle
subsection in docs/instantpage-richtext.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
I
isaac committed
a45ea21aaec23c47a841b57f6ebb42f431e99f38
Parent: 63de291