Skip to content

Add discontinued date and precision to core gear specs#379

Merged
Flohhhhh merged 2 commits into
developmentfrom
cursor/discontinued-date-core-specs-e1e3
Jul 25, 2026
Merged

Add discontinued date and precision to core gear specs#379
Flohhhhh merged 2 commits into
developmentfrom
cursor/discontinued-date-core-specs-e1e3

Conversation

@Flohhhhh

Copy link
Copy Markdown
Owner

Summary

Adds discontinuedDate and discontinuedDatePrecision to core gear specs, mirroring the existing release/announced date+precision pair across the full spec surface.

Changes

  • Schema: new nullable discontinued_date + discontinued_date_precision columns on gear
  • Edit UI: paired precision ToggleGroup + DateInput after release date
  • Spec registry display with formatDateWithPrecision
  • Change-request preview, edit-success, and admin approvals date formatting
  • Normalizer validation, trusted auto-approval overwrite allowlist for precision, catalog cache invalidation
  • Developer API catalog + gear detail serializers
  • i18n keys in all locales; docs updated

Out of scope

Gear cards/tables, browse sort/filter coalesce, bulk import, and “new” badge logic (discontinued stays independent of release/announced coalesce).

Notes

Schema is additive. Maintainers should run db:push / generate migrations on merge — this PR does not include migration files.

Open in Web Open in Cursor 

Flohhhhh added 2 commits July 25, 2026 14:03
Mirror the release/announced date+precision pair across schema, edit UI,
change-request preview, admin approvals, normalizer validation, auto-approval
policy, developer API, i18n, docs, and tests.
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sharplyphoto Ready Ready Preview, Comment Jul 25, 2026 6:06pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2bb62fef-5509-4420-8257-4d68d38c3f29

📥 Commits

Reviewing files that changed from the base of the PR and between 485b910 and 735d49e.

📒 Files selected for processing (29)
  • docs/developer-api.md
  • docs/gear-editing/auto-approvals.md
  • docs/gear-specification-system.md
  • docs/spec-editing-flow-design.md
  • messages/de.json
  • messages/en.json
  • messages/es.json
  • messages/fr.json
  • messages/it.json
  • messages/ja.json
  • messages/ms.json
  • messages/zh.json
  • src/app/[locale]/(admin)/admin/gear-proposals-list.tsx
  • src/app/[locale]/(pages)/edit-success/page.tsx
  • src/app/[locale]/(pages)/gear/_components/edit-gear/edit-gear-form.tsx
  • src/app/[locale]/(pages)/gear/_components/edit-gear/fields-core.tsx
  • src/lib/gear/change-request-field-policy.ts
  • src/lib/specs/registry.tsx
  • src/server/admin/proposals/service.ts
  • src/server/db/normalizers.ts
  • src/server/db/schema.ts
  • src/server/developer-api/data.ts
  • src/server/developer-api/serializers.ts
  • tests/unit/core-fields.test.ts
  • tests/unit/db-normalizers.test.ts
  • tests/unit/developer-api-schemas-serializers.test.ts
  • tests/unit/developer-api-service.test.ts
  • tests/unit/gear-edit-submission.test.ts
  • tests/unit/spec-registry-i18n.test.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added support for recording and displaying a product’s discontinued date and date precision.
    • Discontinued dates now appear in gear editing, specifications, proposal reviews, and edit confirmations.
    • Developer catalog data now includes discontinued date information.
    • Added localized labels across supported languages.
  • Documentation

    • Updated API, schema, and editing guidance to document discontinued-date fields and approval rules.
  • Tests

    • Added coverage for formatting, validation, serialization, localization, and approval behavior.

Walkthrough

Changes

The PR adds discontinuedDate and discontinuedDatePrecision across the gear schema, edit form, specification registry, developer catalog serialization, localized messages, and trusted-contributor approval rules.

Discontinued Date Support

Layer / File(s) Summary
Persistence and payload normalization
src/server/db/schema.ts, src/server/db/normalizers.ts, tests/unit/db-normalizers.test.ts
The gear table and proposal normalizer support discontinued dates and validated precision values, including UTC conversion and explicit clearing.
Editing and specification display
src/app/.../edit-gear/*, src/lib/specs/registry.tsx, src/app/.../gear-proposals-list.tsx, src/app/.../edit-success/page.tsx, messages/*.json, tests/unit/core-fields.test.ts, tests/unit/spec-registry-i18n.test.ts
The editor captures paired date and precision values, diffs and previews format them, and the specification registry displays localized precision-aware values.
Developer catalog propagation
src/server/developer-api/*, src/server/admin/proposals/service.ts, tests/unit/developer-api-*.test.ts, docs/developer-api.md, docs/gear-specification-system.md
Catalog queries, types, serializers, cache invalidation detection, tests, and documentation include the new fields.
Trusted contributor approval rules
src/lib/gear/change-request-field-policy.ts, tests/unit/gear-edit-submission.test.ts, docs/gear-editing/auto-approvals.md, docs/spec-editing-flow-design.md
Non-empty discontinued precision replacements are allowlisted for auto-approval, while clears and discontinued date changes remain reviewable.

Sequence Diagram(s)

sequenceDiagram
  participant GearEditor
  participant ProposalNormalizer
  participant GearDatabase
  participant DeveloperCatalog
  GearEditor->>ProposalNormalizer: Submit discontinuedDate and precision
  ProposalNormalizer->>GearDatabase: Store normalized discontinued date fields
  GearDatabase->>DeveloperCatalog: Provide catalog fields
  DeveloperCatalog-->>GearEditor: Serialize discontinued date fields
Loading

Possibly related PRs


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Flohhhhh
Flohhhhh marked this pull request as ready for review July 25, 2026 18:08
@Flohhhhh
Flohhhhh merged commit bf8c939 into development Jul 25, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant