Skip to content

Support app branches in sandbox commands - #616

Open
theunreal wants to merge 2 commits into
base44:mainfrom
theunreal:codex/sandbox-branch-support
Open

Support app branches in sandbox commands#616
theunreal wants to merge 2 commits into
base44:mainfrom
theunreal:codex/sandbox-branch-support

Conversation

@theunreal

@theunreal theunreal commented Sep 10, 2026

Copy link
Copy Markdown

Summary

  • make --branch-id <id> global and forward it through all seven sandbox commands
  • reject unsupported commands and empty branch IDs explicitly instead of silently targeting main
  • preserve existing behavior when the flag is omitted

Scope

Branch support is currently sandbox-only. functions pull/list read the app-level deployed-function map; merely passing a branch query parameter is not sufficient. They now reject explicit branch scope, as do other unsupported commands. There is no entities pull command in this CLI; use sandbox file reads for branch source files. Full branch-aware resource pull support remains separate backend/CLI work.

Testing

  • CLI production bundle build and TypeScript typecheck
  • sandbox + functions pull/list: 47 tests passed (mocked HTTP, no live E2E)
  • Biome lint/format and git diff --check

Coordination

Pairs with base44-dev/apper#23840 for the sandbox-based local-agent handoff. The CLI can release first: the old backend rejects branch-scoped sandbox payloads rather than ignoring them, and commands without the flag are unchanged.

@theunreal
theunreal force-pushed the codex/sandbox-branch-support branch from 80c2ef8 to e9c5d36 Compare September 10, 2026 08:18
carmelc
carmelc previously approved these changes Sep 10, 2026
"--name <name>",
"Optional message/title for the checkpoint (defaults to an auto-generated title)",
)
.option("--branch-id <id>", "Operate on a specific app branch")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am wondering if only the the sandbox cli commands need it, like don'tfunctions pull/entity pull (get the backend code and entity schemas) need the branch id too (I am not sure if it is covered in the feature), if it is relevant in more commands you can consider adding it to packages/cli/src/cli/program.ts (global params added to all cli commands)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good point, I made --branch-id global. sandbox commands support it, while unsupported commands like functions pull explicitly reject it instead of silently targeting main.

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