Repository navigation
feat(sidebar): Agents 목록을 워크스페이스별 카드로 묶기 - #673
Conversation
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]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to The workspace-card change is ready to merge after normal checks. Pre-merge checks |
|
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]>
…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).
## 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]>
Change
사이드바 Agents 목록에서 같은 워크스페이스의 에이전트를 테두리 카드 하나로 묶습니다. 지금도 Workspaces 순서에서는 같은 워크스페이스의 에이전트가 붙어 있지만, 경계가 보이지 않습니다. 그래서 행마다 두 번째 줄에 워크스페이스 이름이 반복되고, 어디까지가 한 워크스페이스인지 이름을 읽어야만 알 수 있었습니다.
모습
--hairline--border테두리,--radius-lg, 안쪽 여백--space-1, 카드 사이--space-2이고 채움은 없습니다. 그래서 행의 hover와 선택 채움이 카드 밖에서와 똑같이 보입니다.--space-6높이의 한 줄입니다. 앞 칸에--space-4폴더, 그 옆에 워크스페이스 이름을--text-dim--fs-xs로 씁니다. PC가 2대 이상이면PC · 워크스페이스로 씁니다(지금 두 번째 줄의 규칙과 같습니다).두 번째 줄
claude · checkout-api · Tab 1→claude · Tab 1<ul aria-labelledby>).agentContext의grouped옵션입니다. 탭 이름이 워크스페이스 이름과 같으면 지금처럼 생략합니다.Activity 순서
Activity 순서는 워크스페이스를 섞어 놓으므로 카드를 그리지 않습니다. 지금처럼 평평한 목록이고, 행마다 자기 위치를 씁니다. 묶음을 유지하면서 묶음 순서를 바꾸는 방법도 검토했습니다. 하지만 그러면 "가장 최근 것이 위"라는 Activity의 의미가 깨져서 하지 않았습니다.
바뀐 파일
src/lib/sidebarAgents.ts(+ 테스트):groupRows(키별로 묶되 첫 행의 자리를 지킴),agentContext의groupedsrc/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 passgroupRows: herdr가 pane을 어떤 순서로 주든 워크스페이스마다 묶음이 하나이고 herdr의 순서를 지킴. 첫 행의 자리와 묶음 안 순서를 지킴agentContextgrouped: PC와 워크스페이스를 빼고, 탭이 워크스페이스와 같으면 여전히 생략bun scripts/sidebar-activity-demo-regression.ts(데모 transport, herdr 불필요): 통과checkout-api, web-dashboard, infra, docs-site, cli-tools. 카드 안 행의 두 번째 줄에는 워크스페이스가 없고, 툴팁에는 있음. 카드의 목록이 머리글로 레이블됨bun run check run bun scripts/ui-regression.ts(격리 herdr 세션): 93개 모두 PASSPASS Agents excludes shells, survives PC folds, selects its machine target and disables offline rows(카드 안 행의 선택, PC 대상, 오프라인 비활성)검증 범위:
PC · 워크스페이스머리글을 브라우저로 보지 않았습니다. 데모는 PC가 1대뿐입니다.스크린샷(데모 세션, 1280×1000 @2x, checkout-api에 탭 두 개와 에이전트 두 개를 더 띄운 상태):
🤖 Generated with Claude Code