Skip to content

feat(sidebar): Agents 목록을 워크스페이스별 카드로 묶기 - #673

Merged
devswha merged 5 commits into
devswha:mainfrom
WOULDU-pres:feat/agent-workspace-groups
Oct 11, 2026
Merged

devswha merged 5 commits into
devswha:mainfrom
WOULDU-pres:feat/agent-workspace-groups

Conversation

@WOULDU-pres

@WOULDU-pres WOULDU-pres commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Change

사이드바 Agents 목록에서 같은 워크스페이스의 에이전트를 테두리 카드 하나로 묶습니다. 지금도 Workspaces 순서에서는 같은 워크스페이스의 에이전트가 붙어 있지만, 경계가 보이지 않습니다. 그래서 행마다 두 번째 줄에 워크스페이스 이름이 반복되고, 어디까지가 한 워크스페이스인지 이름을 읽어야만 알 수 있었습니다.

모습

  • 카드는 --hairline --border 테두리, --radius-lg, 안쪽 여백 --space-1, 카드 사이 --space-2이고 채움은 없습니다. 그래서 행의 hover와 선택 채움이 카드 밖에서와 똑같이 보입니다.
    • 카드에 채움을 깔면 hover 채움(bg-hover 50%)과 세기가 비슷해져서 안에서 hover가 흐려지기 때문에, 테두리만 썼습니다.
  • 카드 머리글은 --space-6 높이의 한 줄입니다. 앞 칸에 --space-4 폴더, 그 옆에 워크스페이스 이름을 --text-dim --fs-xs로 씁니다. PC가 2대 이상이면 PC · 워크스페이스로 씁니다(지금 두 번째 줄의 규칙과 같습니다).
  • 머리글은 이름일 뿐 컨트롤이 아닙니다. 행은 pane을 열고, 워크스페이스는 위쪽 목록이 엽니다.
  • 에이전트가 하나뿐인 워크스페이스도 카드로 묶습니다. 모양을 일관되게 하려는 것입니다.

두 번째 줄

  • 카드 안의 행은 두 번째 줄에서 PC와 워크스페이스를 뺍니다. 예: claude · checkout-api · Tab 1 → claude · Tab 1
  • 위치 정보는 사라지지 않습니다. 툴팁에는 그대로 남고, 스크린리더에서는 카드의 목록이 머리글을 이름으로 갖습니다(<ul aria-labelledby>).
  • 규칙은 agentContext의 grouped 옵션입니다. 탭 이름이 워크스페이스 이름과 같으면 지금처럼 생략합니다.

Activity 순서

Activity 순서는 워크스페이스를 섞어 놓으므로 카드를 그리지 않습니다. 지금처럼 평평한 목록이고, 행마다 자기 위치를 씁니다. 묶음을 유지하면서 묶음 순서를 바꾸는 방법도 검토했습니다. 하지만 그러면 "가장 최근 것이 위"라는 Activity의 의미가 깨져서 하지 않았습니다.

바뀐 파일

  • src/lib/sidebarAgents.ts(+ 테스트): groupRows(키별로 묶되 첫 행의 자리를 지킴), agentContext의 grouped
  • src/components/AgentSidebar.tsx, AgentSidebar.css: 카드와 머리글. 행 그리기를 agentItem으로 뺐습니다(행 DOM, data-machine/data-pane, 클래스는 그대로입니다).
  • scripts/sidebar-activity-demo-regression.ts: 카드 확인을 추가했습니다(아래 Validation).
  • DESIGN.md, src/AGENTS.md, CHANGELOG.md(Unreleased → Changed)

새 t() 문자열, 서버 계약, 설정 항목은 없습니다.

#672와의 관계

#672(에이전트 행 우클릭으로 탭 닫기)도 AgentSidebar.tsx를 크게 고칩니다. 먼저 머지되는 쪽에 맞춰 나머지를 rebase하겠습니다. 합칠 때는 #672의 행 메뉴 부제목(RowMenu subtitle)이 줄어든 context가 아니라 전체 위치(place)를 써야 합니다. 그래야 카드 안 행의 메뉴에도 워크스페이스 이름이 나옵니다.

Validation

  • bun run check fast: 통과(workflow syntax, generated types, typecheck, build, unit tests 2012 pass / 0 fail)
  • HERDR_TEST_MODE=unit bun test ./src/lib/sidebarAgents.test.ts: 17 pass
    • groupRows: herdr가 pane을 어떤 순서로 주든 워크스페이스마다 묶음이 하나이고 herdr의 순서를 지킴. 첫 행의 자리와 묶음 안 순서를 지킴
    • agentContext grouped: PC와 워크스페이스를 빼고, 탭이 워크스페이스와 같으면 여전히 생략
  • bun scripts/sidebar-activity-demo-regression.ts(데모 transport, herdr 불필요): 통과
    • 기본(Workspaces) 순서: 카드 이름이 checkout-api, web-dashboard, infra, docs-site, cli-tools. 카드 안 행의 두 번째 줄에는 워크스페이스가 없고, 툴팁에는 있음. 카드의 목록이 머리글로 레이블됨
    • Activity 순서: 카드 0개, 행의 두 번째 줄에 워크스페이스가 있음
    • 기존 순서와 DONE 검사 그대로 통과
  • bun run check run bun scripts/ui-regression.ts(격리 herdr 세션): 93개 모두 PASS
    • Agents 목록 확인: PASS Agents excludes shells, survives PC folds, selects its machine target and disables offline rows(카드 안 행의 선택, PC 대상, 오프라인 비활성)

검증 범위:

  • 브라우저에서 확인: PC 1대일 때의 카드, 머리글, 두 번째 줄, aria-labelledby. Activity에서 카드가 없는 것. 다크와 라이트 테마. 한국어 UI
  • 단위 테스트로만 확인: 묶음 로직과 두 번째 줄 규칙
  • 확인하지 않음: PC 2대일 때의 PC · 워크스페이스 머리글을 브라우저로 보지 않았습니다. 데모는 PC가 1대뿐입니다.

스크린샷(데모 세션, 1280×1000 @2x, checkout-api에 탭 두 개와 에이전트 두 개를 더 띄운 상태):

Workspaces 순서 (다크) Workspaces 순서 (라이트) Activity 순서 (카드 없음)
Agents 목록: checkout-api 카드에 에이전트 셋, 나머지 워크스페이스는 하나씩 라이트 테마의 같은 화면 Activity 순서: 카드 없이 평평한 목록, 행마다 워크스페이스를 씀

🤖 Generated with Claude Code

In Workspaces order the Agents list puts each workspace's agents on a PC
in a hairline card under the workspace's name (after the PC's with two or
more PCs). Rows in a card leave the PC and workspace out of their second
line; the tooltip and the list's aria-labelledby keep them. Activity order
mixes workspaces and draws no cards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c06ca6df-0efc-42da-87d2-0897dc4eac30

📥 Commits

Reviewing files that changed from the base of the PR and between 6e468e8 and b4a4957.


📒 Files selected for processing (8)
  • CHANGELOG.md
  • DESIGN.md
  • scripts/sidebar-activity-demo-regression.ts
  • src/AGENTS.md
  • src/components/AgentSidebar.css
  • src/components/AgentSidebar.tsx
  • src/lib/sidebarAgents.test.ts
  • src/lib/sidebarAgents.ts

🚧 Files skipped from review as they are similar to previous changes (3)
  • CHANGELOG.md
  • src/components/AgentSidebar.css
  • DESIGN.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.



📝 Summary

Summary by CodeRabbit

  • New Features
    • In Workspaces order, agents are grouped into workspace cards with a heading that identifies the workspace and, when relevant, the PC. Pinned agents appear above the cards.
    • Grouped agent rows avoid repeating workspace context; tooltips still identify the workspace. Rows show the agent kind when no other context is available.
    • Offline workspace cards and their rows appear dimmed.
    • Activity order remains ungrouped, with each agent row identifying its workspace.

Walkthrough

The Agents list now groups agents into workspace cards in Workspaces order. Activity order keeps agents ungrouped. Grouped rows omit placement details from their context but retain them in tooltips.

Changes

Workspace-grouped agent sidebar

Layer / File(s) Summary
Agent grouping and context
src/lib/sidebarAgents.ts, src/lib/sidebarAgents.test.ts
groupRows groups rows in first-seen order and preserves member order. agentContext omits machine and workspace labels for grouped agents. Tests cover grouping, empty input, and grouped context.
Workspace cards and sidebar rendering
src/components/AgentSidebar.tsx, src/components/AgentSidebar.css, scripts/sidebar-activity-demo-regression.ts, DESIGN.md, src/AGENTS.md, CHANGELOG.md
The sidebar renders grouped workspace cards outside Activity order and standalone rows in Activity order. Cards have labelled row lists and styling. Regression checks and documentation describe both layouts.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: devswha, phirschybar


Merge Risk: ⚪ Minimal · up to b4a49

The workspace-card change is ready to merge after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (4 skipped: 4… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: grouping the sidebar Agents list into workspace-specific cards.
Description check Passed The description includes the required Change and Validation sections. It explains the behavior, affected areas, test results, browser coverage, known validation limits, and UI screenshots.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Full details: Docstring Coverage

Explanation

Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. (4 skipped: 4 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devswha and others added 4 commits October 11, 2026 16:34
Resolve conflicts with main's sidebar changes: the Agents list keeps
main's live agent names, mark-aware kind labels and row structure, and
this PR's per-workspace cards on top. CHANGELOG entry moves under main's
Unreleased Changed with the PR link and credit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ware kinds

Main leaves the agent kind off the line when the mark already draws it,
and a card leaves the workspace to its head, so the demo's Claude row in
checkout-api has no .agent-context at all. Read it with allTextContents so
an absent line passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Maintainer decision on devswha#673: a row in a workspace card with no live name
and no tab of its own shows its kind on the second line instead of leaving
it empty. DESIGN.md and src/AGENTS.md also record that pinned agents (devswha#778)
go in a section above the cards.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Maintainer decision: every otherwise-empty line in a workspace card shows
the agent kind, with no exception for a title that reads as the kind.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@devswha
devswha merged commit 01637d6 into devswha:main Oct 11, 2026
5 checks passed
devswha added a commit that referenced this pull request Oct 11, 2026
…changed appearance settings (#820)

## Change

Three commits, in order; the third depends on the first two (it counts
their settings).

**1. Sidebar: workspace cards and pin stars are settings, off by
default.** #673 and #778 turned both on for everyone. The Agents list is
flat again and its rows carry no star unless **Settings → Appearance →
Workspace cards** / **Pin agents** is on. Saved pins stay stored while
the setting is off.

**2. Plan: the flow and the header's count are settings, on by
default.** **Plan flow** off opens a pane's plan as the list alone, with
no switch; **Plan count in the header** off takes the plan button out of
the header on that device. Defaults keep #531 as it is.

**3. Anonymous counts name the appearance settings changed from their
defaults.** The install/update event gets `changed_settings`: names from
a fixed list (theme, density, palette, sidebar rows, Agents order,
workspace cards, pin agents, plan flow, plan count). Names only, never a
value, never a setting the user types.

- The browser tells its server the list on opening and on a change
(`POST /api/telemetry { changed_settings }`; anything outside the list
is a 400). The server keeps it for its next event and sends nothing by
itself.
- The notice says so and is shown once more (`NOTICE_VERSION = 2`). An
install that saw the older notice sends nothing, its update count
included, until it has seen this one.
- The same switch, `HERDR_WEB_TELEMETRY=0` and `DO_NOT_TRACK` turn it
off.
- Receiver: a `changed_settings` column (sorted, comma-joined, `''` for
none, `NULL` when not told). The Worker drops a name it does not know
instead of refusing the event, so a newer app is still counted.
`telemetry/README.md` has the `ALTER` and a query for "installs that
changed each setting".

The receiver is already deployed: the column was added to the D1 table
and the Worker deployed from this branch's `telemetry/` (it accepts
events from released versions unchanged).

## Validation

- `bun run typecheck`: pass
- `HERDR_TEST_MODE=unit bun test` on `server/telemetry.test.ts`,
`telemetry/worker.test.ts`, `src/lib/settings.test.ts`, `i18n.test.ts`,
`plan.test.ts`, `sidebarOrder.test.ts`, `sidebarAgents.test.ts`: 141
pass
- `bun scripts/sidebar-activity-demo-regression.ts`: pass (new: the list
is flat and starless by default; the plan's flow and header count stand
by default on a desktop and a phone, and each goes with its setting)
- End to end with the real `createServer` + `Telemetry`, the Worker's
`handle` over an in-memory table from `schema.sql`, and Chrome: with
theme, workspace cards and plan flow changed (and a typed terminal
font), the stored row holds `agentCards,planFlow,theme`; neither the
font nor any value leaves the PC; a later change is kept for the next
event and sends nothing; with the switch off a new version sends
nothing.
- Deployed receiver: a test event stored `agentCards,theme` (an unknown
name dropped); the test rows were deleted.

`scripts/ui-regression.ts` was not run to the end locally (it stops on
this Mac at "explicit Send now delivered one item" on unmodified `main`
as well).
devswha added a commit that referenced this pull request Oct 11, 2026
## Problem
From 0.4.7 mobile testing: with **Settings → Appearance → Workspace
cards** (#673/#820) and **Pin agents** (#778/#820) both on, starring an
agent pulled it out of its workspace card and put it above all cards.
The user read that as the agent "escaping" its card and chose a
different layout.

## Change
- `AgentSidebar`: in cards mode the groups are built from `[...pinned,
...rest]` instead of `rest` alone, and the separate pinned rows above
the cards are gone. `groupRows` keeps first-appearance order, so:
  - a pinned agent stays in its own card, first in it (in pin order);
- cards holding pins come first, in the order of their first pin; the
rest keep herdr's order.
- Flat mode (cards off, or Activity order) is unchanged: pinned rows
lead the list.
- Comments in `AgentSidebar`/`sidebarPins` updated to the new rule.

## Tests
- `sidebarPins.test.ts`: the grouping case now expects `C1` pinned then
`A2` → cards `C [C1]`, `A [A2, A1]`, `B [B1]`.
- `sidebar-activity-demo-regression`: pinning `infra` keeps it inside
the `infra` card, which becomes the first card; the star keeps keyboard
focus; reload keeps it; unpinning returns `checkout-api` as the first
card.
- `bun run check fast` passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants