# repo-detail ## Intent The detail panel for the repository selected in the dashboard. It fulfills the right-docked "detail panel" role (AGENT.md §4) and demonstrates cross-component communication done the sanctioned way (AGENT.md §1.1): it holds no reference to `` — it only listens for the `repo:select` event and fetches its own data. ## Public surface - **Tag:** `` - **Attributes/properties:** none. - **Listens:** `repo:select` on `document` — the bubbling/composed event emitted by ``; `event.detail.path` selects the repo. - **Fetches:** `GET /api/repo?path=` (in-flight request aborted on the next selection and on disconnect). The endpoint only serves repos already in the scanner index — it never runs git against an arbitrary query path. - **Renders:** name + status badges, path, current branch, remotes (name + URL), local branches (current flagged, upstream shown), and the 20 most recent commits. ## History - 2026-09-19: created — first detail panel; consumes `repo:select`, backed by the new `/api/repo` endpoint and `internal/git` branch/commit/remote readers. ## Notes / gotchas - Server output is escaped before insertion (`#esc`); branch names, commit subjects, and remote URLs all originate from repo contents — treat as untrusted. - Uses shared design tokens for all colors/radii — no hardcoded hex (AGENT.md §1.1). - Data is fetched on selection only (no polling); it will not auto-refresh while a repo stays selected. A push/refresh signal can be added without changing the public surface.