Skip to main content

Notes (My Workspace)

Notes (My Workspace)

Overview

The Notes tool in My Workspace is a personal + shared note workspace. Users can create notes/folders, archive or pin notes, and share owner notes with teammates as View or Edit.

  • Primary UI: src/features/workspace/components/Notes/NotesManager.tsx
  • Data access: src/lib/db/workspace-notes.ts
  • Types: src/types/workspaceNotes.ts

Data Scope

  • Owner data: notes/folders are keyed by created_by (current user).
  • Shared data: notes shared to the user are surfaced via workspace_note_shares.
  • Share picker org context: resolved from header entity using:
  • getOrgId(selectedEntity)
  • fallback getActualOrgId(selectedEntity)
  • fallback getParentOrgId()

List + Folder Semantics

The list intentionally treats owner and shared notes differently:

  • Root view (`folderId = null`)
  • Shows owner notes in root (folder_id IS NULL)
  • Shows all notes shared with the user, even if the owner filed them in a private folder
  • Specific folder view (`folderId = uuid`)
  • Shows only owner notes in that folder
  • Shared notes are not tied to the recipient's folder tree

This prevents shared notes from disappearing when owners organize their notes into private folders.

Autosave Behavior

  • Editor changes are debounced (AUTO_SAVE_DELAY = 1500ms).
  • Pending autosaves are now flushed when:
  • switching notes
  • leaving the editor via mobile back
  • unmounting the Notes view
  • Deleting the currently selected note clears pending autosave state to avoid post-delete update attempts.

Accessibility

Note rows and folder rows are keyboard-accessible:

  • role="button" + tabIndex={0}
  • Enter/Space activate open/select behavior
  • focus-visible ring styles applied for keyboard users

Tests

Coverage for folder/share semantics is in:

  • src/lib/db/workspace-notes.test.ts
  • src/features/workspace/components/Notes/NotesManager.test.tsx

These tests assert:

  • shared notes remain visible in root view even when owner-foldered
  • specific folder views only include owner notes in that folder
  • keyboard activation for note/folder rows (Enter/Space)

Synced from IFMmvp-Frontend documentation: workspace/05-NOTES.md

Ready to Get Started?

See how Alignmint can simplify your nonprofit's operations. Schedule a free demo with our team and we'll walk you through everything.

Questions? Email us at steven@getalignmint.org

Ready to get started?Start Plus Trial