Repository navigation
feat: My Notes panel with reordering + dashboard action-item fixes - #7
Merged
Merged
Conversation
Add an accessible notes drawer that slides in from the left (left-edge trigger
or Ctrl+Shift+N), alongside the existing /my-notes page. Capture, tag, inline-edit,
delete, and reorder personal (self-assigned) notes with per-note move up/down.
Backend: QuickNote gains displayOrder (lower sorts higher) + withDisplayOrder; new
MoveDirection/MoveQuickNoteCommand and QuickNoteService.moveQuickNote swaps a note's
order with its adjacent self-assigned INBOX neighbor (userId-scoped, 404 cross-user,
no-op at edges). New self-assigned notes are placed on top; self-assigned list sorts
by displayOrder ASC, createdAt DESC. New migration adds display_order (per-user
backfill). POST /api/v1/quick-notes/{id}/move exposes the reorder.
Frontend: new MyNotesPanel (role=dialog, aria-modal, labelled title, Escape/backdrop
close, focus-in/restore, focus-trap, prefers-reduced-motion), moveQuickNote API client,
and displayOrder/MoveDirection types.
Tests: backend 1661 pass (+18); frontend 127 suites/1369 pass (+15). Docs: README +
api/ARCHITECTURE.md + PROGRESS.md updated.
Let personal notes be reordered by dragging a card and dropping it anywhere in
the list (native HTML5 drag-and-drop, no new dependency), with a live drop indicator
and a grab affordance. The up/down arrow buttons stay as a keyboard-accessible fallback.
Backend: new absolute-position reorder alongside the single-step /move swap.
ReorderQuickNoteCommand + QuickNoteService.reorderQuickNote removes the note and
reinserts it at a clamped 0-based targetIndex, renumbers the self-assigned INBOX list
contiguously, and persists only changed notes. POST /api/v1/quick-notes/{id}/reorder
(ReorderQuickNoteRequest, @min(0)); userId-scoped (cross-manager -> 404). Reuses
display_order, no schema change.
Frontend: draggable note cards (disabled while editing), drop-target styling, and
reorderQuickNote(token, id, targetIndex) API client + ReorderQuickNoteRequest type.
Tests: backend 1671 pass (+10: service top/bottom/middle/clamp/no-op/404, integration
absolute-move/clamp/negative-400/cross-user-404); frontend 127 suites/1373 pass (+4).
Docs: README + api/ARCHITECTURE.md + PROGRESS.md updated.
The /my-notes page and the slide-in side panel used two different note cards that had drifted apart. Extract a single canonical MyNoteCard used by both so they look and behave identically, and give the /my-notes page the same drag-and-drop + up/down reordering the panel already had. - New frontend/src/components/quick-notes/MyNoteCard.tsx: date, sensitive/tag/status badges, inline edit (text + tag), reorder (arrows + native HTML5 drag-and-drop with a drop indicator and grab handle), convert-to-TODO (+ due date), archive, edit, delete. Each action renders only when its callback is supplied. - MyNotesPanel: drop bespoke PanelNoteCard, use MyNoteCard (now shows date/status and gains convert/archive actions it lacked). Panel chrome unchanged. - /my-notes page: use MyNoteCard + drag-and-drop/arrow reordering for the active list (disabled under the Archived filter), wiring moveQuickNote and reorderQuickNote. - Unify card testids to the my-note-* family; migrate panel/page tests; add MyNoteCard unit tests and page drag-drop/move/archived-disabled tests. Frontend-only (reorder endpoints already exist). Verified: jest 128 suites / 1389 tests pass; feature files typecheck clean. README + PROGRESS.md updated.
The Today's Priorities widget links a person-less action item (e.g. a note converted
to a personal TODO) to /action-items, but no page existed at that route, so the click
404'd. Create the cross-person Action Items page the link already targets.
- New frontend/src/app/action-items/page.tsx: manager-wide list of all action items
including person-less TODOs, with a status filter (All/Open/Done/Canceled),
pagination, and inline complete/cancel/delete. Reuses ActionItemCard.
- Add cross-person by-id client functions (getActionItemById, completeActionItemById,
cancelActionItemById, deleteActionItemById) against the existing /action-items/{id}
endpoints; the person-scoped helpers couldn't reach person-less items.
- Correct ActionItem.personId to string | null (person-less items are valid).
- Add an Action Items top-nav link so the page is discoverable.
Frontend-only (backend cross-person endpoints already existed). Verified: jest 129
suites / 1402 tests pass; feature files typecheck clean. README + PROGRESS.md updated.
…es and the sections Today's Priorities unioned overdue + due-soon action items with self-assigned notes, but the dashboard also has dedicated Overdue and Due Soon sections, so every overdue/due-soon item appeared twice and overloaded the card. Split by ownership in DashboardService.getDashboard: the Overdue/Due Soon sections now list only person-assigned items (work tracked for reports), and Today's Priorities lists only the manager's own person-less items (e.g. a converted note's TODO) plus self-assigned notes. Each item now appears exactly once. Ranking (overdue -> due-soon -> notes) and the cap of 7 are unchanged; all queries stay userId-scoped. Backend-only (the frontend renders whatever the backend returns). Verified: gradle test BUILD SUCCESSFUL, 1672 tests pass; frontend jest 129 suites / 1402 tests pass. README + PROGRESS.md updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a slide-in My Notes panel with drag-and-drop reordering, unifies the My Notes page and panel onto one shared note card, and fixes two dashboard issues that surfaced from the new flow. One linear stack of 5 commits off
main; each builds on the previous.What's included (in order)
feat(notes): slide-in My Notes panel with personal-note reordering (
7f7343f)New left-edge drawer (trigger +
Ctrl+Shift+N) for personal (self-assigned) notes, alongside the existing/my-notespage. Capture, tag, inline-edit, delete, and reorder with ↑/↓ arrows. Backend:QuickNote.displayOrder(newest-on-top), a userId-scoped reorder (POST /api/v1/quick-notes/{id}/move,UP/DOWNneighbor swap), new migrationV20251028120000__add_display_order_to_quick_notes.sql. Accessible dialog (role/aria, focus trap + restore, Escape, backdrop,prefers-reduced-motion).feat(notes): mouse drag-and-drop reordering (
f233491)Native HTML5 drag-and-drop with a drop indicator, keeping the ↑/↓ arrows as a keyboard fallback. Backend gains an absolute-position reorder (
POST /api/v1/quick-notes/{id}/reorderwith a clamped 0-basedtargetIndex) for multi-position drops.refactor(notes): unify the page and panel on one shared card (
ddea5d0)Extracts a single
MyNoteCardused by both surfaces so they look and behave identically, and brings drag-and-drop + arrow reordering to the/my-notespage (active list only; disabled under the Archived filter).fix(dashboard): resolve 404 when opening a person-less TODO (
5b7ee7f)The dashboard linked person-less (converted-note) TODOs to
/action-items, which had no page. Adds the cross-person Action Items page (list + status filter + complete/cancel/delete via existing by-id endpoints), a top-nav link, and correctsActionItem.personIdtostring | null.fix(dashboard): stop duplicating action items across Today's Priorities and the sections (
4fecb85)Overdue/due-soon items appeared both in "Today's Priorities" and their own sections. Split by ownership in
DashboardService: the Overdue/Due Soon sections show only person-assigned items; Today's Priorities shows only the manager's own person-less items plus self-assigned notes. Each item now appears exactly once.Testing
./gradlew test→ BUILD SUCCESSFUL, 1672 tests, 0 failures (domain, service, and Testcontainers integration tests for reorder/move/dedup; cross-user access returns 404).jest→ 129 suites / 1402 tests pass (newMyNoteCard,MyNotesPanel,ActionItemsPagesuites + client tests). Feature files typecheck clean.Security / data isolation
Every new query and endpoint is
userId-scoped; cross-manager access to a note or action item returns 404 (integration-tested). No change to auth, and no cross-manager data boundaries crossed.Notes for reviewers
display_order INTEGER NOT NULL DEFAULT 0, per-user backfill bycreated_at); no existing migrations were modified.