feat(web-analytics): Add focus mode to Web Analytics#60311
Merged
Conversation
Contributor
|
🎭 Playwright didn't run on this PR — your changes touch code that could affect E2E behavior, but Playwright is opt-in via label now to keep CI cost down. Add the Most PRs don't need this. Real regressions still get caught on master and fix-forward. |
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx:2841-2844
**`exitFocusMode` silently drops manually-hidden tiles**
`enterFocusMode` carefully computes `nonFocusHiddenTiles` to preserve tiles the user hid before enabling focus mode. `exitFocusMode` discards that preservation by calling `resetTileVisibility()`, which sets `hiddenTiles` back to `[]`. If a user had manually hidden, say, `GRAPHS` before entering focus mode, that setting is permanently lost the moment they exit. The fix is to save those non-focus hidden tiles before entering focus mode (or on `enterFocusMode`) and restore only them on exit.
### Issue 2 of 2
frontend/src/scenes/web-analytics/webAnalyticsLogic.tsx:2831-2855
**Duplicated tile-hiding computation in `enterFocusMode` and `applyFocusMode`**
Both listeners independently compute `focusModeTileSet`, `nonFocusHiddenTiles`, and `focusHiddenTiles` before calling `setHiddenTiles`. If the logic for computing which tiles to hide ever changes, it must be updated in two places. Extracting a shared helper (e.g., `computeFocusHiddenTiles(currentHiddenTiles, concerns)`) would keep it in one place.
Reviews (1): Last reviewed commit: "Add focus mode to Web Analytics" | Re-trigger Greptile |
Contributor
|
Size Change: +13 kB (+0.02%) Total Size: 80.2 MB 📦 View Changed
ℹ️ View Unchanged
|
arthurdedeus
approved these changes
May 28, 2026
rorylshanks
pushed a commit
that referenced
this pull request
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users are overwhelmed with the Web Analytics dashboard
Changes
Adds a new focused mode that wraps the existing visible tiles work. This is PR one of a larger work item that will include the focused mode as a part of onboarding
Screen.Recording.2026-05-27.at.2.03.24.PM.mov
How did you test this code?
Locally
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Publish to changelog?
No
Docs update
🤖 Agent context