Skip to content

refactor(ui): adapt organizer empty states - #641

Merged
zacjones93 merged 12 commits into
codex/empty-state-semantic-fixesfrom
codex/organizer-empty-state-adapter
Jul 15, 2026
Merged

refactor(ui): adapt organizer empty states#641
zacjones93 merged 12 commits into
codex/empty-state-semantic-fixesfrom
codex/organizer-empty-state-adapter

Conversation

@zacjones93

@zacjones93 zacjones93 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reimplement the byte-identical Start and Crew OrganizerEmptyState components as compatibility adapters over shared @repo/ui EmptyState composition
  • preserve the existing feature prop API, explicit plain and default card presentation, caller-owned h3, action ordering, icons, callbacks, and historical card spacing
  • add mirrored Start/Crew contract tests plus byte-identical source parity coverage
  • update the generated UI inventory and LAT architecture/test contracts for all 21 audited render sites

Impact

Feature consumers are unchanged. The only intentional semantic delta is aria-hidden="true" on the visual-only icon wrapper. The shared card's default max width and padding are explicitly overridden so this migration does not change existing organizer layouts.

This draft is stacked on the independently reviewed semantic-fix PR branch codex/empty-state-semantic-fixes.

Validation

  • Start OrganizerEmptyState: 5/5
  • Crew OrganizerEmptyState: 5/5
  • @repo/ui: 63/63
  • Start and Crew typechecks
  • UI package Biome
  • generated UI inventory check
  • lat check
  • pre-push monorepo lint and typecheck
  • GitNexus staged change detection: low risk, no affected execution processes

Summary by cubic

Refactored Start and Crew organizer empty states to use the shared @repo/ui EmptyState without changing visuals or APIs. Introduced @repo/ui/metric and migrated summary metrics; improved Start admin semantics and hydration.

  • Refactors

    • Rewrote OrganizerEmptyState as compatibility adapters over EmptyState.Root/Card/Icon/Title/Description/Actions, and updated direct consumers to compose EmptyState directly where appropriate.
    • Added @repo/ui/metric and adopted Metric for preview summaries (imports, heats, templates), with thin app adapters; updated Storybook and UI inventory.
    • Expanded mirrored Start/Crew contract tests for empty states and new metric consumers; validated organizer render sites.
  • Bug Fixes

    • Preserved primary/secondary action behavior and layout when composed via EmptyState.Actions; icon wrapper is decorative (aria-hidden="true").
    • Stabilized Start admin sidebar hydration and link state styles; enforced heading hierarchy on the dashboard and corrected demo-competitions semantics.
    • Kept compact metric typography consistent with prior UI.

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

Review in cubic

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 360a4f2d-f297-43b2-be41-ef7c4eb912d0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/organizer-empty-state-adapter

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.

@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.

This was referenced Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Independent review of exact base 21f62cd28191b0e47b9b2f9838272dbd84280910 → head 59151a93ef308925bb968600b284cb46355563d1.

Two findings:

  1. [P2] Preserve the legacy mobile action alignment. Both mirrored adapters render EmptyState.Actions with flex-col but leave the shared primitive's items-center justify-center defaults in place. The legacy action container was flex flex-col gap-2 sm:flex-row; below sm, its default align-items: stretch made both action buttons share the wider button's width. The new inherited items-center makes each button use its intrinsic width. This is a visible compatibility regression and contradicts the stated layout-preservation contract. Override the inherited alignment for the compatibility adapter (while retaining the intended sm row behavior), and add a class/layout assertion so the mirrored tests catch it.

  2. [P2] Correct the audited consumer/render-site totals. The checked-in inventory reports Start as 11 consumer files / 16 render sites and the total as 15 / 21. Exact git grep counts at both the base and head are Start 10 files / 14 render sites, Crew 4 / 5, total 14 / 19. The same stale “21 render sites” assertion is repeated in lat.md/ui-library.md. Because this artifact is the migration audit record, those counts should match the exact tree.

Everything else reviewed cleanly: the legacy prop API, h3 semantics, action callbacks/icons/order, explicit Root/Card selection, card max-width/padding overrides, decorative icon semantics, and byte-identical Start/Crew adapter source are sound; no consumer source changed.

Validation:

  • focused Start + Crew adapter tests: 10/10 pass
  • @repo/ui: 63/63 tests + type-check pass
  • Start + Crew app type-checks pass
  • UI inventory generator, lat check, and git diff --check pass
  • changed adapter sources pass Biome; whole-app Biome checks still report unrelated pre-existing repository diagnostics
  • CI at review time: Crew build/lint/demo E2E and Start lint green; Start build and two E2E shards pending
  • live review threads: none; CodeRabbit was rate-limited
  • GitNexus graph review was unavailable due a LadybugDB storage-version mismatch, so blast radius was independently verified from the exact diff and exact base/head consumer searches.

Copy link
Copy Markdown
Contributor Author

Independent fix-head re-review of exact base 21f62cd28191b0e47b9b2f9838272dbd84280910 → head ca6933e417e0e398875c4e5b40a5ef26ccc1e391: LGTM; both prior P2 findings are resolved.

  • Exact base/head source counts now match the audit and LAT: Start 10 consumer files / 14 render sites (3 plain, 11 card), Crew 4 / 5 (3 plain, 2 card), total 14 / 19 (6 plain, 13 card).
  • The mirrored adapters remain byte-identical and no consumer source changed.
  • The merged action classes are flex min-w-0 gap-2 mt-5 flex-col flex-nowrap items-stretch justify-start sm:flex-row sm:items-center: inherited unprefixed items-center justify-center are removed, mobile equal-width stretch/start behavior is restored, and the responsive row alignment remains explicit.
  • Mirrored regression assertions cover the compatibility alignment.

Revalidation is green: focused adapters 10/10, @repo/ui 63/63 plus type-check, Start/Crew type-checks, UI inventory freshness, lat check, and git diff --check. Live review threads remain empty and CodeRabbit skipped the draft. Current CI is green for both lints, Crew build, stack, security, and CodeRabbit; Start build, Crew demo E2E, and the two E2E shards are still running with no reported failures. No further findings.

@zacjones93 zacjones93 closed this Jul 15, 2026
@zacjones93
zacjones93 merged commit d6316c1 into codex/empty-state-semantic-fixes Jul 15, 2026
42 of 64 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