Skip to content

feat(adapter-ui): surface proposal validation findings in the review UI#489

Merged
laofahai merged 3 commits into
mainfrom
feat/proposal-compat-findings-ui
Jun 7, 2026
Merged

feat(adapter-ui): surface proposal validation findings in the review UI#489
laofahai merged 3 commits into
mainfrom
feat/proposal-compat-findings-ui

Conversation

@laofahai

@laofahai laofahai commented Jun 7, 2026

Copy link
Copy Markdown
Owner

What & why

Proposal-validation Phase 3 (compatibility / breaking-reference checks) (#487) produces warnings/errors on a proposal's validationResult, but the review UI never displayed them — a reviewer could not see that a proposal would break existing references. This surfaces them.

Change

New read-only ProposalValidationFindings component + pure, tested helpers:

  • Renders each non-skipped validation phase's errors (blocking — destructive styling) and warnings (advisory — amber styling) with code + message + optional target/field.
  • Emphasizes Phase 3 (compatibility): distinct icon, dedicated title, sorted first.
  • Defensive against missing/partial validationResult (returns []/zeros, never throws); renders nothing when clean.
  • Mounted on the proposal review surface (proposal-review-demo) beside the existing impact preview, driven by the same fixture switcher.

Extracts the inline validationResult shape on Proposal into reusable exported types (ProposalValidationFinding / Phase / Result).

Boundary

Purely presentational — never submits/approves/applies/commits. ui imports no server/core runtime (the validation-result type is mirrored locally in the client lib). Pre-analysis (dedup/impact) is not yet plumbed to the client — verified, left out of scope (no server plumbing added).

Review

Cross-model reviewed (codex): clean, no actionable findings.

Tests

proposal-validation-findings.test.ts — 19 bun:test assertions over the helpers (selectPhasesWithFindings null/partial defensiveness, skipped/clean exclusion, Phase-3-first sort; countFindings cross-phase totals + defensive zeros; hasAnyFindings). Helpers are logic-only (the package has no jsdom/happy-dom render infra — consistent with sibling tests).

Gates

bun run check, bun run typecheck, full bun run test (batched) all green.

🤖 Generated with Claude Code

Proposal-validation Phase 3 (compatibility / breaking-reference checks) produces
warnings/errors on a proposal's validationResult, but the review UI never showed
them — a reviewer could not see that a proposal would break existing references.

Add a read-only ProposalValidationFindings component (+ pure, tested helpers):
- Renders each non-skipped phase's errors (blocking, destructive styling) and
  warnings (advisory, amber styling) with code + message + optional target/field.
- Emphasizes Phase 3 (compatibility): distinct icon, dedicated title, sorted first.
- Defensive against missing/partial validationResult; renders nothing when clean.
- Mounted on the proposal review surface (proposal-review-demo) next to the
  existing impact preview, driven by the same fixture switcher.

Extracts the inline validationResult shape on Proposal into reusable exported
types (ProposalValidationFinding/Phase/Result). Purely presentational — never
submits/approves/applies. ui imports no server/core runtime. Pre-analysis
(dedup/impact) is not plumbed to the client yet and is out of scope.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

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

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

⌛ 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5e531acd-4580-410b-8fb9-8147ea7e4903

📥 Commits

Reviewing files that changed from the base of the PR and between 9626920 and 69a0e7b.

📒 Files selected for processing (8)
  • .changeset/proposal-validation-findings-ui.md
  • addons/adapter-ui/cap-adapter-ui/__tests__/proposal-validation-findings.test.ts
  • addons/adapter-ui/cap-adapter-ui/src/components/proposal-validation-findings-helpers.ts
  • addons/adapter-ui/cap-adapter-ui/src/components/proposal-validation-findings.tsx
  • addons/adapter-ui/cap-adapter-ui/src/i18n/locales/en.json
  • addons/adapter-ui/cap-adapter-ui/src/i18n/locales/zh-CN.json
  • addons/adapter-ui/cap-adapter-ui/src/lib/proposal-api.ts
  • addons/adapter-ui/cap-adapter-ui/src/pages/proposal-review-demo.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/proposal-compat-findings-ui

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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request introduces the ProposalValidationFindings component to display validation findings in the proposal review UI, specifically highlighting Phase 3 compatibility and breaking-reference checks. It also extracts validation types for reusability, adds comprehensive unit tests for helper functions, and updates localization files. The review feedback suggests improving the component by removing a redundant hasAnyFindings check and its unused import, and ensuring unique React keys by appending the map index to prevent duplicate key warnings.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread addons/adapter-ui/cap-adapter-ui/src/components/proposal-validation-findings.tsx Outdated
@laofahai laofahai merged commit ff02462 into main Jun 7, 2026
6 checks passed
@laofahai laofahai deleted the feat/proposal-compat-findings-ui branch June 7, 2026 01:52
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