AGENTS.md@packages/client/src/lib/layout · git:20261022.106f2a6 · 2026-10-22 · sha256 6c4ab70c6f78208e

AGENTS.md@packages/client/src/lib/layout git:20261022.106f2a6A

Immutable. This exact content never changes and is served at /api/v1/blob/6c4ab70c6f78208e.

# DOX — packages/client/src/lib/layout

Files in this directory. One row per source file. See change: fold-oversized-agents-directories.

| File | Purpose |
|------|---------|
| `chat-pane-row-class.ts` | Row classification (`shrinkable` vs `fixed`), declared transcript floor/bound/weights, composer bound, and header bound/floor/weight (`CHAT_HEADER_BOUND` 0, `CHAT_HEADER_FLOOR` 1, `CHAT_HEADER_WEIGHT` 2) for `split-chat-pane` below-floor allocation. Seven shrinkable rows now: transcript, composer, `content-header-sticky` (owns a scrollport; bound 0 so an empty slot takes no pane height), the collapsed-dock entries `composer-dock:collapsed` (bound `COLLAPSED_BAR_PX` 44, floor bound + 1) and `composer-dock:collapsed-yolo` (bound 44 + 32), and the dock's two static shapes `composer-dock` (bound `YOLO_FOOTER_HEIGHT` 32, floor bound + 41, weight 1) and `composer-dock:footer-only` (bound 32, floor 33); App picks the key. `composer-context-strip`, `status-bar`, `queue-panel` fixed rows removed. Exports `YOLO_FOOTER_HEIGHT`, `DOCK_LANE_HEADER_FLOOR`, `DOCK_WEIGHT`, `COLLAPSED_BAR_PX`. See changes: consolidate-flow-agent-cards, add-composer-dock (D10), composer-dock-collapse-and-file-open. |
| `editor-pane-state.ts` | Per-session pane state + localStorage persistence under `pi-dashboard:editor-pane:<sessionId>`. → see `editor-pane-state.ts.AGENTS.md` |
| `editor-tab-open.ts` | Client side of `editor_tab_open`: `isOnSessionRoute(pathname, sessionId)` (chat or editor route only), `useEditorTabOpenListener(pathname, navigate)` → `openPluginTabRoute` (one navigation, fresh nonce); ignored on other sessions/settings/landing. See change: add-browser-editor-pane-tab. |
| `folder-pane-id.ts` | Namespaced localStorage key for the folder-scoped editor pane. Exports `FOLDER_PANE_PREFIX` (`folder:`), `folderPaneId(cwd)`, `isFolderPaneId(id)`. Disjoint from UUID session-id key space. See change: remove-external-editor-integration. |
| `mobile-depth.ts` | Computes `MobileShell` nav depth from route-match flags. Exports `MobileDepthInput`, `getMobileDepth(input)`… → see `mobile-depth.ts.AGENTS.md` |
| `rail-width.ts` | Per-session browse-rail width, localStorage `pi-dashboard:rail:<id>`, clamp [160,480], default 224. `useRailWidth`. Independent of outer split ratio. See change: split-editor-workspace. |
| `sidebar-dnd.ts` | Shared drag-and-drop helpers for sidebar `SessionList`. Exports `compatibleClosestCenter` + `DRAG_TARGETS` (type-aware collision…, `resolveFolderMove` → see `sidebar-dnd.ts.AGENTS.md` |
| `split-state.ts` | Per-session split state (`open`,`ratio`,`orientation`), localStorage key `pi-dashboard:split:<id>`. → see `split-state.ts.AGENTS.md` |
| `use-terminal-pane-tabs.ts` | Terminal-tab slice for an editor pane. Hosts terminals as virtual `term:<id>` tabs (`terminal` viewer kind) beside file tabs. Pure planners `stripTermId`/`openTerminalIds`/`reconcileTerminalTabs`. Hook `useTerminalPaneTabs({cwd,terminals,autoSurface,paneState,dispatch,ensureOpen,on*})` → `{terminals,createTerminal,openTerminal,killTerminal,closeTerminalTab,renameTerminal,onTerminalTitle}`. Effect: D5 reconcile (drop stale `term:` tabs on set-change/mount, keyed off id-signature), D3 auto-surface (folder, open every live id, `activate:false`); create→open via `pendingCreateRef` (both modes). Filters ephemeral. `closeTerminalTab`=closeByPath+kill (D4). Exports `TerminalPaneTabs`. Optional opts `focusOnMount`/`terminalsReady`/`onFocusConsumed` = one-shot terminal-focused entry: gate on `terminalsReady`, newest non-ephemeral `createdAt` (last-element tie-break) → activate, else create once; effect declared AFTER reconcile so activation wins `activeIndex`; `focusHandledRef` burned only when an action ran, reset on cwd change. See change: terminals-in-tabbed-panes. See change: fix-terminals-action-opens-terminal.  auto-surfaced tabs open `activate:false`; a freshly-created terminal still activates. See change: add-lazy-terminal-diff-bootstrap. |
| `useSplitRatio.ts` | Split-divider drag math. `ratioFromPointer`, `clampWidth` (pure). `useSplitRatio` hook removed. See change: split-editor-workspace. See change: fix-split-divider-drag. |