Feat v0.4.2 tags search (#24)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m39s
CI/CD / test-sqlite (push) Successful in 2m48s
CI/CD / build-and-deploy (push) Successful in 1m6s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #24.
This commit is contained in:
2026-03-29 13:55:18 +00:00
committed by xcaliber
parent 03c182b9d1
commit 32beb3cee4
7 changed files with 661 additions and 48 deletions

View File

@@ -2,6 +2,45 @@
All notable changes to Switchboard Core are documented here.
## v0.4.2 — Tags + Search
### Added
- **Tags table** (`ext_notes_tags`): note_id, tag columns with indexes on
both for bidirectional lookup. Many-to-many relationship via join table.
- **Tag CRUD API**: 3 new Starlark handlers — list all unique tags, get tags
for a note, replace tags for a note (delete-all + reinsert). Tags are
normalized to lowercase, trimmed, and deduplicated on save.
- **Tags in list/get/search**: `_list_notes` batch-fetches all tags in a
single query and attaches a `tags` array to each note item. `_get_note`
includes tags. `_search_notes` now matches search terms against tags.
- **Tag cascade delete**: Hard-deleting a note also removes its tag rows.
- **Tag input in editor**: `TagInput` component with removable pills, text
input (comma or Enter to add), and autocomplete dropdown populated from
all existing tags.
- **Tag pills on note cards**: `NoteCard` renders up to 3 tag pills with
"+N" overflow indicator for notes with many tags.
- **Tag filter in sidebar**: `TagFilter` component displays all unique tags
as clickable pills. Clicking toggles client-side filtering of the note
list by that tag.
- **Drag-and-drop note moves**: `NoteCard` is draggable (HTML5 drag/drop).
`FolderNode`, "All Notes", and "Unfiled" items are drop targets. On drop,
calls the existing move-note API.
- **Folder context menu**: Replaced `prompt()` hack with a proper right-click
popup menu showing "Add subfolder", "Rename", and "Delete" actions. Positioned
at click coordinates, dismissed on outside click.
- **Updated stats**: `/stats` response now includes `tags` count (unique).
### Data model
| Table | Columns |
|-------|---------|
| `ext_notes_tags` | note_id, tag |
### Notes package version
Bumped from 0.2.0 → 0.3.0. 15 API routes (12 existing + 3 new).
## v0.4.1 — Folders + Navigation Tree
### Added