feat(cards): add 'note' card type for readable markdown content

New card type renders body as styled markdown with no copy/fill/run
affordance. Glyph: ¶, color: --note.

Migration uses transaction to safely rebuild table constraint.
Checks both 'note' presence and modified_at column to catch
partial migration state.
This commit is contained in:
2026-05-17 12:49:43 -04:00
parent 840084fbb0
commit 2b177eeae9
7 changed files with 69 additions and 5 deletions
+3 -3
View File
@@ -4,14 +4,14 @@
const GLYPHS = {
note: '—', todo: '○', event: '◇', reminder: '△',
snippet: '◆', template: '◈', checklist: '☐',
decision: '⚖', link: '↗',
decision: '⚖', link: '↗', note: '¶',
};
const GLYPH_CLASSES = {
note: 'glyph-note', todo: 'glyph-todo', event: 'glyph-event', reminder: 'glyph-reminder',
snippet: 'glyph-snippet', template: 'glyph-template',
checklist: 'glyph-checklist', decision: 'glyph-decision',
link: 'glyph-link',
link: 'glyph-link', note: 'glyph-note',
};
const PAGE_SIZE = 50;
@@ -121,7 +121,7 @@
// ========== Grammar parser (mirrors Go parser) ==========
const VALID_CARDS = { card: 'snippet', c: 'snippet', snippet: 'snippet', template: 'template', checklist: 'checklist', decision: 'decision', link: 'link' };
const VALID_CARDS = { card: 'snippet', c: 'snippet', snippet: 'snippet', template: 'template', checklist: 'checklist', decision: 'decision', link: 'link', note: 'note', n: 'note' };
function validateTime(s) {
const parts = s.split(':');
+5
View File
@@ -64,6 +64,11 @@
<span class="type-name">decision</span>
<span class="type-hint">record a choice + rationale</span>
</button>
<button data-type="note" class="type-btn">
<span class="type-glyph glyph-note"></span>
<span class="type-name">note</span>
<span class="type-hint">readable markdown content</span>
</button>
<button data-type="link" class="type-btn">
<span class="type-glyph glyph-link"></span>
<span class="type-name">link</span>
+1
View File
@@ -462,6 +462,7 @@ main.focus-peek .resize-handle { visibility: hidden; }
.glyph-checklist { color: var(--remind); }
.glyph-decision { color: var(--note); }
.glyph-link { color: var(--event); }
.glyph-note { color: var(--note); }
.entity-content {
flex: 1;