Skip to content

feat: board sort dropdown and persistent view state - #10

Merged
Gardner-Programs merged 1 commit into
masterfrom
feature/board-sort-and-persistence
May 18, 2026
Merged

feat: board sort dropdown and persistent view state#10
Gardner-Programs merged 1 commit into
masterfrom
feature/board-sort-and-persistence

Conversation

@Gardner-Programs

Copy link
Copy Markdown
Owner

Summary

  • Sort dropdown on the Board with three options: By Date, By Priority, By Story Points
  • Deadlines now visible on every card; overdue items shown in red with ⚠
  • Optimistic drag-and-drop — card moves instantly, Calendar API updates in background, reverts only on error (fixes the flicker/snap-back)
  • `useLocalStorage` hook persists selected project, active tab, and board sort preference across page refreshes

New files

  • `src/utils/useLocalStorage.ts` — generic typed hook wrapping `useState` + `localStorage`

Changed files

  • `src/App.tsx` — `selectedId` and `tab` now use `useLocalStorage`; project load restores saved selection if still valid; `handleUpdateItem` is now optimistic
  • `src/components/Board.tsx` — sort dropdown, deadline display, `sortBy` persisted via `useLocalStorage`

Test plan

  • Drag a card to a new column — should move instantly with no snap-back
  • Select each sort option — cards reorder correctly within columns
  • Refresh the page — active tab, selected project, and sort preference all restored
  • Add an item with a past deadline — card shows red ⚠ date

🤖 Generated with Claude Code

- Sort dropdown on the board: by date (soonest first), priority (high→low),
  or story points (low→high); selection persists across refreshes
- Deadline shown on cards; overdue items highlighted in red
- Optimistic drag-and-drop: card moves instantly, API updates in background,
  reverts on failure so there's no flicker
- useLocalStorage hook persists selected project, active tab, and board sort
  so the full view is restored on refresh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plan-it Ready Ready Preview, Comment May 18, 2026 1:36pm

@Gardner-Programs
Gardner-Programs merged commit 831241c into master May 18, 2026
3 checks passed
@Gardner-Programs
Gardner-Programs deleted the feature/board-sort-and-persistence branch May 18, 2026 13:36
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