Files
Lumotia/docs/architecture-map/01-frontend/pages/tasks.md
jars a1f3f3f134 docs: architecture map (initial 5-slice generation, 105 pages)
Five-slice navigable map of the entire codebase under
docs/architecture-map/. Each slice is a self-contained
breadcrumbed sub-tree:

  01-frontend (16)              Svelte/SvelteKit UI
  02-tauri-runtime (26)         src-tauri commands + lifecycle
  03-audio-transcription (16)   audio + transcription crates
  04-llm-formatting-mcp (19)    llm, ai-formatting, mcp, cloud
  05-core-storage-hotkey-build  core, storage, hotkey, workspace,
                          (26) CI, dev glue

Plus master README.md and data-flow-end-to-end.md tracing
audio bytes from microphone to FTS5 search to MCP read.

Generated by 5 parallel subagents on 2026/05/09 against
HEAD 3c47000. Each page has YAML frontmatter, file:line code
refs, sibling cross-links, plain-English summaries.

Aggregated debt surfaced (full lists in master README):
RB-08 macOS power assertion, schema head drift v14 vs v15,
VAD blocked on ort version conflict, streaming primitives
not wired into live.rs, no prompt versioning, MCP has no
auth, cloud-providers in-memory keystore, SettingsPage
2 484 LOC, commands/live.rs 1 737 LOC, dual theme system,
brand rename to Lumenote pending across the codebase.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 14:04:13 +01:00

3.3 KiB

name, type, slice, last_verified
name type slice last_verified
Tasks page architecture-map-page 01-frontend 2026/05/09

Tasks page

Where you are: Architecture mapFrontendPages overview → Tasks

Plain English summary. The full screen tasks board. Inbox, today, soon, later buckets. Per task energy chips (low/medium/high), per task lists, micro steps, completion sparkline, search, sort, drag to reorder, and a "pop out" button that opens the same tasks in a small persistent floating window via open_task_window.

At a glance

  • Path: src/lib/pages/TasksPage.svelte
  • LOC: 725
  • Imports (selected):
    • Stores: from page.svelte.ts: tasks, addTask, completeTask, uncompleteTask, deleteTask, updateTask, setTaskEnergy, taskLists, addTaskList, renameTaskList, deleteTaskList, settings, saveSettings. From completionStats.svelte.ts: recentCompletions, todayCount.
    • Components: WipTaskList, EmptyState, CompletionSparkline, EnergyChip, Card.
    • Utils: formatTimestamp (time). BUCKET_COLORS, EFFORT_LABELS, EFFORT_ORDER (constants).
    • External: lucide-svelte (SquareCheck, Search, ExternalLink, ChevronLeft, ArrowUpDown, Plus, X, ChevronRight, Zap).

What's in here

Local state

  • activeBucket ("all" | "inbox" | "today" | "soon" | "later").
  • activeListId ("all" | "inbox" | <listId>).
  • showCompleted, quickInput, searchQuery, sidebarCollapsed.

Render

  • Quick add input (top). Sets bucket via segmented choice, energy via EnergyChip.
  • Filter / sort header. Sort modes use EFFORT_ORDER for effort comparisons.
  • Task list body uses WipTaskList (which renders rows with MicroSteps expansion).
  • "Pop out" icon → invoke("open_task_window") (TasksPage.svelte:231).
  • Sparkline panel renders CompletionSparkline if settings.showMomentumSparkline is true.

Stores it depends on

  • tasks (live array). taskLists. recentCompletions for the sparkline.

Events

  • Listens implicitly to: magnotia:task-completed, magnotia:task-uncompleted, magnotia:task-deleted, magnotia:step-completed are emitted from store helpers and consumed by completionStats.svelte.ts to refresh the sparkline.

Tauri command surface (direct)

  • open_task_window (page action).

The store helpers used here call into Rust through add_task_cmd, complete_task_cmd, uncomplete_task_cmd, delete_task_cmd, plus list management commands (*_task_list_cmd).

Watch outs

  • Drag and drop is heavy on this page. Reorder mutations should always go via the store helpers; do not manipulate tasks directly or you will desync the SQLite source of truth.
  • The sparkline is gated on settings.showMomentumSparkline (true by default). It re renders on the four magnotia:task-* events, plus window focus for date rollover.
  • "Pop out" deliberately does not pass any state. The float window reads the same store, which is shared via store hydration on mount and localStorage for settings.
  • Sort, filter, search are not persisted. Reload returns to defaults.

See also