Skip to content

Commit e43eb0c

Browse files
os-zhuangclaude
andauthored
fix(showcase): drop dead props f_rating.maxRating / f_vector.vectorConfig (#1973)
The spec-liveness author-warning lint flagged two dead-property usages in the showcase's field-zoo object that do nothing at runtime: - f_rating authored `maxRating` (via Field.rating), but RatingField reads the flat `max` prop. Author `{ type: 'rating', max: 5 }` directly. - f_vector authored the nested `vectorConfig` block (via Field.vector), but VectorField reads the flat `dimensions` sibling and there is no vector-index DDL consuming vectorConfig. Author `{ type: 'vector', dimensions: 1536 }` directly. Switched both from the builder helpers to raw literals (matching the style of other raw-literal fields in this file) so the showcase authors zero dead props. `objectstack compile` is clean: exit 0, no liveness-dead-property warnings, no new errors. Note: the Field.rating/Field.vector builders themselves still emit the dead props (field.zod.ts) — a separate follow-up. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 796f0d6 commit e43eb0c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/app-showcase/src/objects/field-zoo.object.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ export const FieldZoo = ObjectSchema.create({
121121
f_code: Field.code('json', { label: 'Code Editor' }),
122122
f_json: Field.json({ label: 'JSON' }),
123123
f_color: Field.color({ label: 'Color' }),
124-
f_rating: Field.rating(5, { label: 'Rating' }),
124+
f_rating: { type: 'rating', label: 'Rating', max: 5 },
125125
f_slider: Field.slider({ label: 'Slider', min: 0, max: 100, step: 5 }),
126126
f_signature: Field.signature({ label: 'Signature' }),
127127
f_qrcode: Field.qrcode({ label: 'QR / Barcode' }),
128128
f_progress: { type: 'progress', label: 'Progress', min: 0, max: 100 },
129129

130130
// ── AI / ML ──────────────────────────────────────────────────────────
131-
f_vector: Field.vector(1536, { label: 'Embedding Vector' }),
131+
f_vector: { type: 'vector', label: 'Embedding Vector', dimensions: 1536 },
132132
},
133133
});

0 commit comments

Comments
 (0)