Skip to content

Allow dev-command arguments and desktop port selection - #109

Merged
wesbillman merged 6 commits into
mainfrom
brain/dev-command-ports
Sep 22, 2026
Merged

wesbillman merged 6 commits into
mainfrom
brain/dev-command-ports

Conversation

@wesbillman

@wesbillman wesbillman commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Created by Brain on behalf of Wes.

Summary

Allow multiple Buzz development copies to select different frontend ports:

just desktop --port 1430
# In another terminal/worktree:
just desktop --port 1431 --no-watch
just web --port 1432 --host 127.0.0.1
  • Forward arbitrary arguments from just web to Vite and just desktop to Tauri, using positional arguments rather than shell interpolation.
  • A small desktop adapter translates --port N / --port=N into matching Tauri devUrl and Vite beforeDevCommand settings. Tauri's own --port controls its static-file server and would not configure Vite.
  • Preserve the no-argument defaults, strict desktop port binding, and all arguments after --. Generated port configuration is prepended, before Tauri’s implicit runner-argument boundary. Explicit user --config values merge afterward and can override it. Runner-owned --port arguments need an explicit -- boundary.
  • Document parallel copies and the distinction between ports and existing credential/plugin-profile sharing. No app-runtime, dependency, or profile lifecycle changes.

Validation

Checked at 982e7cd52f5ffff5350c6771a993292cf14123b9:

  • bin/node --test tests/integration/dev-commands.test.mjs: 15 tests passed, executing the real just recipes and desktop adapter against a recording package-manager boundary. Includes default behavior, both port syntaxes, boundaries, invalid input, quoting, config order, and runner/application argument pass-through.
  • With the base justfile substituted in an isolated temporary fixture, the same coverage fails for the newly requested behavior; the no-argument defaults still pass.
  • Local smoke: two real just web --port ... servers and two real just desktop --port ... --no-watch --runner <stub> frontend servers responded concurrently. Captured Tauri's effective config confirmed matching port/URL, correct parsing even with implicit runner arguments, and preservation of an unrelated productName override.
  • Occupied desktop frontend port failed without disrupting the original server. just desktop --help forwarded successfully.
  • Pre-commit formatting/lint passed. Pre-push hooks selected no JS unit or design-system inputs; broad suites are left to existing CI. The new integration file is selected by CI's node --test tests/integration/*.test.mjs.
  • Independent review: Pinky found an implicit-runner argument ordering defect in the first adapter; fixed with a prepended config and regression coverage. Correction review reports no remaining blockers.
  • No browser test cases added or removed: this is a command/argument contract tested at the process boundary.

Native compilation and actual simultaneous native windows were not exercised: the smoke used the real Tauri CLI and Vite but substituted only the native runner. No live identity/relay activity. Full CI and code-owner approval remain separate gates.

Originating Buzz conversation: channel 3428ec3f-a58b-429b-afbc-dc6a77918ce8, thread 0470bf23405c699a93bba2d83a3791cfc50e6a1d5d63205761e1cb191a640094.

CI follow-up at 8e4e74acc39a234c475d60f046aca09d1e85c974

  • Merged main at 9053fa9, incorporating test(browser): scroll past tall rows before asserting a new reading row #110. All four browser-journey jobs then passed, including the previously failing reading-anchor assertion.
  • That run instead failed terminal::tests::bounded_input_and_session_admission during first PTY spawn with “nul byte found in provided data.” Its Node integration step was skipped. Failed Rust job.
  • With Wes's authorization, repaired only src-tauri/src/terminal/tests.rs: both shell fixtures clone one OnceLock-initialized command with explicit HOME/SHELL. Locked portable-pty 0.9.0 otherwise calls non-reentrant getpwuid during construction when parent SHELL is absent and at spawn when HOME/SHELL are omitted. The template prevents concurrent fixture constructor lookups; explicit values avoid spawn fallback lookups. No production changes, serial test mode, retries, or weakened assertions.
  • Added a fresh-process regression without parent HOME/SHELL: eight barrier-started workers each own a separate terminal registry, assert explicit command environment, and verify exact HOME/SHELL/PWD through real PTYs.
  • Local macOS arm64: bin/cargo test -p buzz-foundation --lib --locked terminal::tests -- --nocapture passed all 11 terminal tests (3 unrelated native tests filtered out). Cold build 38.68s; test execution 0.73s. This is focused validation, not a full package-suite claim; CI owns broad coverage.
  • Negative control in an isolated clone with separate Git metadata and build output: restoring both old fixture constructors while retaining the regression fails deterministically on missing explicit HOME. Restoring the candidate produces a clean tree and 11/11 passing terminal tests (0.75s). This establishes regression sensitivity, not reproduction of the historical intermittent NUL corruption.
  • Pinky's independent read-only review at 8e4e74a / tests blob 4e7456e8ac81477dd81ba758b331a729ac97bd72 reports no blocking findings. Formatting and diff checks passed; mandatory hooks passed, with no JS/design tests selected by pre-push.
  • New Linux CI results remain a separate gate. Actual native windows remain untested.

Refreshed integration head 8d5afc5726f4df8d4f22c3db9615711afb379f82

Main advanced during the repair and introduced a contributing.md conflict, which prevented PR CI from starting at 8e4e74a. Merged main 0b73a45, preserving both port documentation and local-notification guidance. The terminal fixture blob is unchanged. At this refreshed head, all 11 terminal tests (8 unrelated native tests filtered) and all 15 dev-command integration tests pass locally. That CI run completed: Rust/tool integration passed, including the previously failing admission test; Chromium shard 1 instead failed the agent-activity tooltip teardown/layout assertion described below.

Tooltip teardown repair at a5eb7da9eeb72c069f48937dfe53acda6dbcf5ab

  • Saved Chromium trace identifies the exact 910px result: after Escape the closed tooltip portal remained at x=590 with a 320px popup when the viewport became 390px. Base UI 1.8.0 awaits animation-frame completion before unmount; key delivery is not completion.
  • Five test-only lines await actual tooltip DOM removal (including hidden elements) before the next resize/click. Both immediate exact-width assertions and all geometry checks remain unchanged. No sleeps, retries, timeout increases, production CSS changes, or browser cases added/removed.
  • Full affected agent-activity.spec.mjs passed in Chromium and WebKit: 10/10, 21.4s locally. Exact test SHA256: 40bcd0cfcd49f7882e727bac9a887b8c78b493265a614554ae0981b67202f7e2. This is focused browser validation, not the full repository suite.
  • Controlled local diagnostic held the actual tooltip close-completion promise: Chromium without the removal barrier reproduces 910px; releasing teardown restores 390px. Removal-before-resize passes in both engines. WebKit did not reproduce overflow without the barrier (reported 390px), so cross-engine failure reproduction is not claimed. Diagnostic was removed, not added to the suite.
  • Pinky's independent read-only review found no blocking issue. Mandatory hooks passed; DCO is green. Fresh hosted CI is running, not yet a passing result. Simultaneous native-window acceptance remains unverified.

Brain added 2 commits September 21, 2026 13:37
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
@wesbillman
wesbillman marked this pull request as ready for review September 21, 2026 19:44
@wesbillman
wesbillman requested review from a team and comp615 as code owners September 21, 2026 19:44
@morgmart

morgmart commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Integration update: #111 is notification-only. Dock labels are now implemented in draft PR #113, stacked on this PR’s shared desktop launcher. It preserves this argument/port interface and inherited package-manager/termination path; content-keyed icons fix warm-build invalidation. No code changes are requested here for Dock labels. After #109 merges, #113 will need retargeting to main and revalidation. The mistakenly created tracker #112 is closed; #113 is the implementation.

Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Brain added 3 commits September 21, 2026 17:04
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
@wesbillman
wesbillman merged commit 16273b2 into main Sep 22, 2026
12 checks passed
@wesbillman
wesbillman deleted the brain/dev-command-ports branch September 22, 2026 00:24
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