Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: migrate blox CLI to sq blox and conditionally show remote branches#74

Merged
wesbillman merged 3 commits intomainfrom
detect-sq
Feb 12, 2026
Merged

feat: migrate blox CLI to sq blox and conditionally show remote branches#74
wesbillman merged 3 commits intomainfrom
detect-sq

Conversation

@wesbillman
Copy link
Collaborator

Summary

Migrate all blox CLI invocations to sq blox and conditionally render the remote branch UI based on whether the sq CLI is available on the user's system.

Changes

Rust (acp-client)

  • types.rs: Make find_command public so it can be reused across crates
  • lib.rs: Re-export find_command from the crate root
  • driver.rs: Replace find_command("blox") with find_command("sq") and update args to ["blox", "acp", ...]; remove unused FLUSH_INTERVAL constant and Duration import

Rust (staged/src-tauri)

  • blox.rs: Add sq_binary() helper that locates sq via find_command; update run() to invoke sq blox <args…> instead of blox <args…>; add is_sq_available() public function; update all error messages to reference sq/sq blox
  • lib.rs: Register is_sq_available as a Tauri command; remove unused setup_worktree command

Frontend (staged/src)

  • commands.ts: Add isSqAvailable() binding; remove unused setupWorktree export
  • sq.svelte.ts (new): Reactive store that caches sq CLI availability — checked once at startup, read synchronously by components
  • App.svelte: Call refreshSqAvailability() on mount (non-blocking)
  • NewBranchModal.svelte: Read sqState.available from the store; only render the Local/Remote toggle when sq is detected

Testing

  • Verified with sq installed: remote branch toggle appears, remote branch creation works via sq blox
  • Verified without sq: toggle is hidden, only local branches are offered
  • Pre-push hooks pass (lint + typecheck)

- Replace direct `blox` binary calls with `sq blox` in blox.rs and driver.rs
- Make `find_command` public in acp-client for reuse across crates
- Add `sq_binary()` helper that locates `sq` via `find_command`
- Update all error messages to reference `sq`/`sq blox`
- Add `is_sq_available` Tauri command to detect `sq` CLI presence
- Add `isSqAvailable()` frontend command binding
- Conditionally render remote branch toggle in NewBranchModal only
  when `sq` is available on the system
- Use public re-export `acp_client::find_command` instead of private
  `acp_client::types::find_command` in blox.rs
- Remove unused `FLUSH_INTERVAL` constant and `Duration` import from
  driver.rs
- Add sq.svelte.ts store with sqState reactive object and
  refreshSqAvailability() function that checks once and caches
- Call refreshSqAvailability() in App.svelte onMount (non-blocking)
- Update NewBranchModal to read sqState.available from the store
  instead of calling isSqAvailable() on every dialog open
- Removes per-open delay when launching the new branch dialog
@wesbillman wesbillman merged commit eb5450f into main Feb 12, 2026
2 checks passed
@wesbillman wesbillman deleted the detect-sq branch February 12, 2026 20:28
loganj added a commit that referenced this pull request Feb 26, 2026
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.

1 participant