feat: add ppv-cli, ppex and pptop CLI tools - #1
Merged
Merged
Conversation
Add CLI tools for inspecting ProtoPedia API data offline from local snapshots: - ppv-cli: one-shot, pipe-friendly CLI (JSON or tab-separated output) - ppex: interactive explorer built with Ink - pptop: top(1)-style monitor built with Ink Includes build/test tooling (TypeScript, esbuild, Vitest, ESLint, Prettier), CI workflow, and project documentation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Generated with npm install. Build and tests pass locally. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
There was a problem hiding this comment.
Pull request overview
Establishes the initial ppv26-cli project baseline: an offline snapshot-driven CLI suite (ppv-cli, ppex, pptop) plus the supporting core libraries, UI components, test suite, and CI/tooling needed to build, lint, test, and ship the binaries.
Changes:
- Adds core snapshot/config/token infrastructure and one-shot CLI commands for offline inspection.
- Adds Ink-based interactive UIs (
ppex,pptop) with shared UI components and comprehensive tests. - Adds TypeScript/build tooling, lint/format config, CI workflow, and project documentation.
Reviewed changes
Copilot reviewed 99 out of 102 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Vitest setup (timeouts/includes) |
| tsconfig.json | Base TS typecheck config |
| tsconfig.build.json | Build-only TS emit config |
| src/ui/use-terminal-size.ts | Terminal resize hook |
| src/ui/token-missing-notice.tsx | Shared missing-token UI |
| src/ui/token-missing-notice.test.tsx | Tests for token notice |
| src/ui/table-columns.ts | pptop table column SSOT |
| src/ui/table-columns.test.ts | Column logic unit tests |
| src/ui/snapshot-picker.tsx | Snapshot selection UI |
| src/ui/search-form.tsx | Search form presentation |
| src/ui/result-table.tsx | Table-style results view |
| src/ui/result-table.test.tsx | ResultTable responsive tests |
| src/ui/result-list.tsx | List-style results view |
| src/ui/prototype-raw.tsx | Raw JSON view component |
| src/ui/prototype-detail.test.tsx | Prototype detail tests |
| src/ui/preview-pane.tsx | Fixed-height preview pane |
| src/ui/multi-select-list.tsx | Multi-select list component |
| src/ui/menu.tsx | Generic menu component |
| src/ui/help-panel.tsx | pptop help overlay |
| src/ui/header.tsx | ppex metadata header |
| src/ui/creating-progress.tsx | Snapshot create progress UI |
| src/ui/creating-progress.test.ts | Progress mapping tests |
| src/pptop/top-stats.ts | pptop aggregate stats logic |
| src/pptop/top-header.tsx | pptop header rendering |
| src/pptop.tsx | pptop CLI entrypoint |
| src/ppex/ppex-app.test.tsx | ppex integration tests |
| src/ppex.tsx | ppex CLI entrypoint |
| src/ppc/snapshot-loader.ts | Snapshot selection/load helpers |
| src/ppc/output.ts | Stdout/stderr output helpers |
| src/ppc/format-prototype-row.ts | Tab-separated row formatter |
| src/ppc/format-prototype-row.test.ts | Row formatter tests |
| src/ppc/explorer.ts | CLI search/filter logic |
| src/ppc/explorer.test.ts | Explorer logic tests |
| src/ppc/commands/snapshot-list.ts | ppc snapshot list |
| src/ppc/commands/snapshot-create.ts | ppc snapshot create |
| src/ppc/commands/snapshot-create.test.ts | Snapshot create tests |
| src/ppc/commands/prototype-show.ts | ppc prototype show |
| src/ppc/commands/prototype-search.ts | ppc prototype search |
| src/ppc/commands/prototype-list.ts | ppc prototype list |
| src/ppc/commands/data-stats.ts | ppc data stats |
| src/ppc/commands/data-analyze.ts | ppc data analyze |
| src/ppc/commands/config-show.ts | ppc config show |
| src/ppc/commands/config-show.test.ts | Config show tests |
| src/ppc/commands/config-set-token.ts | ppc config set-token |
| src/ppc/commands/config-set-token.test.ts | Set-token tests |
| src/ppc/commands/config-init.ts | ppc config init |
| src/ppc/commands/config-init.test.ts | Config init tests |
| src/core/version.ts | Runtime/bundled version logic |
| src/core/user-dirs.ts | User directory layout |
| src/core/token.ts | Token resolution + messages |
| src/core/snapshot-delete.ts | Snapshot deletion utility |
| src/core/snapshot-delete.test.ts | Deletion tests |
| src/core/snapshot-catalog.ts | Snapshot naming/listing logic |
| src/core/snapshot-catalog.test.ts | Catalog tests |
| src/core/session.ts | Interactive session loader/creator |
| src/core/session.test.ts | Session tests |
| src/core/search-model.ts | Shared UI search model |
| src/core/sanitize-display-text.ts | Control-char display sanitization |
| src/core/sanitize-display-text.test.ts | Sanitizer tests |
| src/core/repository-factory.ts | PROMIDAS repository builder |
| src/core/protopedia-utils.ts | ProtoPedia URL helpers |
| src/core/logger.ts | Stderr logger + level resolution |
| src/core/logger.test.ts | Logger tests |
| src/core/list-window.ts | Cursor-following windowing |
| src/core/list-window.test.ts | Windowing tests |
| src/core/format.ts | Shared formatting helpers |
| src/core/format.test.ts | Format tests |
| src/core/file-io-errors.ts | File I/O error messages |
| src/core/constants.ts | Shared constants + stale logic |
| src/core/constants.test.ts | Constants tests |
| src/core/config-validation.ts | Config startup gate |
| src/core/config-validation.test.ts | Validation tests |
| src/core/config-file.ts | Config file RMW helpers |
| src/core/config-file.test.ts | Config-file tests |
| src/core/config-entries.ts | Config parsing + SSOT |
| src/core/config-entries.test.ts | Config entries tests |
| src/core/clipboard.ts | Clipboard integration |
| scripts/stub-react-devtools-core.mjs | Devtools stub for bundling |
| scripts/build-ink.mjs | esbuild bundling for Ink CLIs |
| README.md | User-facing docs |
| prettier.config.mjs | Prettier configuration |
| package.json | Package metadata + scripts |
| LICENSE | MIT license |
| eslint.config.mjs | ESLint configuration |
| DEVELOPMENT.md | Contributor/development docs |
| CHANGELOG.md | Changelog skeleton |
| .prettierignore | Prettier ignore rules |
| .markdownlint.yaml | Markdown lint config |
| .gitignore | Git ignore rules |
| .github/workflows/ci.yml | CI workflow |
| .gitattributes | LF normalization |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+90
to
+96
| : ''; | ||
| return ( | ||
| <Box key={item.label} flexDirection="column"> | ||
| <Text | ||
| color={index === cursor ? 'cyan' : undefined} | ||
| dimColor={item.disabled === true && index !== cursor} | ||
| > |
The Node 22 on windows-latest CI job consistently fails the timing-sensitive ppex-app tests (5 runs in a row, surviving the per-test retries), while the same code passes on ubuntu and on Node 24 after rerun. The only moving part is the toolchain in the lockfile, where vite resolves to 8.1.5 (released 2026-07-16). Pin vite to 8.1.4 via overrides as a diagnostic: if the job turns green, the vite patch is what shifts the Ink rendering timing past what these tests tolerate. This pin may be reverted or replaced by a proper test fix once the cause is confirmed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop the vite override (pinning vite alone did not help: both Windows jobs still failed) and instead resolve the remaining toolchain transitives (flatted, obug, @emnapi/*, lightningcss, postcss, eslint-utils) to the versions that consistently pass the Windows CI jobs elsewhere. Diagnostic step: if the Windows jobs turn green, one of these patch updates destabilizes the ppex-app tests; if they stay red, dependency versions are ruled out entirely. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The pinned and downgraded toolchain resolutions did not change the Windows CI failures, so dependency versions are ruled out as the cause. Go back to the resolutions npm install produces; the test flakiness is addressed separately on the test side. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The ppex-app scenarios drive multi-screen key sequences and wait for each transition with vi.waitFor, whose 1s default can expire on slow Windows CI runners before Ink finishes re-rendering, even though the suite-level testTimeout already allows 15s per test. - Wrap the waits in a waitForFrame helper with an explicit 5s timeout. - Move the snapshot-manager row assertions inside the wait: the rows and their file sizes load asynchronously after the screen mounts, so asserting them right after the title appears was racy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
/gemini review |
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Menu and MultiSelectList are generic components, so they cannot assume that callers pass unique labels; a duplicate label would collide as a React key. The rows are stateless Text/Box nodes and the cursor lives in the component itself, so index keys carry no remount downside here. Addresses the Copilot review comments on PR #1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Set up the project baseline for ppv26-cli:
ppv-cli: one-shot, pipe-friendly CLI (JSON or tab-separated output)ppex: interactive explorer built with Inkpptop: top(1)-style monitor built with InkNote:
npm publishis intentionally blocked via theprepublishOnlyguard until the npmjs publish setup is ready.🤖 Generated with Claude Code