Skip to content

feat: [ENG-2621] open the analytics disclosure by default in the Privacy tab#742

Open
ncnthien wants to merge 1 commit into
proj/analytics-system-tool-modefrom
feat/ENG-2621
Open

feat: [ENG-2621] open the analytics disclosure by default in the Privacy tab#742
ncnthien wants to merge 1 commit into
proj/analytics-system-tool-modefrom
feat/ENG-2621

Conversation

@ncnthien
Copy link
Copy Markdown
Collaborator

Summary

  • Default `detailsOpen` to `true` so the "What data will be collected?" disclosure panel inside the Privacy tab renders expanded on first view.
  • Surfaces the disclosure proactively — fits the spirit of an opt-in privacy surface (user shouldn't have to hunt for what the toggle implies).
  • One-line change in `src/webui/features/analytics/components/analytics-panel.tsx`.

Test plan

  • `npm run dev:ui` → `brv webui` → Configuration → Privacy → "What data will be collected?" is expanded on initial render
  • Clicking the trigger collapses it; clicking again re-expands
  • Toggle on/off still routes to the correct confirm dialog
  • `npm run lint`, `npm run typecheck`, `npm test` green

…acy tab

Default detailsOpen to true so the "What data will be collected?" panel is
expanded on first render. Helps the user see the disclosure without having
to click to reveal it, which matches the spirit of an opt-in privacy
surface.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

Claude finished @ncnthien's task in 1m 1s —— View job


Claude PR Review

Score: 5 / 5 — clean, well-scoped one-line UX polish.

Summary

The change in src/webui/features/analytics/components/analytics-panel.tsx:21 flips the initial value of detailsOpen from false to true, so the "What data will be collected?" disclosure renders expanded on first view of Configuration → Privacy.

Correctness

  • praise (non-blocking): Matches the stated intent — surfaces the disclosure proactively on an opt-in privacy surface, where the user shouldn't have to hunt for what the toggle implies.
  • The Collapsible is already controlled (open={detailsOpen} + onOpenChange={setDetailsOpen} at line 90), so toggling still works correctly: clicking the trigger collapses, clicking again re-expands. Behavior is symmetric with the prior default.
  • The chip label switches correctly (detailsOpen ? 'Hide details' : 'Show details' at line 95) — on first render it now reads "Hide details", which matches the new expanded default.
  • The chevron rotation uses group-data-[panel-open] (line 96), which is driven by the same open prop, so the rotated state on initial render is consistent.
  • No tests exist for AnalyticsPanel (confirmed via grep for AnalyticsPanel / detailsOpen across src/ and test/), so no test updates are required.
  • Toggle-on/off → confirm dialog routing is untouched; pendingIntent and requestToggle are unaffected.

Quality / Style

  • nitpick (non-blocking): State is purely local and resets to expanded on every remount (e.g., navigating away and back to the Privacy tab). For a disclosure panel that's arguably the right default — every visit re-surfaces the info — so no action needed; just flagging that this is intentional component-local UX, not persisted.
  • No TypeScript / lint concerns: the change keeps the same inferred type and stays inside CLAUDE.md's TS standards.

Security

  • No new data flow, no new props, no new external surface. Nothing to assess.

Verdict

Approve in spirit. Ship it once the manual npm run dev:uibrv webui → Privacy check in the PR description is ticked off.


  • Read the PR context
  • Inspect the changed file (src/webui/features/analytics/components/analytics-panel.tsx)
  • Verify the diff vs origin/proj/analytics-system-tool-mode
  • Check for related tests / consistency
  • Post review summary
    · branch feat/ENG-2621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant