Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): Persist app bootstrap data to indexdb #83796

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

scttcper
Copy link
Member

@scttcper scttcper commented Jan 22, 2025

Moves bootstrap queries into react query.
Adds a indexdb cache for app bootstrap queries via react query persister. Indexdb was chosen because projects can be 6+ mb for some orgs.
Global stores get stale data and then are updated with fresh data when the request finishes.

part of https://www.notion.so/sentry/Tech-Spec-Frontend-Bootstrap-Cache-Project-Loading-Performance-1748b10e4b5d80759127c15d3772e063

Copy link

sentry-io bot commented Jan 22, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: static/app/actionCreators/organization.tsx

Function Unhandled Issue
fetchOrganizationDetails TypeError: j.toSorted is not a function /settings...
Event Count: 1 Affected Users: 1

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8606 1 8605 0
View the top 1 failed tests by shortest run time
OrganizationContext does not fetch if organization is already set
Stack Traces | 0.026s run time
Error: expect(jest.fn()).not.toHaveBeenCalled()

Expected number of calls: 0
Received number of calls: 1

1: "/organizations/org-slug/", {"error": [Function error], "query": {"detailed": 0, "include_feature_flags": 1}, "success": [Function success]}
    at Object.<anonymous> (.../app/views/organizationContext.spec.tsx:116:28)
    at runNextTicks (node:internal/process/task_queues:65:5)
    at listOnTimeout (node:internal/timers:555:9)
    at processTimers (node:internal/timers:529:7)

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@scttcper scttcper changed the title feat(ui): Persist projects to indexdb feat(ui): Persist app bootstrap data to indexdb Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant