Skip to content

feat: add timeline sidebar navigation with note grouping#3

Merged
j4rviscmd merged 2 commits intomainfrom
feat/timeline-sidebar
Mar 21, 2026
Merged

feat: add timeline sidebar navigation with note grouping#3
j4rviscmd merged 2 commits intomainfrom
feat/timeline-sidebar

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Add a collapsible sidebar using shadcn/ui Radix Sidebar that displays notes grouped by relative date (Today, Yesterday, Previous 7 Days, Older)
  • Notes can be selected from the sidebar to load in the editor
    • button immediately creates a new "Untitled" note and selects it
  • Last opened note ID is persisted in localStorage and restored on startup
  • Consolidate duplicate DEFAULT_CONTENT into a shared editor/lib/constants.ts module
  • Fix stale closure bug in useAutoSave by adding onNoteSaved to dependency array

Changes

Area Change
Sidebar New NoteSidebar component with date-grouped note list
Editor Extract shared DEFAULT_BLOCKS / DEFAULT_CONTENT constants
Auto-save Fix onNoteSaved stale closure; simplify unmount cleanup
Layout Wire SidebarProvider + SidebarInset + SidebarTrigger in App
shadcn/ui Add sidebar, sonner, button, input, separator, skeleton, tooltip, sheet components

Test plan

  • Verify notes appear grouped by date on sidebar load
  • Click a note to load it in the editor
  • Press + button to create a new note immediately (no typing required)
  • Verify "Untitled" new note appears in sidebar and is selected
  • Verify title updates in sidebar after editing heading and saving
  • Close and reopen app — last opened note should be restored
  • Verify sidebar toggle via hamburger button

🤖 Generated with Claude Code

j4rviscmd and others added 2 commits March 21, 2026 20:10
Implement a collapsible sidebar using shadcn/ui Radix Sidebar that
displays notes grouped by relative date (Today, Yesterday, Previous
7 Days, Older). Notes can be selected to load in the editor, and a
+ button immediately creates a new note. The last opened note is
persisted in localStorage for restoration on startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@j4rviscmd j4rviscmd added the enhancement New feature or request label Mar 21, 2026
@j4rviscmd j4rviscmd merged commit 2f6fce6 into main Mar 21, 2026
@j4rviscmd j4rviscmd deleted the feat/timeline-sidebar branch March 21, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant