# Task-first Herdr A Herdr desktop layout for identifying work at a glance: unnamed tabs show native agent titles; agent rows show the task first and working folder below. Manual names stay intact. The rest of the stock desktop remains familiar. ![Task-first Herdr](preview.png) **Preview:** a native `herdr-app shot` capture from an isolated demo instance, with fictional tasks and no real model sessions. See [capture details](docs/preview.md). Version 0.1.0 is a preview release; [release review](docs/release-review.md) distinguishes completed checks from the full acceptance criteria below. ## What you see - A stock-style left sidebar: 268 logical px wide initially, with the workspace header, spaces, agents, and footer. A 42 px tab strip spans the work area. - Tabs are 29 px high pills with an app icon, title (truncated after at most 170 logical px), native status indicator, and a close control on the active tab. - The agents section has a 41 px heading, 30 px group headers, and 46 px rows. A row's first line is its task title at 13 px. The second line is `working-folder · space [· remote-machine]` at 11 px, plus age/status controls. Identical folder and space names are not repeated. Missing folders read `Folder unknown`. Long labels truncate; hover reveals the full details. - Colors come from the active Herdr theme: chrome, foreground, muted, dim, selected, border and native status colors. There is no forced theme/font. - The main region keeps the active terminal panes, 30 px stock pane headers, optional Files/Changes side panel, and 28 px stock status bar. ## How it behaves - A manually named tab always wins, even if its name is a number or program name. Clearing its name restores automatic labels. No automatic `tab.rename` is run. - An unnamed tab follows its first agent. Without an agent it follows the focused terminal, otherwise its first terminal. Generic/blank/path-like agent titles fall back to the current folder, then program/tab label. Non-agent terminals use their folder so an exited agent's old title is not reused. - A sidebar row follows its own agent, not another agent in a split tab. It uses the same title rules. Leading decoration and Pi's `π - ` prefix are removed; Unicode task names remain intact. Reported title/folder changes update live. - Working agents show the native spinner, blocked agents show the stock warning badge/compact exclamation, done agents a dot, and idle agents a ring. Priority groups are Needs you, Done, Working, Idle; grouped-by-space and pinned views retain the stock behavior. A viewed done agent stays in Done until left. - Clicking an agent focuses that pane. Hover exposes its pin control and full title, folder, context and address. Child agents retain fold/peek behavior; their rows retain stock names rather than gaining inferred project labels. - Double-clicking a tab opens rename; right-click opens the stock tab menu; drag/release reorders tabs. The add, close, panel and window buttons retain stock actions. Tab hover exposes the full title. - Below a 160 px sidebar width, the stock compact numbered rail remains, with full-detail tooltips. No key bindings are added or intercepted. ## Built from - `layouts/task-first.json`: a derivative of Herdr 0.1.12's `main` tree. Its `tabs` node uses `task-first-tabs`; its `agents` node uses `task-first-agents`. The layout preview is `layouts/task-first.png`. The `_notice` field records modifications as inert JSON metadata (the 0.1.12 parser ignores unknown fields). - `mods/task-first-tabs/main.js` and `mods/task-first-agents/main.js`: personal copies of the shipped panels. Default export is a `gpui-kit` `View`; styling uses `gpui-base` builders and `theme()` tokens. - Each mod has its own identical `title.js`. Agents also has `labels.js` for task/folder/space/machine presentation. Test both standalone copies; do not import another mod's code at runtime. - Native data comes from `spaces()`, `panes()`, `agents()`, `terminals()`, and `focused()`. The mods retain stock shared sorting/panel preferences, local age/panel state, `setAgentOrder`, overlays and standard `run(...)` actions. The agents panel keeps the stock 30-second age-label refresh. Spinners use native animation, not redraw timers. - Stock dependencies are workspace-chrome, spaces, pane, files, changes, workspace-status, menu, new-menu, and their installed assets/program icons. The Windows window buttons reference stock `mods/tabs/` assets. No icons, fonts, binaries or generated type declarations are bundled. - Neither custom runtime mod runs external programs, reads transcripts/files, reaches the network, or calls models. Stock panels keep their own behavior. ## Watch out - Target the **desktop app**, tested on 0.1.12; the legacy TUI is a separate product. Current app-generated `AGENTS.md` and `.d.ts` files are the API authority. - A working folder is not necessarily a project root. Show the reported basename honestly, including parent folders and subdirectories. Do not infer a repo from the task title, space launch folder, or another pane. - Pi needs to report a useful session title to get a task-specific label. This recipe is native-title mirroring, not automatic title generation. - Keep the `main` layout's node IDs: tab side-panel restoration relies on them. Clones do not receive upstream code updates automatically. - Preserve explicit names, Unicode, remote-qualified IDs, focus, pins, status grouping and the stock behavior of children/menus. Test empty and mod-only tabs. - Install new names without overwriting existing paths. Keep licenses/notices. Activation is explicit and can close overlays, but does not restart agents. - A native mod check is necessary but does not lay out all dynamic states. Check the running UI and `status.errors`; do not mistake an old frame for a successful hot reload. New mod age-history starts fresh instead of importing private state. ## Done when - `npm run check`, `npm test`, and `npm run build` pass from the package root. - Both copied mods pass `herdr-app check` on the intended installed version. - In a disposable Herdr workspace, native titles update, manual names stay fixed, split agents keep distinct titles/folders, and hover shows complete details. - Working/blocked/done/idle, grouped/pinned, collapsed, remote and mod-only cases have been checked without disturbing somebody else's agents or core. - Installation into a clean temporary home succeeds; a second install and collision/symlink cases fail without replacing existing files. - The archive contains only reviewed source/docs/tests/licenses and clean preview assets, never app state, transcripts, personal paths, credentials or binaries. - A real `herdr-app shot preview.png` from a clean demo workspace is inspected for privacy before the public GitHub folder is tagged `herdr-layout`.