Skip to content

Unified release TUI with Ink, replacing monolithic version script#180

Merged
ScottMorris merged 10 commits intomainfrom
feat/release-tui-redesign
Mar 2, 2026
Merged

Unified release TUI with Ink, replacing monolithic version script#180
ScottMorris merged 10 commits intomainfrom
feat/release-tui-redesign

Conversation

@ScottMorris
Copy link
Copy Markdown
Contributor

Summary

  • Replaces the monolithic update-release-version.mjs (1400+ lines) with a screen-based Ink (React for CLI) TUI in tools/release-tui/, implementing the full spec at docs/release-tui/SPEC.md
  • Adds 10 SVG screen mockups and a detailed specification document covering all screens and workflows
  • Full-screen alternate-screen mode (like vim/mc) with reactive terminal resize, pinned footer, single-key hotkeys, and CI/non-interactive mode via --ci flags

Screens implemented

Screen Hotkeys Purpose
Version Bump p n j c r Patch/minor/major/custom/redo selection
Custom Version text input Free-form semver entry
Review a d b Compact summary + toggleable detail panel
Tag Conflict u t b Force-update or rename when tag exists
Build Offer b s Build phone + wear or skip
Build Progress Live progress bars for phone and wear builds
Pre-flight Failure b Shows failed prerequisite checks
Done Enter Artifact table, signatures, next steps, undo commands
Release Log Esc Recent git tags in table format
Help any key Two-column keybinding reference

Technical details

  • Framework: Ink v6 + React 19 + TypeScript (react-jsx transform)
  • Testing: 27 tests via custom ink-testing-library fork (version logic + screen rendering)
  • Workspace: Adds tools/* to pnpm-workspace.yaml, wires pnpm version:release to new entry point
  • Reactive resize: Custom useTerminalSize hook listens to stdout resize events for SIGWINCH handling
  • CI mode: --ci --bump patch|minor|major|X.Y.Z, --redo, --build, --dry-run, --no-commit, --no-web-sync

Test plan

  • pnpm --filter @threshold/release-tui typecheck passes
  • pnpm --filter @threshold/release-tui test passes (27 tests)
  • Manual: pnpm version:release launches full-screen TUI
  • Manual: All hotkeys respond correctly on each screen
  • Manual: Terminal resize re-renders layout properly
  • Manual: Detail panel divider stops at container edge (no ...)
  • Manual: esc and q quit from all screens
  • Manual: CI mode works with pnpm version:release -- --ci --bump patch --dry-run

🤖 Generated with Claude Code

ScottMorris and others added 5 commits March 1, 2026 21:22
Full specification for the unified release TUI that replaces both
`pnpm version:release` and `pnpm build:release` as separate workflows.

Includes 10 SVG screen mockups covering version bump, review, build
progress, done states, release log, tag conflict, and help overlay.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces the monolithic `update-release-version.mjs` with a screen-based
Ink (React for CLI) TUI in `tools/release-tui/`. Key changes:

- Screen-based navigation: Version Bump -> Review -> Build Offer -> Done
- Single-key hotkeys (`p/n/j/c/r/l`) matching the spec
- Detail panel toggle (`d`) on the Review screen
- Tag conflict detection and resolution screen
- Build integration with progress bars and pre-flight checks
- Release log screen showing recent git tags
- Help overlay with all keybindings
- CLI flags for CI mode (`--ci`, `--bump`, `--redo`, `--build`, `--dry-run`)
- 27 tests passing (version logic + screen rendering via `ink-testing-library`)

Adds `tools/*` to `pnpm-workspace.yaml` and wires `pnpm version:release`
to the new TUI entry point.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`pnpm --filter` runs from the subpackage's directory, so
`ensureRepoRoot()` now walks up the directory tree to find
`pnpm-workspace.yaml` and chdirs there automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ed dividers

- Enter alternate screen buffer on launch (like vim/mc)
- Pin footer to bottom by setting explicit `height` on the root Box
- Add `wrap="truncate"` to dividers so they never wrap on narrow terminals
- Add `esc` as quit/back on all screens alongside `q`
- Use `overflow="hidden"` on body to prevent content overflow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…idth

Add `useTerminalSize` hook that listens to stdout `resize` events so
the TUI re-renders on SIGWINCH. Replace static `useStdout()` sizing in
`Layout` and `Review` with the reactive hook.

Pass explicit width to `<Divider>` inside `DetailPanel` so the divider
stops at the right edge of its container instead of being truncated
with `...`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ScottMorris ScottMorris added enhancement New feature or request refactor build Build related release Release related labels Mar 2, 2026
@ScottMorris
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 297dd344e3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

**What changed**
- Switch `tools/release-tui/src/cli.tsx` to Commander-based argument parsing and default help output
- Add `commander` as a dependency for the release TUI
- Temporarily disable `@threshold/release-tui` test execution in the package script
- Remove `ink-testing-library` from release TUI dev dependencies
- Remove workspace `onlyBuiltDependencies` override for `ink-testing-library`

**Why**
- Use a more standard and maintainable CLI interface for release commands
- Avoid install/build instability from git-sourced test tooling while release automation is being prioritized
**What changed**
- Add `.github/workflows/release-build.yml` triggered by `v*` tags
- Verify tagged commits are reachable from `main` before building
- Run desktop and Android release builds in `ci-base` container jobs
- Configure Android signing from GitHub Secrets for phone and Wear builds
- Verify Android signatures and collect release artefacts for GitHub Releases
- Publish a GitHub Release with desktop and Android artefacts attached

**Why**
- Automate release packaging from version tags
- Produce signed Android artefacts consistently in CI
- Reduce manual release preparation work before Play Console upload
**What changed**
- Update core `actions/*` usage to current major versions in build, deploy, and test workflows
- Pin selected third-party actions to current stable versions
- Keep existing workflow behaviour while modernizing action dependencies

**Why**
- Reduce drift from upstream GitHub Actions releases
- Pick up maintenance and compatibility updates without changing workflow intent
**What changed**
- Add `docs/infrastructure/release-build.md` with release workflow behaviour and tagging flow
- Document required Android signing secrets and base64 keystore setup
- Link the new guide from `docs/infrastructure/README.md`

**Why**
- Give future maintainers a single reference for release CI setup
- Lower onboarding friction for signed Android release builds
**What changed**
- propagate build command failures from `runFullBuild` using `BuildFailureError`
- fail CI mode with a non-zero exit when build phases fail instead of reporting success
- show `--force` in next-step push guidance when a tag was force-updated
- implement a real custom-tag conflict path with validation and `draft.tagOverride`

**Why**
- preserves release integrity by ensuring failed builds are visible to automation
- keeps user guidance accurate after non-fast-forward tag updates
- makes the advertised tag-rename conflict option functional
@ScottMorris ScottMorris merged commit 4150074 into main Mar 2, 2026
5 checks passed
@ScottMorris ScottMorris deleted the feat/release-tui-redesign branch March 2, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build related enhancement New feature or request refactor release Release related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant