Skip to content

feat: add TUI features and fix benchmark pagination total count#230

Merged
jason-rl merged 9 commits into
mainfrom
jason/tui-object-create-blueprint-dup-axon-events
May 11, 2026
Merged

feat: add TUI features and fix benchmark pagination total count#230
jason-rl merged 9 commits into
mainfrom
jason/tui-object-create-blueprint-dup-axon-events

Conversation

@jason-rl
Copy link
Copy Markdown
Contributor

@jason-rl jason-rl commented Apr 29, 2026

Summary

  • Object create form: New TUI screen accessible via c shortcut from object list. Supports optional file path upload or displays pre-signed S3 URL with clipboard copy. For tar/tgz content types, a multi-item list manager allows adding multiple file paths; for other types, a single text input is shown. Switching content type syncs between the two inputs bidirectionally.
  • Benchmark tab toggle: Changed public/custom toggle from t key to Tab key with visual tab bar matching the agent list pattern.
  • Blueprint tab toggle: Added public/custom toggle with Tab key and visual tab bar matching the benchmark/agent list pattern.
  • Benchmark pagination fix: All benchmark list screens (Benchmark Definitions, Benchmark Runs, Scenario Runs, Benchmark Jobs) now correctly display total count from the API instead of current page item count.
  • Full Details viewport fix: Fixed off-by-one in DetailedInfoView overhead calculation that caused the top border to be clipped off screen when content filled the viewport exactly.
  • CLI: blueprint create --base: Duplicate a blueprint by passing --base <id|name> to blueprint create. The source blueprint's parameters are used as defaults; any other flag overrides. --name defaults to {base}-copy when --base is used.
  • CLI: axon events: New subcommand to list events for an axon. Fixed origin field to display enum names (SYSTEM_EVENT, AGENT_EVENT, etc.) instead of numeric values.
  • CLI: scenario list: New subcommand to list scenario runs with pagination and optional benchmark run ID filter.
  • Metadata support: --metadata key=value added to object upload and benchmark-job run CLI commands. TUI create screens for objects and benchmark jobs include a metadata key-value editor matching the devbox create pattern.
  • Tar archive: duplicate path rejection: createTarBuffer now rejects duplicate input paths (after path.resolve) instead of producing an invalid tar archive.
  • Tar archive: symlink support: Replaced nanotar with tar-stream. Symlinks are now stored as proper tar symlink entries (type 2) with their target in linkname, instead of being rejected. This applies to both CLI and TUI upload flows.
  • TUI tar single-file fix: When content type is tar/tgz and a single file (not directory) is specified, the TUI now uploads it as-is instead of re-archiving it. Matches the CLI behavior.
  • TUI [d] keybind consistency: Changed all [d] Remove hints in devbox create (gateway configs, MCP configs, agent mounts, object mounts) to [d] Delete to match the rest of the codebase.
  • Benchmark job metadata navigation: Fixed up/down arrow keys moving the main form cursor while editing metadata key-value pairs. Added isActive: !inMetadataSection guard to the main form input handler.
  • Benchmark list [c] keybind fix: Changed "Create Job" shortcut from c to s to avoid conflicting with the [c] = "Copy ID" convention used in detail screens. The popup already used s for this action.
  • CLI output consistency: Standardized all CLI list/get/info commands to default to JSON output and removed chalk-colored text tables from axon events, axon list, scenario list, scenario info, benchmark-job list, benchmark-job summary, and agent show. Text mode now uses the shared output() utility's uncolored key-value format.

Note: TUI axon events and SQL workbench screens have been moved to PR #233.

Test plan

Automated tests (155+ new tests)

Test file Tests Coverage
services/benchmarkJobService.test.ts 27 buildCloneParams (all source/secret variants), createBenchmarkJob (validation, config mapping), listBenchmarkJobs, getBenchmarkJob, getBenchmarkRun, listBenchmarkRunScenarioRuns
services/axonService.test.ts 15 listActiveAxons (smart search, pagination), getAxon, listAxonEvents (hasMore detection, row mapping, origin enum mapping), executeAxonSql
services/benchmarkService.test.ts 16 listScenarioRuns (both code paths), listPublicBenchmarks, createBenchmarkRun, listBenchmarkRuns, getBenchmarkRun, getScenarioRun, listBenchmarks, getBenchmark
services/objectServiceApi.test.ts 6 createObject, completeObject, uploadToPresignedUrl
services/objectService.test.ts +5 buildObjectDetailFields edge cases (hours format, missing size, public field)
commands/object/upload.test.ts +3 Symlink entries stored with correct type/linkname, symlinks inside directory trees, duplicate path rejection
commands/axon/events.test.ts 5 Output format, limit defaults, error handling
commands/blueprint/create.test.ts 26 Normal create (name+options, missing name error), --base (ID/name lookup, exact match, fallback, not found, default name, custom name, all source params copied, override per flag, preserves non-overridden params), output format, error handling
commands/scenario/list.test.ts 8 Pagination, sorting, output formats, filter, error handling
components/allocateSectionLines.test.ts 10 Zero/partial/full budget, single-field priority, null filtering, multi-section distribution

Manual tests

  • TUI: Objects list → press c → verify create form renders with Name, Content Type, File Path fields
  • TUI: Create object with non-tar content type → verify single text input for file path
  • TUI: Create object → switch content type to tar/tgz → verify file path field becomes multi-item list manager
  • TUI: Type a path in single input, switch to tar → verify path appears as 1st entry in list
  • TUI: Add multiple paths in tar mode, switch to text → verify 1st entry populates single input; switch back to tar → verify entries >=2 are preserved
  • TUI: Create object without file path → verify pre-signed URL shown, c copies to clipboard
  • TUI: Create object with file path → verify upload + completion flow
  • TUI: Create object with multiple paths and tar/tgz content type → verify archive upload
  • TUI: Object create form → add metadata key-value pairs → verify passed to API
  • TUI: Benchmark job create → add metadata key-value pairs → verify passed to API
  • TUI: Benchmark Definitions → verify Tab key toggles between Public/Custom with visual tab bar
  • TUI: Benchmark Definitions → verify old t key no longer toggles
  • TUI: Benchmark Definitions list → verify total count matches API total, not page item count
  • TUI: Benchmark Runs list → verify total count displays correctly
  • TUI: Scenario Runs list → verify total count displays correctly
  • TUI: Benchmark Jobs list → verify total count displays correctly
  • TUI: Any detail screen → press i for Full Details → verify top border is visible (not clipped)
  • TUI: Blueprint detail → verify "Duplicate Blueprint" operation is NOT shown
  • TUI: Blueprint list → verify Tab key toggles between Public/Custom with visual tab bar
  • TUI: Object create → select tar/tgz, specify a single .tar file → uploads as-is (not re-archived)
  • TUI: Object create → select tar/tgz, specify a directory → creates an archive
  • TUI: Devbox create → verify gateway/MCP/mount sections show [d] Delete consistently
  • TUI: Benchmark job create → enter metadata section → verify up/down arrows only navigate metadata items
  • TUI: Benchmark list → verify s creates a job, c no longer triggers create
  • CLI: rli blueprint create --base <id> → verify creates copy with {base}-copy name
  • CLI: rli blueprint create --base <id> --name custom → verify custom name
  • CLI: rli blueprint create --base <id> --resources LARGE → verify override applied
  • CLI: rli blueprint create --base <id> --metadata env=prod → verify metadata override
  • CLI: rli blueprint create --help → verify --base flag listed, --name not marked required
  • CLI: rli object upload <file> --metadata key=value → verify metadata on created object
  • CLI: rli benchmark-job run --agent ... --benchmark ... --metadata key=value → verify metadata
  • CLI: rli axon events <id> → verify JSON output by default, origin shows enum names
  • CLI: rli axon events <id> -o text → verify key-value output
  • CLI: rli scenario list → verify JSON output by default
  • CLI: rli scenario list -o text → verify key-value output
  • CLI: rli benchmark-job list → verify JSON output by default
  • CLI: rli benchmark-job summary <id> → verify JSON output by default
  • CLI: rli scenario info <id> → verify JSON output by default
  • CLI: rli agent show <id> → verify JSON output by default
  • CLI: Upload with duplicate paths → verify error message instead of invalid tar
  • CLI: Upload with symlink path → verify symlink stored correctly in tar archive
  • Type check: npx tsc --noEmit passes cleanly

🤖 Generated with Claude Code

@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from 6292fc7 to b58ce55 Compare April 29, 2026 17:24
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch 2 times, most recently from 55d1ccd to 5b8111f Compare April 29, 2026 20:45
@jason-rl jason-rl changed the title Add TUI object create, blueprint duplication, axon events & SQL workbench feat: add TUI object create, blueprint duplication, axon events, SQL workbench, and benchmark tab toggle Apr 29, 2026
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from 5b8111f to 537f1ad Compare April 29, 2026 22:13
@jason-rl jason-rl changed the title feat: add TUI object create, blueprint duplication, axon events, SQL workbench, and benchmark tab toggle feat: add TUI features and fix benchmark pagination total count Apr 29, 2026
@jason-rl jason-rl marked this pull request as ready for review April 29, 2026 22:43
@jason-rl jason-rl requested review from dines-rl and tode-rl April 29, 2026 22:45
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch 3 times, most recently from 38efd64 to 7c59b15 Compare April 29, 2026 23:33
@dines-rl
Copy link
Copy Markdown
Contributor

Test plan is huge because you don't have tests?

jason-rl added a commit that referenced this pull request Apr 30, 2026
Cover new CLI commands (axon events, blueprint duplicate, scenario
list), new/modified services (axonService, benchmarkJobService,
benchmarkService, objectService), and the allocateSectionLines pure
function. Export allocateSectionLines for direct unit testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch 3 times, most recently from 557c4ee to 2860697 Compare May 1, 2026 18:08
jason-rl and others added 3 commits May 5, 2026 12:48
…tadata, tar symlinks

- Object create form: TUI screen via `c` shortcut with tar/tgz multi-path
  list manager, content type switching, and pre-signed URL fallback
- Axon events & SQL workbench: paginated event table and interactive SQL
  workbench from axon detail screen
- Blueprint create --base: duplicate a blueprint by passing --base
  <name-or-id> to `blueprint create`. Source parameters are inherited
  (excluding dockerfile/base_blueprint_id); any other flag overrides.
  --name defaults to {base}-copy. Passing --dockerfile with --base
  replaces base_blueprint_id (mutually exclusive per API contract).
- Metadata key-value pairs: --metadata flag on object upload and
  benchmark-job run CLI; TUI editors on object and benchmark job create
- Tar archives: replaced nanotar with tar-stream for symlink support
  (type 2 entries); duplicate path rejection after resolve()
- Benchmark tab toggle changed from t to Tab with visual tab bar
- Benchmark pagination fix: total count from API, not page item count
- Detail viewport fix: off-by-one in overhead calculation
- CLI: axon events, scenario list subcommands
- Shared parseMetadata utility
- Removed blueprint duplication from TUI (kept in CLI via --base)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover benchmarkJobService (buildCloneParams, createBenchmarkJob),
axonService (smart search, events, SQL), benchmarkService (scenario
runs, public benchmarks), objectService (create, complete, upload),
blueprint create --base (source param inheritance, dockerfile/base
mutual exclusion, overrides per flag), axon events CLI, scenario list
CLI, allocateSectionLines, tar symlinks, and duplicate path rejection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from 2860697 to 9ff1d63 Compare May 5, 2026 19:52
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from d15aa80 to ca08384 Compare May 5, 2026 21:19
…bles

Change benchmark list 'Create Job' keybind from [c] to [s] to avoid
conflicting with [c] = 'Copy ID' convention used in detail screens.
The popup already used [s] for this action — now the main handler and
nav tip are consistent.
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from d480a63 to 357b52a Compare May 5, 2026 22:14
The TUI screens for viewing axon events and SQL workbench are being
moved to PR #233 (TUI feature parity) to better separate concerns.
This PR retains the CLI `axon events` command and service layer.

Also fixes the origin field displaying numeric values (e.g., 2 instead
of AGENT_EVENT) by adding a mapping from SQLite enum indices to string
enum names in axonService.ts.

Files moved to #233:
- AxonEventsScreen.tsx
- AxonSqlScreen.tsx
- Router/navigation integrations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason-rl added a commit that referenced this pull request May 6, 2026
Add Tab toggle between public and custom blueprints in TUI,
matching the benchmark list screen implementation from PR #230.

- Add publicOnly and includeTotalCount options to listBlueprints
- Reuse listBlueprints with publicOnly flag (no code duplication)
- Add showPublic state and Tab key handler
- Add tab bar UI between breadcrumb and search
- Update navigation tips with Tab key hint
- Fix building_complete -> build_complete typos

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason-rl added a commit that referenced this pull request May 6, 2026
Add Tab toggle between public and custom blueprints in TUI,
matching the benchmark list screen implementation from PR #230.

- Add publicOnly and includeTotalCount options to listBlueprints
- Reuse listBlueprints with publicOnly flag (no code duplication)
- Add showPublic state and Tab key handler
- Add tab bar UI between breadcrumb and search
- Update navigation tips with Tab key hint
- Fix building_complete -> build_complete typos

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from 79d6937 to b803bf5 Compare May 6, 2026 20:28
Add Tab toggle between public and custom blueprints in TUI,
matching the benchmark list screen implementation from PR #230.

- Add publicOnly and includeTotalCount options to listBlueprints
- Reuse listBlueprints with publicOnly flag (no code duplication)
- Add showPublic state and Tab key handler
- Add tab bar UI between breadcrumb and search
- Update navigation tips with Tab key hint
- Fix building_complete -> build_complete typos

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from b803bf5 to c991e1c Compare May 6, 2026 20:44
Also reject empty and duplicate metadata keys in parseMetadata.
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch 2 times, most recently from b16dac5 to a9e6a98 Compare May 11, 2026 19:46
@jason-rl jason-rl force-pushed the jason/tui-object-create-blueprint-dup-axon-events branch from a9e6a98 to fbc586a Compare May 11, 2026 19:51
@jason-rl jason-rl merged commit 7565d45 into main May 11, 2026
12 of 13 checks passed
@jason-rl jason-rl deleted the jason/tui-object-create-blueprint-dup-axon-events branch May 11, 2026 19:51
jason-rl added a commit that referenced this pull request May 11, 2026
## Summary
- Add `y` keybind to copy resource name on all detail screens (in
addition to existing `c` for Copy ID)
- Add `h` keybind to copy endpoint URL on MCP config detail screen
(shown in footer alongside Copy ID/Name)
- Enhanced clipboard feedback: shows "ID copied!", "Name copied!",
"Endpoint copied!" instead of generic message
- New `extraKeybinds`/`extraNavTips` props on `ResourceDetailPage` for
resource-specific shortcuts
- Covers all 14 detail screens via centralized change in
`ResourceDetailPage`
- TUI equivalent of clipboard buttons added in runloop-fe PR #1825

**Stacked on #230**

## Test plan
- [ ] TUI: Any detail screen → press `y` → verify "Name copied!"
feedback and correct clipboard content
- [ ] TUI: Any detail screen → press `c` → verify "ID copied!" feedback
(updated from generic "Copied to clipboard!")
- [ ] TUI: MCP config detail → press `h` → verify "Endpoint copied!"
feedback and endpoint URL in clipboard
- [ ] TUI: MCP config detail → verify `h` shortcut shown in footer
navigation tips
- [ ] TUI: Devbox detail → verify `n` still triggers "Create Snapshot"
(no conflict)
- [ ] TUI: Agent detail → verify `n` still triggers "Create Devbox with
Agent" (no conflict)
- [ ] Type check: `npx tsc --noEmit` passes cleanly

🤖 Generated with [Claude Code](https://claude.com/claude-code)
tode-rl pushed a commit that referenced this pull request May 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.17.0](v1.16.0...v1.17.0)
(2026-05-12)


### Features

* add --public flag to agent create, fix object upload --public
([#219](#219))
([6e7a8b3](6e7a8b3))
* add clipboard keybinds to detail screens
([#231](#231))
([83874ca](83874ca))
* add TUI features and fix benchmark pagination total count
([#230](#230))
([7565d45](7565d45))
* agent object picker, multi-mount support, and TUI improvements
([#217](#217))
([dbe2a5c](dbe2a5c))
* pty support ([#234](#234))
([3cfd720](3cfd720))
* smart default download path + stdin/stdout support
([#222](#222))
([419a961](419a961))
* support multi-path tar/tgz archive creation in obj upload
([#220](#220))
([3528701](3528701))


### Bug Fixes

* menu header clipping and breadcrumb hyperlink
([#221](#221))
([3ef6271](3ef6271))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants