fix(analytics): harden analytics opt-out and feedback surfaces (#423)

Server stops phoning Sentry home after opt-out (release-health sessions + client reports off); settings saves diff-send only changed keys so a stale tab cannot revert an instance-wide opt-out; disabling analytics hides the feedback UI immediately; optIn resumes PostHog after re-enable; onboarding survey writes time out at 15s; inline tool-feedback prompt arms a shown-cooldown.
This commit is contained in:
SnapOtter
2026-07-04 14:02:28 +08:00
committed by GitHub
parent 6e3a14ec6b
commit 23efce9df0
11 changed files with 233 additions and 33 deletions
@@ -139,6 +139,17 @@ describe("ToolFeedbackPrompt", () => {
expect(screen.getByText("How did this tool work?")).toBeDefined();
});
it("stops nagging on the next result once shown, even without interaction", () => {
const { unmount } = render(<ToolFeedbackPrompt toolId="resize" />);
expect(screen.getByText("How did this tool work?")).toBeDefined();
unmount();
// A different tool finishes moments later. The user never touched the first
// prompt, but it must not reappear on the very next result.
render(<ToolFeedbackPrompt toolId="convert" />);
expect(screen.queryByText("How did this tool work?")).toBeNull();
});
it("supports Don't ask again suppression", () => {
const { unmount } = render(<ToolFeedbackPrompt toolId="resize" />);