Skip to content

feat(desktop): show saved Run on settings when editing an agent - #4539

Merged
tlongwell-block merged 2 commits into
mainfrom
eva/edit-agent-run-on
Aug 3, 2026
Merged

feat(desktop): show saved Run on settings when editing an agent#4539
tlongwell-block merged 2 commits into
mainfrom
eva/edit-agent-run-on

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

What

When editing an agent, show where it runs. The edit dialog previously showed nothing about the backend; the "Where to run" section only existed in the create flow. This adds a read-only Run on section to AgentInstanceEditDialog:

  • Local agents: "This computer".
  • Provider agents (e.g. Kubernetes): the provider id plus its saved config rows — context, namespace, image, resources, etc. — with labels humanized from the stored keys and rows in provider-schema order (locators first, request/limit pairs adjacent, alphabetical spillover for unknown providers).
  • Copy states these are the settings saved at creation and that the run location can't be changed afterwards (a new agent is required).

Design decisions (from thread review with @wren + @sami)

  • No provider probe on edit. info is executable work, and its schema reflects the plugin today (including a freshly generated random namespace default) — not what this agent was deployed with. The stored record is the only honest source.
  • Saved settings, not effective settings. Optional fields a record omits (e.g. service_account) are defaulted by the provider at deploy time; we render only what was persisted and never synthesize today's defaults.
  • Safe rendering of opaque provider config. Values render as safe scalars only; arrays/objects degrade to a summary row (React throws on object children — a hand-edited record must not crash the dialog). Falsy-but-present values (0, false) render honestly. Secret-shaped keys are redacted using the same word-split heuristic as the create-time validate_provider_config gate — one definition of "looks like a secret". The gate already blocks such keys on every app write path; display-side redaction is screenshot hygiene and covers hand-edited records.
  • backendAgentId intentionally excluded: deploy-time runtime state written on start, not saved creation intent.
  • Read-only, no form state. The backend is immutable post-create (UpdateManagedAgentRequest has no backend field), so the section renders straight from agent.backend with no reset effect.
  • ADVANCED_FIELDS_MOTION_TRANSITION was duplicated in both agent dialogs; hoisted to agentConfigOptions (also keeps the edit dialog inside the file-size ratchet).

Testing

  • Unit contract for summarizeRunOn (9 tests): scalar honesty incl. 0/false, structured-value fallback, secret redaction fail-safe, preferred ordering with spillover, key humanization.
  • Playwright spec (4 tests, registered in the smoke project): kubernetes agent with the exact eight-key record a real create flow persisted, local agent, blox agent (workstation_name), and redacted secret-shaped keys from a hypothetical future provider.
  • pnpm typecheck, pnpm check, full pnpm test (3937 pass) green at this head.
  • Live screenshots posted in the originating Buzz thread.

npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d and others added 2 commits August 3, 2026 10:38
The edit-agent dialog showed nothing about where an agent runs; the
"Where to run" section only existed in the create flow. Add a read-only
"Run on" section to AgentInstanceEditDialog that renders straight from
the saved record (agent.backend): "This computer" for local agents, or
the provider id plus its saved config rows for provider-backed agents
(e.g. Kubernetes context, namespace, image, resources).

Design constraints (from thread review):
- No provider probe on edit: `info` is executable work and its schema
  (titles, generated namespace defaults) reflects the plugin today, not
  what this agent deployed with. Labels are humanized from saved keys.
- These are saved settings, not effective settings — omitted optional
  fields are defaulted by the provider at deploy time, and synthesizing
  today's defaults could drift from what actually deployed.
- Values render as safe scalars only; arrays/objects are summarized
  (React throws on object children — a hand-edited record must degrade
  to a summary row, not crash the dialog). Falsy-but-present values
  (0, false) render honestly, never as "missing".
- Secret-shaped keys are redacted using the same word-split heuristic
  as the create-time validate_provider_config gate (one definition of
  "looks like a secret"). The gate already blocks such keys on every
  app write path; display-side redaction is screenshot hygiene and
  covers hand-edited records that never met the gate.
- Copy states the run location cannot be changed after creation, and
  the section is named "Run on" to avoid colliding with the existing
  "Provider" (ACP harness) field in the same dialog.

ADVANCED_FIELDS_MOTION_TRANSITION was duplicated in both agent dialogs;
hoisted to agentConfigOptions so the edit dialog stays within the
file-size ratchet and the constant has one home.

Tests: unit contract for the summary helper (scalars, redaction,
ordering, structured-value fallback) and a Playwright spec covering
kubernetes, local, and redacted-provider agents.

Co-authored-by: Tyler <109685178+tlongwell-block@users.noreply.github.com>
Signed-off-by: Tyler <109685178+tlongwell-block@users.noreply.github.com>
Address Wren's first-pass review (thread, event 40508ef3):

- Rows now follow the provider-schema preferred order (context,
  namespace, image, request/limit pairs adjacent, lifecycle last) with
  alphabetical spillover for unknown keys, instead of bare alphabetical
  which buried namespace last and split the cpu/memory pairs.
- The e2e kubernetes fixture is now the exact eight-key record a real
  create flow persisted (Loni in managed-agents.json): optional
  service_account absent — asserted absent, not synthesized — numeric
  inactivity_seconds, full digest-pinned image.
- Added a blox case (workstation_name), the other real provider shape,
  exercising provider-generic humanization.
- backendAgentId is deliberately not shown: it is deploy-time runtime
  state written on start, not saved creation intent; decision recorded
  in the summarizeRunOn doc comment.

Co-authored-by: Tyler <109685178+tlongwell-block@users.noreply.github.com>
Signed-off-by: Tyler <109685178+tlongwell-block@users.noreply.github.com>
@tlongwell-block
tlongwell-block requested a review from a team as a code owner August 3, 2026 14:48
@tlongwell-block

Copy link
Copy Markdown
Collaborator Author

Kubernetes

Saved Kubernetes settings from a persisted agent record, including readable resource ordering and wrapped image digest.

kubernetes-run-on

Local

Local agents identify the current computer without provider config rows.

local-run-on

Blox

Provider-generic settings are humanized from the saved config.

blox-run-on

Secret-shaped values

Secret-shaped fields are redacted before display.

redacted-run-on

@tlongwell-block
tlongwell-block merged commit f865c00 into main Aug 3, 2026
26 checks passed
@tlongwell-block
tlongwell-block deleted the eva/edit-agent-run-on branch August 3, 2026 16:08
tlongwell-block pushed a commit that referenced this pull request Aug 3, 2026
branch-skew again: main advanced during the ~9min pre-push hook run and now
overlaps desktop/playwright.config.ts, which this branch carries via its base
merge. Merging main so the pushed tree is one CI will actually test.

Merge-only, no rebase, no force. merge-tree reported 0 conflicts. My own
commits still touch only the 7 desktop/src/features/terminal files.

Co-authored-by: npub17jjz49l9jjmhhk7cac63j8yt9z555n9cw8vk7v5jz4vzw4ppld5qgj57cc <f4a42a97e594b77bdbd8ee35191c8b28a94a4cb871d96f32921558275421fb68@buzz.block.builderlab.xyz>
Signed-off-by: npub17jjz49l9jjmhhk7cac63j8yt9z555n9cw8vk7v5jz4vzw4ppld5qgj57cc <f4a42a97e594b77bdbd8ee35191c8b28a94a4cb871d96f32921558275421fb68@buzz.block.builderlab.xyz>

* origin/main:
  feat(desktop): show saved Run on settings when editing an agent (#4539)
wpfleger96 pushed a commit that referenced this pull request Aug 3, 2026
…ed-unread

* origin/main: (44 commits)
  chore(release): release Buzz Desktop version 0.5.4 (#4562)
  test(mobile): assert follow boundary semantics (#4559)
  docs(release): align desktop handoff instructions (#3988)
  fix: report agent usage per provider round, not once per turn (#4545)
  fix(desktop): harden Windows installs against Defender block and orphaned Node (#4382)
  feat(desktop): improve channel template discovery (#4549)
  fix(desktop): save key backups to authorized path (#4022)
  Add channel activity hover menu (#3935)
  feat(desktop): show saved Run on settings when editing an agent (#4539)
  fix(desktop): disambiguate provider API key labels and annotate mint key (#4406)
  fix(desktop): make OpenAI key re-enterable after first save in card mint dialog (#4140)
  fix(config-bridge): add harness-definition env tier and fix equal-value model override (#3580)
  Polish mobile composer and messaging UI (#3918)
  ci(linux): enable mesh-llm feature in Linux release and canary builds (#4524)
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (#4411)
  fix(mobile): recover and pace live subscriptions (#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (#4395)
  fix(security): bump nostr crates for RUSTSEC-2026-0225..0232 + default sprig image to published digest (#4392)
  fix(desktop): back/forward via keyboard chords, mouse X1/X2 buttons, and swipe gestures (#3778)
  feat(k8s): Kubernetes backend plugin + desktop deploy path (#4289)
  ...

Signed-off-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Onnokh added a commit to Onnokh/buzz that referenced this pull request Aug 3, 2026
Upstream block#4539 added a read-only saved-settings summary to the edit
dialog premised on backends being fixed at creation. This branch makes
backends swappable from that dialog, so the two features now compose:
the interactive Run on picker owns location and changes, and the
summary renders beneath it for provider agents only, showing the saved
config rows (namespace, image, limits) without the immutability copy.
summarizeRunOn learns the execution-node backend variant (no config
rows — node runtime details stay on the node), and the edit dialog
consumes upstream's applyProbeResult seam instead of the draft-keyed
probe effect it replaced.

Signed-off-by: Onno Klein Hofmeijer <onnokh@hotmail.com>
wpfleger96 added a commit that referenced this pull request Aug 3, 2026
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

* origin/main: (40 commits)
  fix(mobile): recover stale relay sessions (#4372)
  chore(release): release Buzz Desktop version 0.5.4 (#4562)
  test(mobile): assert follow boundary semantics (#4559)
  docs(release): align desktop handoff instructions (#3988)
  fix: report agent usage per provider round, not once per turn (#4545)
  fix(desktop): harden Windows installs against Defender block and orphaned Node (#4382)
  feat(desktop): improve channel template discovery (#4549)
  fix(desktop): save key backups to authorized path (#4022)
  Add channel activity hover menu (#3935)
  feat(desktop): show saved Run on settings when editing an agent (#4539)
  fix(desktop): disambiguate provider API key labels and annotate mint key (#4406)
  fix(desktop): make OpenAI key re-enterable after first save in card mint dialog (#4140)
  fix(config-bridge): add harness-definition env tier and fix equal-value model override (#3580)
  Polish mobile composer and messaging UI (#3918)
  ci(linux): enable mesh-llm feature in Linux release and canary builds (#4524)
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (#4411)
  fix(mobile): recover and pace live subscriptions (#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (#4395)
  fix(security): bump nostr crates for RUSTSEC-2026-0225..0232 + default sprig image to published digest (#4392)
  fix(desktop): back/forward via keyboard chords, mouse X1/X2 buttons, and swipe gestures (#3778)
  ...
wpfleger96 added a commit that referenced this pull request Aug 3, 2026
Syncs Cargo.lock and ci.yml updates from origin/main via the umbrella, which
resolves the RUSTSEC-2026-0225..0229 nostr advisory failures in the Security gate.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>

* commit 'ad9ae1dbb0c2d9b6839c1e18d6fd6a78238b61fb': (40 commits)
  fix(mobile): recover stale relay sessions (#4372)
  chore(release): release Buzz Desktop version 0.5.4 (#4562)
  test(mobile): assert follow boundary semantics (#4559)
  docs(release): align desktop handoff instructions (#3988)
  fix: report agent usage per provider round, not once per turn (#4545)
  fix(desktop): harden Windows installs against Defender block and orphaned Node (#4382)
  feat(desktop): improve channel template discovery (#4549)
  fix(desktop): save key backups to authorized path (#4022)
  Add channel activity hover menu (#3935)
  feat(desktop): show saved Run on settings when editing an agent (#4539)
  fix(desktop): disambiguate provider API key labels and annotate mint key (#4406)
  fix(desktop): make OpenAI key re-enterable after first save in card mint dialog (#4140)
  fix(config-bridge): add harness-definition env tier and fix equal-value model override (#3580)
  Polish mobile composer and messaging UI (#3918)
  ci(linux): enable mesh-llm feature in Linux release and canary builds (#4524)
  fix(desktop): stop the create-agent provider config probe from erasing keystrokes (#4411)
  fix(mobile): recover and pace live subscriptions (#3053)
  feat(acp): deliver system prompt via _meta.systemPrompt for claude-agent-acp (#4395)
  fix(security): bump nostr crates for RUSTSEC-2026-0225..0232 + default sprig image to published digest (#4392)
  fix(desktop): back/forward via keyboard chords, mouse X1/X2 buttons, and swipe gestures (#3778)
  ...
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