Skip to content

fix(dashboard): surface analytics overview timeouts instead of empty stats - #421

Merged
Hydralerne merged 6 commits into
oblien:feat/bugfix-batch-2026-09-16from
santhiprakash:fix/analytics-overview-timeout-and-error-ui
Sep 16, 2026
Merged

Hydralerne merged 6 commits into
oblien:feat/bugfix-batch-2026-09-16from
santhiprakash:fix/analytics-overview-timeout-and-error-ui

Conversation

@santhiprakash

@santhiprakash santhiprakash commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #396. Analytics failures now show a retry action instead of zero traffic. The error is confined to overview statistics and traffic, so Monitoring keeps independent resource and geography data visible. Both tabs use the same error component.

Overview derives the selected domain during rendering and waits for the current project/domain before fetching. This avoids an unnecessary all-domain request on initial load or navigation. The shared cache rejects responses from invalidated requests, including polling; the overview request allows 60 seconds for aggregation.

Validated with 99 relevant dashboard cases across request lifecycle, rendered Monitoring panels, and connection discovery (98-case suite plus the added polling regression). Ten new cases fail against main. Dashboard TypeScript check passes. Targeting the bug integration branch for PR #892.

@Hydralerne

Copy link
Copy Markdown
Member

MonitoringTab blanks the whole tab (should-fix)
The MonitoringTab change is a full early return (MonitoringTab.tsx:309) that replaces the entire MonitoringView with the error card when /analytics/overview fails. But that view renders several independent data sources:

geo map + top paths → useAnalyticsGeo (separate cache)
CPU/memory resource charts → useProjectUsageHistory (a DB read, not edge aggregation)
live traffic feed → useProjectUsageStream (SSE, already has its own usageError/reconnect)
So an overview timeout now hides the resource charts and live feed that loaded fine. That's a resilience regression: before this PR, an overview failure left analytics null and the TrafficChart showed its empty state, but geo/usage/live still rendered. The fix should scope the error to the traffic chart/summary block — exactly the way OverviewTab already scopes it — not nuke the tab.

santhiprakash added a commit to santhiprakash/openship that referenced this pull request Aug 5, 2026
…itoringView

Address maintainer review on oblien#421: an /analytics/overview timeout was replacing the entire MonitoringTab via an early return, hiding the independent geo, usage, and history blocks. Move the error card into MonitoringView and scope it to the stats strip / traffic chart block (mirroring OverviewTab), so the rest of the tab still renders.
@santhiprakash

Copy link
Copy Markdown
Contributor Author

Pushed a follow-up commit to address the feedback.

The early return in MonitoringTab is gone. Instead, MonitoringView now accepts an analyticsError prop and scopes the retry card to the stats strip / traffic chart block only. The resources card, visitor map, live hits, top paths, response mix, and usage history all keep rendering when /analytics/overview fails, which matches the OverviewTab pattern.

What changed:

  • Removed the whole-tab if (showAnalyticsError) early return from MonitoringTab.
  • Added analyticsError and onRetryAnalytics props to MonitoringView.
  • When analyticsError is set and not loading, MonitoringView replaces the stats strip and CollapsibleCard traffic block with the existing error card + retry button.
  • The no-data prompt and traffic CollapsibleCard are suppressed while the error is shown.

Local verification:

  • bun run --cwd apps/dashboard lint (tsc --noEmit) passes.
  • bun run --cwd apps/dashboard test passes (447 tests, including MonitoringView.test.tsx).
  • bunx prettier --write applied to the two modified files.

Please take another look when you have a moment.

santhiprakash added a commit to santhiprakash/openship that referenced this pull request Aug 9, 2026
…itoringView

Address maintainer review on oblien#421: an /analytics/overview timeout was replacing the entire MonitoringTab via an early return, hiding the independent geo, usage, and history blocks. Move the error card into MonitoringView and scope it to the stats strip / traffic chart block (mirroring OverviewTab), so the rest of the tab still renders.
@santhiprakash
santhiprakash force-pushed the fix/analytics-overview-timeout-and-error-ui branch from e099c69 to 5d5d0bb Compare August 9, 2026 14:48
Farahat612 added a commit to Farahat612/openship that referenced this pull request Aug 14, 2026
Two documents for the machine that opens the pull requests:
OPEN_PRS_INSTRUCTIONS.md carries the exact gh commands, titles, bodies
and wave order for all eight branches plus the two issue comments;
OPEN_PRS_UPDATE.md supersedes parts of it after the freshness re-check
(the oblien#396 PR is replaced by a comment because of the competing oblien#421,
and all branches were rebased onto v0.6.5 with the migration renumbered
to 0106). Read the update first. These files stay on this working
branch only and are never part of any upstream PR.
…stats

- Problem: /analytics/overview can exceed the 15s client default for high-traffic projects; the abort left Overview/Monitoring tabs showing 0/N/A with no error.
- Fix: request a 60s timeout for the overview fetch and render a retryable error state when analytics.error is set.
- Verification: bun run test src/i18n/i18n-parity.test.ts (pass); preflight_ship.py clear for oblien#396.
…itoringView

Address maintainer review on oblien#421: an /analytics/overview timeout was replacing the entire MonitoringTab via an early return, hiding the independent geo, usage, and history blocks. Move the error card into MonitoringView and scope it to the stats strip / traffic chart block (mirroring OverviewTab), so the rest of the tab still renders.
@santhiprakash
santhiprakash force-pushed the fix/analytics-overview-timeout-and-error-ui branch from 5d5d0bb to e217c17 Compare August 22, 2026 22:48
@Hydralerne
Hydralerne changed the base branch from main to feat/bugfix-batch-2026-09-16 September 16, 2026 03:14
@Hydralerne
Hydralerne merged commit 0834b84 into oblien:feat/bugfix-batch-2026-09-16 Sep 16, 2026
7 of 8 checks passed
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.

Overview page shows 0 requests / no traffic data on some projects (silent AbortError in root layout)

2 participants