You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(cli): group runtime modules by responsibility - #42378
Group CLI runtime modules by the responsibility they own so connection, pairing, launching, and supervision code is easier to find.
What Changed
Move 71 whole modules into commands, status, connection, app-launch, pairing, profile, and serve startup/supervision/updates groups. Keep the substantive client, launcher, and executable-discovery owners at the root with seven associated tests. Executable discovery keeps its native resource anchor.
Update real consumers and replace 21 surviving borrowed bindings with concrete defining-owner imports. Remove two forwarding declarations and the one-statement envelope-schema facade. Keep the shared envelope schema at its single real owner. No barrels or forwarding wrappers are added.
Transport compiler/workflow/E2E selectors and 11 active metadata paths without changing budgets or rules. Preserve current plugin build/package entries and complete historical timing. Add the supported current-command mapping for one dated test receipt while preserving its originally executed command and results. The response-framing benchmark keeps its historical Git source path, baseline source, workloads, mocks, and algorithm; a bounded resolver maps three old sibling paths to the same current owners while the current arm loads the moved transport.
Why
The flat runtime directory mixed connection handling, installation/profile paths, pairing, application discovery, and long-running serve supervision. This batch groups whole owners while retaining the central entry points.
Linked Issue
Internal maintenance; no existing issue.
Visual Proof
N/A
No intended visual or interaction change; no renderer or mobile Programs are affected. Two existing hidden runtime flows exercised the real CLI connection and terminal lifecycle surfaces.
Testing
Full pnpm tc; desktop production, CLI, and desktop E2E builds.
51 affected unit files: 192 passed, 5 skipped; hosted-review corrections: 2 files, 9 passed. Two hidden Electron flows passed: headless CLI terminal retention and durable whole-tab close across restart.
Two independent source audits and an independent test audit bind the exact final tree, owner identity, runtime order, selectors, historical benchmark resolution, and metadata carry.
No new tests for moves. Apply the repository test policy to two mock-only local tests and 62 original-coordinate spans across 19 local test modules; remove the now-unobserved counter declaration/increment in the supervision test. Retain 156 local registrations, 200 known cases, and 431 original expectations. Hosted review prompted two narrow observations in existing cases: forbid QR payload glyphs in redacted output and observe the valid mounted-AppImage source path; no new test cases or production-derived output oracle. Preserve retained calls/awaits, socket/filesystem/security/process-argument contracts, all incoming test bodies, and support modules.
Final pnpm check:changed: all 36 checks passed in 53.7s immediately before publication. Required hosted aggregate remains a merge gate.
Risk
Level: Low. Incorrect paths could break CLI discovery, pairing, requests, serve startup, or supervision. Whole bodies, binding names, canonical schema/error owners, runtime requests, resource anchors, selectors, and supervisor state are audited. The packaged interpreter retains its early environment handling. A plain revert restores the old layout; there is no data migration. Native-focus and Windows-only tests are not run on the local macOS desktop.
Review
Independent source and test audits precede application; required hosted checks must pass before merge. No human approval claimed.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Tracker and detailed evidence stay local. No design docs are committed.
Checklist
Focused on CLI runtime ownership
Explained what changed and why
Stated risks and revert plan
N/A visual change with reason
Audited final candidate and completed validation
Cross-platform, remote, mobile, and folder workspace impacts considered
No actionable comments were generated in the recent review.
Walkthrough
The CLI runtime modules now use reorganized subdirectories for connection, profile, pairing, app launch, status, and serve functions. CLI consumers, tests, workflow filters, baselines, configuration, and scripts now reference those paths. The changes also remove selected type re-exports and test assertions. Most listed runtime behavior and function signatures remain unchanged.
Merge Risk: Low · up to 51249
This is a mechanical path reorganization with no intended runtime behavior change. Some tests had assertions weakened, including the pairing-output redaction check, so a regression in that output could go unnoticed. Restoring those assertions is a low-effort follow-up that does not block merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title uses the conventional refactor(cli) prefix and names the main change: CLI runtime modules were regrouped by responsibility. The raw summary and PR objectives confirm that the change moves 71…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the repository template closely. It has ELI5, What Changed, Why, Testing, Risk (Level: Low, with a revert plan), Agent skill upstream boundary, Notes, and Checklist sections. T…
Full details: Title check
Explanation
The title uses the conventional refactor(cli) prefix and names the main change: CLI runtime modules were regrouped by responsibility. The raw summary and PR objectives confirm that the change moves 71 runtime modules into responsibility-based groups such as connection, pairing, profile, app-launch, and serve subdirectories. The title is specific and matches the changeset.
Full details: Description check
Explanation
The description follows the repository template closely. It has ELI5, What Changed, Why, Testing, Risk (Level: Low, with a revert plan), Agent skill upstream boundary, Notes, and Checklist sections. The Visual Proof section is marked N/A with a reason. The Linked Issue section says 'Internal maintenance; no existing issue', which does not meet the template's requirement to link an issue. The author is not identified as a stablyai maintainer, so the requirement to link an issue applies. The AI Disclosure section is absent. The Review section states that no human approval is claimed. The Testing section is detailed, but it is dense and hard to follow, and it uses terms such as 'hosted-review corrections' and 'original-coordinate spans' without explanation. The 'What Changed' section also gives the mechanism, but the before and after from the user's view is thin. Some parts of the template are missing or incomplete, but the description is mostly complete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The remaining tests accept the expected exit codes even if preflight stops printing the failure reason or --force guidance. Restore stderr capture and the removed assertions to protect these recovery diagnostics.
The test now discards the result for a valid mounted executable. Its remaining assertion checks only an unrelated executable. If the mounted branch always returns null, this test still passes.
Assert the returned appImagePath and runningKey against independent fixture expectations. Keep this check in the existing test.
Both tests now discard spawnChild. An exit code of 0 does not establish that resumption avoided spawning a replacement. Retain spawnChild and assert expect(spawnChild).not.toHaveBeenCalled() in both tests. This preserves the behavior named by the tests without adding another execution.
These calls now discard the text returned by status(false). The tests can no longer detect a missing session ID or refusal code in text output. Assert the resolved session ID in the first case and the refusal code in the second case. The existing helper already captures the output.
Also applies to: 158-158
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 34fc54d4-b5bc-4f0b-9bd5-5e62f8dcb0f8
Commits
Reviewing files that changed from the base of the PR and between 4668c79 and 55fb418.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Security & Privacy · Quick win
Restore the exact redacted-output assertion.
A QR line can encode pairing information without containing the literal string secret. The remaining assertion accepts that line, so this test no longer detects that exposure. Restore the assertion that checks the complete retained output, including the hidden pairing message. filecitesource_other
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…261's moved modules
Upstream regrouped the modules they import: speech types (stablyai#42702), the
secret store (stablyai#42781), the window shortcut policy (stablyai#42772), the
non-secure-context UUID helper (stablyai#42777), the CLI runtime client types
(stablyai#42378), and the browser grab hook and context menu folder (stablyai#42478). The
shared keybindings facade is gone, so the CLI preference service imports
each owner directly.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
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.
ELI5
Group CLI runtime modules by the responsibility they own so connection, pairing, launching, and supervision code is easier to find.
What Changed
Move 71 whole modules into commands, status, connection, app-launch, pairing, profile, and serve startup/supervision/updates groups. Keep the substantive client, launcher, and executable-discovery owners at the root with seven associated tests. Executable discovery keeps its native resource anchor.
Update real consumers and replace 21 surviving borrowed bindings with concrete defining-owner imports. Remove two forwarding declarations and the one-statement envelope-schema facade. Keep the shared envelope schema at its single real owner. No barrels or forwarding wrappers are added.
Transport compiler/workflow/E2E selectors and 11 active metadata paths without changing budgets or rules. Preserve current plugin build/package entries and complete historical timing. Add the supported current-command mapping for one dated test receipt while preserving its originally executed command and results. The response-framing benchmark keeps its historical Git source path, baseline source, workloads, mocks, and algorithm; a bounded resolver maps three old sibling paths to the same current owners while the current arm loads the moved transport.
Why
The flat runtime directory mixed connection handling, installation/profile paths, pairing, application discovery, and long-running serve supervision. This batch groups whole owners while retaining the central entry points.
Linked Issue
Internal maintenance; no existing issue.
Visual Proof
N/A
No intended visual or interaction change; no renderer or mobile Programs are affected. Two existing hidden runtime flows exercised the real CLI connection and terminal lifecycle surfaces.
Testing
pnpm tc; desktop production, CLI, and desktop E2E builds.pnpm check:changed: all 36 checks passed in 53.7s immediately before publication. Required hosted aggregate remains a merge gate.Risk
Level: Low. Incorrect paths could break CLI discovery, pairing, requests, serve startup, or supervision. Whole bodies, binding names, canonical schema/error owners, runtime requests, resource anchors, selectors, and supervisor state are audited. The packaged interpreter retains its early environment handling. A plain revert restores the old layout; there is no data migration. Native-focus and Windows-only tests are not run on the local macOS desktop.
Review
Independent source and test audits precede application; required hosted checks must pass before merge. No human approval claimed.
Agent skill upstream boundary
Notes
Tracker and detailed evidence stay local. No design docs are committed.
Checklist