Adopt to mobile - #12
Conversation
Deploying everfreenote with
|
| Latest commit: |
ffb1698
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9c3d920a.everfreenote.pages.dev |
| Branch Preview URL: | https://adopt-to-mobile.everfreenote.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export function buildTsQuery(query: string): string | null { | ||
| if (!query || typeof query !== 'string') { | ||
| throw new Error('Query must be a non-empty string') | ||
| return null | ||
| } | ||
|
|
||
| if (query.length > MAX_QUERY_LENGTH) { | ||
| throw new Error(`Query exceeds maximum length: ${MAX_QUERY_LENGTH}`) | ||
| return null | ||
| } | ||
|
|
||
| const trimmed = query.trim() | ||
|
|
||
| if (trimmed.length < MIN_QUERY_LENGTH) { | ||
| throw new Error(`Query must be at least ${MIN_QUERY_LENGTH} characters`) | ||
| return null |
There was a problem hiding this comment.
Update buildTsQuery contract or dependent tests
buildTsQuery now returns null for empty/short/oversized input instead of throwing (core/utils/search.ts lines 14-26), but the existing cypress/component/core/utils/search.cy.ts still asserts that these inputs throw (it('throws error …')). Running the Cypress component suite now fails because the function no longer matches those expectations. Please either restore the exceptions or adjust the tests/callers to the new null-returning contract.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| from: cy.stub().returns({ | ||
| select: cy.stub().returnsThis(), | ||
| order: cy.stub().returnsThis(), | ||
| range: cy.stub().returnsThis(), | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any |
There was a problem hiding this comment.
Stub Supabase fallback methods in SearchRobustness tests
The Supabase mock in SearchRobustness.cy.tsx only provides select, order, and range, but SearchService’s fallback path (core/services/search.ts lines 72‑83) invokes eq, or, and contains whenever the RPC returns no rows. Because the mock RPC is hard-coded to return an empty array, every search in these tests hits the fallback and throws supabaseQuery.eq is not a function, populating ftsData.error instead of the expected "no-error". As written, the new robustness tests will consistently fail and never exercise the intended behavior until the mock implements the missing query methods.
Useful? React with 👍 / 👎.
No description provided.