Skip to content

Todo Panel — Polish: first-time prompt, color bleed, tests, edge cases #53

Description

@harrryyd

Parent

#44

What to build

Final polish pass: first-time empty state, category color bleeding into item backgrounds, remaining tests, and edge-case hardening.

First-time empty state: When the todo panel is opened and there are zero categories, show a subtle centered prompt: "No categories yet. Click + to create one." This disappears once the first category is created.

Color bleed: Each category's color is applied as a full tint to the header background. Items within the category get a lighter variant of the same color as a subtle background. Use CSS color-mix or opacity to derive the lighter variant. This creates a visual scanning aid.

Remaining tests: Fill in any missing coverage from prior slices. Focus on todoStore edge cases:

  • Empty state transitions
  • Invalid operations (deleting non-empty category, cycling non-existent item)
  • Reorder with gaps
  • Concurrent mutations (debounced write handling)

Edge cases:

  • Sidebar reopens to last state (not reset)
  • Markdown XSS safety (no raw HTML injection)
  • Empty item title handling (prevent creation with empty title)
  • Very long category names (truncation)

Acceptance criteria

  • First-time empty state shows subtle prompt in center of panel
  • Prompt disappears when first category is created
  • Category header rendered with full color tint
  • Items within category have lighter variant of category color as background
  • Color is readable against text (either dark text on light bg or vice versa)
  • Sidebar reopening preserves last scroll/collapse state
  • Empty item title is rejected (no blank items created)
  • Long category names are truncated with ellipsis
  • Unit tests: empty state transitions, edge cases, invalids
  • bun fmt, bun lint, bun typecheck, bun run test all pass
  • Full manual smoke test: create categories → add items → reorder → cycle status → edit description → delete → verify persistence after restart

Blocked by

Serves as the integration and polish slice. All prior slices should be merged before starting this one.

Activity

  1. harrryyd commented on Jun 8, 2026

    @harrryyd
    OwnerAuthor

    Implemented and merged to main.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions