Skip to content

fix: make overview tokens readable down the column - #35

Merged
yujiezhang-ops merged 3 commits into
mainfrom
fix/overview-card-tokens
Aug 5, 2026
Merged

fix: make overview tokens readable down the column#35
yujiezhang-ops merged 3 commits into
mainfrom
fix/overview-card-tokens

Conversation

@yujiezhang-ops

Copy link
Copy Markdown
Collaborator

Four things the Agent overview got wrong, all in how a row presents state.

Token order was not stable

The Provider token was dropped when empty, which slid model and version left — so the same field sat in a different slot from row to row and the strip could not be read down the column.

Order is now fixed, Profile → Provider → model → version, with the first two slots always rendered. A new test asserts the order with a field absent, which is the case that used to shift.

"Not linked" / "Not configured" were invented vocabulary

Worse, 未绑定 / Not linked was shown for both a missing Provider and a missing Profile, so two identical pills gave the user no way to tell which piece was actually absent.

Each token now names its own field — 无 Profile / 无 Provider — following the existing Provider 缺少 KeyProvider key missing wording rather than introducing a term. The separate 未配置 badge is gone; it said the same thing a third time.

targetSummary() still returns 未配置 internally, but line 240 suppresses it, so it never reaches the user. Left as-is since it answers a different question ("the detected config is empty"), though using a translated string as a sentinel is fragile and worth replacing later.

Configuring an installed Agent was hidden

配置 appeared in the action row only when the Agent could not launch; for an installed one it was reachable only by opening <details>. That made the common case the hidden one. It now sits with 更新 and 启动, and the duplicate link inside <details> is removed.

The desktop card did not match the rows beneath it

Four labelled fact columns at min-height: 145px — twice the height of the CLI rows for the same four values. Now the same token strip, same order, same wording, same 84px.

Trademark marks, restored with an auditable basis

Claude Code, Cursor and Kilo CLI are real artwork again, taken from the MIT-licensed lobehub/lobe-icons already vendored in this repo rather than by restoring the unaudited vendor favicons that #25 removed.

Each is registered in asset-rights.json with source URL, licence, copyright owner and SHA-256; the licence bundle is regenerated and --check passes. Aider has no mark upstream (HTTP 404), so it keeps a generic symbol rather than gaining a favicon with no redistribution basis.

agents.test.tsx previously asserted rights for one example (["codex"]). It now asserts the whole asset set, so an unregistered mark fails there. Verified by mutation: flipping one license to UNKNOWN fails the test.

Incidental cleanups

A leftover duplicate .agent-manage-identity rule set display: grid with no columns and won on source order, stacking each Agent's name under its icon — that was the actual cause of the tall, narrow rows. Also removes CSS orphaned by the changes above (.desktop-app-fact, .agent-manage-detail-action) and ignores __pycache__, which the Python unittest run leaves behind untracked.

Two dead selectors (.desktop-app-path, .agent-manage-target) predate this branch and are left alone.

Verification

Measured in the running app, not inferred from the diff:

token order   配置模板 → 模型服务 → 模型 → 版本   (CLI and desktop identical)
actions       配置 / 更新 / 启动
row height    112px → 89px
old wording   未绑定 / 未配置 absent from the page
pnpm run test                  148 passed (22 files)
pnpm run build                 typecheck + vite ok
go vet ./...                   clean
generate_third_party_licenses.py --check   ok
check-docs.py                  ok: 49 files

🤖 Generated with Claude Code

Four things the Agent overview got wrong, all in how a row presents state.

Token order was not stable. The Provider token was dropped when empty, which
slid model and version left, so the same field sat in a different slot from row
to row and the strip could not be read down the column. Order is now fixed --
Profile, Provider, model, version -- with the first two slots always rendered.

"未绑定 / Not linked" and "未配置 / Not configured" were invented vocabulary, and
the first was shown for BOTH a missing Provider and a missing Profile, so two
identical pills gave the user no way to tell which piece was absent. Each token
now names its own field ("无 Profile" / "无 Provider"), following the existing
"Provider 缺少 Key" wording rather than adding a term. The separate
"未配置" badge is gone: it said the same thing a third time.

Configuring an installed Agent was reachable only by opening <details>, which
made the common case the hidden one. 配置 now sits with 更新 and 启动.

The desktop Agent card used four labelled fact columns at 145px tall, twice the
height of the CLI rows below it for the same four values. It now uses the same
token strip, the same order, and the same wording.

Also: three Agent marks (Claude Code, Cursor, Kilo CLI) return as real artwork,
taken from the MIT-licensed lobehub/lobe-icons already vendored here rather than
by restoring the unaudited vendor favicons #25 removed. Each is registered in
asset-rights.json with source, licence, owner and SHA-256, and the licence
bundle is regenerated. Aider has no mark upstream, so it keeps a generic symbol.
agents.test.tsx now asserts the whole asset set instead of one example, so an
unregistered mark fails there.

Removes CSS orphaned by the above (.desktop-app-fact, .agent-manage-detail-action)
and a leftover duplicate .agent-manage-identity rule whose `display: grid` won on
source order and stacked each Agent's name under its icon -- that was what made
every row tall and narrow. Ignores __pycache__, which the Python unittest run
leaves behind.
fc94be4 ("feat: compact agent info card") tuned grid placement for the previous
multi-column card: grid-column: 3 / -1 and grid-row: 2 on the action rows, plus
a narrow-width block targeting .agent-manage-fact and .agent-manage-package.

Resolved toward this branch's two-column layout (summary | actions, actions
inline), because column 3 no longer exists there -- keeping those placements
would put the buttons outside the grid. The narrow-width intent from that commit
(actions spanning the full width) already holds here, since the row collapses to
a single column at that breakpoint. Its .agent-manage-fact and
.agent-manage-package selectors have no markup on either side of the merge.

One placement merged cleanly but was still wrong and had to be removed by hand:
grid-column: 3 / -1 on .agent-manage-actions produced no conflict yet referred
to a column this layout does not have.

Also collapsed the pre-existing duplicate .agent-manage-actions block, which won
on source order and dropped justify-content, so the buttons would have stopped
right-aligning. Only its flex-shrink was doing anything.

Verified in the running app at 1280px and 560px: token order intact, actions
right-aligned at gap 6px and in column 2, icon and name on one line, row 89px,
no horizontal overflow.
… files

The asset test hardcoded ["codex", "opencode"] while reading the real
asset-rights.json, so it failed the moment an icon was added -- which is what CI
just caught. It now derives the expected set from the manifest, so it fails only
when the bundle is actually wrong.

Adds the check that was missing: collect_asset_dependencies walks the manifest
and never the directory, so an unregistered image ships with no source, licence
or hash recorded and --check still passes. The new test diffs the assets
directory against the manifest in the other direction.

It immediately found openclaw.svg: shipped in the bundle, referenced by no
component, and belonging to an Agent that is no longer in agents.lock.json at all
(the catalog is down to five). Left over from the guide-mode removal, so it is
deleted rather than registered. Its licence entries were already gone from
third_party/, so nothing else needed updating.

Both directions verified by mutation: adding an unregistered file fails the new
test, and removing an entry from the manifest while leaving its file also fails.
@yujiezhang-ops
yujiezhang-ops merged commit 9980c69 into main Aug 5, 2026
4 checks passed
@Paulkm2006
Paulkm2006 deleted the fix/overview-card-tokens branch August 5, 2026 10:03
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