Conversation
Introduces `TagRoles` — a per-vault JSON configuration mapping four semantic roles (`pinned`, `archived`, `captureVoice`, `captureText`) to tag names. Features that previously hardcoded tag strings now read the role from `useTagRoles(vaultId)` so each vault can keep its own conventions. - New `src/lib/vault/tag-roles.ts` — type, defaults, load/save/delete, and a `useTagRoles` hook that mirrors the scribe-settings pattern. - New `TagRolesSection` in Settings with per-role inputs, a shared `<datalist>` populated from the vault's existing tags for autocomplete, Save / Reset to defaults, and a "changes apply to new notes only" note. - `TextCapture` and `MemoCapture` now read `captureText` / `captureVoice` from the stored roles. Voice capture's default tag is now `voice` (was hardcoded `memo`) per the issue spec — users who want the old tag can change it in Settings. - CLAUDE.md documents the pattern so future role-bearing features (pinned/archived views, etc.) reuse the primitive. Closes #23 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
TagRolesprimitive (src/lib/vault/tag-roles.ts) — per-vault JSON inlocalStorage(lens:tag-roles:<vaultId>), mirrors the scribe-settings pattern. Roles:pinned,archived,captureVoice,captureText.TagRolesSectionin Settings with inputs for each role, shared<datalist>autocomplete from the vault's existing tag list, Save / Reset, and a "changes apply to new notes only" note.TextCaptureandMemoCapturenow read defaults fromuseTagRoles(vaultId)instead of hardcoding"quick"/"memo".CLAUDE.mddocuments the pattern so future role-bearing features (pinned/archived views, etc.) reuse this primitive.Notes on defaults
Per the issue spec, the voice-capture default is
voice(the issue listed this as an explicit default). Existing code used the literal"memo"; any current user who wants that back can set it in Settings. Pinned/archived defaults are the role names themselves, matching the issue.Out of scope
Closes #23
Test plan
bun run lint— cleanbun run typecheck— cleanbun run test— 338/338 (49 files). Adds tag-roles storage tests (8) and two Settings UI tests for TagRolesSection (save overrides, reset to defaults).bun run build— clean🤖 Generated with Claude Code