Skip to content

Add is_extended_promotional filter to components list and API search#129

Open
gavin-openops wants to merge 1 commit intotscircuit:mainfrom
gavin-openops:bounty-92-extended-promotional-20260301
Open

Add is_extended_promotional filter to components list and API search#129
gavin-openops wants to merge 1 commit intotscircuit:mainfrom
gavin-openops:bounty-92-extended-promotional-20260301

Conversation

@gavin-openops
Copy link

/claim #92

Summary

  • Added is_extended_promotional as an optional query param on:
    • /components/list(.json)
    • /api/search
  • Added SQL filtering via json_extract(extra, "$.is_extended_promotional") = 1
  • Added is_extended_promotional to response payloads by parsing each component's extra JSON
  • Also fixed an existing omission in routes/components/list.tsx by selecting preferred so is_preferred in output works correctly

Why

Issue #92 asks for extended promotional status to be available in a filterable column. This change exposes and filters that status without requiring a schema migration, since the flag is already available from component extra JSON.

Validation

  • bun run format
  • bun run format:check
  • bun test ⚠️ existing unrelated fixture/db issues in this repo (missing tables for some integration tests), but no new formatting/type errors introduced by this change.

If maintainers prefer this flag materialized as a dedicated DB column in derived tables, I can follow up with that migration path too.

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