fix: planner 401 poll storm + customers/priority 403 (from PostHog telemetry) - #213
Merged
Merged
Conversation
…ustomers/priority under the Orders tab Two errors surfaced by PostHog http_error telemetry: - 401 /admin/schedule/check-updates (385 events / 4 users): the planner poll retried forever after session expiry. Both pollers now stop on 401/419. - 403 /admin/customers + /admin/priority-rules: unmapped to any tab -> admin-only, but shown under Orders in the nav. Now resolve to the orders tab.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Two real user-facing errors surfaced by PostHog
http_errortelemetry (last 30 days, 671 events / 77 users).1. 401
/admin/schedule/check-updates— 385 events / 4 users (biggest single error)The production planner short-polls this endpoint every 5-10s to sync across tabs (
LiveRefresh+ a tracking poll inPlanner.jsx). Both usedif (!r.ok) returnand kept retrying. When the session expired on a left-open planner tab, every poll returned 401 and the client retried forever, silently generating hundreds of error events per stale tab.Fix: both pollers now stop on 401/419 (session gone). A real navigation still bounces to login.
2. 403
/admin/customers+/admin/priority-rules— ~28 events / 9 usersThese paths sat outside every
TabRegistryprefix, soTabAccessMiddlewaremade them Admin-only (403) — but the sidebar showed them under the Orders group to anytab:ordersholder (the child links have no per-tab gate). A Supervisor/Operator with Orders access saw the links and got a 403 on click.Fix: map both to the Orders tab, so route access matches nav visibility. New regression test in
TabAccessTest.Not fixed here (noise / separate)
*.clarity.ms, 500tawk.to— third-party widgets on the demo site/.well-known/*, 429/login— bots/crawlers + login rate-limit (expected)/packaging/label-templates403 — packaging role-specific, left for a separate lookFull suite: 1988 passed.
🤖 Generated with claude-flow