15 KiB
Shared popout contract
Tracking: #1383; foundation and Template family slice #1401. This is an implementation inventory, not a completion claim. Native acceptance and remaining consumer migrations are still required.
Geometry
All values scale with the root text size. Header inset is 1rem horizontally and 0.625rem vertically, minimum height 3.5rem. Body and footer insets and section gaps are 1rem. The close target is 2.125rem square, with one accessible name, a Close tooltip, and the shared visible focus treatment. Header, body, and footer use the same background and border tokens.
| Variant | Maximum width | Presentation |
|---|---|---|
| confirm | 28rem | Centered confirmation |
| form | 36rem | Centered form |
| authoring | 65rem | Centered multi-section editor |
| utility | 38rem | Right-side panel |
| task | 60rem | Task workspace |
| chat | 31rem | Chat panel |
Ordinary dialogs clamp to the viewport minus 1rem on each edge. Utility panels occupy the available height. Compound layouts use one primary vk-overlay-scroll region and a non-scrolling OverlayFooter; feature code must not subtract guessed header heights from the viewport. A utility panel opened inside a dialog is presented as a centered authoring dialog instead of stacking arbitrary drawers.
The shared provider registers only open overlays, removes unmounted entries, and gives Escape, outside-click, and focus trapping to the top entry. Inactive parents remain visible behind the scrim but are inert. Shared overlays require the default portal so a child cannot inherit its parent's inert subtree. Closing a child returns focus to its trigger after the parent trap reactivates. Form data remains owned by feature components. Explicit Escape guards remain respected. Entire parent/child families must migrate together; raw legacy children are not members of this stack.
Consumer inventory
The task-family migration in #1444 is tracked in Task overlay family acceptance. Its per-family browser and native evidence remains incomplete; adoption of a shared primitive is not completion of the inventory row.
Line numbers identify the audited opening and may move during migration. A shared primitive alone does not prove the feature's inner scroll, spacing, or keyboard behavior. Each row remains subject to rendered acceptance.
| Consumer | Opening line | Intended variant | Status |
|---|---|---|---|
| TemplateEditorDialog.tsx | 188 | authoring | Shared primitive adopted; runtime acceptance pending |
| TemplatesPage.tsx | 274 | confirm | Shared primitive adopted; runtime acceptance pending |
| TemplatesPage.tsx | 298 | form | Shared primitive adopted; runtime acceptance pending |
| SearchDialog.tsx | 282 | authoring | Shared geometry; browser/native passed #1440 |
| AdmissionQueuePanel.tsx | 315 | form | Migration pending |
| WorkflowStartDialog.tsx | 71 | form | Migration pending; migrate with nested consumers |
| CreateTaskDialog.tsx | 267 | form | Migration pending; migrate with nested consumers |
| PolicyManager.tsx | 552 | authoring | Shared modal; runtime acceptance pending in #1423 |
| PolicyManager.tsx | 906 | form | Shared modal; runtime acceptance pending in #1423 |
| TimeTrackingSection.tsx | 243 | form | Migration pending |
| BulkActionsBar.tsx | 366 | confirm | Migration pending |
| ArchiveSuggestionBanner.tsx | 92 | confirm | Migration pending |
| ConflictResolver.tsx | 124 | utility | Migration pending |
| ConflictResolver.tsx | 383 | confirm | Migration pending |
| FilterBar.tsx | 349 | form | Migration pending |
| FilterBar.tsx | 374 | confirm | Migration pending |
| ChatPanel.tsx | 279 | chat | Migration pending; migrate with nested consumers |
| ChatPanel.tsx | 297 | confirm | Migration pending; migrate with nested consumers |
| TaskWorkView.tsx | 1055 | confirm | Migration pending |
| ObservationsSection.tsx | 118 | confirm | Migration pending |
| SquadChatPanel.tsx | 522 | chat | Migration pending; migrate with nested consumers |
| ReviewPanel.tsx | 212 | form | Migration pending |
| ArtifactPreviewModal.tsx | 112 | authoring | Migration pending |
| CommandPalette.tsx | 293 | form | Shared geometry; browser/native passed #1440 |
| SettingsDialog.tsx | 529 | authoring | Shared geometry; browser/native passed #1436 |
| SettingsDialog.tsx | 739 | confirm | Shared geometry; browser/native passed #1436 |
| PRDialog.tsx | 36 | authoring | Migration pending |
| ActivitySidebar.tsx | 244 | utility | Migration pending |
| SortableListItem.tsx | 171 | confirm | Shared geometry; browser/native passed #1436 |
| WorktreeStatus.tsx | 374 | form | Migration pending |
| WorktreeStatus.tsx | 404 | confirm | Migration pending |
| TaskDetailsTab.tsx | 254 | confirm | Migration pending |
| KeyboardShortcutsDialog.tsx | 49 | form | Shared geometry; browser/native passed #1440 |
| ArchiveSidebar.tsx | 240 | utility | Migration pending |
| MobileShell.tsx | 129 | utility | Migration pending |
| ApplyTemplateDialog.tsx | 305 | authoring | Migration pending |
| PreviewPanel.tsx | 71 | utility | Migration pending; migrate with nested consumers |
| AttachmentsSection.tsx | 172 | confirm | Migration pending |
| SectionHeader.tsx | 66 | confirm | Shared geometry; browser/native passed #1436 |
| DesktopOnboarding.tsx | 711 | authoring | Migration pending |
| AgentRunTimelinePanel.tsx | 1373 | form | Migration pending |
| DeliverablesSection.tsx | 272 | confirm | Migration pending |
| DrillDownPanel.tsx | 14 | utility | Migration pending |
| WorkflowSection.tsx | 266 | authoring | Migration pending |
| CommentsSection.tsx | 190 | confirm | Migration pending |
| TaskDetailPanel.tsx | 271 | task | Migration pending |
| sheet.tsx | 147 | utility | Migration pending |
| alert-dialog.tsx | 136 | form | Migration pending |
| WorkProductsSection.tsx | 504 | authoring | Migration pending |
| WorkProductsSection.tsx | 551 | authoring | Migration pending |
| AgentPanel.tsx | 630 | confirm | Migration pending |
| AgentPanel.tsx | 661 | form | Migration pending |
| dialog.tsx | 157 | form | Migration pending |
| ExportDialog.tsx | 106 | form | Migration pending |
| SkillRiskDashboardPanel.tsx | 339 | form | Shared geometry; browser/native passed #1436 |
| ToolPoliciesTab.tsx | 269 | authoring | Shared geometry; browser/native passed #1436 |
| GeneralTab.tsx | 404 | confirm | Shared geometry; browser/native passed #1436 |
| TemplateComponents.tsx | 252 | confirm | Shared geometry; browser/native passed #1436 |
| SecurityTab.tsx | 174 | confirm | Shared geometry; browser/native passed #1436 |
| AgentsTab.tsx | 2331 | confirm | Shared geometry; browser/native passed #1436 |
| MaintenanceTab.tsx | 590 | form | Shared geometry; browser/native passed #1436 |
The mobile notification drawer is a deliberate bottom-sheet exception; it still needs matching spacing and keyboard checks. Compatibility wrappers in ui/dialog.tsx, ui/alert-dialog.tsx, and ui/sheet.tsx remain inventoried above where they instantiate roots; their public call sites must not be silently treated as migrated. Docked Workbench chat is not a modal and must keep its non-modal focus model while adopting the same header/composer spacing.
Acceptance surface
Open ?ui-gallery=1 and use the Popout geometry cards. Each variant opens the actual shared component with a long scrolling body, fixed footer, and nested confirmation. e2e/popout-contract.spec.ts checks bounds, scaled insets, state retention, Escape, and focus restoration in dark/light themes at 1180×760 and 900×480 with increased text size. Browser checks do not replace rebuilt packaged macOS captures. Those captures, every production-consumer check, and the final documentation media refresh remain pending.