feat: add extended promotional component filter (#92) - #394
feat: add extended promotional component filter (#92)#394chenlinxi890-spec wants to merge 3 commits into
Conversation
…circuit#92) - Add is_extended_promotional to queryParams schema - Add extra field to select() for JSON parsing - Add LIKE filter on extra column for is_extended_promotional - Add Extended Promotional checkbox to UI filter form - Add preferred field to select() for proper boolean conversion References: tscircuit#92, /bounty "
|
Hi, this PR adds the is_extended_promotional filterable column to JLCSearch components data source (issue #92). Single file change, follows existing TypeScript patterns in the codebase. |
|
Rebased/merged onto current Current head: The final diff is focused to 9 Worker/index/test files, includes the required |
|
CI is ready but GitHub has marked all fork workflows as
No code-side failing check is currently reported. Once approved, I will address any actual CI failure promptly. |
|
Added deterministic D1 query coverage in commit 2bf364e. The fixture-backed test verifies that is_extended_promotional=true filters out the non-promotional row and returns the field. Verified locally: focused query test 1/1 passed, render test 5/5 passed, root and cf-proxy TypeScript checks passed, and git diff --check passed. The full Bun suite reached 139 passed / 1 pre-existing Windows EBUSY cleanup failure outside this diff. Please re-review once the fork workflows are approved. |
|
Payout asset: USDC |
|
Payout asset: USDC |
Summary
Ports the
is_extended_promotionalcomponent flag to the repository's current Cloudflare Worker architecture after the legacyroutes/implementation was removed upstream.component_catalog.extraintosearch_indexis_extended_promotional=truein component/search queries/components/listTest plan
npx --yes bun test tests/lib/extended-promotional-search-index.test.ts: 1 passed, 0 failedcf-proxy/node_modules/.bin/vitest run test/render.test.ts --reporter verbose: 5 passed, 0 failednpx --yes -p typescript@5.8.3 tsc --noEmit: passedcf-proxy/node_modules/.bin/tsc --noEmit -p tsconfig.json: passedgit diff --check upstream/main...HEAD: passednpx --yes bun test: 139 passed, 1 failed; the remaining failure is the pre-existing WindowsEBUSYcleanup intests/lib/get-db-client.test.ts, outside this PR's diffThe new fixture-backed Bun/SQLite test exercises the real
searchIndexquery and verifies thatis_extended_promotional=truereturns only the promotional row and includes the response field.Risk
Low-to-moderate. The application change depends on rebuilding
search_indexduring deployment so the new materialized column exists. Both full and batched rebuild scripts are updated together.GitHub Actions for fork commits require maintainer approval before they can run.
Linked issue
Closes #92
/claim #92