Skip to content

Fix activity loading render loop#1321

Merged
rossgalloway merged 3 commits into
mainfrom
codex/activity-loading-block
Jul 22, 2026
Merged

Fix activity loading render loop#1321
rossgalloway merged 3 commits into
mainfrom
codex/activity-loading-block

Conversation

@rossgalloway

@rossgalloway rossgalloway commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes an issue where, when new activity rows were being loaded, the page was preventing any further actions outside the activity component. Navigation was blocked and required waiting or reloading.

Fix:

  • memoize derived activity entries and fallback chain IDs
  • prevent the Activity tab from entering a render loop while facets load
  • add a regression test for reference stability before facet data arrives

Root cause

While the activity facets request was pending, the hook recreated its fallback chain ID array on every render. The Activity section watched that array by reference and wrote it into state, producing a maximum-update-depth loop that could block navigation and other interactions until the facets request completed.

Impact

The Activity tab remains responsive while additional activity pages and facet data are loading.

Validation

  • bunx vitest run src/components/pages/portfolio/hooks/usePortfolioActivity.test.tsx
  • bun run tslint
  • bun run lint:fix
  • bun run build
  • browser verification while Loading more... was visible

Keep derived activity entries and fallback chain IDs referentially stable while facets are loading.

Add a regression test covering repeated renders before facet data arrives.
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yearnfi Ready Ready Preview, Comment Jul 22, 2026 5:39pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
yearnfi-nextjs Ignored Ignored Preview Jul 22, 2026 5:39pm
yearnfi-nextjs-2 Ignored Ignored Preview Jul 22, 2026 5:39pm

Request Review

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@rossgalloway
rossgalloway marked this pull request as ready for review July 17, 2026 13:45
@rossgalloway
rossgalloway requested a review from w84april July 20, 2026 13:57
@rossgalloway rossgalloway added the bug Something isn't working label Jul 20, 2026
@rossgalloway
rossgalloway merged commit c2680b2 into main Jul 22, 2026
12 of 13 checks passed
@rossgalloway
rossgalloway deleted the codex/activity-loading-block branch July 22, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants