Skip to content

Conversation

@jonathanlab
Copy link
Contributor

@jonathanlab jonathanlab commented Dec 22, 2025

CLI for stacked PR management using JJ. Generally makes JJ easier to grasp.

Consists of a core package and a cli app. The CLI is fairly thin, and all functionality occurs in core, so we can directly use that via the Array desktop app as well.

jonathanlab and others added 5 commits December 21, 2025 22:58
Adds two new packages for the Array CLI stacking workflow:

@array/core - Core library with:
- JJ wrapper for jujutsu commands
- GitHub API integration for PR management
- Config/state management
- Stack comment generation for linked PRs
- Workspace management
- Mock executor for testability

@array/cli - Command-line interface with:
- Stacking commands (create, up, down, top, bottom, log)
- Changeset commands (enable, disable, swap, status, list)
- PR workflow (submit, sync, restack)
- GitHub auth integration
- Interactive prompts

Test coverage (289 tests):
- Unit tests with mocked executors
- Integration tests with real git/jj repos
- E2E tests for CLI commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Convert vitest.config.ts from CommonJS to ESM syntax
- Temporarily disable electron-trpc tests due to missing dependencies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- `pnpm test:bun` - runs @array/core and @array/cli tests (bun)
- `pnpm test:vitest` - runs array app and electron-trpc tests (vitest)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
const changes: FileChange[] = [];

for (const line of lines) {
const match = line.match(/^([MADR])\s+(.+)$/);

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This regular expression that depends on library input may run slow on strings starting with 'A ' and with many repetitions of ' '.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

stale

jonathanlab and others added 6 commits December 22, 2025 17:12
Previously, modify just called jj.status() and printed success.
Now it properly calls jj squash to squash working copy into parent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Previously arr top just navigated to the topmost described change.
Now it creates an empty @ above the stack (if not already there),
matching the STORIES.md expectation: "Empty @ above stack top".

Uses jj directly to check if @ is empty/undescribed with no children.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The revset `trunk()..heads(trunk()..)` was including immutable
remote-tracking branches that clutter the log. Now uses
`mutable() & trunk()..heads(trunk()..)` to show only mutable changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Add updatePRBase() to GitHub class for updating PR base branches
- updateStackComments() now updates PR base when stack changes after merge
- STATUS_TEMPLATE now includes 'empty' field, parsed correctly
- navigateTop test updated to match new behavior (creates empty @ above stack)
- STORIES.md: removed .array/config.json (fully stateless), merged duplicate sections,
  clarified arr create requires file changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@charlesvien charlesvien changed the title feat/arr-cli feat: Array CLI Dec 23, 2025
@jonathanlab jonathanlab changed the title feat: Array CLI feat: arr CLI Dec 23, 2025
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