Skip to content

feat(compliance): focused first-load — setup panel for empty orgs, two-block register - #251

Merged
ejay-dev merged 1 commit into
mainfrom
claude/festive-franklin-3enxim
Jun 12, 2026
Merged

feat(compliance): focused first-load — setup panel for empty orgs, two-block register#251
ejay-dev merged 1 commit into
mainfrom
claude/festive-franklin-3enxim

Conversation

@ejay-dev

Copy link
Copy Markdown
Owner

Summary

First-session density/IA pass on /app/compliance (surface 1 of the remaining workstream; dashboard was PR #250).

Before: every org — including a brand-new one — saw four stacked uniform blocks: a 4-metric hero (all zeros for new orgs), two equal quick-link cards (Health, Attestations), a 3-select filter bar, and an empty table with pagination.

After, branching server-side on the org's obligation count:

  • Zero obligations: one centered setup panel with a single primary action (Browse frameworks). Nothing else on screen. Fail-open — any org-resolution or count error renders the full register, never a false setup state.
  • Populated org: two blocks — hero + register. The Health and Attestations quick-link cards fold into the hero's actions row as quiet links, killing the uniform-card band.

Notes

  • Reuses PageHero actions, the health page's empty-state pattern, and StartHereCard's primary CTA styling — no new primitives, tokens, or affordances
  • Keeps the Obligations Register heading (asserted by deep-workflow-integrity.spec.ts after seeding data) and the compliance-health-link testid
  • Empty-state copy contains "framework" / register language so enterprise-invariants.spec.ts's empty-state regex still matches

Verification

  • npm run typecheck — pass
  • npx eslint on both touched files — clean
  • Blast radius: CompliancePageHero has a single consumer (this page); change is surface-local

https://claude.ai/code/session_01TyMddHGjcjofqS6K9H2MeW


Generated by Claude Code

…o-block register

For an org with zero obligations the landing page rendered four stacked
mostly-empty blocks: a 4-metric hero of zeros, two uniform quick-link
cards, a 3-select filter bar and an empty table with pagination. The
page now branches server-side on the org's obligation count:

- No obligations yet: a single centered setup panel with one primary
  action (Browse frameworks). Fail-open — any resolution/query error
  renders the full register.
- Populated org: hero + register only. The Compliance health and
  Manual attestations quick-link cards fold into the hero's actions
  row as quiet links, so the page is two blocks instead of four.

Reuses PageHero actions, the health page's empty-state pattern and
StartHereCard's primary CTA styling — no new primitives or tokens.
Keeps the 'Obligations Register' heading and compliance-health-link
testid asserted/used by e2e.
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
forma-os Ready Ready Preview, Comment Jun 12, 2026 4:22pm

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ejay-dev, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 38 minutes and 36 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

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.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5742305a-6c73-4bae-a325-ca7d7abdd046

📥 Commits

Reviewing files that changed from the base of the PR and between 19107fb and 399c37a.

📒 Files selected for processing (2)
  • app/app/compliance/page.tsx
  • components/compliance/CompliancePageHero.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/festive-franklin-3enxim

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 and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 399c37a327

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

.select('id', { count: 'exact', head: true })
.eq('organization_id', orgId);
if (error) return true;
return (count ?? 0) > 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Treat enabled frameworks as populated

When an org has just activated a framework, this gate can still return false because framework activation upserts org_frameworks and then starts provisionFrameworkControls(...).catch() without awaiting it in app/api/v1/frameworks/activate/route.ts, so org_tasks may be empty while the framework is already enabled. In that window, or if provisioning fails to create tasks, /app/compliance keeps showing the setup CTA instead of the populated compliance landing/health links, effectively sending users back to browse frameworks they already enabled.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown

♿ Accessibility Test Results

PASSED - No critical accessibility issues found

Tests Performed:

  • WCAG 2.1 AA compliance validation
  • Cross-browser accessibility testing
  • Keyboard navigation testing
  • Screen reader compatibility
  • Color contrast validation

Artifacts: Download the accessibility reports from the "Artifacts" section for detailed results.

@ejay-dev
ejay-dev merged commit 6289939 into main Jun 12, 2026
29 of 31 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.

2 participants