AGENTS.md@packages/client/src/components/questions · git:20261015.f6de4a9 · 2026-10-15 · sha256 ec082b2031609e5a
AGENTS.md@packages/client/src/components/questions git:20261015.f6de4a9A
Immutable. This exact content never changes and is served at /api/v1/blob/ec082b2031609e5a.
# DOX — packages/client/src/components/questions
Files in this directory. One row per source file. See change: add-pending-question-stack.
| File | Purpose |
|------|---------|
| `QuestionDialog.tsx` | `QuestionDialog({row,gone,onClose,onOpenSession?})`. Own modal (`DialogPortal` + `useFocusTrap` + `useEscapeDismiss`): `role=dialog`, `aria-modal`, `aria-labelledby`→title. Esc intercepted in capture phase (renderer Esc-cancels never answers). Lazy `GET /api/questions/:id`, refetch on `row.briefStatus`. `BriefSection` (label provided/generated/limited, `pending`→Summarizing, Summarize→`question-brief-summarize`, failure→inline alert + `question-brief-retry`), `QuestionSection` (reuses `getInteractiveRenderer`; `<fieldset disabled>` when answered/busy; file origin → read-only + `question-access-link` to `/settings/access`), `ContextSection` (`<details question-context>`, open when pending; ≤5 tools; absent reasons none/evicted; PLAIN TEXT only). Answer → `encodeDialogAnswer` → POST; 409/404 → `question-answered` callout. Mobile tier = full screen, sticky footer. |
| `QuestionStack.tsx` | `QuestionStack({sessions,onOpenSession,store?})`. Header pill `question-pill` (aria-label "N open question(s)", `aria-expanded/controls`, tint-purple tokens, ≥44×44 on mobile, absent at 0, `arrive` class once per new id, never on first frame / reduced motion). Panel `question-panel` (portal; desktop dropdown at header-app-bar rect, mobile bottom sheet + scrim): newest 5 + `question-more` → expanded `question-list` max-height 60vh; rows `question-row-<id>` (label, change, preview ≤140, age, origin badge, Go to session / Answer here). Esc/outside click closes, focus → pill. Activation → `routeQuestion`; hidden → hosts `QuestionDialog` (row kept live; vanished → `gone`). Mounted in `SessionList` row 1 after `YoloPill`. |
| `__tests__/` | `QuestionStack.test.tsx` (E16/E17/F1/F6/F9), `QuestionStack.mobile-and-focus.test.tsx` (mobile tier, focus return), `QuestionDialog.test.tsx` (F4/F5/F6, answering), `question-fixtures.ts`. |