diff options
| author | soryu <soryu@soryu.co> | 2026-04-30 12:12:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-30 12:12:48 +0100 |
| commit | a2148d4e3117cdda2e1d0a8e3df289bfe04789a3 (patch) | |
| tree | 38ee768964c99917e8f51bdbfa9ddc89cc57f97b /makima/migrations/20250110000007_create_auth_trigger.sql | |
| parent | c3e97bbcc32bd18d9344dd44cc54dfcdce32100b (diff) | |
| download | soryu-a2148d4e3117cdda2e1d0a8e3df289bfe04789a3.tar.gz soryu-a2148d4e3117cdda2e1d0a8e3df289bfe04789a3.zip | |
feat(document-mode): folder layout v2, glow on pending, inline formatting, autosave fix (#107)
## Autosave bug fix (top priority)
The 250ms debounce on the localStorage draft write was racing the unmount
cleanup: typing then navigating within 250ms cleared the pending timer
*before* it flushed, which is exactly when we needed the draft saved.
Drafts are now written synchronously on every keystroke. localStorage
.setItem on a small string is sub-millisecond — the debounce was a
premature optimisation.
## Sidebar v2 (document-directives.tsx)
- Tasks now live in a `tasks/` subfolder inside each directive folder
(orchestrator, completion, and started step tasks). The pinned `.md`
document remains at the top of the directive folder.
- Status circles moved to the RIGHT side only (previously rendered on
both sides, which the user found noisy).
- New `StatusDot` component composes the status colour with two optional
modifiers: a "live" pulse when the orchestrator is running, and a
GLOW (amber ring + pulse) when there is a pending user question for
that directive or task. The glow is sourced from the existing
SupervisorQuestionsContext, indexed by `directiveId` and `taskId`.
- New `TaskIcon` (terminal) and `CompletionIcon` (PR-bracket) so
orchestrator/step/completion entries look distinct from the .md file.
## Inline formatting in the editor (DocumentEditor.tsx)
- New `MarkdownShortcutPlugin` (scoped to TEXT_FORMAT_TRANSFORMERS only)
so typing `**foo**`, `*foo*`, `` `foo` ``, `~~foo~~` auto-formats inline.
Block-level shortcuts (# heading, - list) are intentionally excluded so
the document shape (H1 / goal / StepsBlock / trailing para) stays intact.
- New `FloatingFormatToolbar` appears above any non-collapsed selection
inside the goal paragraph, with B / I / U / S / </> buttons that
dispatch FORMAT_TEXT_COMMAND. Buttons highlight when the corresponding
format is active. Standard ⌘B / ⌘I / ⌘U keyboard shortcuts also work
via the existing RichTextPlugin.
- Round-trip via a small inline-only markdown serializer/parser so
formatting persists across saves. Supported markers: `\``code\``,
`***bold-italic***`, `**bold**`, `*italic* / _italic_`, `~~strike~~`.
Underline survives within the editor session (toolbar / shortcut) but
has no markdown syntax so it does not round-trip — by design.
- No backend schema change: `directive.goal` is still a TEXT column, it
just contains inline markdown now.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'makima/migrations/20250110000007_create_auth_trigger.sql')
0 files changed, 0 insertions, 0 deletions
