Skip to content

Add extended promotional boolean filter#339

Open
YunHeTracyLee wants to merge 6 commits into
tscircuit:mainfrom
YunHeTracyLee:codex/extended-promotional-boolean-92
Open

Add extended promotional boolean filter#339
YunHeTracyLee wants to merge 6 commits into
tscircuit:mainfrom
YunHeTracyLee:codex/extended-promotional-boolean-92

Conversation

@YunHeTracyLee
Copy link
Copy Markdown

/claim #92

Summary

  • Derive is_extended_promotional from existing JLC flags as preferred = 1 and basic = 0.
  • Expose the field in /components/list and /api/search responses, including full=true components-list responses.
  • Support both is_extended_promotional=true and is_extended_promotional=false filtering in the origin routes and D1 proxy search/catalog paths.
  • Add the Extended Promotional filter/column label to rendered component-list pages.
  • Add focused helper coverage and D1 render coverage.

Non-overlap

Most existing #92 PRs cover the true-only checkbox/filter path. This PR keeps the same derived-field behavior but makes the query filter a full boolean API (true and false) while keeping the UI checkbox path intact.

Validation

  • npx --yes bun test tests/lib/extended-promotional.test.ts
  • npx --yes bun x biome check lib/util/extended-promotional.ts routes/components/list.tsx routes/api/search.tsx tests/lib/extended-promotional.test.ts cf-proxy/src/extended-promotional.ts cf-proxy/src/search.ts cf-proxy/src/components.ts cf-proxy/src/index.ts cf-proxy/src/render.ts cf-proxy/test/render.test.ts
  • npx --yes bun x tsc --noEmit
  • cd cf-proxy && npx --yes bun x tsc --noEmit && npx --yes bun test test/render.test.ts
  • git diff --check

AI-assisted with Codex; I reviewed the diff and validation before submitting.

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