chore: rename project from system-test-sandbox to cli-box#17
Merged
Conversation
Replace all occurrences of the old project name across source code, configuration, documentation, and build files: - "system-test-sandbox" → "cli-box" - "System Test Sandbox" → "CLI Box" - "com.system-test-sandbox" → "com.cli-box" Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Rename all user-facing "sandbox" references to "cli-box":
- Cargo crates: sandbox-core → cli-box-core, sandbox-cli → cli-box-cli, sandbox-daemon → cli-box-daemon
- Binary names: sandbox → cli-box, sandbox-daemon → cli-box-daemon
- API routes: /sandbox/{id}/... → /box/{id}/...
- Config dir: ~/.sandbox/ → ~/.cli-box/
- Log files: sandbox-cli.log → cli-box-cli.log
- UI text, CI/CD, release scripts, and all documentation
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…open" Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🔒 门禁检查结果
Rust 测试覆盖率
前端测试覆盖率
✅ 所有检查通过,可以合入
|
- cli-box list help text now shows "cli-box start" instead of "sandbox start" - Update Playwright snapshot for renamed UI text Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…reuse - Daemon: add WebSocket ping/pong (10s interval) to keep renderer connection alive - Daemon: add X-Screenshot-Source + X-Screenshot-Fallback-Reason response headers - Daemon: refactor screenshot_handler into screenshot_handler + screenshot_fallback - Renderer: add WebSocket reconnection with exponential backoff (1s→30s max) - CLI: read fallback headers and warn user when ScreenCaptureKit is used - CLI: skip Electron spawn when already running (find_running_electron check) - CLI: MCP server includes screenshot_source/fallback_reason in response Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add tests guarding against previously encountered issues: - Daemon: screenshot_response header tests, request_renderer_screenshot error reason test when WebSocket not connected - CLI: find_running_electron and ScreenshotResult tests - Renderer: WebSocket reconnection with exponential backoff tests (4 tests) - E2E: screenshot fallback header verification - test.sh: add clippy, fmt, cli crate tests, and sandbox remnant grep check Also fixes: - MCP server name: sandbox-mcp → cli-box-mcp - capture_sandbox tests: tolerate Electron running (don't hard-assert failure) - find_running_electron test: use current PID instead of PID 1 (permission issue) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…stalled The CI environment installs Rust without the rustfmt component. Formatting is already checked by a separate "Rust 格式化检查" CI job, so test.sh should skip this check on Linux CI (same pattern as clippy). Co-Authored-By: Claude Opus 4.7 <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
This PR covers three main areas: project rename, screenshot reliability improvements, and comprehensive test coverage.
1. Project Rename: system-test-sandbox → cli-box
system-test-sandbox→cli-boxandSystem Test Sandbox→CLI Boxacross the entire codebasecom.system-test-sandboxtocom.cli-box.claude/settings.local.json2. Screenshot Reliability & Electron Reuse
Problems solved:
X-Screenshot-SourceandX-Screenshot-Fallback-Reasonresponse headers; CLI prints warning on stderr when fallback is usedcli-box startalways spawned new Electron windowfind_running_electron()that checks~/.cli-box/electron.jsonfor alive PID; skips spawn if already runningKey changes:
daemon/mod.rs: WebSocket ping/pong viatokio::select!,screenshot_response()helper with headers,request_renderer_screenshot()returnsResult<Vec<u8>, String>with descriptive errorsclient.rs:ScreenshotResultstruct withsourceandfallback_reasonfieldsmain.rs: CLI fallback warning on stderr, Electron reuse viafind_running_electron()main.tsx: WebSocket reconnection with exponential backoff (1s→2s→4s→...→30s max), resets on successful connection3. Comprehensive Test Coverage (224 tests)
Added tests guarding against all previously encountered issues:
screenshot_responseheader tests (2)request_renderer_screenshoterror testfind_running_electrontests (2)ScreenshotResulttests (2)test.sh improvements:
cargo clippy --all-targets -- -D warningscargo fmt --all -- --check(skipped on Linux CI, handled by separate CI job)cargo test -p cli-box-cli(previously only ran cli-box-core)4. Additional Fixes
sandbox-mcp→cli-box-mcpcapture_sandboxintegration tests: tolerate Electron running (don't hard-assert failure)find_running_electrontest: use current PID instead of PID 1 (macOS permission issue)Files Changed
daemon/mod.rs,capture/mod.rs,process/mod.rs,server/mod.rsmain.rs,client.rscapture_integration.rs,sandbox_integration.rs,config_integration.rsmain/index.ts,main.tsx,api.ts,tabState.tsscreenshotWsReconnect.test.ts(new),screenshot-fallback.spec.ts(new)test.sh,release.sh,ci.yml,release.ymlCLAUDE.md, plan docsVerification
sh test.sh— all sections pass (Rust 177 + Frontend 36 + E2E 11 = 224 tests)cargo clippy --all-targets -- -D warnings— cleancargo fmt --all -- --check— clean🤖 Generated with Claude Code