SurfSense/surfsense_web/components/public-chat
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
..
public-chat-footer.tsx perf: replace useSearchParams() with window.location.search in effects 2026-04-02 02:45:46 +05:30
public-chat-not-found.tsx feat: add graceful public chat not found page 2026-02-02 20:08:38 +02:00
public-chat-view.tsx refactor: migrate thinking steps handling to new data structure and streamline related components 2026-03-24 02:23:05 +05:30
public-thread.tsx chore: ran linting 2026-03-30 01:50:41 +05:30