SurfSense/surfsense_web/app/dashboard
SohamBhattacharjee2003 767c97682d perf: replace useSearchParams() with window.location.search in effects
Components were calling useSearchParams() at the top level but only
reading the value inside useEffect or callbacks, never in JSX. This
subscribed the entire component tree to every URL query change.

Fix: read from window.location.search directly inside the effect so
no React subscription is created.

Changes:
- new-chat/page.tsx: read commentId inside effect + popstate listener
  for SPA back/forward support; removes subscription from 1500+ line tree
- dashboard/page.tsx: read window.location.search at redirect time;
  removes searchParams from dep array
- public-chat-footer.tsx: one-shot mount read for action=clone param
- TokenHandler.tsx: one-shot mount read for token + refresh_token params

Implements Vercel React Best Practices Rule: rerender-defer-reads (5.2)
2026-04-02 02:45:46 +05:30
..
[search_space_id] perf: replace useSearchParams() with window.location.search in effects 2026-04-02 02:45:46 +05:30
layout.tsx feat: integrate Stripe for page purchases and reconciliation tasks 2026-03-31 18:39:45 -07:00
loading.tsx fix: remove message from loading UI 2026-01-27 15:28:30 +05:30
page.tsx perf: replace useSearchParams() with window.location.search in effects 2026-04-02 02:45:46 +05:30