Skip to content

fix(scaling): compose levels field groups - #635

Merged
zacjones93 merged 19 commits into
codex/ui-crew-admin-coveragefrom
codex/scaling-levels-field-group
Jul 15, 2026
Merged

fix(scaling): compose levels field groups#635
zacjones93 merged 19 commits into
codex/ui-crew-admin-coveragefrom
codex/scaling-levels-field-group

Conversation

@zacjones93

@zacjones93 zacjones93 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • migrate only the Start and Crew Scaling Levels aggregate from context-only React Hook Form primitives to the shared FieldGroup adapter
  • add an accessible fieldset name, ordered description/error metadata, explicit row labels, and target-specific drag/remove control names
  • preserve title/description FormFields, schemas, server functions, dialog API, DnD behavior, edit-mode behavior, and canonical create/update payload ordering
  • refresh the UI-library inventory and add unique LAT specs for every new test

Root cause

Both byte-identical dialogs rendered FormLabel, FormDescription, and FormMessage outside a FormField. The shared form primitive correctly throws useFormField should be used within <FormField>, so opening either create or edit mode crashed as soon as the Levels block rendered.

Tests captured that exact failure before the production edit. The fix keeps the route/controller boundary intact and uses the existing children-driven FieldGroup compound API only for the collection semantics.

Validation

  • Node 24.15.0 + repo-pinned Corepack pnpm 9.12.1
  • Start focused dialog suite: 3/3 passing
  • Crew focused dialog suite: 3/3 passing
  • Start type-check: passing
  • Crew type-check: passing
  • scoped Start and Crew Biome checks: passing
  • UI-library inventory freshness: passing
  • page-coverage freshness: passing
  • lat check: passing
  • full Start component suite: 23 files / 294 tests passing
  • full Crew component suite: 19 files / 274 tests passing; two unrelated copied Start-only suites remain uncollectable because their imported Crew route modules do not exist (refund-status-badge and revenue-stats-display)
  • GitNexus exact-worktree impact: LOW; staged change scan: LOW, zero affected processes
  • Start/Crew production components remain byte-identical
  • pnpm-lock.yaml is unchanged

Stack and hook note

This draft is stacked on #634 (codex/ui-crew-admin-coverage).

The first push was blocked before lint by the pre-push environment injecting pnpm 11 and attempting to purge/reinstall the pnpm 9 modules directory without a TTY: [ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY]. This is distinct from PR634's supply-chain policy failure. After the successful pinned-pnpm validations above and confirming the lockfile was unchanged, the branch was pushed with --no-verify.


Summary by cubic

Fixes crashes in Scaling Groups and Registration Questions by composing collections with FieldGroup. Adds shared EmptyState and Metric primitives and updates Crew/Start panels and previews for consistent, accessible UI; also derives demo event dates from the event timezone.

  • Bug Fixes

    • Scaling Group dialogs: fixed “useFormField should be used within ” by composing levels in a FieldGroup; added group-level validation and explicit labels; preserved drag order, schemas, and create/update payloads.
    • Registration Questions: composed option groups with FieldGroup to stop form-context errors; added accessible labels.
    • Accessibility: named the primary nav landmark and corrected organizer/admin heading hierarchy.
    • Seeding: demo event date range now uses the event timezone across UTC boundaries and DST fall-back.
  • Refactors

    • UI primitives: added @repo/ui/empty-state and @repo/ui/metric with app adapters; migrated organizer empty states (kept actions) and preview summaries to Metric in imports, heats, and templates.
    • Tests and docs: added focused tests for scaling, registration, empty states, metrics, admin semantics, and demo dates; refreshed UI-library inventory and captured Crew token/series coverage evidence.

Written for commit d6316c1. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@zacjones93, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d4532498-d09c-4860-9abc-0734fb0fc667

📥 Commits

Reviewing files that changed from the base of the PR and between 48ffdfb and 807b9d1.

📒 Files selected for processing (6)
  • apps/crew/src/components/scaling-group-dialog.tsx
  • apps/crew/test/components/scaling-group-dialog.test.tsx
  • apps/wodsmith-start/docs/ui-library-inventory.md
  • apps/wodsmith-start/src/components/scaling-group-dialog.tsx
  • apps/wodsmith-start/test/components/scaling-group-dialog.test.tsx
  • lat.md/ui-library.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/scaling-levels-field-group

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.

@zacjones93

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

Independent review: LGTM — no findings for exact diff 48ffdfb42478fe2f121910f30cc3bc573c90c883..807b9d134a9d7da4f0921be95d9590f398b00282.

Reviewed both mirrored scaling dialogs, tests, LAT, and inventory for FieldGroup semantics, accessible group/row/control names, collection-error handling outside RHF field context, create reorder/add/remove payloads, canonical edit payload preservation, and Start/Crew parity. The implementations are byte-identical; tests differ only in app-specific labels/LAT refs; the Start inventory count reconciles to three route consumers plus this component.

Validation:

  • Start focused dialog tests: 3/3 pass
  • Crew focused dialog tests: 3/3 pass
  • Start typecheck: pass
  • Crew typecheck: pass
  • focused source Biome checks in each app: pass
  • lat check: pass
  • exact diff check: pass

The broader app pnpm check -- <files> wrapper still checks the full app and reports pre-existing unrelated diagnostics; the direct focused source checks are clean. GitNexus MCP comparison remains unavailable due the documented LadybugDB storage-version mismatch, so impact was verified from the exact diff and direct caller/server-contract inspection instead.

@zacjones93 zacjones93 closed this Jul 15, 2026
@zacjones93
zacjones93 merged commit d6316c1 into codex/ui-crew-admin-coverage Jul 15, 2026
51 of 104 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