Skip to content

fix(dashboard): don't hang forever when saved native filter state request stalls - #45928

Draft
eschutho wants to merge 2 commits into
masterfrom
fix-dashboard-filter-state-hang
Draft

eschutho wants to merge 2 commits into
masterfrom
fix-dashboard-filter-state-hang

Conversation

@eschutho

Copy link
Copy Markdown
Member

SUMMARY

When a dashboard URL carries a saved filter state key (native_filters_key), the page fetches that state before it loads. If the request never completes (a stalled connection, a proxy that drops the response), the dashboard stays on its loading spinner forever, because nothing loads until the request finishes.

This change makes the dashboard wait at most 5 seconds for the saved filter state. After that it gives up and loads the dashboard with no saved filters, exactly as it already does when the key is missing or the request fails with an error. A warning is logged to the console; users see no new error message.

Also:

  • The request is now cancellable, and is cancelled on timeout or when leaving the page.
  • If the user leaves the dashboard (or switches to another one) while the state is still loading, the late response no longer triggers loading of the old dashboard.

How the key gets written to the URL is untouched.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Automated: npm run test -- src/dashboard/containers/DashboardPage.test.tsx (new tests cover a stalled request, a successful request, and leaving the page mid-request).

Manual: open a dashboard with ?native_filters_key=<valid key> and, in browser dev tools, block or throttle the /filter_state/ request indefinitely. The dashboard should load without the saved filters after about 5 seconds instead of spinning forever. With the request unblocked, the saved filters apply as before.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Note: once merged, this is a good candidate to cherry-pick to the 6.0 and 6.1 release branches.

🤖 Generated with Claude Code

…uest stalls

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.77%. Comparing base (3914e00) to head (0f278f5).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #45928   +/-   ##
=======================================
  Coverage   84.76%   84.77%           
=======================================
  Files        3072     3072           
  Lines      206140   206158   +18     
  Branches    48549    48554    +5     
=======================================
+ Hits       174741   174764   +23     
+ Misses      28100    28095    -5     
  Partials     3299     3299           
Flag Coverage Δ
javascript 81.07% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
…ip error log on abort

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant