Skip to content

feat: toggle to hide checked-off checklist items #200

@oobagi

Description

@oobagi

Problem

When a checklist grows long, completed items add clutter. There's no way to hide checked-off items to focus on what's left.

Context

Checklist blocks are defined in internal/block/block.go:85-89 with a Checked bool field. Rendering happens in internal/editor/render.go — active blocks at line 234, inactive at line 595, and view mode at line 738. Toggle between checked/unchecked already works via Ctrl+X (edit) and mouse click (view).

Approach

Add a 3-way HideChecked setting:

  • off — show all items (current behavior, default)

  • view-only — hide checked items in view mode only, still visible in editor

  • on — hide checked items in both editor and view mode

  • Store the setting in config (global default) and/or per-note metadata

  • In render.go, skip checked Checklist blocks based on the mode + setting

  • Add a keybind to cycle through states

  • When items are hidden, show a subtle "[N hidden]" indicator so the user knows items exist

Files to touch:

  • internal/config/ — new setting
  • internal/editor/render.go — filter logic in all three render paths
  • internal/editor/editor.go — keybind to cycle the toggle

Tasks

  • Add HideChecked config option with values (off, view-only, on)
  • Thread the setting through the editor model
  • Filter checked blocks out of rendering based on current mode + setting
  • Add "[N checked hidden]" indicator when items are filtered
  • Add keybind to cycle the toggle (and show current state briefly)
  • Persist toggle state per-note or globally

Acceptance criteria

  • Checked items disappear from view mode when set to view-only or on
  • Checked items disappear from edit mode when set to on
  • Hidden count indicator visible when items are filtered
  • Cycling the toggle updates the view immediately
  • Default is off (no behavior change for existing users)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions