open-design/apps/web/tests/components
lefarcen e149616dbe
fix(web): decouple privacy banner from onboarding and Settings lifecycles (#2525)
* fix(web): decouple privacy banner from onboarding and Settings lifecycles

The first-run privacy banner used to be tightly bound to two unrelated
surfaces: it was hidden whenever Settings was open, and the onboarding
panel only navigated in after the user had resolved the banner. The
coupling existed because the banner's z-index sat below modal backdrops,
so showing both at once collided visually, and the banner+onboarding
were linearized to avoid a "two unfinished things on screen" feel.

This change makes the three surfaces independent:

- Lift `.privacy-consent-banner` z-index above the modal-backdrop layer
  so the banner stays visible (and clickable) when Settings is open. The
  banner is already `pointer-events: none` with opt-in on its actionable
  children, so it does not steal clicks from the layer below.
- Drop the `!settingsOpen` guard from `showPrivacyConsent`.
- Drop the `privacyDecisionAt != null` guard from the bootstrap
  onboarding route; first-run users land on `/onboarding` purely based
  on `!onboardingCompleted`, and the banner sits on top in parallel.
- Drop the `navigate(... onboarding)` side effect from the banner's
  `onAccept` — the banner only persists the privacy decision now.

Bootstrap also had to be reshaped: the merged config is now computed
outside the `setConfig` updater so navigation can happen synchronously
after the state update. Calling `navigate` inside the updater triggered
a React "setState while rendering" warning, and reading a captured flag
after `setConfig` was unreliable because React 18+ batches the updater
to the next render — the navigate condition was never observed.

Existing test that asserted the old coupling ("banner unmounts while
Settings is open") is inverted to lock in the new contract.

* fix(web): defer privacy banner until onboarding is done and user lands on home

Product feedback on the previous lifecycle change: the banner should not
appear during the welcome panel. It should surface only:

  - immediately after the user Skips onboarding (lands directly on home), or
  - after the user finishes the design-system step and later returns to a
    home view from the project view they were dropped into.

To capture both paths with a single rule, the banner now requires:

  1. Daemon config hydrated (unchanged).
  2. No privacy decision recorded yet (unchanged).
  3. onboardingCompleted === true.
  4. The current route is a home route (route.kind === 'home').

The Skip path already routes through finishOnboarding, which calls
onCompleteOnboarding() + changeView('home') — that satisfies all four
gates the moment Skip is clicked.

The finish path (step 2: create design system) previously navigated to a
project view without marking onboardingCompleted. This commit mirrors the
Skip path by calling handleCompleteOnboarding() from the App-level
renderDesignSystemCreation onCreated callback (the onboarding-specific use
of DesignSystemCreationFlow). The shared DesignSystemFlow component is left
untouched so the create-from-Settings entry point keeps its existing
semantics.

The route gate keeps the banner suppressed while the user is reading their
just-created design system project. As soon as they navigate back to the
entry shell (home route), the banner appears.

Tests:
  - "withholds the privacy banner until onboarding completes" — covers
    gate 3 (onboardingCompleted=false while still on onboarding/home).
  - "withholds the privacy banner outside the home route" — covers gate 4
    (user is on a project route, onboardingCompleted=true).
  - Existing "keeps the first-run privacy banner mounted while settings is
    open" still passes; the Settings/banner z-index relationship is
    independent of these gates.

* fix(web): allow privacy banner to surface on non-home routes after onboarding

Follow-up to the previous lifecycle change. After exercising the design-
system finish path end-to-end, product wants the banner to appear in the
project view the user is dropped into — the first generation is running
in the background and the user is already waiting, so the disclosure can
be acknowledged inline rather than being held back until they navigate
back to a home view.

The Skip path is unchanged: Skip routes the user to home and the banner
appears there.

This drops the `route.kind === 'home'` guard and the matching test, and
adds a contract test that locks in banner visibility on a project route
when `onboardingCompleted=true` and no privacy decision has been made.
2026-05-21 14:51:59 +08:00
..
home-hero fix(plugins): stop recommending raw publish CLIs from authoring summary (#2380) 2026-05-20 15:39:42 +08:00
Theater test(web): Critique Theater Phase 13 (reducer p99 bench + surface coverage walker) (#1318) 2026-05-14 15:55:36 +08:00
AgentIcon.test.tsx Fix Kimi CLI icon contrast in light mode (#1667) 2026-05-14 20:32:52 +08:00
App.connectors.test.tsx fix(web): decouple privacy banner from onboarding and Settings lifecycles (#2525) 2026-05-21 14:51:59 +08:00
App.mediaProviders.test.tsx [codex] Add global onboarding flow without AMR (#2272) 2026-05-19 22:00:40 +08:00
assistant-message-tool-status.test.tsx fix(web): complete finished tool calls missing results (#1240) 2026-05-11 15:54:11 +08:00
assistant-message-unfinished-todos.test.tsx Garnet hemisphere (#1769) 2026-05-15 14:42:11 +08:00
AssistantMessage.test.ts chore: enforce test directory conventions (#496) 2026-05-05 15:34:22 +08:00
AssistantMessage.test.tsx [codex] Polish home composer working-directory controls (#2468) 2026-05-21 00:22:46 +08:00
auto-open-file.test.ts chore: enforce test directory conventions (#496) 2026-05-05 15:34:22 +08:00
BoardComposerPopover.pod-chip-hover.test.tsx feat(web): highlight captured Pod component on chip hover (#1982) 2026-05-18 16:34:19 +08:00
BoardComposerPopover.pod-remove.test.tsx feat(web): add manual removal for captured Pod components (#1951) 2026-05-17 20:13:56 +08:00
chat-feedback.test.tsx [codex] Polish home composer working-directory controls (#2468) 2026-05-21 00:22:46 +08:00
chat-scroll-preservation.test.tsx fix(web): keep chat pinned during content growth (#1716) 2026-05-15 14:12:00 +08:00
ChatComposer.context-pickers.test.tsx [codex] Add automation templates and proposal workflows (#2193) 2026-05-19 16:35:28 +08:00
ChatComposer.import-menu.test.tsx [codex] Update home starter template categories (#2501) 2026-05-21 13:14:08 +08:00
ChatComposer.infinite-render.test.tsx fix(web): stop re-syncing composer scroll on every keystroke (#2282) 2026-05-20 11:15:59 +08:00
ChatComposer.search.test.tsx Garnet hemisphere (#1769) 2026-05-15 14:42:11 +08:00
ChatPane.resume-conversation.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ChatPane.streaming.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
CommentTargetOverlay.hover-class.test.tsx feat(web): highlight captured Pod component on chip hover (#1982) 2026-05-18 16:34:19 +08:00
ConnectorsBrowser.test.tsx Add connector memory extraction flow (#2265) 2026-05-19 21:27:41 +08:00
ContinueInCliButton.test.tsx feat(web): add Finalize design package + Continue in CLI buttons (#451) (#974) 2026-05-10 11:44:32 +08:00
conversation-timestamps.test.tsx fix(web): freeze completed run durations across conversations (#1351) 2026-05-14 14:25:37 +08:00
CustomSelect.test.tsx feat(web): add custom select primitive (#1714) 2026-05-15 14:43:18 +08:00
DesignFilesPanel.test.tsx Polish project workspace UI (#2201) 2026-05-19 15:14:16 +08:00
DesignsTab.select-mode.test.tsx [codex] Polish home composer working-directory controls (#2468) 2026-05-21 00:22:46 +08:00
DesignsTab.test.ts chore: enforce test directory conventions (#496) 2026-05-05 15:34:22 +08:00
DesignSystemFlow.test.tsx [codex] Polish home composer working-directory controls (#2468) 2026-05-21 00:22:46 +08:00
DesignSystemsTab.test.tsx Polish design systems library layout (#2421) 2026-05-20 20:31:10 +08:00
EntryView.test.ts Add connector memory extraction flow (#2265) 2026-05-19 21:27:41 +08:00
examples-tab-filter-counts.test.tsx fix: keep examples filter counts consistent (#949) 2026-05-08 21:41:52 +08:00
examples-tab-preview-dispatch.test.tsx fix(web): dispatch Examples preview on od.preview.type (#897) (#1001) 2026-05-09 21:32:45 +08:00
examples-tab-retry.test.tsx fix(web): dispatch Examples preview on od.preview.type (#897) (#1001) 2026-05-09 21:32:45 +08:00
ExamplesTab.test.tsx test: expand entry and settings automation coverage (#954) 2026-05-11 10:49:42 +08:00
file-viewer-markdown-copy.test.tsx feat(analytics): add project_id + project_kind to studio/artifact events (#1509) 2026-05-13 12:13:55 +08:00
file-viewer-render-mode.test.ts feat(tweaks): bind toolbar toggle to artifact panel (#2348) 2026-05-20 18:00:49 +08:00
FileOpsSummary.test.tsx feat(web): implement file operations summary in assistant messages 2026-05-11 23:25:38 +08:00
FileViewer.manual-edit-history.test.tsx fix(web): align Icon names and FileViewer tests with merged state 2026-05-13 18:40:48 +08:00
FileViewer.manual-edit.test.tsx fix(web): align Icon names and FileViewer tests with merged state 2026-05-13 18:40:48 +08:00
FileViewer.test.tsx [codex] Update home starter template categories (#2501) 2026-05-21 13:14:08 +08:00
FileWorkspace.design-system.test.tsx [codex] Land design system GitHub intake handoff (#2187) 2026-05-19 14:30:17 +08:00
FileWorkspace.test.tsx Garnet hemisphere (#1702) 2026-05-14 21:12:50 +08:00
GenUISurfaceRenderer.diff-review.test.tsx feat(web): native diff-review UI on GenUISurfaceRenderer (Phase 8 entry slice) 2026-05-09 15:36:38 +00:00
GenUISurfaceRenderer.schema-form.test.tsx feat(daemon): enrich API responses with surface specs and add new flags 2026-05-11 20:27:05 +08:00
GenUISurfaceRenderer.test.tsx feat(web): plugin composer surface — applyPlugin + Rail + Inputs + GenUI renderer 2026-05-09 11:47:12 +00:00
HomeHero.plugin-picker.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
HomeHero.rail.test.tsx [codex] Update home starter template categories (#2501) 2026-05-21 13:14:08 +08:00
HomeView.context-picker.test.tsx Garnet hemisphere (#1769) 2026-05-15 14:42:11 +08:00
HomeView.media-options.test.tsx [codex] Update home starter template categories (#2501) 2026-05-21 13:14:08 +08:00
HomeView.plugin-i18n.test.tsx Garnet hemisphere (#1702) 2026-05-14 21:12:50 +08:00
HomeView.prefill.test.tsx [codex] Update home starter template categories (#2501) 2026-05-21 13:14:08 +08:00
InlinePluginsRail.test.tsx feat(web): enhance PluginLoopHome with plugin details modal and refined plugin rail 2026-05-11 23:18:34 +08:00
ManualEditPanel.test.tsx chore: pin dependency versions and harden CI caches (#2189) 2026-05-19 13:58:27 +08:00
MarketplaceView.test.tsx feat(web): MarketplaceView + PluginDetailView + /marketplace routes 2026-05-09 12:28:59 +00:00
McpClientSection.oauth.test.tsx fix(mcp): support no-auth local HTTP servers (#2008) 2026-05-18 17:08:46 +08:00
McpJsonHelper.test.tsx feat: add collapsible MCP JSON field-mapping helper (#1136) 2026-05-10 19:37:46 +08:00
MemorySection.test.tsx Add connector memory extraction flow (#2265) 2026-05-19 21:27:41 +08:00
modelOptions.test.tsx test: cover model option rendering (#948) 2026-05-08 21:38:13 +08:00
NewAutomationModal.context-picker.test.tsx [codex] Add automation templates and proposal workflows (#2193) 2026-05-19 16:35:28 +08:00
NewProjectModal.test.tsx Fix template project creation flow (#2399) 2026-05-20 17:18:24 +08:00
NewProjectPanel.media.test.tsx Revert "fix(web): restore consistent app header layout (#1432)" 2026-05-13 11:20:16 +08:00
NewProjectPanel.test.ts feat(audio): add ElevenLabs audio support (#1384) 2026-05-13 15:53:41 +08:00
NewProjectPanel.test.tsx fix(web): confirm before deleting saved template in New Project (#2330) 2026-05-20 14:50:36 +08:00
pet-task-center.test.ts [codex] Add pet task center and desktop pet (#1833) 2026-05-19 15:38:39 +08:00
PetOverlay.test.tsx [codex] Add pet task center and desktop pet (#1833) 2026-05-19 15:38:39 +08:00
PluginDetailsModal.dispatch.test.tsx feat(web): standardize plugin terminology and enhance UI components 2026-05-13 12:19:29 +08:00
pluginFolderActions.test.ts fix(plugins): make Publish repo actually create the author's repo (#2332) (#2363) 2026-05-20 15:38:29 +08:00
PluginInputsForm.test.tsx chore: pin dependency versions and harden CI caches (#2189) 2026-05-19 13:58:27 +08:00
plugins-home-facets.test.ts [codex] Update home starter template categories (#2501) 2026-05-21 13:14:08 +08:00
plugins-home-html-surface.test.tsx feat(daemon): enhance plugin preview handling and add fallback mechanisms 2026-05-12 16:45:24 +08:00
plugins-home-preview.test.ts feat(web): enhance TasksView and plugin preview components with new features and styles 2026-05-12 18:10:37 +08:00
plugins-home-section.test.tsx [codex] Update home starter template categories (#2501) 2026-05-21 13:14:08 +08:00
plugins-home-visualScore.test.ts feat(plugins): enhance visual score sorting and add new example templates 2026-05-13 21:02:05 +08:00
PluginShareMenu.test.tsx feat(plugins): add login and whoami commands for GitHub CLI authentication 2026-05-14 07:25:05 +08:00
PluginsSection.test.tsx feat(web): redesign entry view with new navigation and home layout 2026-05-12 10:56:35 +08:00
PluginsView.test.tsx Reapply "fix(web): demote Plugins and Integrations to nav rail footer (#1806)" (#2360) (#2397) 2026-05-20 18:27:48 +08:00
preview-modal-error-state.test.tsx fix(web): show explicit error/retry state when example preview HTML fails to load (#863) 2026-05-08 11:16:14 +08:00
preview-modal-fullscreen.test.tsx test(e2e): gate beta packaged runtime (#637) 2026-05-06 17:44:29 +08:00
preview-modal-unavailable-state.test.tsx fix(web): dispatch Examples preview on od.preview.type (#897) (#1001) 2026-05-09 21:32:45 +08:00
PreviewDrawOverlay.test.tsx fix(web): keep draw overlay scrollable (#1848) 2026-05-15 23:05:49 +08:00
PreviewModal.test.tsx fix: fix link handling in example preview iframe sandbox (#701) 2026-05-09 21:24:25 +08:00
PrivacyConsentModal.test.tsx feat(privacy): collapse first-run consent banner to a single "I get it" button (#2202) 2026-05-19 15:26:56 +08:00
PrivacySection.test.tsx feat: add opt-in Langfuse telemetry (#800) 2026-05-09 10:06:01 +08:00
ProjectDesignSystemPicker.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ProjectView.api-empty-response.test.tsx test(e2e): harden extended coverage state assertions (#2245) 2026-05-20 16:21:01 +08:00
ProjectView.deleteConversation.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ProjectView.pendingPrompt.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ProjectView.projectInstructions.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ProjectView.resume-conversation.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ProjectView.run-cleanup.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ProjectView.run-isolation.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
ProjectView.tabs-navigation.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00
QuestionForm.test.tsx feat(audio): add ElevenLabs audio support (#1384) 2026-05-13 15:53:41 +08:00
QuickSwitcher.test.tsx feat(web): add Cmd/Ctrl+P quick file switcher (#556) 2026-05-06 10:31:50 +08:00
RecentProjectsStrip.test.tsx [codex] Polish home composer working-directory controls (#2468) 2026-05-21 00:22:46 +08:00
RoutinesSection.test.tsx [codex] Add automation templates and proposal workflows (#2193) 2026-05-19 16:35:28 +08:00
SettingsDialog.execution.test.tsx Polish Design Systems settings gallery controls (#2392) 2026-05-21 11:30:15 +08:00
SettingsDialog.media.test.tsx refactor(web): rename Execution mode and tighten settings dialog UI (#1568) 2026-05-15 14:35:06 +08:00
SettingsDialog.orbit.test.tsx chore: pin dependency versions and harden CI caches (#2189) 2026-05-19 13:58:27 +08:00
SettingsDialog.test.ts [codex] Add Cursor Agent auth diagnostics (#1538) 2026-05-13 20:25:34 +08:00
sketch-model.test.ts fix(web): render static previews for sketch json files (#1060) 2026-05-11 19:29:46 +08:00
SkillsSection.test.tsx fix(web): warn before editing a built-in skill creates a shadow (#1850) 2026-05-17 18:30:45 +08:00
TasksView.history.test.tsx [codex] Add automation templates and proposal workflows (#2193) 2026-05-19 16:35:28 +08:00
TasksView.templates.test.tsx [codex] Add automation templates and proposal workflows (#2193) 2026-05-19 16:35:28 +08:00
Toast.test.tsx feat(web): add Finalize design package + Continue in CLI buttons (#451) (#974) 2026-05-10 11:44:32 +08:00
TrustBadge.test.tsx feat(web): unify plugin trust badges (#2088) 2026-05-18 19:20:01 +08:00
UpdaterPopup.test.tsx Improve desktop updater ready UI (#2403) 2026-05-20 17:29:28 +08:00
use-everywhere-agent-guide.test.ts feat(web): enhance entry view with responsive topbar and GitHub star integration 2026-05-12 11:57:41 +08:00
WorkingDirPill.test.tsx [codex] Polish home composer working-directory controls (#2468) 2026-05-21 00:22:46 +08:00
WorkspaceTabsBar.test.tsx Keep PR 2400 changes without folder pickers (#2462) 2026-05-20 22:07:30 +08:00