fix: add retry on network errors to page-search workspace lookup (#149)#150
Conversation
The page-search workspace lookup was missing retryOnNetworkError, unlike the identical pattern in page-tree.tsx that was fixed in PR #145. Transient network failures would immediately call captureSupabaseError without any retry attempt. Wrap the Supabase workspace lookup in retryOnNetworkError and add isTransientNetworkError to the test mock so retryOnNetworkError resolves correctly in tests. Closes #149 Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✅ UI verification passed — no visual changes detected. The diff only modifies data-fetching logic (wrapping a Supabase query in |
|
✅ Post-merge verification passed. E2E suite (42 tests against The 2 failures were in search tests ( Ad-hoc smoke tests (all passed):
Skipped:
|
Closes #149
What
PR #145 added
retryOnNetworkErrortopage-tree.tsxbut missed the identical pattern inpage-search.tsx. The page-search workspace lookup (page-search:workspace-lookup) still made a single Supabase call without retry, causing transient network errors to immediately surface in Sentry (MEMO-9).Sentry issue: https://ona-2j.sentry.io/issues/MEMO-9
Root Cause
The fix in PR #145 was incomplete — it wrapped the page-tree workspace lookup in
retryOnNetworkErrorbut left the page-search workspace lookup unprotected.Changes
src/components/sidebar/page-search.tsx: Wrapped the workspace slug → ID lookup inretryOnNetworkError, matching the pattern inpage-tree.tsx.src/components/sidebar/page-search.test.tsx: AddedisTransientNetworkErrorto the@/lib/sentrymock soretryOnNetworkErrorresolves correctly in tests.Testing