revert: "fix(shared-views): skip API calls that always 401 in shared/exported views"#57814
Conversation
…xported …" This reverts commit d9c5aa3.
|
🎭 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. |
|
Reviews (1): Last reviewed commit: "Revert "fix(shared-views): skip API call..." | Re-trigger Greptile |
|
Size Change: -30.6 kB (-0.03%) Total Size: 98.4 MB 📦 View Changed
ℹ️ View Unchanged
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5587878308
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .filter((id): id is number => !!id) | ||
|
|
||
| if (insightIds.length > 0 && values.currentTeamId && !isSharedView()) { | ||
| if (insightIds.length > 0 && values.currentTeamId) { |
There was a problem hiding this comment.
Skip viewed-insight writes in public dashboards
ExporterDashboardScene mounts dashboardLogic in DashboardPlacement.Public, but this condition now posts to /api/environments/{id}/insights/viewed for every shared dashboard load. Public/shared viewers are often unauthenticated, so this request reliably returns 401 there, and because it is fired as void api.create(...) with no rejection handler it creates repeated client-side error noise instead of being a no-op. Keep a shared/public-mode guard (or placement check) before sending this write call.
Useful? React with 👍 / 👎.
| loadPinnedTabsFromBackend: async () => { | ||
| if (isSharedView()) { | ||
| return | ||
| } | ||
| try { | ||
| const response = await api.get<{ |
There was a problem hiding this comment.
Re-add shared-view guard before loading user home settings
This shared-view short-circuit was removed, so sceneLogic now calls api/user_home_settings/@me/ even when rendered via exported/shared insights. ExportedInsight mounts insightLogic, and insightLogic connects sceneLogic, so anonymous shared viewers hit a user-scoped endpoint that cannot succeed and generate avoidable 401 failures on mount. The loader should still bail out in shared/export contexts.
Useful? React with 👍 / 👎.
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
Reverts #57670
errors but we don't know why