Skip to content

feat: add extended promotional component filter (#92) - #394

Open
chenlinxi890-spec wants to merge 3 commits into
tscircuit:mainfrom
chenlinxi890-spec:fix/is-extended-promotional-column-92
Open

feat: add extended promotional component filter (#92)#394
chenlinxi890-spec wants to merge 3 commits into
tscircuit:mainfrom
chenlinxi890-spec:fix/is-extended-promotional-column-92

Conversation

@chenlinxi890-spec

@chenlinxi890-spec chenlinxi890-spec commented Jun 30, 2026

Copy link
Copy Markdown

Summary

Ports the is_extended_promotional component flag to the repository's current Cloudflare Worker architecture after the legacy routes/ implementation was removed upstream.

  • materializes the flag from component_catalog.extra into search_index
  • supports is_extended_promotional=true in component/search queries
  • returns the flag in JSON responses
  • renders an Extended Promotional column and filter on /components/list
  • updates both search-index rebuild paths and the D1 sync schema

Test plan

  • npx --yes bun test tests/lib/extended-promotional-search-index.test.ts: 1 passed, 0 failed
  • cf-proxy/node_modules/.bin/vitest run test/render.test.ts --reporter verbose: 5 passed, 0 failed
  • npx --yes -p typescript@5.8.3 tsc --noEmit: passed
  • cf-proxy/node_modules/.bin/tsc --noEmit -p tsconfig.json: passed
  • focused Biome format check for the new fixture test: passed
  • git diff --check upstream/main...HEAD: passed
  • full npx --yes bun test: 139 passed, 1 failed; the remaining failure is the pre-existing Windows EBUSY cleanup in tests/lib/get-db-client.test.ts, outside this PR's diff

The new fixture-backed Bun/SQLite test exercises the real searchIndex query and verifies that is_extended_promotional=true returns only the promotional row and includes the response field.

Risk

Low-to-moderate. The application change depends on rebuilding search_index during 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

…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 "
@chenlinxi890-spec

Copy link
Copy Markdown
Author

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.

@chenlinxi890-spec chenlinxi890-spec changed the title feat: add is_extended_promotional filterable column (#92) feat: add extended promotional component filter (#92) Jul 15, 2026
@chenlinxi890-spec

Copy link
Copy Markdown
Author

Rebased/merged onto current main and resolved the hard conflict by porting the feature from the deleted legacy route to the active Cloudflare Worker implementation.

Current head: 5b509ca

The final diff is focused to 9 Worker/index/test files, includes the required /claim #92, and adds the query field, JSON output, HTML filter/column, index rebuild support, and a focused render test. Ready for a fresh review.

@chenlinxi890-spec

Copy link
Copy Markdown
Author

CI is ready but GitHub has marked all fork workflows as action_required; maintainer approval is needed before they can execute:

No code-side failing check is currently reported. Once approved, I will address any actual CI failure promptly.

@chenlinxi890-spec

Copy link
Copy Markdown
Author

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.

Copy link
Copy Markdown
Author

Payout asset: USDC
Payout network: Base
Payout address: 0x9d4cc3466a2d81efb8b575e2af154ce81cae2a46

@chenlinxi890-spec

Copy link
Copy Markdown
Author

Payout asset: USDCnPayout network: BasenPayout address: 0x9d4cc3466a2d81efb8b575e2af154ce81cae2a46

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.

Add is_extended_promotional column to components (from data source)

1 participant