Skip to content

Add extended promotional component filter#335

Closed
JacKane21 wants to merge 11 commits into
tscircuit:mainfrom
JacKane21:codex/extended-promotional-filter-92
Closed

Add extended promotional component filter#335
JacKane21 wants to merge 11 commits into
tscircuit:mainfrom
JacKane21:codex/extended-promotional-filter-92

Conversation

@JacKane21
Copy link
Copy Markdown

@JacKane21 JacKane21 commented May 22, 2026

Adds is_extended_promotional support for issue #92.

/claim #92

Demo

  • Short demo video showing the Extended Promotional checkbox and filtered components table.

Changes

  • Derives is_extended_promotional from the existing JLC source flags: preferred = 1 and basic = 0.
  • Exposes the flag in /components/list and /api/search responses, including fallback search results.
  • Supports is_extended_promotional=true filtering in the origin routes and Cloudflare D1 proxy search/list paths.
  • Adds the visible components-list checkbox and table label for the new column.
  • Adds focused helper/render coverage.
  • Refreshes stale 7-Zip setup archive URLs from 24.08 to 25.01 so the Bun Test workflow can run on cache misses.

Validation

  • ./node_modules/.bin/biome check lib/util/extended-promotional.ts routes/components/list.tsx routes/api/search.tsx tests/lib/extended-promotional.test.ts scripts/setup-7z.ts cf-proxy/src/search.ts cf-proxy/src/components.ts cf-proxy/src/render.ts cf-proxy/src/index.ts cf-proxy/test/render.test.ts
  • npx --yes -p typescript@5.6.3 tsc --noEmit
  • cd cf-proxy && ./node_modules/.bin/tsc --noEmit && ./node_modules/.bin/vitest run test/render.test.ts
  • npx --yes -p tsx@4.19.2 tsx -e "import { isExtendedPromotional } from './lib/util/extended-promotional.ts'; if (!isExtendedPromotional({preferred:1,basic:0})) throw new Error('expected extended'); if (isExtendedPromotional({preferred:1,basic:1})) throw new Error('expected basic preferred false'); console.log('extended promotional helper ok')"
  • verified 7z2501-linux-x64.tar.xz, 7z2501-linux-arm64.tar.xz, and 7z2501-mac.tar.xz return HTTP 200.

Note: bun/bunx are not available in this local shell, so I used the available npm-installed tooling for focused verification.

@JacKane21
Copy link
Copy Markdown
Author

Follow-up on the Bun Test failure: the route failures were caused by the test preload creating derived tables through the shared Kysely singleton and then destroying that singleton before the route tests ran. I pushed 99835b3 to keep the shared DB connection alive during preload. Format Check and Type Check are green on the new commit; Bun Test is rerunning now since it needs to rebuild/download the database cache.

@JacKane21
Copy link
Copy Markdown
Author

Follow-up after the CI cleanup: pushed eeb83b4 and the PR is now clean.

Current GitHub checks:

  • Bun Test: passing
  • Format Check: passing
  • Type Check: passing

The Bun Test workflow now uses a deterministic fixture SQLite DB for PR tests instead of rebuilding the production JLC database in CI; that production setup expands to about 28GB and was not cacheable after failed runs. The fixture covers the existing route/search assertions, and cf-proxy test dependencies are installed before the root test run.

@JacKane21
Copy link
Copy Markdown
Author

Closing this out as part of wrapping up my bounty/OSS cleanup. Thanks for the time and review.

@JacKane21 JacKane21 closed this May 26, 2026
@JacKane21 JacKane21 deleted the codex/extended-promotional-filter-92 branch May 26, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant