Skip to content

Adopt to mobile - #12

Merged
koreyba merged 6 commits into
mainfrom
adopt-to-mobile
Nov 30, 2025
Merged

koreyba merged 6 commits into
mainfrom
adopt-to-mobile

Conversation

@koreyba

@koreyba koreyba commented Nov 30, 2025

Copy link
Copy Markdown
Owner

No description provided.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 30, 2025

Copy link
Copy Markdown

Deploying everfreenote with  Cloudflare Pages  Cloudflare Pages

Latest commit: ffb1698
Status: ✅  Deploy successful!
Preview URL: https://9c3d920a.everfreenote.pages.dev
Branch Preview URL: https://adopt-to-mobile.everfreenote.pages.dev

View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread core/utils/search.ts
Comment on lines +14 to +26
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@koreyba

koreyba commented Nov 30, 2025

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +34 to +38
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@koreyba
koreyba merged commit 20aedcd into main Nov 30, 2025
2 checks passed
@koreyba
koreyba deleted the adopt-to-mobile branch December 13, 2025 11:45
koreyba added a commit that referenced this pull request Jan 25, 2026
koreyba added a commit that referenced this pull request Apr 1, 2026
Use iterative while-loop for tag removal to handle cases where
a single pass leaves partial tags (e.g. <scr + ipt>).
Fixes CodeQL alerts #6, #12, #13.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
koreyba added a commit that referenced this pull request Apr 1, 2026
Use iterative while-loop for tag removal to handle cases where
a single pass leaves partial tags (e.g. <scr + ipt>).
Fixes CodeQL alerts #6, #12, #13.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant