2.1 KiB
2.1 KiB
UI Change Playbook
Use this when an agent changes layout, navigation, shell, buttons, dialogs, inputs, tables, feedback UI, or any apps/web/app/components/ui primitive.
First Reads
docs/ui-inventory/surface-map.mddocs/ui-inventory/surfaces.jsondocs/ui-inventory/components.jsonapps/web/app/application/ui/uiRegistry.tsdocs/agent-playbooks/ui-adapter-migration.mdif the change touchespackages/ui
Agent Workflow
- Identify the target by
data-ui-id, not by visual guesswork. - Find the source file in
docs/ui-inventory/surfaces.jsonorcomponents.json. - Check whether the change is a surface change, component primitive change, or feature-specific UI change.
- Preserve or add stable
data-ui-idattributes for user-visible surfaces and actions. - Update
docs/ui-inventory/components.jsonwhen adding root UI primitives. - Update
docs/ui-inventory/surfaces.jsonwhen adding or renaming surfaces/actions/navigation IDs. - Add or update DOM tests for important
data-ui-idbehavior.
Rules
- Do not add sidebar/nav items without stable IDs.
- Do not add dynamic UI items without
uiIdPatternanduiIdParams. - Do not move app components into
packages/uiunless the adapter migration playbook says the category is ready. - Do not change
packages/uiexports in a way that imports app runtime or React components unless that migration phase explicitly owns it. - Do not rely on visible text alone to locate UI in agent instructions; prefer
data-ui-id.
Common Requests
- "Change the app sidebar": start with
ui.surface.app.sidebar. - "Change admin sidebar settings": start with
ui.nav.admin.settings. - "Change header search": start with
ui.action.shell.search. - "Change header right actions": start with
ui.surface.shell.navActions. - "Change page content shell": start with
ui.surface.shell.main.
Done Criteria
- Target UI ID still exists in rendered DOM.
- New UI IDs are listed in
surfaces.jsonwhen stable. - Root primitives are listed in
components.json. - Tests cover changed registry, inventory, or DOM behavior.