Skip to content

fix: add retry on network errors to page-search workspace lookup (#149)#150

Merged
zacharias-ona merged 1 commit intomainfrom
fix/sentry-memo-9-page-search-retry
Apr 17, 2026
Merged

fix: add retry on network errors to page-search workspace lookup (#149)#150
zacharias-ona merged 1 commit intomainfrom
fix/sentry-memo-9-page-search-retry

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #149

What

PR #145 added retryOnNetworkError to page-tree.tsx but missed the identical pattern in page-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 retryOnNetworkError but left the page-search workspace lookup unprotected.

Changes

  1. src/components/sidebar/page-search.tsx: Wrapped the workspace slug → ID lookup in retryOnNetworkError, matching the pattern in page-tree.tsx.
  2. src/components/sidebar/page-search.test.tsx: Added isTransientNetworkError to the @/lib/sentry mock so retryOnNetworkError resolves correctly in tests.

Testing

  • All 166 unit tests pass
  • Lint and typecheck clean

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>
@zacharias-ona zacharias-ona added the bug Something isn't working label Apr 17, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

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

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 17, 2026 0:35am

Request Review

@zacharias-ona zacharias-ona merged commit f04a6a0 into main Apr 17, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the fix/sentry-memo-9-page-search-retry branch April 17, 2026 00:42
@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ UI verification passed — no visual changes detected. The diff only modifies data-fetching logic (wrapping a Supabase query in retryOnNetworkError). No JSX, styles, or layout were changed.

@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ Post-merge verification passed.

E2E suite (42 tests against https://memo.software-factory.dev): 40 passed, 2 flaky failures.

The 2 failures were in search tests (typing in search input shows matching results, clicking a search result navigates to the correct page) — both passed on re-run when executed in isolation (5/5 search tests green). The failures are caused by accumulated test data from parallel test workers making the search API response exceed the 5s timeout. This is a pre-existing flakiness issue, not a regression from this PR.

Ad-hoc smoke tests (all passed):

  • ✅ Landing page — loads, has title
  • /sign-in — renders email input
  • /api/health — returns healthy status
  • ✅ Authenticated login flow — redirects to workspace
  • ✅ Workspace page — fully loads
  • ✅ Page navigation via sidebar — editor route loads with contenteditable element
  • ✅ No console errors (unauthenticated or authenticated)

Skipped:

  • /dashboard (route does not exist)

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.

bug: page-search workspace lookup missing retry on network errors (Sentry MEMO-9)

1 participant