Commit Graph

32 Commits

Author SHA1 Message Date
lerko a854f02854 feat(themes): add catppuccin mocha, nord, and dracula themes
Community-standard palettes mapped to nib's 18-token design system.
Theme cycle extended: dark → paper → tinycard → catppuccin → nord → dracula.
2026-05-17 13:28:10 -04:00
lerko 2b177eeae9 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.
2026-05-17 12:49:43 -04:00
lerko 840084fbb0 fix(ui): render full card content in mobile inline expansion
Promoted cards now show decision/steps/link/body sections in inline
detail instead of just a body preview. Fullscreen removes line clamp.
2026-05-17 11:05:10 -04:00
lerko 4ec876b2d2 fix(ui): mobile capture sticky, post-delete focus, inline markdown
- Capture bar stays visible on mobile via sticky positioning (#25)
- Cursor moves to adjacent entry after delete instead of resetting (#24)
- Inline expansion renders styled markdown via .exp-body.md selectors (#23)
2026-05-17 10:40:04 -04:00
lerko fa960ec204 feat(ui): inline expansion for cards view at mobile
Same accordion pattern as stream: card-row gets entity-exp markup,
selectEntity/expandInline/dismissPeek/Escape all handle .card-row.
Fullscreen expand works for both views.
2026-05-16 22:46:01 -04:00
lerko ad44d35d9b fix(ui): render markdown in mobile inline expansion
Use renderMd instead of escHtml for exp-body content.
Add .md class for consistent markdown styling.
2026-05-16 22:38:38 -04:00
lerko 694dfe1c89 feat(ui): inline expansion for mobile stream entries
Replace bottom-sheet peek with inline accordion at ≤900px.
Entries expand in-place with grid-template-rows animation (0.2s).
Body clamped to 3 lines; fullscreen uncaps it.
Selection toggles DOM classes instead of re-rendering for fluid j/k nav.
2026-05-16 22:32:41 -04:00
lerko 180757827b fix(ui): mobile breakpoint layout and peek interactions
Grid forced to single-column at ≤900px for all panel states.
Resize handles hidden, transitions killed to prevent slivers.
Peek pane gets mobile toolbar (expand/dismiss buttons).
Escape dismisses peek at any viewport. Z toggles full-screen
peek at mobile instead of no-op zen toggle.
2026-05-16 21:53:12 -04:00
lerko ff190e395b feat(ui): context-sensitive z key (focus mode)
- Nothing selected: z toggles zen (hide both panels)
- Item selected: z expands peek to full width (focus mode)
- z again or Esc exits focus mode and deselects
- j/k still cycle items while in focus mode
2026-05-16 20:46:23 -04:00
lerko 0316076bf8 feat(ui): resizable rail and peek pane
- Drag handles between rail/center and center/peek
- Rail: 120–360px range, peek: 250–700px range
- Widths persisted in localStorage
- Handles hidden when panel is collapsed (zen mode)
- Transition disabled during drag for smooth resize
2026-05-16 20:42:20 -04:00
lerko b456dca4b3 feat(ui): render markdown in peek pane
- Add marked.js for full markdown rendering
- Stream peek body renders as markdown
- Card peek non-code content renders as markdown
- Code/snippet cards keep escaped pre/code display
- Styled: headers, lists, blockquotes, inline code, code blocks, links, hr
- Graceful fallback to escHtml if marked fails to load
2026-05-16 19:47:53 -04:00
lerko 9ea00c235b feat(ui): zen mode and panel toggles
- z: toggle zen mode (hide both sidebars)
- [: toggle tag rail
- ]: toggle peek pane
- Panel state persisted in localStorage
- CSS grid transition for smooth collapse
2026-05-16 19:40:44 -04:00
lerko ef647aea7a feat(ui): sort dropdown for cards, capture bar prominence
- Cards sort dropdown: newest, oldest, most used — wired to reload
- Capture bar: larger font, more padding, accent glow on focus
- Prompt glyph scales up for visibility
2026-05-16 19:01:44 -04:00
lerko 35fe97a166 feat(ui): add tinycard theme
- New [data-theme="tinycard"] token block with purple accent palette
- Theme toggle cycles dark → paper → tinycard
- Load Inter font for tinycard sans stack
2026-05-16 19:00:25 -04:00
lerko 8bfa9b15ed fix(ui): tag counts, j/k nav, stream layout, search alignment
- Tag rail counts now reflect cards-only when in cards view
  (ListTags accepts cardsOnly filter, JS passes it per view)
- j/k navigation scoped to visible (intent/search filtered) list
- scrollSelectedIntoView works in both stream and cards view
- Entity items wrap title/desc/preview in .entity-content flex
  container so tags/pills align right consistently
- Title no longer eaten by description/body (flex-shrink + min-width)
- Search bar centered in header with margin auto
- switchView awaits loadEntities+loadTags to fix stale intent counts
2026-05-16 18:42:05 -04:00
lerko 1c6ba2b34c fix(ui): add edit pill to stream peek, unify edit mode across views 2026-05-16 13:42:44 -04:00
lerko b7dd58bf3e feat(ui): absorb button in peek, preserve newlines, demote promoted items
Stream peek now shows absorb button for unpromoted entries. Promoted
items in stream show demote instead of delete. d double-tap demotes
any card_type entity regardless of view. Parsers preserve newlines
from Shift+Enter. Absorb popup truncates to first non-empty line.
2026-05-16 13:00:22 -04:00
lerko 464ff5a8be fix(ui): replace delete with demote on card peek, scope d-key by view
Card peek action bar now shows demote instead of delete. Double-tap
d demotes in cards view, deletes in stream view.
2026-05-16 12:10:55 -04:00
lerko a8ea8f099f feat(ui): live parse preview pills + description in list rows
Capture bar shows inline pills as you type — glyph, title, desc,
tags, time, pin, card type. Textarea auto-grows on Shift+Enter.
Preview clears on save. Entity list rows now show description.
2026-05-16 12:01:05 -04:00
lerko 97ad71d66b fix(parser): align Go and JS parsers with capture grammar spec
Kind prefixes now follow the canonical grammar: `-` for todo,
`@time` for event, `!time` for reminder. Removed `*`/`◇`/`▸`
as capture aliases (display-layer only). Added `\` escape prefix,
`?` query mode, `!pin` flag extraction, `##word` hash escape,
and tag lowercasing. Both parsers produce identical results.
2026-05-16 11:12:36 -04:00
lerko 6802474595 fix(ui): broken peek editing + wire up search
- Fix startEditBody/startEditField selectors (.detail-body → .peek-body,
  .detail-title → .peek-title) — double-click editing works again
- Wire up search input: client-side filter by body/title/description text
- Search supports #tag inline filters (e.g. "proxy #ops")
- Debounced input (150ms), Escape clears and blurs
- Shows "no matches" when search has no results
2026-05-16 09:47:35 -04:00
lerko f26716a9ee feat(ui): phase 4 — promote modal polish, TODO complete
- Promote modal: colored glyphs, type names, hint descriptions per type
- Show truncated entry body in promote modal subtitle
- Mark all redesign phases complete in TODO.md
2026-05-16 09:37:32 -04:00
lerko 1c95902e2b feat(ui): phase 3 — peek pane redesign with modes
- Full peek pane rewrite: idle state, stream peek, card peek
- Idle state shows keyboard shortcuts per view
- Stream peek: eyebrow (glyph + kind + id + timestamp), body, tags, context
- Card peek: card container with eyebrow, title, desc, meta, content sections
- Decision section with choice/rationale/rejected display
- Steps section with run button
- Code section with content display
- Run mode: interactive checklist with progress bar + step toggling
- Fill mode: inline slot editor with tab navigation + copy resolved
- Edit mode: form fields for title/desc/body/tags
- Mode pills (running/filling/editing) with colored badges
- Pin/unpin action via keyboard (p) and button
- Escape exits any active mode
- Keyboard shortcuts: r=run, f=fill, e=edit, p=pin in cards view
2026-05-16 09:35:06 -04:00
lerko 156ea6ea1c feat(ui): phase 2 — card rows, affordance badges, cards sub-header
- Rich card row rendering: title — preview — affordance badges — tags — pin — use count
- Affordance detection (code, fill, steps, decide, link) from entity shape
- Cards sub-header with scope label, count, sort dropdown
- Section labels (★ pinned / recent) in cards view
- Flash animation on copy (--a-str pulse)
- Tag pill styling for card rows
- Progress bar mini-display for checklists in card preview
2026-05-16 09:29:51 -04:00
lerko dda8426113 feat(ui): phase 1 — layout, tokens, header, rail redesign
- Switch mono font from Monaspace Neon to JetBrains Mono
- Grid layout 192px | 1fr | 400px (was 180/320)
- Move capture bar from header to bottom of center panel
- Add search input to header center
- Redesign tag rail: grid items with arrow/dot/name/count
- Add intent section (grab/read/fill) in cards view rail
- Add --a-str token, toast component
- Logo 16px 700 weight
2026-05-16 09:25:35 -04:00
lerko c8e18f0bc1 feat: add title and description fields to capture grammar
Implement | prefix for titles and // separator for descriptions
across the full stack: parser, schema, API, CLI, and web frontend.

- Parser: line-aware extraction for |title, |title // desc,
  // leading desc, body // inline desc. URL-safe (skips :// lines).
  Modifiers (#tag, @time, ^card) extracted from all segments.
- Schema: ALTER TABLE migration adds title, description columns
- DB: Entity/EntityUpdate structs, all CRUD queries updated
- API: title/description on create/update/response, body validation
  relaxed (title-only entries valid)
- CLI: shows title as scan label when present
- Web: parseInput mirrors Go parser, list shows title, detail pane
  renders title + description with double-click inline editing
- Tests: 10 new cases (grammar, entity, API) — 71 total, all pass
2026-05-15 21:19:33 -04:00
lerko 6278cb1022 fix: code principles audit — correctness, security, testability
- Add rows.Err() checks after all scan loops (entities, tags, resolve)
- Surface time.Parse errors instead of silently discarding
- Extract entityRow scan helper to eliminate Get/List duplication
- Cap request body at 1MB via MaxBytesReader
- Stop leaking internal errors to API clients (log server-side only)
- Block javascript: URIs in link card open button (XSS)
- Fix all go vet failures in api_test.go (unchecked http errors)
- Add tests for display package, generateCardData, absorb-source-card
- Run go mod tidy to fix direct/indirect dep markers
2026-05-14 17:41:30 -04:00
lerko aa7c9aef7d feat: implement nib design system — warm amber palette, dual themes, new typography
Replace Tokyonight/Catppuccin blue palette with warm amber/ink identity.
Dual theme support (noir + paper) via data-theme attribute with
localStorage persistence. Space Grotesk for chrome, Monaspace Neon for
content. Updated glyph set (Strokes: — ○ ◇) across web and CLI.
2026-05-14 17:02:11 -04:00
lerko 949ccaca59 feat: add browse-at-scale — date ranges, load more, month navigator
CLI: --month YYYY-MM, --from/--to date range, --limit override
API: from/to query params for date range filtering
Web: load more button for pagination, month nav (◂/▸) in stream view
2026-05-14 14:03:45 -04:00
lerko 7711240d68 feat: add absorb command — merge source entity into target
DB: Absorb() merges body (newline-separated), unions tags, demotes
crystallized sources, soft-deletes source. Rejects crystallized targets.

API: POST /api/entities/:id/absorb { source_id }

CLI: nib absorb <target> <source> with prefix ID resolution

Web: absorb button on fluid entities, 'a' keyboard shortcut,
source picker modal
2026-05-14 13:47:08 -04:00
lerko 03094706c3 fix: batch tag queries, inline edit, delete response, SPA catch-all, link glyph
- Fix N+1 tag query in List() with batched IN clause
- Add inline body editing in web detail pane (dblclick or e key)
- Delete API returns {result: "soft"|"hard"} with 200 instead of 204
- SPA handler serves index.html for all extensionless paths
- Link glyph changed from emoji 🔗 to unicode ↗ for terminal alignment
- Capture bar contrast and hover glow increased
- Comment on load-bearing "--" in root.go
2026-05-14 12:37:13 -04:00
lerko 5b0d0a8f33 feat(web): add vanilla JS/CSS SPA with embed.FS
Stream view with date grouping, card view sorted by usage, capture
bar with client-side grammar parsing, tag rail filter, detail pane
with card affordances (template slot fill, checklist toggle, link
open), promote modal with auto-detect, keyboard shortcuts (j/k/n/p/
Enter/dd/1/2). Dark theme, responsive layout. Embedded in Go binary.
2026-05-14 11:38:45 -04:00