Skip to content

Add PRD for Inspector TUI (Terminal User Interface)#71

Draft
nadyyym wants to merge 3 commits into
stagingfrom
claude/tui-inspector-prd-fiv2B
Draft

Add PRD for Inspector TUI (Terminal User Interface)#71
nadyyym wants to merge 3 commits into
stagingfrom
claude/tui-inspector-prd-fiv2B

Conversation

@nadyyym
Copy link
Copy Markdown
Member

@nadyyym nadyyym commented Apr 6, 2026

Comprehensive product requirements document covering interactive TUI views
(dashboard, signals, identities, integrations, memory), CLI mode with JSON
output for scripting, authentication flow, technical architecture using
Ink/React, and 4-milestone delivery plan.

https://claude.ai/code/session_01VqJx72QpxH8GN9W3HpLCQF

Comprehensive product requirements document covering interactive TUI views
(dashboard, signals, identities, integrations, memory), CLI mode with JSON
output for scripting, authentication flow, technical architecture using
Ink/React, and 4-milestone delivery plan.

https://claude.ai/code/session_01VqJx72QpxH8GN9W3HpLCQF
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beton-inspector Ready Ready Preview, Comment Apr 6, 2026 6:39pm

Request Review

@nadyyym nadyyym changed the base branch from main to staging April 6, 2026 17:59
- Fix API key prefix from insp_ to beton_ (matches codebase)
- Rename CLI binary from `inspector` to `beton` (avoids PATH conflicts)
- Split Accounts vs Identities into separate views with proper data models
- Add Account detail view with health/expansion/churn score breakdown
- Add F8: MCP Sessions viewer with request logs
- Add F9: API Key management (create, list, revoke)
- Add pagination to all list views (cursor-based, 30 rows/page)
- Add --workspace global flag for multi-workspace usage
- Define JSON output contract (envelope with data + meta)
- Fix signal filter to include "inactive" status
- Replace deprecated keytar with encrypted credential file
- Add Ink 4 ESM-only note and build pipeline guidance
- Add --json schema documentation for scriptability
- Remove resolved open question (workspace switching via --workspace flag)

https://claude.ai/code/session_01VqJx72QpxH8GN9W3HpLCQF
Implements a complete CLI/TUI using Commander.js for command parsing and
Ink (React) for interactive terminal rendering. The TUI provides all core
Inspector functionality from the terminal with both interactive and JSON
output modes for scripting.

Architecture:
- Entry point: src/cli/index.ts (Commander.js with global --json, --workspace, --api-url flags)
- Build: tsup.config.ts bundles CLI separately from Next.js (ESM, node18 target)
- API client: standalone HTTP client with Bearer auth (src/cli/lib/api-client.ts)
- Config: ~/.beton/config.toml management with minimal TOML parser
- Auth: API key storage in ~/.beton/credentials with 0600 permissions

Commands: dashboard, signals (list/show/delete), accounts (list/show),
identities, integrations (list/test/configure), login/logout/whoami,
keys (list/create/revoke), mcp (sessions/logs)

Interactive views: Dashboard with metric cards, signals/accounts/identities
lists with keyboard navigation and pagination, signal/account detail views
with score visualizations, integrations with connection testing, MCP session
viewer, API key management.

Dependencies added: commander, ink@6, ink-spinner, ink-text-input, tsup

https://claude.ai/code/session_01VqJx72QpxH8GN9W3HpLCQF
@nadyyym nadyyym self-assigned this Apr 15, 2026
@nadyyym nadyyym marked this pull request as draft April 15, 2026 06:56
Copy link
Copy Markdown
Member Author

@nadyyym nadyyym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Diff Inflation Diagnosis

This PR shows 264 files / +28,911 / -1,287 but the actual unique content is much smaller. The branch forked from an old staging point (75 commits behind). Using git log --cherry-pick --right-only, only 6 commits are truly unique:

Commit Description Scope
95b0f02 PRD document (540 lines) docs/prd-tui-inspector.md
62d6739 PRD review fixes (223+/55-) docs/prd-tui-inspector.md
53fdeb7 Full TUI implementation (5,055 lines, 35 files) src/cli/, build config
033fa77 Apple app site association public/.well-known/ (unrelated)
a96874b Block search crawlers public/robots.txt (unrelated)
d63f9d0 Add robots.txt public/robots.txt (unrelated)

True scope: ~36 files, +5,763 / -9 for the relevant commits.

Critical Problems

1. Scope creep -- PR bundles implementation with PRD

The title says "Add PRD" but commit 53fdeb7 adds a complete TUI implementation (3,482 lines of TypeScript in src/cli/, 5 new npm deps, tsup.config.ts, bin field in package.json). A PRD PR should not include implementation code.

2. Branch would delete staging code

Because the branch diverged 75 commits ago, merging it would effectively delete the Postgres data source connector (15 files, 1,774 lines) that staging has since added.

3. CI never ran -- diff too large for GitHub to render, so nextjs-ci and claude-review were never triggered.

4. 3 unrelated commits included (robots.txt, apple-app-site-association).

PRD Quality Assessment

The PRD itself (docs/prd-tui-inspector.md, 708 lines) is high quality:

  • Covers all TUI views (dashboard, signals, accounts, identities, integrations, signal creation, MCP sessions, API keys)
  • CLI mode with --json output, exit codes, and piping examples
  • Practical auth flow (beton login opens browser for OAuth, --api-key for headless/CI, ~/.beton/credentials with 0600 perms)
  • Justified tech choice (Ink/React aligns with existing codebase)
  • ASCII wireframes for every view
  • Clear 4-milestone delivery plan with success metrics
  • Minor: says "Ink 4+" but implementation installs Ink 6 -- should be consistent

Recommended Action

Close this PR and re-create as two clean PRs:

  1. PR A -- PRD only: Fresh branch from current staging, cherry-pick the PRD doc. Clean 1-file, ~708-line PR for requirements review.
  2. PR B -- TUI implementation: Fresh branch from staging, cherry-pick src/cli/ implementation. Review as a proper code PR after PRD approval.
  3. Robots.txt commits: Separate small PR or include in an existing one.

Verdict

The PRD content is strong -- comprehensive, practical, well-structured. But the PR is not mergeable in its current state due to stale branch (would delete staging code), bundled implementation, and no CI. The fix is git hygiene: rebase and split.

Review by Claude Code

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