Skip to content

widget: TODO list (local file) #10

Closed

Description

@unhappychoice

Intent

Both self/home ("what am I supposed to do today?") and self/project ("what's left on this branch before it's shippable?"). Todos are the oldest, least-controversial widget category — they belong in the core set.

Fetcher kind + safety

  • `Fetcher` (cached). Reading + parsing a Markdown file is fast, but caching keeps the render path identical to other widgets. TTL can be short (~10s) since the file is user-edited and mtime changes obviously.
  • `Safety::Safe`. Local file read only.

Data source

A plain Markdown file with checkbox list items. No external deps — `pulldown-cmark` if we want a proper parser, or a hand-rolled regex for `^\s*-\s+\[([ xX])\]\s+(.*)$` since we only care about that one construct.

Default location: `$XDG_CONFIG_HOME/splashboard/todo.md`. Per-dir overrides via config path.

Payload shape

`Body::Entries` with each todo as one entry. `status` = `Ok` if ticked, `Warn` if not (lets renderers highlight open items). Per the existing entries renderer, this renders as a checklist.

Alternative: `Body::Lines` with raw strings if we don't want renderer sophistication. Entries is nicer for styling.

Config schema sketch

```toml
[[widgets]]
id = "todo"
fetcher = "todo"

[widgets.todo]
path = "~/.config/splashboard/todo.md" # default
limit = 5 # open items to show
show_completed = false # include ticked items
newest_first = false # respect file order by default
```

CRUD CLI

Read-only rendering isn't enough — users need a way to add / tick off items without opening the file in an editor. CLI verbs:

  • `splashboard todo add "fix bug"` — append `- [ ] fix bug`
  • `splashboard todo done ` — tick the Nth open item (1-indexed, order matches rendered view)
  • `splashboard todo list` — print todos to stdout (scripting)
  • `splashboard todo rm ` — remove a line entirely (lower priority)

Design questions for the CLI:

  • Indexing stability: if the widget hides completed items, `done 3` indexes into the visible open items, not into the raw file lines. That's what matches what the user sees.
  • Concurrency: two `todo add` racing. Use the same `tmp + rename` pattern the cache store uses.
  • Path resolution: `--file` flag overrides; otherwise use the same lookup the widget does.

Design questions

  • Syntax extensions: priorities (`- [ ] !!! fix bug`)? due dates (`(2026-05-01)`)? Tempting but slippery. First pass: ignore, pass through verbatim.
  • Nested todos: render as-is (indent preserved)? Collapse to top-level only?
  • Frontmatter: ignore YAML frontmatter at the top of the file so users can add notes.
  • Glob: single file vs multiple (`todos/**/*.md`)? First pass: single file. Multi-file later if users ask.

Related widgets (see #41)

  • journal_prompt — same-file-region of personal productivity
  • habit_tracker, goal_progress — ReadStore candidates rather than built-ins
  • git_status — pairs well in per-project splashes ("branch state + checklist for this PR")

Activity

  1. added this to the v1.0 milestone on Apr 21, 2026
  2. unhappychoice commented on Apr 21, 2026

    @unhappychoice
    OwnerAuthor

    Scope addendum: pair with CRUD CLI commands

    Read-only rendering isn't enough — users need a way to add / tick off items without opening the file in an editor. Bundling CLI commands into this issue:

    • `splashboard todo add "fix bug"` — append `- [ ] fix bug`
    • `splashboard todo done ` — tick the Nth incomplete item (1-indexed, as rendered)
    • `splashboard todo list` — print todos to stdout (for scripting)
    • `splashboard todo rm ` — remove a line entirely (optional, lower priority)

    Open questions:

    • Indexing stability: if todos render sorted / filtered, what does `done 3` refer to? Probably: index into the raw file's incomplete items in order, not the rendered view.
    • Concurrency: two `todo add` racing. File lock or tmp+rename like the cache store?
    • Path resolution: `--file` flag to override the default path; otherwise use the same config lookup as the widget.
  3. unhappychoice commented on Apr 21, 2026

    @unhappychoice
    OwnerAuthor

    Consolidating into catalog #41. Individual widget issues turned out to be premature commitments — priority isn't fixed yet and detailed specs belong alongside the PR that actually ships the widget. Progress tracked as checkboxes in #41 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    widget

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions