git:20261019.55c89ac to git:20261022.4339930

1 added, 0 removed. Audit A to A.

# DOX — packages/client/src/components/DirectorySettings
Files in this directory. One row per source file.
| File | Purpose |
|------|---------|
| `CardSectionsPage.tsx` | Directory Settings › Session cards (`cards`). Tri-state rows Default(<global>)/Show/Hide (Default sends null = sparse), groups Sections / Plugin sections / Card lines, `overridden` badge, `Reset to global` (disabled with 0 overrides), OPENSPEC note + link `/settings/openspec`, context-bar row links `/settings/general` (no toggle), synthetic live preview from the resolver. Writes apply immediately. See change: configurable-session-card-sections. Adds the `Directory card` group (folder-scoped blocks + `pill-*` plugin rows) and the global-only `Effects` group (`fx-*` rows, inert here). The `Default (…)` label resolves through the legacy parent, so a row inheriting a hidden parent reads as hidden. Mounts `<FocusNotice/>` while focus mode is on — a focus profile outranks these writes. See change: add-focus-mode-and-card-block-toggles. |
| `DirectorySettings.tsx` | Directory-scoped settings page. Mirrors SettingsPanel left-nav, mobile hierarchy. Props `{cwd,page,onBack,onViewFile}`. Pages instructions/packages + `RESOURCES` group (skills/agents/extensions/prompts/themes) each a `ResourceGridPanel` (local+global, scope filter); nav count pills from one `usePiResources` fetch; default packages. Route `/folder/:cwd/settings/:page?`. `directory-settings-content` wrapper = `flex flex-col min-h-0 overflow-y-auto` (parity with global `settings-content`; height for Instructions split, scroll for grids). See change: directory-settings-page-and-scoped-md-editing; directory-settings-tree-and-resize; resources-card-tabs. Root is `flex-1 flex flex-col min-w-0 min-h-0` (NOT `h-full`); edited globally, so all THREE mount contexts (flush overlay, live chain, mobile `renderFolderSettings`) are in blast radius. See change: fix-flush-dialog-scroll-and-close-collision. Strip under the header mounts `DirectoryYoloAction cwd={cwd}` (pre-scoped YOLO, own folder pre-selected, one shared session). See change: add-access-grant-dialog (tasks 8b.7a). Adds page `cards` (Session cards, after Packages) → `CardSectionsPage`. See change: configurable-session-card-sections. Page id `packages` → `add-ons` (nav label Add-ons, `DirectorySettingsPage` union). See change: addons-hub-declutter. Passes `cwd` to `ScopedResourceGrid`. See change: add-skill-atlas-screen. |
| `FilePicker.tsx` | Scope-bounded `.md`/`.mdx` candidate picker. Fetches `GET /api/file/md-candidates` (omit cwd = global). Scope chip + substring filter. Folds candidates into a collapsible folder tree (`buildTree`): `DirRow` chevron + `depth*16px` indent, `FileRow` basename-only. Collapsed `Set` defaults expanded, persists to `localStorage:dashboard:dirset-collapsed` (only collapsed paths). Filter force-expands matching branches. `width` prop = desktop px (undefined = mobile full width); rows ≥44px below `md`. See change: directory-settings-page-and-scoped-md-editing; directory-settings-tree-and-resize. |
| `file-tree.ts` | Pure folder-tree builder for FilePicker. `buildTree(candidates)` splits `relPath` on `/`, nests dirs (sorted), collects basename leaves; plain tree (single-child dirs NOT merged). `subtreeMatches(node,q)` = descendant/dir-name match for filter force-expand. Exports `buildTree`, `subtreeMatches`, `TreeNode`, `FileLeaf`. See change: directory-settings-tree-and-resize. |
+ | `FolderAddonsParts.tsx` | Variable link targets render via `SafeLink` (`classifyUrl`; blocked → inert text). See change: harden-client-sinks. |
| `InstructionsEditorPane.tsx` | Presentational editor pane for Instructions page. Renders file tab, conflict banner, lazy Monaco `MarkdownEditor`, dirty-gated Save Bar. Optional `onBack` renders a mobile back arrow (`instructions-mobile-back`) in the file tab. Exports `InstructionsEditorPane`. Split from `InstructionsPage` (container holds state machine, pane holds view). See change: directory-settings-tree-and-resize. |
| `InstructionsPage.tsx` | Edits markdown. FilePicker + resize gutter + lazy Monaco MarkdownEditor + dirty-gated Save Bar. Reads `GET /api/file/md-read`, writes `POST /api/file/write`. 409 conflict banner (Reload/Overwrite). beforeunload + Confirm on dirty file-switch. Props `{cwd?}`; cwd present = directory scope, absent = global (~/.pi/agent). `useIsDesktop` (`md`) gates layout: desktop = resizable split (`useTreeColumnWidth` + `tree-gutter`); mobile = master/detail keyed off `?file=` (`resolveSelection` viewport-gates default selection; `backToTree` clears `?file=`). See change: directory-settings-page-and-scoped-md-editing; directory-settings-tree-and-resize. |
| `FolderAddonRow.tsx` | One From Global row: scope/origin badges, part chips, `off in this folder`/`partly off here` badge, "on here" `role=checkbox` switch (`mixed` when partly off), plugin-stays / agents-still-load / off-globally / keptOn / error / notOwned notes. See change: addons-hub-folder-view. |
| `PackagesPage.tsx` | Folder Add-ons page "Add-ons in this folder": Global/This folder switch, effective-set strip, explainer, tabs What loads here (Added in this folder + own `.pi` files row, From Global, Dashboard-only) / Discover (off-here recommended + `PackageBrowser` local). State in `useFolderAddons`. See change: addons-hub-folder-view, directory-settings-page-and-scoped-md-editing. |