feat: add turn review demo#72
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds a "turn-review" dashboard view: TypeScript types for turn-review scenarios, a DEMO_TURN_REVIEW dataset, UI wiring (navigation item, layout initialView, dashboard client branch), a new demo route (/demo/turn-review), and a client-only TurnReviewBoard component with subcomponents for situation, metrics, move selection, regret/rollback previews, and a static receipt. A Vitest suite validates the demo data shape and content constraints. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed due to a network error. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/turn-review/turn-review-board.tsx`:
- Around line 244-252: The move buttons in TurnReviewBoard currently only show
visual selection via the isSelected class but lack exposed toggle semantics;
update the <button> elements that use onSelect and isSelected (the move
button(s) in turn-review-board.tsx, including the second instance around lines
269-271) to add aria-pressed={isSelected} so screen readers get the toggle
state, and ensure the prop is a boolean tied to the same isSelected value used
for styling.
- Around line 341-347: The primary CTA button currently uses onClick={() =>
undefined} which leaves an enabled, non-functional control; update the <button>
(the JSX element rendering "End turn: {move.label}") to be actually disabled in
preview mode by removing the no-op onClick, adding the disabled attribute (and
aria-disabled="true" if you still need explicit accessibility hint), and adjust
classes to reflect a disabled state (e.g., add disabled:opacity-50
disabled:cursor-not-allowed or similar) so the control is inert and visually
indicated as disabled.
In `@lib/turn-review/demo-turn.ts`:
- Line 1: Replace the relative import with the project root alias: change the
import of the TurnReviewScenario type so it uses the alias path (import {
TurnReviewScenario } from "`@/lib/turn-review/types`") instead of "./types" —
update the import statement that references the TurnReviewScenario type to use
`@/lib/turn-review/types` to comply with the project's TypeScript alias
convention.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 639ed539-dc1b-407a-a887-8d2bf0690c37
📒 Files selected for processing (11)
__tests__/turn-review-demo.test.tsapp/dashboard/dashboard-client.tsxapp/demo/dashboard/page.tsxapp/demo/page.tsxapp/demo/turn-review/page.tsxcomponents/dashboard/layout-shell.tsxcomponents/dashboard/rail.tsxcomponents/turn-review/turn-review-board.tsxlib/navigation-types.tslib/turn-review/demo-turn.tslib/turn-review/types.ts
Summary
/demo/turn-reviewroute.Verification
npm run test -- --run __tests__/turn-review-demo.test.ts— passed, 6/6 testsnpm run lint— passed with 2 pre-existing warnings inlib/hooks/use-gemini-live.tsnpm run typecheck— passednpm run build— passed;/demo/turn-reviewand/demo/dashboardbuiltNotes