Skip to content

FIX: Wait for saved profile before fetching topic reports - #154

Merged
marobinette merged 4 commits into
mainfrom
fix-reports-profile-hydration
Oct 9, 2026
Merged

marobinette merged 4 commits into
mainfrom
fix-reports-profile-hydration

Conversation

@marobinette

Copy link
Copy Markdown
Collaborator

On a full page load of Reports by Topic, the page fetches data twice: once for the default profile (Vermont vs. Vermont), then again for the saved profile. The first set of responses is discarded, so the data shown is correct, but the requests are wasted. This PR adds a useProfileHydrated hook and waits for the saved profile to load before fetching. Other views that read the profile on load can use the same hook.

Note: This PR is intentionally small and non-invasive so that we can have a PR to walk through deployment process.

@iansargent
iansargent self-requested a review October 9, 2026 14:14

@iansargent iansargent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Hopefully saves some compute and rendering time!

@marobinette
marobinette merged commit 5c8c1bf into main Oct 9, 2026
2 checks passed
@marobinette
marobinette deleted the fix-reports-profile-hydration branch October 9, 2026 14:26
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.

2 participants