feat: add title and description to capture grammar #8

Merged
lerko merged 1 commits from feat/title-description into develop 2026-05-16 01:37:11 +00:00
Owner

Summary

  • Parser: |title prefix, // description separator (inline, leading lines, title-line), URL-safe :// skip. Modifiers extracted from all segments.
  • Schema + DB: title TEXT, description TEXT columns via ALTER TABLE migration. 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 eyebrow with double-click inline editing.
  • Tests: 10 new cases across grammar, entity DB, and API layers — 71 total, all passing.

Test plan

  • nib '|nginx proxy trick // always forget this #ops' → title shown in CLI output
  • nib '- |deploy staging #ops' → todo with title
  • nib 'just body text' → unchanged behavior, no title
  • Web capture bar: |my title // desc #tag → title, description, tag all correct
  • Web detail pane: double-click title/description → inline edit → PUT fires
  • Existing entries without title render unchanged
  • go test ./... — 71 tests pass
## Summary - **Parser**: `|title` prefix, `// description` separator (inline, leading lines, title-line), URL-safe `://` skip. Modifiers extracted from all segments. - **Schema + DB**: `title TEXT`, `description TEXT` columns via ALTER TABLE migration. 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 eyebrow with double-click inline editing. - **Tests**: 10 new cases across grammar, entity DB, and API layers — 71 total, all passing. ## Test plan - [x] `nib '|nginx proxy trick // always forget this #ops'` → title shown in CLI output - [x] `nib '- |deploy staging #ops'` → todo with title - [x] `nib 'just body text'` → unchanged behavior, no title - [x] Web capture bar: `|my title // desc #tag` → title, description, tag all correct - [x] Web detail pane: double-click title/description → inline edit → PUT fires - [x] Existing entries without title render unchanged - [x] `go test ./...` — 71 tests pass
lerko added 1 commit 2026-05-16 01:19:38 +00:00
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
lerko force-pushed feat/title-description from f5b46585c3 to c8e18f0bc1 2026-05-16 01:19:38 +00:00 Compare
lerko merged commit 80b8a950a3 into develop 2026-05-16 01:37:11 +00:00
lerko deleted branch feat/title-description 2026-05-16 01:37:11 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerko/nib-v1#8