- notescraft-lint (rules, safe fixes, learned style) and notescraft-blocks (block model and edits); engine lint.* and block.* commands with CLI and MCP parity - Lint tab, underlines, slash menu with preview in Source and Visual, block grip and menu, Settings > Editor and lint, Vim block keys - Visual view: tables, note embeds, %% comments, wrapping property chips - Vault knowledge (Related tab, assistant sources, Settings) and calendar plugin - Sidebar top padding fixed, dot grid follows PaperCraft spacing, right-card tabs no longer cover the collapse button Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.4 KiB
Plan: Editor blocks, component slash menu and note lint
Approach
Pure crates first (notescraft-lint, block model in notescraft-editor), then engine commands (lint.*, block.*), then MCP parity, then the egui screens from the PaperCraft page "Editor" (id d2f89d953e07927f), then Settings, Vim keys, docs. Lint is rule functions over &str returning Issue { rule, severity, range, message, fix }; fixes are text edits checked against the current text (Error::Stale). Blocks are found by parsing, never written to files.
Artboards (page d2f89d953e07927f): Slash menu d2f89d:1, Blocks and WYSIWYG d2f89d:186, Settings / Editor and lint d2f89d:570, Mobile d2f89d:727, Lint and fixes d2f89d:819. UI tasks screenshot the artboard (papercraft-cli call get_screenshot '{"pageId":"d2f89d953e07927f","nodeId":"..."}') and compare with cargo run -p notescraft-ui-egui --example snapshot.
Architecture
- New
crates/lint(L2, depsmarkdown,index):issue,rules/*,fix(apply, apply_all_safe back to front),suggest(closest title),style(vote over notes),check(entry). crates/editor:blocks.rs(parse intoBlock {kind, range};move_block,duplicate,delete,turn_into),marks.rs(toggle bold, italic, strike, code, link, highlight over a range). No egui.- Engine:
crates/engine/src/lint/{mod,commands,state}.rs(lint.check|fix|fix_all_safe|rules|dismiss|state),block.*commands, configsession.lint.*andeditor.blocks.*,.notescraft/lint-state.jsonvia atomic writer, off-thread style vote, assistant gate (check = read, fix = write). - MCP: aliases for lint tools, parity test engine = CLI = MCP.
- UI: right card tabs Backlinks, Related, Lint, Outline, Assistant; Lint panel; underlines in Visual; slash popup groups + preview pane; grip + block menu + drag; floating selection toolbar; Settings > Editor; compact layouts; Vim
]],[[,gb.
Dependencies
None.
Risks
- Visual view is a custom egui renderer: grip and underline positions need block rects from it. Mitigation: first task there reads the renderer and exposes per-block rects.
- Lint latency on big notes: rules are linear scans, region-limited in the UI path.
Out of Scope
Spell-check (rule slot only), AI fixes, block ids, Copy link to block.
Test Strategy
Unit per rule (violating + clean note), hostile-input panic hunt, fix idempotence (fix then check is clean), engine = CLI = MCP parity, UI snapshot tests, cargo xtask ci.