Skip to content

Plugin: Kanban board over status frontmatter (#122)#151

Merged
thetechjon merged 1 commit into
devfrom
feat/kanban-plugin-122
Jun 7, 2026
Merged

Plugin: Kanban board over status frontmatter (#122)#151
thetechjon merged 1 commit into
devfrom
feat/kanban-plugin-122

Conversation

@thetechjon

Copy link
Copy Markdown
Collaborator

Summary

Closes #122. New plugin at public/plugins/noteser-kanban/ surfacing a fullscreen Kanban board over the YAML frontmatter status: field (Obsidian convention).

Defaults (greenlit 2026-06-07)

  • Status field: YAML frontmatter status: — Obsidian convention. Lifted straight from each NoteWithBody.frontmatter; the plugin never re-parses YAML.
  • Columns: user-defined per board via a CSV setting (setSetting('columns', csv)). Fallbacks in order: (1) user CSV, (2) the distinct status values present in the vault, (3) hard-coded Todo / Doing / Done when no notes carry a status yet.
  • Surface: plugin, not core. Matches Jon's standing rule that new features default to plugins.

Move-to mechanic (drag-and-drop replacement)

v1.2 VNodes only carry onClick / onChange / onSubmit / onKeyDown. There is no pointer-event channel through postMessage, so drag-to-Done as described in #122 cannot be expressed with the curated VNode set — docs/plugins-v1.2-impl-notes.md flags the same wall for #71 and the importer.

Each card carries a "Move to..." button. Click it: a small radio picker overlays the card with every other column plus Unsorted. Pick one: the plugin calls ctx.vault.write.updateNote(id, { frontmatter: { ...existing, status: chosen } }). Moving to Unsorted removes the status key entirely so the on-disk YAML stays clean instead of writing status: Unsorted. Every other frontmatter key is preserved.

If a v1.3 plan adds a pointer-event VNode (onDragStart, onDrop), the column strip can swap to native drag-and-drop without changing the wire-level write path.

Files added

public/plugins/noteser-kanban/manifest.json
public/plugins/noteser-kanban/main.js
src/plugins/kanbanPluginLogic.ts          (TS mirror of pure logic, per properties precedent)
src/plugins/__tests__/kanbanPlugin.test.ts

Perf

Measured against a synthetic 1,000-note vault. Times are pure-derive cost on the worker side; the host snapshot cost is shared by every v1.2 plugin and falls outside this plugin's responsibility.

  • Cold derive (filter + resolve columns + group): 0.76 ms
  • Avg of 10 hot runs with a filter applied: 1.13 ms
  • Run trend: 2.79, 1.67, 0.98, 1.00, 1.01, 0.76, 0.92, 1.09, 0.56, 0.52 ms

Both well under the 500 ms board-open budget called out in the task brief. The filter input is debounced at 150 ms; vault-change events ride the host's existing 250 ms debounce and a 0 ms microdebounce to coalesce burst-of-saves into one re-derive.

Tests

src/plugins/__tests__/kanbanPlugin.test.ts — 34 tests, all green:

  • extractStatus on string / missing / empty / array / non-string fixtures.
  • parseColumnsCsv trims, dedupes case-insensitively, preserves order.
  • resolveColumns honours CSV, falls back to vault statuses, falls back again to DEFAULT_COLUMNS.
  • groupByStatus produces every declared column + Unsorted, matches case-insensitively, places untagged + non-matching notes in Unsorted.
  • filterNotes matches title + status + body tag, ignores folder paths.
  • moveTargets excludes the source column, appends Unsorted unless the source IS Unsorted.
  • buildMovePatch preserves siblings, removes status on move-to-Unsorted, does not mutate input.
  • Two integration tests drive the production main.js: the move-to writes through vault.write.updateNote with the right frontmatter, and the custom-columns CSV persists through setSetting.

Voice

User-facing strings (column headers, button labels, empty-state callout, toast errors) carry no em dashes, no contractions, and no hype.

Test plan

  • npm run lint clean.
  • npx tsc --noEmit zero errors.
  • npm test -- --ci green (212 suites pass, 1 skipped pre-existing).
  • Manual smoke: install via local-folder scan, add status: todo to several notes, run "Open Kanban board" from the palette, click "Move to..." on a card, pick a different column, confirm the note moves and frontmatter updates on disk.

🤖 Generated with Claude Code

Closes #122. Surfaces a fullscreen kanban view that groups notes by
their YAML frontmatter `status:` field (Obsidian convention). Columns
default to user-defined CSV (persisted via setSetting) and fall back
to the vault's distinct status values, or Todo / Doing / Done when
nothing carries a status yet. Cards live in an Unsorted column on the
far right when their status does not match any declared column.

Drag-to-Done was the original brief, but v1.2 VNodes carry no pointer
events. The plugin uses a per-card "Move to..." button that opens a
small radio overlay; selecting a column writes the new status via
vault.write.updateNote and preserves every other key. Moving to
Unsorted removes the `status` key entirely so on-disk YAML stays
clean.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@thetechjon thetechjon merged commit d8721e6 into dev Jun 7, 2026
4 of 5 checks passed
@thetechjon thetechjon deleted the feat/kanban-plugin-122 branch June 7, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant