Skip to content

feat: add is_extended_promotional column to all component tables#135

Open
ckmtools wants to merge 1 commit intotscircuit:mainfrom
ckmtools:add-extended-promotional
Open

feat: add is_extended_promotional column to all component tables#135
ckmtools wants to merge 1 commit intotscircuit:mainfrom
ckmtools:add-extended-promotional

Conversation

@ckmtools
Copy link

@ckmtools ckmtools commented Mar 4, 2026

Summary

  • Added extended_promotional field to the Component database interface
  • Updated BaseComponent and DerivedTableSpec types to include is_extended_promotional
  • Added is_extended_promotional column definition and mapping to all 37 derived component tables
  • Created idx_components_extended_promotional database index optimization for faster queries
  • Updated components/list route with filterable checkbox and API response field
  • Updated api/search endpoint with is_extended_promotional query parameter support
  • Updated VComponent view interface with extended_promotional field

Context

Extended promotional parts are components that act as basic parts for a limited time period. This PR exposes that information as a filterable column, following the same pattern as the existing is_basic and is_preferred columns.

Changes

  1. Database Schema (lib/db/generated/kysely.ts): Added extended_promotional to Component and VComponent, added is_extended_promotional to all 37 derived table interfaces
  2. Base Types (lib/db/derivedtables/component-base.ts, types.ts): Added is_extended_promotional: boolean
  3. Derived Tables (37 files): Added column spec and Boolean(c.extended_promotional) mapping
  4. Index Optimization (lib/db/optimizations/component-extended-promotional-index.ts): New index for query performance
  5. API Routes (routes/components/list.tsx, routes/api/search.tsx): Added filtering and response mapping
  6. UI: Added checkbox filter for extended promotional parts

Fixes #92

/claim #92

- Added `extended_promotional` field to Component interface in kysely types
- Added `is_extended_promotional` to BaseComponent and DerivedTableSpec type
- Updated all 37 derived table specs with column definition and mapping
- Created database index optimization for extended_promotional queries
- Added filtering support in components list UI (checkbox) and API search
- Exposed `is_extended_promotional` in API response payloads

/claim tscircuit#92
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.

Add is_extended_promotional column to components (from data source)

1 participant