Skip to content

feat(profiles): add owner runtime configuration tab - #252

Open
kalvinnchau wants to merge 5 commits into
mainfrom
peon/profile-owner-runtime-config
Open

kalvinnchau wants to merge 5 commits into
mainfrom
peon/profile-owner-runtime-config

Conversation

@kalvinnchau

Copy link
Copy Markdown
Contributor

Change

  • Adds an owner-only Runtime tab to the profile panel. It shows:
    • a start-on-launch switch;
    • respond-to, backend and command;
    • effective model/provider rows;
    • advanced settings;
    • an itemized restart diff.
  • The copy follows base Buzz (20131488).
  • start_on_app_launch is a separate persisted preference.
    • Legacy records fall back to enabled.
    • New and imported records store an explicit false.
    • It is set through agent_control_start_on_app_launch, which is granted to the main window only.
  • Queued restore now checks for an explicit user action before it touches a pending Start ticket or reads a credential. A Stop or Start issued during restore is honored.
  • Environment values never cross IPC. Snapshots carry only key names, and the UI shows "Set by environment (KEY)".

Verification

  • cargo fmt --check: pass.
  • clippy --all-targets -D warnings on buzz-agent-controller and buzz-foundation: pass.
  • Native tests: controller 61 passed / 1 ignored, build-config 11 passed, foundation 64 passed / 3 ignored. They include:
    • an overlapping-restore test that uses the real host, IPC Stop/Start and per-credential gates;
    • a real-handler start-on-launch persistence test covering write failure, retry and reopen;
    • key-only snapshot regressions.
  • pnpm check: pass.
  • Chromium/WebKit profile journeys: 8/8.
  • Full Vitest was green at an earlier commit in this branch. At the final SHA, a loaded host hits the dev/vite-config.test.mjs 10 s spawnSync timeout. The same timeout occurs on b276b867, which does not contain this branch.
  • Windows: the Unix-only overlap fixtures are gated in one cfg(unix) module. This was checked with a cfg-disabled proxy only; the on-demand Windows CI lane has not run.
  • Not covered:
    • a rendered click inside a running Tauri webview;
    • OS credential dialogs;
    • a child-observed model/provider selector matrix;
    • the packaged runtime.

peon and others added 5 commits September 24, 2026 19:16
Co-authored-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
Grant agent_control_start_on_app_launch to the main webview, fence queued
launch restore against explicit Start/Stop, save the launch preference off
for created and imported agents, show the model and provider the next start
resolves, report the launch preference in the agent editor, restore base
copy, and drop the unread MCP servers section.

Co-authored-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
launchModel/launchProvider now project only saved selectors and build
defaults. When a saved environment override decides a selector, the
snapshot names its key (launchModelEnv/launchProviderEnv) and omits the
value, covering the worker model/provider keys and DATABRICKS_MODEL.

Co-authored-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
…ixtures

Add a deterministic credential-gate host test: two launch-enabled agents,
Stop and explicit Start during an in-flight restore, late credential
completion, and fence reset on a fresh host. Add a real IPC test for
agent_control_start_on_app_launch covering persistence, revision
stability, write failure, unknown id and reopen. Extend the snapshot
withholding test with empty and combined overrides and make the
ProfileRuntime fixture match the native projection.

Co-authored-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
Co-authored-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: Kalvin Chau <kalvin@block.xyz>
Signed-off-by: peon <9ac6794b000690b7e814eb1805ad32405d0bec7d52838de3a86cf967565dacc0@buzz.block.builderlab.xyz>
@kalvinnchau
kalvinnchau requested review from a team, comp615 and wesbillman as code owners September 25, 2026 04:30

@wesbillman wesbillman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Carl, an automated reviewer, commenting via Wes’s GitHub account.

Changes requested: one P2 browser-fixture regression, detailed inline. Merge criteria: restore coherent launch-preference fixtures and both stopped-state branches without dropping lifecycle assertions, then pass the required CI gate. Do not change the independent production launch preference to satisfy legacy test expectations.

Source review covered owner/native-record gating, preference persistence, main-window IPC permissions, restore-versus-explicit-action ordering, and saved/running configuration redaction. No additional demonstrated production blocker survived integration review.

Existing exact-head CI, on this head merged with base df7b7e7f45739f3e06e12d81623385701acdc51d, failed 16 browser case executions (eight per engine). Vitest (3,702), Rust/tool integration and the other browser shards passed. Review was source-only on Blox; no PR code executed or CI rerun. The new Runtime tab has component coverage, not a browser journey; native webview, packaged/macOS/Windows runtime and OS credential-dialog acceptance remain unverified.

status: "running",
error: null,
diagnostics: ["Listener process started; readiness is unverified."],
startOnAppLaunch: true,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[P2] Preserve the browser fixture’s launch-preference contract

Adding startOnAppLaunch: true makes the shared fixture behave like an explicitly opted-in record. Its action() (lines 82–88) clears enabled on Stop but leaves this flag true, so AgentEditor now renders “Stopped · starts with buzz-app.” The unchanged browser fixture uses this factory, while seven positive assertion sites in tests/browser/agent-control.spec.mjs (141, 366, 436, 816, 837, 856, 863) still expect the preference-off text. CI run 36094738270 fails eight cases in each of Chromium and WebKit as a result.

This also aborts the tests before their late-launch supersession/pending-launch cleanup, unavailable-runtime IPC, and import-preview assertions. It is not a production Stop bug: native legacy records derive the flag from enabled, while an explicit preference must survive Stop.

Make the fixtures deliberately distinguish legacy fallback from an explicitly set preference, including the copied-agent/custom-action browser cases. Alternatively, update the scenarios intentionally while preserving equivalent branch and lifecycle coverage. Keep a stopped/preference-off witness and an explicit-preference-on-after-Stop witness; a blanket string replacement loses the former. Restore the required gate without changing production preference semantics.

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