Skip to content

feat(dashboard): group the Agents list into Core Agents and Hands sections#6205

Merged
houko merged 9 commits into
mainfrom
feat/6189-agents-hands-grouping
Jun 19, 2026
Merged

feat(dashboard): group the Agents list into Core Agents and Hands sections#6205
houko merged 9 commits into
mainfrom
feat/6189-agents-hands-grouping

Conversation

@houko

@houko houko commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #6189. The Agents page rendered every agent in a single flat list; hand-role agents were distinguished only by a small per-row HAND badge. This groups the list into Core Agents and Hands sections, which reads as more structured.

Changes (dashboard-only)

  • crates/librefang-api/dashboard/src/pages/AgentsPage.tsx
    • Split the already-filtered/sorted filteredAgents on the existing is_hand flag into coreAgents (!is_hand) and handAgents (is_hand) — both useMemo, derived from the same source so search / state-filter / sort behaviour is unchanged.
    • Render two titled sections, each header gated on its group being non-empty so the existing Show hands toggle keeps its meaning (when off, handAgents is empty and the Hands header doesn't show) and a single-group view shows no empty banner.
    • Uses the pre-seeded agents.core_agents / agents.hands i18n keys (already present in all locales, previously unreferenced).

No backend, api.ts type, query, mutation, or new i18n keys. The auto-select effect and empty-state still key off filteredAgents, so they are unaffected. The per-row HAND badge is left untouched (minimal diff).

Verification

pnpm typecheck   # clean
pnpm exec eslint src/pages/AgentsPage.tsx   # 0 errors (3 pre-existing exhaustive-deps warnings, unrelated)
pnpm build       # ✓

No dedicated test is added here: AgentsPage has no render-test harness today (one is introduced by the separate #6187 PR), and a full-page mock would be disproportionate for a presentational regroup. Happy to add one once #6187's harness lands.

…tions

The Agents page showed every agent in one flat list, with hand-role agents distinguished only by a small per-row badge.
Split the already-filtered and -sorted list on the is_hand flag into two titled sections using the pre-seeded agents.core_agents / agents.hands i18n keys; each header renders only when its group is non-empty, so the Show hands toggle keeps its meaning and a single-group view shows no empty banner.
Presentational only — no data-layer, query, or backend change; the per-row HAND badge is left untouched to keep the diff minimal.

Closes #6189
@github-actions github-actions Bot added size/S 10-49 lines changed area/docs Documentation and guides labels Jun 18, 2026
CHANGELOG.md: split two sentences that were on one line into separate
lines (one sentence per line rule).
AgentsPage.tsx: trim three-line comment block to one line, keeping only
the non-obvious invariant about showHandAgents toggle interaction.
@github-actions github-actions Bot added has-conflicts PR has merge conflicts that need resolution ready-for-review PR is ready for maintainer review and removed has-conflicts PR has merge conflicts that need resolution ready-for-review PR is ready for maintainer review labels Jun 18, 2026
# Conflicts:
#	.secrets.baseline
@houko
houko enabled auto-merge (squash) June 19, 2026 04:50
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 19, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot added no-rust-required This task does not require Rust knowledge ready-for-review PR is ready for maintainer review has-conflicts PR has merge conflicts that need resolution and removed has-conflicts PR has merge conflicts that need resolution ready-for-review PR is ready for maintainer review labels Jun 19, 2026
@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review and removed has-conflicts PR has merge conflicts that need resolution labels Jun 19, 2026
@github-actions github-actions Bot added has-conflicts PR has merge conflicts that need resolution and removed ready-for-review PR is ready for maintainer review labels Jun 19, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review has-conflicts PR has merge conflicts that need resolution and removed has-conflicts PR has merge conflicts that need resolution ready-for-review PR is ready for maintainer review labels Jun 19, 2026
@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review has-conflicts PR has merge conflicts that need resolution and removed has-conflicts PR has merge conflicts that need resolution ready-for-review PR is ready for maintainer review labels Jun 19, 2026
@github-actions github-actions Bot added ready-for-review PR is ready for maintainer review and removed has-conflicts PR has merge conflicts that need resolution labels Jun 19, 2026
@houko
houko merged commit 9a8ca50 into main Jun 19, 2026
33 checks passed
@houko
houko deleted the feat/6189-agents-hands-grouping branch June 19, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation and guides no-rust-required This task does not require Rust knowledge ready-for-review PR is ready for maintainer review size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

智能体页面, Hands的展示分组比平铺更加直观

2 participants