Skip to content

test(components): backfill learning content coverage#352

Open
bntvllnt wants to merge 4 commits into
mainfrom
chore/231-content-tests
Open

test(components): backfill learning content coverage#352
bntvllnt wants to merge 4 commits into
mainfrom
chore/231-content-tests

Conversation

@bntvllnt
Copy link
Copy Markdown
Collaborator

@bntvllnt bntvllnt commented May 13, 2026

Summary

  • Add Vitest coverage for lang-provider, overview-board, quiz, step-by-step, and tutorial-complete.
  • Cover locale detection, overview CTA/icon rendering, quiz answer flows, interactive step completion, and tutorial completion callbacks/links.
  • Fix Quiz object-option React keys so public QuizOption objects no longer collapse to duplicate [object Object] keys; mirror the fix into the registry copy.

Related to #231

Validation

  • pnpm -F @vllnt/ui exec vitest run src/components/quiz/quiz.test.tsx — 1 file, 5 tests passed
  • pnpm -F @vllnt/ui exec eslint src/components/quiz/quiz.tsx src/components/quiz/quiz.test.tsx
  • pnpm -F @vllnt/ui exec tsc --noEmit --project tsconfig.build.json
  • git diff --check
  • pnpm -F @vllnt/ui lint
  • pnpm build
  • pnpm test:once — 221 files, 1232 tests passed
  • pnpm -F @vllnt/ui check:use-client — OK: all 246 hook components declare "use client"
  • pnpm -F @vllnt/ui exec tsx scripts/check-story-coverage.ts — all 236 components have stories
  • pnpm -F @vllnt/ui exec tsx scripts/verify-stories.ts — all stories provide required props

CI status update (2026-05-19T08:46:35Z)

Current head: f2bcc767b7440ac1cbcef57e181cd3fb78e9bfd2

  • GitHub Actions build · sign · scan · deploy: SUCCESS (completed 2026-05-19T07:00:14Z); deploy gate recovered at the current head.
  • vllnt-pilot preview/deploy status: SUCCESS (completed 2026-05-19T06:59:39Z) — https://pr-352-ui-registry.preview.vllnt.ai.
  • Legacy vllnt-pilot preview check: NEUTRAL as vllnt-pilot / preview (superseded legacy) (completed 2026-05-19T06:46:42Z); retained only as superseded legacy metadata, not a blocking failure.
  • Other current PR checks observed green/acceptable: Quality Gates, CodeQL, issue-link enforcement, Verify Stories, Build Storybook, Storybook Tests, Visual Regression, Scan codebase health, and language/action CodeQL analyses.
  • Merge/release status: not merged; mergeStateStatus is CLEAN. Current disposition: green/manual-review-ready subject to human review; no live CI/preview blocker observed at this head.

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.

@bntvllnt Review verdict: REQUEST_CHANGES recommended — issue scope/body blockers

Head reviewed: 4b0ae65b176181350907716492de9d808ab2bc70

BLOCKING

  • The only linked issue is Related to #231, but #231 is a test-backfill tracker that explicitly scopes the work to net-new *.test.tsx files and no source changes. This PR also changes runtime Quiz source in packages/ui/src/components/quiz/quiz.tsx and the registry mirror. Link a matching bug issue for that runtime fix, or split/remove the source change from this issue-scoped test-backfill PR.
  • The PR body is stale under R3: current checks are green except the stale Vercel UI preview, but the body still says GitHub Actions/CodeQL are queued/in progress and Storybook is pending.

STATUS

  • GitHub Actions/code checks are green and Vercel – storybook is SUCCESS.
  • Vercel – ui.vllnt.ai: FAILURE is eligible for the PM stale-Vercel reviewer-triage waiver only; it is not merge/release approval.
  • Validation gap: I did not rerun full local workspace gates; this review used the live GitHub status rollup plus changed-file inspection.

<QuizOptionButton
index={index}
key={typeof opt === "string" ? opt : `quiz-option-${String(opt)}`}
key={`quiz-option-${index}-${opt.label}`}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Blocking scope issue: this runtime source fix may be valid, but the only linked issue (#231) explicitly scoped the PR to net-new tests and no source changes. Link a matching bug issue for this source change, or split/remove it from the test-backfill PR.

@vllnt-pilot vllnt-pilot Bot had a problem deploying to Preview · pr-352-storybook May 18, 2026 17:14 Failure
@vllnt-pilot vllnt-pilot Bot had a problem deploying to Preview · pr-352-storybook May 18, 2026 17:20 Failure
@bntvllnt bntvllnt had a problem deploying to Preview · pr-352-ui-registry May 18, 2026 18:24 Failure
@vllnt-pilot
Copy link
Copy Markdown

vllnt-pilot Bot commented May 18, 2026

Preview build failed · pr-352-ui-registry

Workflow ran but the build did not produce a runnable image. Common causes:

  • lockfile drift from package.json (run pnpm install)
  • missing output: standalone in next.config.mjs
  • broken Dockerfile path

Check the failed build · sign · scan · deploy Action run on this PR for the exact error.

From f2bcc76.

@bntvllnt
Copy link
Copy Markdown
Collaborator Author

bntvllnt commented May 19, 2026

Review update — manual-review-ready

@bntvllnt The previous metadata-only REQUEST_CHANGES blocker is cleared for the current head.

VERIFIED LIVE

  • PR: test(components): backfill learning content coverage #352
  • Reviewed head: f2bcc767b7440ac1cbcef57e181cd3fb78e9bfd2
  • Head unchanged from the blocker-repair task: yes.
  • mergeStateStatus: CLEAN (mergeable: MERGEABLE)
  • Current checks: all current checks are success/neutral acceptable; no nonacceptable check remains.
  • Deploy/preview status: recovered at the current head; preview is live at https://pr-352-ui-registry.preview.vllnt.ai.
  • PR body status section now describes the current recovered CI/preview state and no longer claims a live deploy failure.

OUTCOME

  • Blocking: none from the stale PR-body/deploy-status issue.
  • Disposition: green/manual-review-ready, with final approval still reserved for bntvllnt.
  • Scope of this update: PR body/status metadata only; no source-code changes were made or re-reviewed in this pass.

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 — changes requested

@bntvllnt I re-reviewed PR #352 at head f2bcc767b7440ac1cbcef57e181cd3fb78e9bfd2. The tests and live checks are green, but the PR still has one scope/issue-link blocker for this #231 coverage lane.

BLOCKING

  • S1 — runtime Quiz fix is still bundled under the #231 test-backfill issue
    • Evidence: the PR body links only Related to #231; issue #231 explicitly scopes this rollout to net-new *.test.tsx files and says No source changes. This PR also changes runtime source at packages/ui/src/components/quiz/quiz.tsx:217 and the registry mirror at apps/registry/registry/default/quiz/quiz.tsx:217.
    • Why it matters: the key fix may be correct, and the registry mirror is consistent, but it is not covered by the issue contract for this finite green coverage batch. Merging it as-is would make the #231 lane a mixed test + runtime-change lane and weakens issue-link review as a real scope control.
    • Fix: either split the Quiz runtime/registry key fix into its own bug-fix PR linked to a matching issue, or update/link an explicit issue that covers the runtime fix and make this PR body explain why this #231 coverage batch intentionally carries that non-test change.
    • Rule: issue #231 § Approach/Acceptance Criteria — “No source changes — net-new *.test.tsx files only” / “No existing test files modified”; docs/agents/RULES.md R5 — every PR must link the issue that actually covers the work.

WARN

None beyond the blocker above.

VERIFIED CLEAN

  • Current live state verified: open, non-draft, mergeStateStatus: CLEAN, mergeable: MERGEABLE, changedFiles=7, head matches the assigned SHA.
  • Full changed-file coverage reviewed:
    • apps/registry/registry/default/quiz/quiz.tsx
    • packages/ui/src/components/lang-provider/lang-provider.test.tsx
    • packages/ui/src/components/overview-board/overview-board.test.tsx
    • packages/ui/src/components/quiz/quiz.test.tsx
    • packages/ui/src/components/quiz/quiz.tsx
    • packages/ui/src/components/step-by-step/step-by-step.test.tsx
    • packages/ui/src/components/tutorial-complete/tutorial-complete.test.tsx
  • Reviewed surrounding component behavior for locale detection, overview rendering, quiz answer/reset flows, step completion state, tutorial completion actions, and Quiz key construction.
  • Rule verdicts: PASS R3 PR body freshness; FAIL issue-link/scope fit because only #231 is linked while runtime files are changed; PASS generated-artifact policy for registry mirror consistency; PASS local targeted coverage validity; PASS live checks; PASS no unrelated generated metadata (component-metadata.json not touched).

VALIDATION

  • Ran locally in the PR worktree: pnpm exec vitest run src/components/lang-provider/lang-provider.test.tsx src/components/overview-board/overview-board.test.tsx src/components/quiz/quiz.test.tsx src/components/step-by-step/step-by-step.test.tsx src/components/tutorial-complete/tutorial-complete.test.tsx — 5 files, 17 tests passed.
  • Live checks observed: issue-link enforcement, preview deploy, build/sign/scan/deploy, Storybook, visual regression, CodeQL, health scan, quality gates, and story verification all pass; only the superseded legacy preview check is neutral.

Verdict: REQUEST_CHANGES until the runtime Quiz fix is split or explicitly covered by the PR’s linked issue/scope. This is not an approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tech-debt Refactoring or cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant