open-design/apps/web/tests/components
lefarcen 9596a0ccd5
feat(privacy): collapse first-run consent banner to a single "I get it" button (#2202)
* feat(privacy): collapse first-run banner to a single "I get it" button

Replaces the first-run privacy disclosure's two-button decision picker
("Share usage data" / "Don't share") with a single "I get it"
acknowledgement. Clicking it accepts the same default telemetry surface
the previous "Share usage data" path enabled — the banner shifts from
binary consent picker to informed disclosure.

To keep the surface honest, the banner footer is rewritten to spell out
the new default and point at the off switch:

  "Data sharing is on by default. You can turn it off any time in
   Settings → Privacy. We never upload the contents of your generated
   artifact files."

Settings → Privacy (PrivacySection.tsx) is unchanged — that surface still
exposes both Share and Don't share buttons so users who arrive there
later (or come back to flip the choice) keep the explicit picker.

Mechanics:

* `PrivacyConsentModal.tsx`: drop `onDecline` prop and the second button;
  rename `onShare` → `onAccept` to match the new semantic. Footer hint
  now reads from `settings.privacyConsentBannerFooter` (new key) so the
  banner copy can speak in single-button voice without disturbing the
  reused `settings.privacyConsentFooter` that PrivacySection still
  displays.

* `App.tsx`: drop the `onDecline` handler. Single `onAccept` handler
  applies the same opt-in payload as the previous `onShare` branch
  (`telemetry.metrics = true`, `telemetry.content = true`, fresh
  `installationId`), so the wire format daemon-side is unchanged.

* `i18n/types.ts` + `locales/en.ts`: two new keys —
  `settings.privacyConsentAccept` ("I get it") and
  `settings.privacyConsentBannerFooter` (the default-on disclosure copy).

* `i18n/locales/*.ts` (all 18 non-en dictionaries): added the two new
  keys. zh-CN and zh-TW are translated; the remaining 16 locales follow
  the project convention of leaving the EN string as a fallback for
  later contributor passes (same shape used by privacyConsentShare /
  Decline today).

* `tests/components/PrivacyConsentModal.test.tsx`: rewritten. The four
  new tests lock the new contract — single "I get it" button, no
  Share/Decline labels, default-on disclosure text in the footer, the
  external privacy-policy link, and onAccept firing on click. Replaces
  the prior "equal-prominence" tests, which only made sense for the
  two-button shape.

Validation:

* `pnpm --filter @open-design/web exec vitest run tests/components/PrivacyConsentModal.test.tsx`
  → 4/4 passed
* `pnpm --filter @open-design/web exec vitest run tests/i18n/locales.test.ts`
  → 5/5 passed (every locale aligned with English keys + placeholders;
  the new keys ship to all 19 dictionaries)
* `pnpm --filter @open-design/web typecheck` clean

* test(privacy): update App.connectors fixture to match single-button banner

`App.connectors.test.tsx > does not show first-run privacy consent until
daemon config hydration finishes` hardcoded the previous "Share usage
data" affirmative button label. The single-button banner now renders
"I get it", so the assertion was looking for a button that no longer
exists.

CI signal: 26081467446 → Web workspace tests → `× does not show
first-run privacy consent until daemon config hydration finishes`. The
App workspace tests + Validate workspace failures cascaded from this
one — both are aggregator jobs.

Local: vitest run tests/components/App.connectors.test.tsx → 5/5 passed.
2026-05-19 15:26:56 +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 feat(privacy): collapse first-run consent banner to a single "I get it" button (#2202) 2026-05-19 15:26:56 +08:00
App.mediaProviders.test.tsx Merge origin/main into garnet-hemisphere (reconcile) 2026-05-13 22:29:21 +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 Revert "fix(web): restore consistent app header layout (#1432)" 2026-05-13 11:20:16 +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 fix(web): auto-scroll feedback form (#1566) 2026-05-13 19:06:08 +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 fix(web): expand skill mention picker (#2170) 2026-05-19 13:49:15 +08:00
ChatComposer.search.test.tsx Garnet hemisphere (#1769) 2026-05-15 14:42:11 +08:00
ChatPane.streaming.test.tsx [codex] Land design system GitHub intake handoff (#2187) 2026-05-19 14:30:17 +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 fix(web): keep connector errors out of cards (#1740) 2026-05-18 17:06:46 +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 feat(web): redesign Designs tab cards — covers, tags, overflow menu, multi-select (#1161) 2026-05-12 15:08:22 +08:00
DesignsTab.test.ts chore: enforce test directory conventions (#496) 2026-05-05 15:34:22 +08:00
DesignSystemFlow.test.tsx [codex] Land design system GitHub intake handoff (#2187) 2026-05-19 14:30:17 +08:00
DesignSystemsTab.test.tsx [codex] Land design system GitHub intake handoff (#2187) 2026-05-19 14:30:17 +08:00
EntryView.test.ts fix(web): surface connector auth errors and stop silent popup close (#725) (#1128) 2026-05-10 19:38:18 +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 Prevent imported Claude canvases from zooming on scroll (#1726) 2026-05-15 16:37:57 +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 Polish project workspace UI (#2201) 2026-05-19 15:14:16 +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 fix(web): demote Plugins and Integrations to nav rail footer (#1806) 2026-05-19 14:58:15 +08:00
HomeHero.rail.test.tsx fix(web): demote Plugins and Integrations to nav rail footer (#1806) 2026-05-19 14:58:15 +08:00
HomeView.context-picker.test.tsx Garnet hemisphere (#1769) 2026-05-15 14:42:11 +08:00
HomeView.media-options.test.tsx Implement Home audio essential workflow (#2104) 2026-05-18 23:14:03 +08:00
HomeView.plugin-i18n.test.tsx Garnet hemisphere (#1702) 2026-05-14 21:12:50 +08:00
HomeView.prefill.test.tsx fix(web): demote Plugins and Integrations to nav rail footer (#1806) 2026-05-19 14:58:15 +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 test(web): decouple memory preview icon assertion (#1863) 2026-05-16 11:37:34 +08:00
modelOptions.test.tsx test: cover model option rendering (#948) 2026-05-08 21:38:13 +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): surface daemon error messages for invalid folder imports (#1923) 2026-05-17 15:00:49 +08:00
PluginDetailsModal.dispatch.test.tsx feat(web): standardize plugin terminology and enhance UI components 2026-05-13 12:19: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 feat(daemon, web): enhance plugin preview handling and add new templates 2026-05-13 20:58:24 +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 feat(plugins): add login and whoami commands for GitHub CLI authentication 2026-05-14 07:25:05 +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 fix(web): demote Plugins and Integrations to nav rail footer (#1806) 2026-05-19 14:58:15 +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
ProjectView.api-empty-response.test.tsx Fix pointer HTML artifact previews (#2075) 2026-05-18 18:28:28 +08:00
ProjectView.deleteConversation.test.tsx Add reliable agent-browser skill (#1284) 2026-05-11 20:09:12 +08:00
ProjectView.pendingPrompt.test.tsx feat: generic skills + split skills/design-templates + finalize-design API (#955) 2026-05-11 17:48:34 +08:00
ProjectView.projectInstructions.test.tsx feat(web): surface saved Project instructions for review and retrieval (#1933) 2026-05-17 23:07:25 +08:00
ProjectView.run-cleanup.test.tsx [codex] Land design system GitHub intake handoff (#2187) 2026-05-19 14:30:17 +08:00
ProjectView.run-isolation.test.tsx Fix conversation run isolation (#1271) 2026-05-11 21:13:54 +08:00
ProjectView.tabs-navigation.test.tsx fix(web): deep-link Routines history rows to their specific conversation (Fixes #1505) (#1508) 2026-05-14 14:27:34 +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
RoutinesSection.test.tsx Persist routine failure reasons (#1963) 2026-05-17 23:22:00 +08:00
SettingsDialog.execution.test.tsx chore: pin dependency versions and harden CI caches (#2189) 2026-05-19 13:58:27 +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
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
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
WorkspaceTabsBar.test.tsx Garnet hemisphere (#1769) 2026-05-15 14:42:11 +08:00