Skip to content

fix(admin): show the harness/model card at every accepted scope - #593

Open
yzxcj797 wants to merge 1 commit into
yc-software:mainfrom
yzxcj797:fix/admin-runtime-any-scope-589
Open

fix(admin): show the harness/model card at every accepted scope#593
yzxcj797 wants to merge 1 commit into
yc-software:mainfrom
yzxcj797:fix/admin-runtime-any-scope-589

Conversation

@yzxcj797

@yzxcj797 yzxcj797 commented Aug 18, 2026

Copy link
Copy Markdown

Summary

Fixes #589.

Root cause

Purely a UI gate: the runtime (and base-model) resources are declared target: "any" in admin-resources.ts, and scope-config.ts already returns baseModelOptions / modelsByHarness / runtime for every scope — which is exactly why the issue's API round-trip works on a channel while the card stays hidden. The one-line culprit:

const showBaseModel = scope.startsWith("org:") && opts.length > 0 && dflt && "runtime" in r.data;

Fix

Drop the org: prefix from showBaseModel — the harness/model card now renders at every scope the resource accepts, and per-channel/per-project model selection happens through the same form as org-level.

Deliberately untouched, because their backends are genuinely org-scoped:

  • approved-harnesses (target: "org", org-wide by design),
  • the ambient/external-Slack/fast-mode/header-pin cards (all org-scoped resources in the same block).

No backend change needed.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The runtime and base-model resources are target: "any" and the
scope-config payload already carries baseModelOptions/modelsByHarness/
runtime for channels and projects, but the admin UI gated the card on
an org: prefix -- an admin wanting a particular room on a particular
model had to call the API by hand (yc-software#589).

Drop the org: prefix from showBaseModel only; approved-harnesses stays
org-gated (it is target: "org" by design), as do the other org-scoped
resources in the same block.
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.

Admin UI only offers the harness/model control at org scope, though the resource accepts any scope

1 participant