Skip to content

feat: metadata-driven env injection and runtime dropdown UX overhaul#791

Merged
wpfleger96 merged 1 commit into
worktree-wpfleger+fix-model-picker-runtime-uxfrom
wpfleger/phase3-runtime-behavioral
May 29, 2026
Merged

feat: metadata-driven env injection and runtime dropdown UX overhaul#791
wpfleger96 merged 1 commit into
worktree-wpfleger+fix-model-picker-runtime-uxfrom
wpfleger/phase3-runtime-behavioral

Conversation

@wpfleger96
Copy link
Copy Markdown
Collaborator

Summary

Stacked on #783 (provider→runtime rename). Consumes the KnownAcpRuntime capability metadata fields added in Phase 2 and redesigns the runtime dropdown in the "Add agents" dialog.

Rust (env injection):

  • Replace hardcoded GOOSE_MODE=auto injection with a metadata-driven default_env loop — new runtimes get their defaults by adding to the catalog, not touching spawn logic
  • Inject GOOSE_MODEL via model_env_var for runtimes that don't support ACP model switching, so goose agents respect PersonaRecord.model even without a persona pack
  • Same pattern applied to the model probe subprocess in agent_models.rs
  • Remove #[allow(dead_code)] from the three now-consumed fields (supports_acp_model_switching, model_env_var, default_env)

TypeScript (runtime dropdown UX):

  • Runtime dropdown defaults to "Use persona defaults" (unset) instead of auto-selecting the first available runtime
  • Explicit runtime selection overrides ALL personas — no more silent bypassing when a persona has a stored preference
  • Per-persona runtime badges on persona chips show the effective runtime, with warning styling when overridden or when a stored preference is unavailable
  • resolvePersonaRuntime gains a forceOverride parameter and an isOverridden field on the result type — single source of truth for override decisions
  • useEffectiveRuntimes hook extracted from AddChannelBotDialog for file size and testability
  • RuntimeBadge extracted as a named component from inline IIFE
  • RUNTIME_NONE_SENTINEL constant replaces magic string
  • 22 unit tests covering all resolution cases, override modes, and isOverridden semantics

… dropdown UX

Replace hardcoded GOOSE_MODE injection with a metadata-driven
default_env loop on KnownAcpRuntime, and inject GOOSE_MODEL via
model_env_var for runtimes that don't support ACP model switching.
This ensures goose agents respect PersonaRecord.model even without
a persona pack.

Redesign the AddChannelBotDialog runtime dropdown: defaults to "Use
persona defaults" (unset) instead of auto-selecting the first runtime.
Explicit selection overrides all personas. Per-persona runtime badges
on chips show the effective runtime with warning styling when overridden
or when a stored preference is unavailable.
@wpfleger96 wpfleger96 requested a review from a team as a code owner May 29, 2026 18:02
@wpfleger96 wpfleger96 marked this pull request as draft May 29, 2026 18:04
@wpfleger96 wpfleger96 merged commit 5172532 into worktree-wpfleger+fix-model-picker-runtime-ux May 29, 2026
15 checks passed
@wpfleger96 wpfleger96 deleted the wpfleger/phase3-runtime-behavioral branch May 29, 2026 19:17
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