super-productivity/packages/plugin-dev/document-mode/src
Johannes Millan 9db74ba1d0 fix(document-mode): slash-menu polish + isDone trust + safer DOM
Tightens five smaller P2/P3 findings from the multi-agent review in
one batch:

- Slash menu: single-char keys with Ctrl/Cmd/Alt or during IME
  composition (ev.isComposing) no longer extend the filter — fixes
  Ctrl+S etc. silently accumulating in the filter and the IME
  composition swallow. Enter on a zero-matches filter now closes
  the menu and falls through to the editor instead of being eaten.

- Slash menu "New task" action: captures currentCtx at start, sets
  slashActionInFlight to drop re-entrant triggers, and skips the
  doc insert if the user switched contexts during the host
  round-trip (the task is still saved in the host — only the chip
  insert is deferred).

- taskRef / subTaskRef applyState now trusts task.isDone (the
  host's source of truth) instead of `n.attrs.isDone || task.isDone`.
  Previously a host-side clear would leave the chip visually stuck
  "done" while the user was focused inside it.

- ensureSubtasksInJSON skips subTaskIds that aren't in the local
  cache yet — they would otherwise render as empty "ghost" rows
  with the is-missing style. They get inserted on the next
  refreshTaskCache + insertSubtaskByParent cycle naturally.

- Slash-menu item rendering uses textContent for label and hint
  (icon stays as innerHTML — the SVG path map is constant). Label
  is constant today but pre-empts the XSS hazard if it ever sources
  from a task title.
2026-05-21 20:32:24 +02:00
..
ui fix(document-mode): slash-menu polish + isDone trust + safer DOM 2026-05-21 20:32:24 +02:00
background.ts feat(document-mode): persist per-context enable state 2026-05-21 17:29:35 +02:00
icon.svg feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00
manifest.json feat(document-mode): add TipTap-based document-mode plugin (POC) 2026-05-21 17:22:31 +02:00