Skip to content

fix(react-doctor): clear correctness warnings#341

Open
bntvllnt wants to merge 3 commits into
mainfrom
fix/272-correctness
Open

fix(react-doctor): clear correctness warnings#341
bntvllnt wants to merge 3 commits into
mainfrom
fix/272-correctness

Conversation

@bntvllnt
Copy link
Copy Markdown
Collaborator

Summary

  • Replace render-adjacent new Date(...) usage and index keys in registry previews/test fixtures with stable module-level values and ids.
  • Add versioned checklist persistence with legacy array migration, and reuse the parser from progress tracker reads.
  • Centralize JSON-LD script props so Correctness diagnostics no longer flag page-level dangerouslySetInnerHTML sites.
  • Regenerate the checklist registry source from the package source.

Validation

  • pnpm doctor:json -> 0 Correctness diagnostics
  • pnpm -F @vllnt/ui exec vitest run src/components/checklist/checklist.test.tsx src/components/date-picker/date-picker.test.tsx src/components/interactive-timeline/interactive-timeline.test.tsx src/components/progress-tracker/progress-tracker.test.tsx
  • pnpm -F @vllnt/ui exec eslint src/components/checklist/checklist.tsx src/components/checklist/index.ts src/components/progress-tracker/progress-tracker.tsx src/components/progress-tracker/progress-tracker.test.tsx src/components/date-picker/date-picker.test.tsx src/components/interactive-timeline/interactive-timeline.test.tsx
  • pnpm -F @vllnt/ui lint
  • pnpm -F @vllnt/ui exec tsc --noEmit --project tsconfig.build.json
  • pnpm build
  • pnpm test:once
  • git diff --check

Notes: pnpm build emitted the existing Next.js multiple-lockfile warning for this nested worktree. pnpm test:once emitted existing jsdom navigation, duplicate-key, and Radix dialog description warnings while passing.

Closes #272

Copy link
Copy Markdown
Collaborator Author

@bntvllnt bntvllnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — 0 findings

BLOCKING

None.

WARN

None.

VERIFIED CLEAN

  • Reviewed all 15 changed files in the PR diff against the repo rules loaded from AGENTS.md, RULES.md, COMPONENTS.md, and PR_PLAYBOOK.md.
  • JSON-LD script prop centralization keeps the ld+json type and now escapes < via jsonLdScript, which preserves valid JSON-LD while removing page-level repeated dangerouslySetInnerHTML sites.
  • Checklist storage changes keep legacy array parsing while writing the new versioned payload, and the registry copy is in parity with the package source after normalizing only the cn import path.
  • ProgressTracker now reads checklist state through the shared parser and refreshes on storage/focus/custom checklist progress events with persist-key filtering.
  • Date/timeline/test fixture changes move stable values to module-level constants or stable ids without weakening assertions.

VALIDATION

  • GitHub checks at PR head 4dc5482aa89ccafe6a6e99ccbe9a9e995a7dfcbb: 10/10 passing.
  • Ran: pnpm -F @vllnt/ui exec vitest run src/components/checklist/checklist.test.tsx src/components/date-picker/date-picker.test.tsx src/components/interactive-timeline/interactive-timeline.test.tsx src/components/progress-tracker/progress-tracker.test.tsx — 22 tests passed. Existing duplicate-key warning emitted in interactive-timeline today-marker test.
  • Ran: pnpm -F @vllnt/ui exec eslint src/components/checklist/checklist.tsx src/components/checklist/index.ts src/components/progress-tracker/progress-tracker.tsx src/components/progress-tracker/progress-tracker.test.tsx src/components/date-picker/date-picker.test.tsx src/components/interactive-timeline/interactive-timeline.test.tsx — passed.
  • Ran: pnpm -F @vllnt/ui exec tsc --noEmit --project tsconfig.build.json — passed.
  • Ran: pnpm doctor:json — exited 0; no Correctness diagnostics were reported.
  • Claude Code secondary review was attempted but skipped because this machine is not logged in to Claude Code (Not logged in · Please run /login).

Approval recommended; submitting as COMMENT to keep final approval under bntvllnt control.

@vllnt-pilot vllnt-pilot Bot had a problem deploying to Preview · pr-341-storybook May 18, 2026 17:14 Failure
@vllnt-pilot
Copy link
Copy Markdown

vllnt-pilot Bot commented May 18, 2026

Preview ready · pr-341-ui-registry

Service Status Preview
ui-registry Ready https://pr-341-ui-registry.preview.vllnt.ai
Inspect
  • Deployed to vllnt-cluster from 87cc8b6
  • Reply with /clean to destroy this preview now

@vllnt vllnt deleted a comment from vllnt-pilot Bot May 18, 2026
@vllnt vllnt deleted a comment from vercel Bot May 18, 2026
@bntvllnt bntvllnt self-assigned this May 19, 2026
Copy link
Copy Markdown
Collaborator Author

@bntvllnt bntvllnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — 0 findings

BLOCKING

None.

WARN

None.

VERIFIED CLEAN

  • Reviewed all 15 changed files in the current PR diff at head 87cc8b60ab55ccb7c1eafea29db2527398069f62 against the repo rules from AGENTS.md, RULES.md, COMPONENTS.md, and PR_PLAYBOOK.md.
  • JSON-LD script prop centralization preserves type="application/ld+json" and escapes < through the shared serializer before reuse across layout/docs/component pages.
  • Checklist storage now writes a versioned payload while still parsing legacy string-array payloads; the registry copy matches the package source after the expected cn import normalization.
  • ProgressTracker consumes the shared checklist parser and keeps same-tab/cross-tab refresh behavior through focus/storage/custom checklist events.
  • Date picker, timeline, and preview fixture updates replace render-adjacent dates/index keys with stable module-level values or stable ids without weakening existing assertions.

VALIDATION

  • GitHub checks at PR head 87cc8b60ab55ccb7c1eafea29db2527398069f62: passing, including Quality Gates, Storybook Tests, Visual Regression, CodeQL, and issue-link enforcement.
  • Ran: pnpm -F @vllnt/ui exec vitest run src/components/checklist/checklist.test.tsx src/components/date-picker/date-picker.test.tsx src/components/interactive-timeline/interactive-timeline.test.tsx src/components/progress-tracker/progress-tracker.test.tsx — 22 tests passed; existing duplicate-key warning emitted in the interactive-timeline today-marker test.
  • Ran: pnpm -F @vllnt/ui exec eslint src/components/checklist/checklist.tsx src/components/checklist/index.ts src/components/progress-tracker/progress-tracker.tsx src/components/progress-tracker/progress-tracker.test.tsx src/components/date-picker/date-picker.test.tsx src/components/interactive-timeline/interactive-timeline.test.tsx — passed.
  • Ran: pnpm -F @vllnt/ui exec tsc --noEmit --project tsconfig.build.json — passed.
  • Ran: pnpm doctor:json and inspected .react-doctor.json — 0 Correctness diagnostics and 0 Security diagnostics; pre-existing non-correctness diagnostics remain outside this PR's stated scope.
  • Ran: git diff --check origin/main...HEAD — passed.

Approval looks safe from the code-review side, but per autonomous-review policy I am leaving this as a COMMENT rather than submitting APPROVE.

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.

react-doctor: correctness — array-index keys + hydration mismatch + localStorage versioning (61 warnings)

1 participant