Commit Graph

41 Commits

Author SHA1 Message Date
lerko 1f2daf4d0e Merge pull request 'fix(ui): tag counts, j/k nav, stream layout, search alignment' (#15) from fix/ui-bugs-phase1 into main
Reviewed-on: #15
2026-05-16 22:49:27 +00: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 ab07f631a7 Merge pull request 'feat: UI redesign, capture grammar, demo command' (#14) from develop into main
Reviewed-on: #14
2026-05-16 20:07:28 +00:00
lerko db3f88508e Merge pull request 'fix(ui): edit pill in stream peek, unified edit mode' (#13) from fix/ui-polish into develop 2026-05-16 19:22:52 +00: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 13cb7b420e Merge pull request 'feat: add demo subcommand with seeded test data' (#12) from feat/demo-command into develop 2026-05-16 17:15:16 +00:00
lerko 5bb6e89523 feat: add demo subcommand with seeded test data
nib demo starts server with temp DB populated from testdata/demo.json.
Covers all glyphs, card types, tags, pins, completions, deletes, and
template fill placeholders.
2026-05-16 13:13:05 -04:00
lerko f6602e3595 Merge pull request 'feat: absorb button, preserve newlines, demote promoted items' (#11) from fix/absorb-button-and-newlines into develop 2026-05-16 17:02:00 +00: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 6654907c41 Merge pull request 'fix: align parsers with capture grammar, restore demote, add parse preview' (#10) from fix/capture-grammar-alignment into develop
Reviewed-on: #10
2026-05-16 16:15:40 +00: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 957265f7b4 Merge pull request 'feat(ui): redesign to match design handoff prototype' (#9) from feat/ui-redesign into develop
Reviewed-on: #9
2026-05-16 14:26:28 +00: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 f4e178e3ee fix(cards): show title instead of body when present 2026-05-15 22:31:28 -04:00
lerko fadc6d9a2a fix(ls): show title instead of body when present 2026-05-15 22:30:59 -04:00
lerko b2d6603dcf docs: add README and MIT license 2026-05-15 22:01:47 -04:00
lerko 80b8a950a3 Merge pull request 'feat: add title and description to capture grammar' (#8) from feat/title-description into develop
Reviewed-on: #8
2026-05-16 01:37:10 +00: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 e477e8d512 Merge pull request 'fix: code principles audit — correctness, security, test-ability' (#5) from fix/code-principles-audit into develop
Reviewed-on: #5
2026-05-14 21:55:27 +00: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 e708ea5c13 Merge pull request 'feat: implement nib design system — warm amber palette, dual themes, new typography' (#4) from feat/design-system into main
Reviewed-on: #4
2026-05-14 21:04:38 +00: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 be590a0f6f Merge pull request 'feat: add browse-at-scale — date ranges, load more, month navigator' (#3) from feat/browse-at-scale into main
Reviewed-on: #3
2026.05.1
2026-05-14 18:09:18 +00: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 2d62199705 Merge pull request 'feat: add absorb command — merge source entity into target' (#2) from feat/absorb into main
Reviewed-on: #2
2026-05-14 17:54:19 +00: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 702caae1af Merge pull request 'fix: batch tag queries, inline edit, delete response, SPA catch-all, link glyph' (#1) from feat/review-fixes into main
Reviewed-on: #1
2026-05-14 17:37:41 +00: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
lerko 6de174e474 feat(api): add HTTP server with full REST API
Chi router with all entity CRUD endpoints, promote/demote/use
actions, tag listing. CORS middleware for --dev mode. Graceful
shutdown on SIGINT/SIGTERM. 22 API integration tests via httptest.
2026-05-14 11:30:47 -04:00
lerko c3cc9464b9 feat(cli): add promote, cards, copy, demote, delete, edit commands
Complete CLI crystallization loop. Promote generates card_data
(template slots, checklist steps, link URLs). Cards view sorted by
use_count. Copy increments usage. Demote strips card layer. Delete
does soft then hard. Edit opens $EDITOR.
2026-05-14 11:28:17 -04:00
lerko a6fda5d1ee feat(cli): add nib add + nib ls commands
Default command delegation: `nib "..."` routes to `nib add`. Capture
bar parses grammar, creates entities. `nib ls` lists with date
grouping, tag filter, 48h default window. Display glyphs for all
entity types.
2026-05-14 11:17:27 -04:00
lerko 51cbf86d77 feat(parse): add capture grammar parser
Extracts glyph prefix, @time anchors, #tags, and ^card suffixes from
raw input. Table-driven tests cover all grammar forms including edge
cases. 24 tests passing.
2026-05-14 11:09:27 -04:00
lerko aed38433ae feat(db): add SQLite schema, Store CRUD, ULID generation
Foundation layer: entities table with card support, entity_tags join
table, WAL mode, busy_timeout, full CRUD operations including
promote/demote lifecycle and soft/hard delete. 33 tests passing.
2026-05-14 11:08:33 -04:00
lerko d2ce5eca29 chore: bootstrap nib project
Go module init, deps (cobra, chi, modernc sqlite, ulid, clipboard),
minimal main.go placeholder, CLAUDE.md with conventions.
2026-05-14 11:03:36 -04:00