Skip to content

fix(onboarding): use string keys for dismissed_hints record schema - #541

Draft
9thLevelSoftware wants to merge 1 commit into
mainfrom
cursor/onboarding-record-key-schema-1024
Draft

9thLevelSoftware wants to merge 1 commit into
mainfrom
cursor/onboarding-record-key-schema-1024

Conversation

@9thLevelSoftware

Copy link
Copy Markdown
Owner

Summary

dismissed_hints used Zod 4's one-argument z.record(z.boolean()), which treats the argument as the key schema. After the first hint dismiss (recovery-readiness and any other string id), onboardingSchema.parse in the onboarding query failed, so feature hints and the What's New check stopped loading. typecheck-baseline.json was hiding the mismatch as TS2554.

  • dismissed_hints is now z.record(z.string(), z.boolean()).default({}).
  • A unit test parses { "recovery-readiness": true } on a full onboarding row.
  • The now-fixed src/schemas/onboarding.ts TS2554 entries were removed from the app and test baselines by hand.

Verification

  • npm run typecheck: app 20 errors (was 21), test 138 errors (was 139), 0 new.
  • npm run lint: 255 warnings, exit 0 (no new warnings).
  • npm test: 2487 passed, 16 skipped, 0 failed (includes the new schema test).
Open in Web Open in Cursor 

Zod 4's one-argument z.record treats the argument as the key schema, so
string hint ids failed to parse after the first dismiss.

Co-authored-by: Devil <9thLevelSoftware@users.noreply.github.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
phoenix-portal 980398e Commit Preview URL

Branch Preview URL
Oct 24 2026, 08:32 AM

This branch has not been deployed

No deployments
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.

2 participants