Skip to content

feat: add turn review demo#72

Merged
jeffgreendesign merged 3 commits into
mainfrom
feat/turn-review-demo
Jun 11, 2026
Merged

feat: add turn review demo#72
jeffgreendesign merged 3 commits into
mainfrom
feat/turn-review-demo

Conversation

@jeffgreendesign

@jeffgreendesign jeffgreendesign commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a synthetic Turn Review demo for comparing aggressive, controlled, scout, and defensive move types.
  • Integrate Turn Review into the demo dashboard shell and /demo/turn-review route.
  • Add typed demo scenario data, regression tests for safety boundaries and move metadata, and a CHANGELOG entry.

Verification

  • npm run test -- --run __tests__/turn-review-demo.test.ts — passed, 6/6 tests
  • npm run lint — passed with 2 pre-existing warnings in lib/hooks/use-gemini-live.ts
  • npm run typecheck — passed
  • npm run build — passed; /demo/turn-review and /demo/dashboard built

Notes

  • Static synthetic demo only: no API calls, persistence, telemetry, auth changes, or live integrations.
  • I did not start a local preview/tunnel for this PR. Vercel created its normal automatic PR preview.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
commerce-changeset Ready Ready Preview, Comment Jun 11, 2026 4:19pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ada6f2c5-e5e6-42c3-b18b-b71aff19f7ff

📥 Commits

Reviewing files that changed from the base of the PR and between 0377c48 and 4c6c815.

📒 Files selected for processing (2)
  • components/turn-review/turn-review-board.tsx
  • lib/turn-review/demo-turn.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/turn-review/demo-turn.ts

Walkthrough

This 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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add turn review demo' directly and clearly describes the main change: introducing a new turn review demo feature.
Description check ✅ Passed The description is well-related to the changeset, providing a clear summary of the turn review demo addition, integration points, verification steps, and important notes about the static nature of the implementation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/turn-review-demo

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


Comment @coderabbitai help to get the list of available commands and usage tips.

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8ae4b91 and 52b2344.

📒 Files selected for processing (11)
  • __tests__/turn-review-demo.test.ts
  • app/dashboard/dashboard-client.tsx
  • app/demo/dashboard/page.tsx
  • app/demo/page.tsx
  • app/demo/turn-review/page.tsx
  • components/dashboard/layout-shell.tsx
  • components/dashboard/rail.tsx
  • components/turn-review/turn-review-board.tsx
  • lib/navigation-types.ts
  • lib/turn-review/demo-turn.ts
  • lib/turn-review/types.ts

Comment thread components/turn-review/turn-review-board.tsx
Comment thread components/turn-review/turn-review-board.tsx
Comment thread lib/turn-review/demo-turn.ts Outdated
@jeffgreendesign jeffgreendesign merged commit 343f5cc into main Jun 11, 2026
6 checks passed
@jeffgreendesign jeffgreendesign deleted the feat/turn-review-demo branch June 11, 2026 18:49
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