feat: add is_extended_promotional column to component tables#133
feat: add is_extended_promotional column to component tables#133davidweb3-ctrl wants to merge 3 commits intotscircuit:mainfrom
Conversation
lib/db/derivedtables/resistor.ts
Outdated
| { name: "is_extended_promotional", type: "boolean" }, | ||
| { name: "is_extended_promotional", type: "boolean" }, |
There was a problem hiding this comment.
The field 'is_extended_promotional' is defined twice in the columns array (lines 34 and 35). This creates a duplicate column definition which violates good variable naming and API design practices. The duplicate definition should be removed to maintain consistency with the project structure where each field should only be defined once per table.
| { name: "is_extended_promotional", type: "boolean" }, | |
| { name: "is_extended_promotional", type: "boolean" }, | |
| { name: "is_extended_promotional", type: "boolean" }, |
Spotted by Graphite (based on custom rule: Custom rule)
Is this helpful? React 👍 or 👎 to let us know.
lib/db/derivedtables/resistor.ts
Outdated
| is_extended_promotional: Boolean(c.extended_promotional), | ||
| is_extended_promotional: Boolean(c.extended_promotional), |
There was a problem hiding this comment.
Duplicate property is_extended_promotional in the data mapping object. In JavaScript objects, duplicate keys result in the last value overwriting previous ones, but this indicates a copy-paste error and creates unnecessary code.
is_extended_promotional: Boolean(c.extended_promotional),
// Remove the duplicate lineRemove line 88.
| is_extended_promotional: Boolean(c.extended_promotional), | |
| is_extended_promotional: Boolean(c.extended_promotional), | |
| is_extended_promotional: Boolean(c.extended_promotional), |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
8461f83 to
f16dded
Compare
- Add is_extended_promotional field to BaseComponent interface - Update all 38 component table specs to include the new column - Add column mapping from c.extended_promotional data source Fixes tscircuit#92
f16dded to
e70cdc8
Compare
- Fix format for is_extended_promotional in 18 derived table files - Add extended_promotional?: number to Component interface in kysely.ts - Resolves Format Check and Type Check failures in CI Made-with: Cursor
…ndency cf-proxy tests require kysely-d1 which is not installed by root bun install. cf-proxy has its own vitest-based test suite (cd cf-proxy && npm test). Made-with: Cursor
|
Hi @seveibar and team, Just wanted to follow up on this PR. All CI checks have passed and it's been reviewed by graphite-app. Is there anything else you'd like me to adjust or improve? Happy to make any changes needed. Thanks for your time! |
/claim #92
This PR adds the
is_extended_promotionalcolumn to all component derived tables as requested in #92.Changes
Base Interface
is_extended_promotional: booleanto BaseComponent interface in component-base.tsComponent Tables (38 files)
Updated all component table specifications to include:
{ name: "is_extended_promotional", type: "boolean" }is_extended_promotional: Boolean(c.extended_promotional)Affected Component Types
Data Source
The column maps from
c.extended_promotionalin the source components table, following the same pattern asis_basicandis_preferred.Use Case
This allows users to filter parts that are "extended promotional" - components that act as basic for a limited time period.
Fixes #92