Skip to content

fix(ui): display resolved agent workspace and effective model consistently - #129701

Merged
steipete merged 1 commit into
mainfrom
codex/control-ui-qa-agent-display-owner
Aug 26, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/control-ui-qa-agent-display-owner

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Restore each agent's actual resolved workspace in Overview, Channels, and Automation instead of incorrectly displaying its global workspace default.
  • Combine inherited primary models with agent-owned fallback lists, including explicit empty fallbacks, so fallback-only agent overrides no longer display a missing primary model.
  • Remove the duplicate Overview projection and use the same canonical agent-context owner as its sibling panels. Production code: +22/-33 (net -11).

Root cause

The Gateway already returns each agent's authoritative resolved workspace and effective model. Both the shared Control UI context builder and a second independent Overview projection instead prioritized the global configured workspace over that resolved roster value. They also rendered an agent model override as a complete model even when the override contained only a fallback list, discarding the inherited primary and displaying -.

The repair restores producer ownership: explicit unsaved agent workspace edits still win; the resolved roster workspace comes next; and global defaults are used only when no agent-specific value exists. The shared owner resolves primary and fallback ownership independently, preserving explicit empty fallback arrays and dirty per-agent model edits. Overview now consumes that same canonical projection as Channels and Automation.

Before

The selected Writer agent incorrectly displayed /tmp/agents and no primary model despite its resolved /tmp/agents/writer workspace and inherited model:

Before: wrong inherited workspace and missing primary model

After

The same real Chromium flow now shows the correct agent-owned workspace and inherited primary with its agent-owned fallback:

After: authoritative agent workspace and effective primary model

Verification

  • Pre-fix: six owner/sibling regressions fail across Overview, Channels, and Automation; actual Chromium independently fails because the wrong workspace is rendered.
  • node scripts/run-vitest.mjs ui/src/pages/agents/panels-overview.test.ts ui/src/lib/agents/display.test.ts — 46 tests pass.
  • OPENCLAW_CAPTURE_UI_PROOF=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/agent-model-fallback-ownership.e2e.test.ts — six real Chromium scenarios pass, covering inherited fallbacks, strict explicit primaries, explicitly disabled fallbacks, agent-owned fallbacks, and fallback-only overrides.
  • OPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 pnpm check:changed — complete core-test/UI typechecking, formatting, lint, i18n, and architecture gates pass; the unchanged dead-export scan had already passed in the preceding full run.
  • Fresh independent Codex review: clean.

Risk

Low: presentation-only ownership correction; no persistence, protocol, configuration shape, security policy, or Gateway runtime changes. Existing draft precedence, explicit empty fallback arrays, file-owned workspace values, and agent-specific model primaries remain covered.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 26, 2026
@steipete
steipete marked this pull request as ready for review August 26, 2026 00:19
@steipete
steipete merged commit 6133ad9 into main Aug 26, 2026
161 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the codex/control-ui-qa-agent-display-owner branch August 26, 2026 00:36
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant