Skip to content

feat(tui): detail view for management drawer rows - #33

Merged
jkyberneees merged 1 commit into
mainfrom
feat/tui-mgmt-detail-view
Aug 22, 2026
Merged

feat(tui): detail view for management drawer rows#33
jkyberneees merged 1 commit into
mainfrom
feat/tui-mgmt-detail-view

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

What

Enter on a management drawer row (memory / skills / tools / config) now expands it into a readable detail view instead of just refreshing the list.

Tab shows
Skills name, usage, source, badges, full wrapped description
Memory fact / pending episode header + full untruncated body
Tools built-in state · MCP command + args, project/auto-approve, timeout, limits
Config key/value; nested values as pretty-printed raw JSON

Why

The promote/delete gates were review-gated but review-blind: /api/skills fetches a Description that bodek never rendered, and Enter on any management tab was a no-op refresh. You can't promote what you can't see.

Behaviour

  • ↑↓ scroll (clamped), esc/q folds back with selection intact
  • p promotes from the detail view (skills + memory episodes)
  • Detail captures keys except drawer navigation (] [ digits) — tab switches reset it (switchDrawerTab, closePanel, open*)
  • Config list flattens one level (sandbox.enabled); deeper nests/slices keep the · marker with raw JSON in detail
  • Skills list renders a dim description line; windowing accounts for the extra rows
  • Everything from the wire goes through sanitize()

Tests

  • New mgmt_detail_test.go: expand/fold round-trip, promote-from-detail (folds after refetch), scroll clamps, tab-switch/digit reset, config flatten + raw JSON, skillSelRow row math
  • TestDrawerTabCycling updated to the new Enter contract (detail, not refresh)
  • make fmt · make vet · make lint 0 issues · make test full race suite green

Out of scope (needs odek serve)

GET /api/skills/{name} returning the SKILL.md body — the actual skill text is omitted server-side today. Once it lands, the detail view can render the full body below the description.

Enter on a memory/skills/tools/config row now expands it into a
readable block: skill description + provenance, full fact and episode
text, MCP command/args/limits, and raw JSON for nested config values.
The promote/delete gates assumed the human could see what they gate —
before this, Enter merely refreshed the list and skills' Description
fetched but never rendered.

- esc/q folds back with selection intact; p promotes in place
- detail captures keys except drawer navigation (]/[/digits)
- config list flattens one level (sandbox.enabled); deeper nests keep
  the · marker with raw JSON in the detail
- skills list renders a dim description line; windowing accounts for it
- switchDrawerTab and closePanel reset the detail submode
- all wire content rendered through sanitize()

Replaces Enter-refresh with the detail contract in TestDrawerTabCycling
and adds mgmt_detail_test.go covering expand/fold, in-place promote,
scroll clamps, tab-switch reset, config flatten, and row math.
@jkyberneees
jkyberneees merged commit 80f2eff into main Aug 22, 2026
5 checks passed
@jkyberneees
jkyberneees deleted the feat/tui-mgmt-detail-view branch August 22, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant