Skip to content

feat(analytics): add first-install lifecycle - #531

Open
Rinat S (rsolmano) wants to merge 1 commit into
feat/attribution-claim-deploymentfrom
feat/attribution-app-lifecycle
Open

Rinat S (rsolmano) wants to merge 1 commit into
feat/attribution-claim-deploymentfrom
feat/attribution-app-lifecycle

Conversation

@rsolmano

Copy link
Copy Markdown
Collaborator

Problem

Additional analytics remains off until an explicit saved choice, while the finalized first-run experience primes sharing on when the dialog appears and treats ordinary dismissal as acceptance. Product analytics also lacks a durable first packaged-install event for acquisition denominators.

Approach

Separate startup prompting from runtime gating without changing the existing config fields: startup remains off/off, dialog mount persists the enabled preference, and confirmation only resolves the prompt. Add a server-only atomic installation marker and emit one property-minimal basic event before the first packaged app_started.

Changes

  • Prime analyticsEnabled: true when the first-run dialog mounts; keep the dialog open until confirmation.
  • Make Done/Close/Escape/backdrop confirm the current draft; explicit switch-off persists refusal immediately.
  • Apply runtime analytics gating only for successful updates that explicitly touch analyticsEnabled.
  • Keep concise startup copy and compact always-on/optional details in Settings → Privacy.
  • Add app_installed once for binary/desktop, never source/CI/test, before app_started.
  • Persist appInstalled: true through an atomic same-directory replacement while preserving the stable installation ID.
  • Update unit, E2E, artifact-probe, and module specs for the exact lifecycle.

Screenshots

Not included — copy/control structure is unchanged; the behavioral state transition is covered by browser E2E.

Testing

  • Focused server/store/artifact tests — 131 passed, 0 failed.
  • Server, web, contracts, and artifact-tests typechecks — passed.
  • e2e/analytics-consent.spec.ts + e2e/privacy.spec.ts — 16 passed.
  • Binary build and smoke — passed.
  • Biome and diff checks — passed with five pre-existing unrelated suppression warnings.
  • Desktop build was unavailable locally because another Electrobun dev process holds the shared build lock; final stack CI/full E2E remains required.
  • Independent reviewer verdict — Approve.

Checklist

  • Fast gates pass: bun run lint, bun run typecheck, bun run test
  • E2E suite passes for app-affecting changes (bun run e2e, or bun run e2e:full when touching agent behavior) — focused affected E2E passed; complete suite runs on the final combined stack
  • Before/after screenshots are included for frontend changes, or marked not applicable
  • Relevant SPEC.md / top-level specs updated to reflect any boundary, contract, or behavior change
  • I have read the Contributing guide and agree to the Code of Conduct

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — ready to merge.

@rsolmano
Rinat S (rsolmano) added this pull request to stack #533 September 19, 2026 12:04
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.

2 participants