Skip to content

Add quick note search and viewer#37

Merged
amrelsagaei merged 4 commits intomainfrom
ae-issue-22-accessing-notes
Apr 13, 2026
Merged

Add quick note search and viewer#37
amrelsagaei merged 4 commits intomainfrom
ae-issue-22-accessing-notes

Conversation

@amrelsagaei
Copy link
Copy Markdown
Contributor

@amrelsagaei amrelsagaei commented Mar 30, 2026

This Closes #22

Summary by CodeRabbit

  • New Features
    • Added reminder system: Set reminders on selected text with customizable due dates and times, receive notifications when reminders are due, and dismiss or delete reminders as needed.
    • Added note search modal: Quickly search and open notes across your workspace with a dedicated search interface (Cmd+Shift+S).

@amrelsagaei amrelsagaei requested a review from f8thl3ss March 30, 2026 13:26
f8thl3ss
f8thl3ss previously approved these changes Apr 1, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

A reminder feature and search modal are added to Notes++. The backend provides reminder CRUD operations with validation, file-based persistence per project, and a periodic timer to detect due reminders and emit events. The frontend integrates a reminder time picker into the editor, displays reminder nodes inline, manages reminder state through a Pinia store, and shows toast notifications when reminders are due. A search modal with note viewing capabilities is also introduced, powered by draggable/resizable modal utilities.

Changes

Cohort / File(s) Summary
Backend Reminder API
packages/backend/src/api/reminder.ts, packages/backend/src/api/index.ts
New reminder handler functions (getReminders, createReminder, deleteReminder, dismissReminder) with error handling and re-exported from module surface.
Backend Reminder Infrastructure
packages/backend/src/index.ts, packages/backend/src/schemas/reminder.ts, packages/backend/src/types/events.ts
Reminder API registration with timer lifecycle management; Zod schemas for request validation; new "notes++:reminderDue" backend event.
Backend Reminder Persistence
packages/backend/src/utils/reminderFile.ts, packages/backend/src/utils/reminderTimer.ts
File I/O utility for reading/writing reminders as JSON per project; periodic timer (30s intervals) that checks due reminders and triggers events.
Frontend Editor Integration
packages/frontend/src/components/content/editor/NoteEditor.vue, packages/frontend/src/components/content/editor/extensions/reminder-node.ts
Context menu with "Set Reminder" action; inline reminder node extension with display state styling, close button, and state refresh interval.
Frontend Reminder Picker
packages/frontend/src/components/content/editor/reminders/ReminderPicker.vue, packages/frontend/src/components/content/editor/reminders/showReminderPicker.ts
Fixed-position, draggable reminder time picker modal with preset buttons; confirmation validates future dates only.
Frontend Search Modal
packages/frontend/src/components/shared/NoteSearchModal.vue, packages/frontend/src/components/shared/SearchInput.vue, packages/frontend/src/components/shared/SearchResults.vue, packages/frontend/src/components/shared/SearchNoteViewer.vue
Draggable/resizable modal for searching and viewing notes with keyboard navigation (arrow keys, Enter, Escape); displays search results or note content conditionally.
Frontend Reminder Notifications
packages/frontend/src/components/shared/reminders/ReminderNotificationManager.vue, packages/frontend/src/components/shared/reminders/ReminderToast.vue, packages/frontend/src/components/shared/reminders/mountReminderNotifications.ts
Toast notification system with auto-dismiss timer, progress bar, and event handlers; mounted at app initialization.
Frontend Modal/Draggable Utilities
packages/frontend/src/composables/useDraggable.ts, packages/frontend/src/composables/useNoteModal.ts, packages/frontend/src/composables/useSearchModal.ts
Reusable drag/resize composable; search modal state management (search, navigation, note loading/saving); updated note modal to delegate dragging to shared composable.
Frontend Reminder State Management
packages/frontend/src/repositories/reminders.ts, packages/frontend/src/stores/reminders.ts, packages/frontend/src/utils/reminderStates.ts
Repository layer delegating to SDK backend calls; Pinia store managing active toasts, reminder creation/deletion/dismissal, and state persistence; centralized display state resolution.
Frontend Initialization & Events
packages/frontend/src/index.ts, packages/frontend/src/utils/eventBus.ts, packages/frontend/src/utils/notificationSound.ts, packages/frontend/src/utils/injectEditorStyles.ts
Reminder notification mounting and search modal command registration; new reminder-related event types; Web Audio API notification chime; CSS injection utility.
Shared Types
packages/shared/src/index.ts, packages/frontend/src/types.ts, packages/frontend/src/components/shared/NoteFloatModal.vue
Reminder interface with ID, note path, context, timestamps, and boolean flags; new ModalPosition type; refactored modal to use shared position type.

Sequence Diagram

sequenceDiagram
    participant User
    participant Editor as NoteEditor
    participant Picker as ReminderPicker
    participant SDK as Backend API
    participant Timer as ReminderTimer
    participant Store as RemindersStore
    participant Notify as ReminderToast

    User->>Editor: Context menu + "Set Reminder"
    Editor->>Picker: Show time picker at cursor
    User->>Picker: Select date + confirm
    Picker->>Editor: emit confirm(date)
    Editor->>SDK: createReminder(notePath, context, reminderAt)
    SDK->>SDK: Validate + parse date + create reminder with UUID
    SDK->>SDK: Write to reminders.json file
    SDK-->>Editor: Return reminder object
    Editor->>Editor: Insert reminderNode into editor content

    Timer->>SDK: Check reminders every 30s
    SDK->>SDK: Read reminders.json + compare reminderAt vs now
    alt Reminder is due
        SDK->>SDK: Set triggered = true + write file
        SDK->>Store: Emit "notes++:reminderDue" event
    end

    Store->>Store: Receive event + add to activeToasts
    Store->>Store: Play notification sound
    Store->>Notify: Render toast
    
    User->>Notify: Click dismiss / wait 15s auto-dismiss
    Notify->>Store: emit dismiss or expire
    Store->>SDK: dismissReminder(reminderId)
    SDK->>SDK: Set dismissed = true + write file
    Store->>Notify: Remove from activeToasts
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • Add reminders to notes #38 — Implements the same reminder feature with overlapping backend API functions, schemas, timer logic, and shared Reminder type definitions.

Suggested reviewers

  • f8thl3ss

Poem

🐰 A rabbit hops through time reminders,
Setting notes to chime and play,
Modal windows dance like finders,
Searching notes throughout the day! 🎵

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The changeset includes reminder functionality not explicitly mentioned in issue #22's scope of 'accessing notes across Caido'. Move reminder-related changes (reminder.ts, reminderTimer.ts, reminderFile.ts, schemas/reminder.ts, reminder components, stores, etc.) to a separate PR for issue #23 or defer until explicit scope inclusion.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.83% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add quick note search and viewer' directly reflects the main feature additions in the changeset.
Linked Issues check ✅ Passed The PR implements the core requirement from issue #22: enabling note access across Caido tabs via the search modal and integration features.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ae-issue-22-accessing-notes

Comment @coderabbitai help to get the list of available commands and usage tips.

@amrelsagaei amrelsagaei requested a review from f8thl3ss April 13, 2026 14:21
@amrelsagaei amrelsagaei merged commit 4e16610 into main Apr 13, 2026
3 of 4 checks passed
@amrelsagaei amrelsagaei deleted the ae-issue-22-accessing-notes branch April 13, 2026 14:26
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.

Abiliy to access the notes all over Caido

2 participants