Skip to content

feat(a2ui): add playback in playground#2613

Merged
HuJean merged 2 commits into
mainfrom
p/a2ui-playback
May 12, 2026
Merged

feat(a2ui): add playback in playground#2613
HuJean merged 2 commits into
mainfrom
p/a2ui-playback

Conversation

@HuJean
Copy link
Copy Markdown
Collaborator

@HuJean HuJean commented May 12, 2026

Summary by CodeRabbit

  • New Features

    • New "Playback" tab with selectable scenarios, play/pause/restart controls, adjustable speed, and chunk-by-chunk streaming with progress.
  • Style

    • Added full page styling for Playback, Chat, Components, and Demos pages with dedicated responsive layouts.
    • Updated global responsive rules to rely on page-specific adjustments for better mobile behavior.

Review Change Stack

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: dd8c3d1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

A new PlaybackPage streams JSONL scenarios chunk-by-chunk into a Lynx Preview iframe with play/pause/restart controls and speed control. App.tsx routing adds a "playback" tab. Page-specific CSS files (AIChatPage, ComponentsPage, DemosPage, PlaybackPage) are added and global responsive rules in styles.css are narrowed.

Changes

Playback Feature and CSS Organization

Layer / File(s) Summary
App routing setup for playback tab
packages/genui/a2ui-playground/src/App.tsx
PlaybackPage is imported and the local Tab union extended to include playback. A new A2UI tab definition for "Playback" is added. parseHash recognizes `#/a2ui
Playback scenarios data export
packages/genui/a2ui-playground/src/demos.ts
PLAYBACK_SCENARIOS exported as a shallow copy of EXTENDED_STATIC_DEMOS.
PlaybackPage component and state management
packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx
PlaybackPage manages playback lifecycle (idle/playing/paused/done), chunk index and visibleMessages, speed multiplier, timer-driven chunk reveals, auto-scrolling, and iframe postMessage communication with reload-on-restart behavior.
PlaybackPage CSS styling
packages/genui/a2ui-playground/src/pages/PlaybackPage.css
Defines dual-panel layout, stream controls and progress bar, chunk cards with enter animation and live badges, JSON rendering constraints, preview panel, and responsive adjustments.
AIChatPage CSS extraction
packages/genui/a2ui-playground/src/pages/AIChatPage.css, AIChatPage.tsx
Adds page-specific chat styles and imports them into the component: header, construction badge, message bubbles (user/AI), input area with send button, and responsive rules.
ComponentsPage CSS extraction
packages/genui/a2ui-playground/src/pages/ComponentsPage.css, ComponentsPage.tsx
Adds ComponentsPage.css and imports it: sidebar navigation, content area with breadcrumbs/title, category badges, copy button, CodeMirror editor container, preview iframe, all-components grid/cards, shared detail styles, and mobile layout.
DemosPage CSS extraction
packages/genui/a2ui-playground/src/pages/DemosPage.css, DemosPage.tsx, DemosListPage.tsx, OpenUIDemosPage.tsx
Adds DemosPage.css and imports across demos pages: listing grid/cards, detail split-pane with scenario sidebar/back button, resizable code panel with CodeMirror theming, error banner, and responsive narrow-viewport layout.
Global styles.css cleanup
packages/genui/a2ui-playground/src/styles.css
The @media (max-width: 980px) block is narrowed to only tab navigation adjustments; previous page-specific responsive rules were removed and moved into pages/*.css.
Release metadata
.changeset/lucky-worms-invent.md
New changeset entry file added for release tracking.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • lynx-family/lynx-stack#2472: Extends the a2ui-playground by adding the "playback" tab/page and PLAYBACK_SCENARIOS, modifying the same App.tsx routing and demos.ts modules.
  • lynx-family/lynx-stack#2566: Both PRs modify the playground's App.tsx tab/routing model (parseHash, TABS, Tab union) and page wiring.

Suggested reviewers

  • Sherry-hue
  • gaoachao
  • PupilTong

Poem

🐰 I hopped through code and scrolled the play,
Chunks of JSON danced and made my day.
Panels split and styles now rest,
Each page dressed up in its own best.
Click play, dear friend — enjoy the replay!

🚥 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(a2ui): add playback in playground' directly and specifically describes the main feature addition—a new playback functionality in the a2ui playground, which is the primary focus of the changeset.
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 p/a2ui-playback

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.

@HuJean HuJean force-pushed the p/a2ui-playback branch from a49d115 to a8f0065 Compare May 12, 2026 10:52
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.changeset/lucky-worms-invent.md (1)

1-4: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Populate this changeset with package bump metadata and a summary.

This file is currently empty (only delimiters), so it won’t capture a meaningful versioning/release note change for this PR.

🤖 Prompt for 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.

In @.changeset/lucky-worms-invent.md around lines 1 - 4, The changeset file
.changeset/lucky-worms-invent.md is empty and must be populated with release
metadata and a short summary; update it to include the packages affected and
their new version bumps (e.g., dependency or patch/minor/major), a concise
human-readable summary of the changes in this PR, and any relevant release notes
or migration notes so the versioning tool can generate proper changelogs.
🤖 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 `@packages/genui/a2ui-playground/src/App.tsx`:
- Around line 73-75: The route parsing currently maps 'playback' to
tab:'playback', which causes the UI to render examples while the route.tab
remains 'playback'; update both occurrences where you check rest[0] ===
'playback' (the early return around the protocol mapping and the later branch at
lines ~118-123) to return/tab-set 'examples' instead of 'playback' so route.tab
matches the rendered OpenUI examples tab and the nav has an active item.

In `@packages/genui/a2ui-playground/src/pages/AIChatPage.css`:
- Around line 72-79: The .chatMessage CSS rule uses the deprecated property
"word-break: break-word"; replace it with the modern equivalent "overflow-wrap:
anywhere" in the .chatMessage selector to preserve line-breaking behavior.
Locate the .chatMessage rule in AIChatPage.css and remove or replace the
"word-break: break-word" declaration with "overflow-wrap: anywhere" so stylelint
warnings are resolved and behavior remains the same.

In `@packages/genui/a2ui-playground/src/pages/DemosPage.css`:
- Around line 109-111: Remove the deprecated page-break-inside declaration:
delete the "page-break-inside: avoid;" line (and keep the modern "break-inside:
avoid;"); ensure only the non-deprecated property remains and drop any
vendor/deprecated variants like "-webkit-column-break-inside" if present to
satisfy stylelint.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.css`:
- Line 127: The keyframe name chunkAppear violates stylelint's
keyframe-name-format rule; rename the `@keyframes` declaration (chunkAppear) to
kebab-case (e.g., chunk-appear) and update all references where it's used (for
example the animation property in PlaybackPage.css that currently says
animation: chunkAppear 300ms ease-out; and any other occurrences around the same
file such as the one on line 131) so they point to the new kebab-case name.
- Line 178: Replace the deprecated CSS property occurrence "word-break:
break-word" in PlaybackPage.css with modern wrapping properties: remove that
declaration and add "overflow-wrap: anywhere" (optionally with "word-break:
normal" for legacy fallback) within the same selector to restore the intended
wrapping behavior without triggering the stylelint deprecation.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx`:
- Around line 45-51: The current iframeBaseUrl code manually constructs a
render.html URL and posts runtime payloads, which bypasses the required initData
+ renderUrl + MobilePreview flow; instead, build the initData object (including
protocol.name and DEFAULT_A2UI_DEMO_URL where appropriate), pass that initData
to the renderUrl utility from src/utils/renderUrl.ts to produce the encoded
renderUrl, and then embed that renderUrl via the MobilePreview component rather
than constructing URLs with new URL(...) or using postMessage; update the places
referenced (iframeBaseUrl, the blocks at 53-67 and 293-304) to stop manual URL
construction and posting and to use initData -> renderUrl utility ->
MobilePreview embedding workflow.
- Around line 53-59: The sendToIframe callback currently posts messages with a
wildcard target origin; update sendToIframe to derive the actual origin from
iframeBaseUrl (e.g., via new URL(iframeBaseUrl).origin) and pass that origin to
win.postMessage instead of '*', handle potential URL parsing errors as needed,
and add iframeBaseUrl to the useCallback dependency array so the callback
updates when the base URL changes; references: sendToIframe, iframeRef,
iframeBaseUrl, useCallback.

---

Outside diff comments:
In @.changeset/lucky-worms-invent.md:
- Around line 1-4: The changeset file .changeset/lucky-worms-invent.md is empty
and must be populated with release metadata and a short summary; update it to
include the packages affected and their new version bumps (e.g., dependency or
patch/minor/major), a concise human-readable summary of the changes in this PR,
and any relevant release notes or migration notes so the versioning tool can
generate proper changelogs.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c4170dac-fcf0-4e22-87a8-c488e8427897

📥 Commits

Reviewing files that changed from the base of the PR and between ded4de9 and a8f0065.

📒 Files selected for processing (15)
  • .changeset/lucky-worms-invent.md
  • packages/genui/a2ui-playground/src/App.tsx
  • packages/genui/a2ui-playground/src/demos.ts
  • packages/genui/a2ui-playground/src/pages/AIChatPage.css
  • packages/genui/a2ui-playground/src/pages/AIChatPage.tsx
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.css
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.tsx
  • packages/genui/a2ui-playground/src/pages/DemosListPage.tsx
  • packages/genui/a2ui-playground/src/pages/DemosPage.css
  • packages/genui/a2ui-playground/src/pages/DemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/OpenUIComponentsPage.tsx
  • packages/genui/a2ui-playground/src/pages/OpenUIDemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.css
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx
  • packages/genui/a2ui-playground/src/styles.css

Comment thread packages/genui/a2ui-playground/src/App.tsx
Comment thread packages/genui/a2ui-playground/src/pages/AIChatPage.css
Comment thread packages/genui/a2ui-playground/src/pages/DemosPage.css
Comment thread packages/genui/a2ui-playground/src/pages/PlaybackPage.css
Comment thread packages/genui/a2ui-playground/src/pages/PlaybackPage.css
Comment thread packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx
Comment thread packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 12, 2026

Merging this PR will improve performance by 8.75%

⚡ 1 improved benchmark
✅ 80 untouched benchmarks
⏩ 26 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
transform 1000 view elements 47 ms 43.2 ms +8.75%

Comparing p/a2ui-playback (dd8c3d1) with main (705a3a3)

Open in CodSpeed

Footnotes

  1. 26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 12, 2026

React MTF Example

#1237 Bundle Size — 207.46KiB (0%).

dd8c3d1(current) vs 705a3a3 main#1234(baseline)

Bundle metrics  no changes
                 Current
#1237
     Baseline
#1234
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 192 192
No change  Duplicate Modules 77 77
No change  Duplicate Code 44.38% 44.38%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1237
     Baseline
#1234
No change  IMG 111.23KiB 111.23KiB
No change  Other 96.23KiB 96.23KiB

Bundle analysis reportBranch p/a2ui-playbackProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 12, 2026

React External

#1219 Bundle Size — 693.04KiB (0%).

dd8c3d1(current) vs 705a3a3 main#1216(baseline)

Bundle metrics  no changes
                 Current
#1219
     Baseline
#1216
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#1219
     Baseline
#1216
No change  Other 693.04KiB 693.04KiB

Bundle analysis reportBranch p/a2ui-playbackProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 12, 2026

Web Explorer

#9679 Bundle Size — 901.38KiB (0%).

dd8c3d1(current) vs 705a3a3 main#9676(baseline)

Bundle metrics  Change 1 change
                 Current
#9679
     Baseline
#9676
No change  Initial JS 45.06KiB 45.06KiB
No change  Initial CSS 2.22KiB 2.22KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 9 9
No change  Assets 11 11
No change  Modules 228 228
No change  Duplicate Modules 11 11
Change  Duplicate Code 27.23%(+0.04%) 27.22%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#9679
     Baseline
#9676
No change  JS 497.1KiB 497.1KiB
No change  Other 402.06KiB 402.06KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch p/a2ui-playbackProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 12, 2026

React Example

#8105 Bundle Size — 236.51KiB (0%).

dd8c3d1(current) vs 705a3a3 main#8102(baseline)

Bundle metrics  no changes
                 Current
#8105
     Baseline
#8102
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 197 197
No change  Duplicate Modules 80 80
No change  Duplicate Code 44.87% 44.87%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8105
     Baseline
#8102
No change  IMG 145.76KiB 145.76KiB
No change  Other 90.75KiB 90.75KiB

Bundle analysis reportBranch p/a2ui-playbackProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented May 12, 2026

React Example with Element Template

#372 Bundle Size — 197.79KiB (0%).

dd8c3d1(current) vs 705a3a3 main#369(baseline)

Bundle metrics  Change 2 changes
                 Current
#372
     Baseline
#369
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
Change  Modules 81(+1.25%) 80
No change  Duplicate Modules 23 23
Change  Duplicate Code 40.29%(-0.02%) 40.3%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#372
     Baseline
#369
No change  IMG 145.76KiB 145.76KiB
No change  Other 52.03KiB 52.03KiB

Bundle analysis reportBranch p/a2ui-playbackProject dashboard


Generated by RelativeCIDocumentationReport issue

@HuJean HuJean force-pushed the p/a2ui-playback branch from a8f0065 to d4781e5 Compare May 12, 2026 12:09
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (4)
packages/genui/a2ui-playground/src/pages/PlaybackPage.css (2)

126-132: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use kebab-case keyframe naming to satisfy stylelint.

Line 127 and Line 131 still use chunkAppear; rename to kebab-case and update the animation reference.

Proposed fix
 .playbackChunkNew {
-  animation: chunkAppear 300ms ease-out;
+  animation: chunk-appear 300ms ease-out;
   border-color: var(--geist-border-hover);
 }
 
-@keyframes chunkAppear {
+@keyframes chunk-appear {
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.css` around lines 126 -
132, The keyframe name chunkAppear violates kebab-case; rename the `@keyframes`
identifier (currently "chunkAppear") to a kebab-case name such as "chunk-appear"
and update the .playbackChunkNew rule's animation value to reference the new
name; specifically modify the `@keyframes` declaration and the animation property
in the .playbackChunkNew selector so both use the same kebab-case keyframe name.

170-179: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace deprecated word-break: break-word.

Line 178 uses a deprecated value that stylelint flags; switch to modern wrapping behavior.

Proposed fix
 .playbackChunkJson {
   margin: 0;
   padding: 8px 10px;
   font-family: var(--geist-mono);
   font-size: 12px;
   line-height: 1.55;
   color: var(--geist-secondary);
   white-space: pre-wrap;
-  word-break: break-word;
+  overflow-wrap: anywhere;
+  word-break: normal;
   max-height: 240px;
   overflow-y: auto;
 }
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.css` around lines 170 -
179, The CSS rule .playbackChunkJson uses the deprecated property value
word-break: break-word; remove that deprecated declaration and replace it with
modern wrapping rules by setting overflow-wrap: anywhere and (optionally)
word-break: normal to preserve standard break behavior; update the
.playbackChunkJson rule to use overflow-wrap: anywhere instead of word-break:
break-word so stylelint stops flagging it.
packages/genui/a2ui-playground/src/pages/AIChatPage.css (1)

72-79: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace deprecated word-break: break-word in chat bubbles.

Line 78 should use modern wrapping to pass stylelint.

Proposed fix
 .chatMessage {
   max-width: 80%;
   padding: 10px 14px;
   border-radius: var(--geist-radius-lg);
   font-size: 14px;
   line-height: 1.5;
-  word-break: break-word;
+  overflow-wrap: anywhere;
+  word-break: normal;
 }
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/AIChatPage.css` around lines 72 -
79, The .chatMessage CSS rule uses the deprecated property value word-break:
break-word; replace that with the modern wrapping rule by removing word-break:
break-word and adding overflow-wrap: anywhere (and optionally word-wrap:
break-word for legacy support) in the .chatMessage selector so long words will
wrap correctly and satisfy stylelint.
packages/genui/a2ui-playground/src/pages/DemosPage.css (1)

109-111: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove deprecated page-break-inside declaration.

Line 110 is deprecated and redundant with break-inside.

Proposed fix
 .exampleCard {
   margin: 0 0 14px;
   break-inside: avoid;
-  page-break-inside: avoid;
-  -webkit-column-break-inside: avoid;
 }
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/DemosPage.css` around lines 109 -
111, Remove the deprecated and redundant CSS declaration `page-break-inside:
avoid;` (the line shown between `break-inside: avoid;` and
`-webkit-column-break-inside: avoid;`) so only the modern `break-inside: avoid;`
and the vendor-prefixed `-webkit-column-break-inside: avoid;` remain; update the
rule containing these properties to delete `page-break-inside` to avoid using
deprecated syntax.
🤖 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.

Duplicate comments:
In `@packages/genui/a2ui-playground/src/pages/AIChatPage.css`:
- Around line 72-79: The .chatMessage CSS rule uses the deprecated property
value word-break: break-word; replace that with the modern wrapping rule by
removing word-break: break-word and adding overflow-wrap: anywhere (and
optionally word-wrap: break-word for legacy support) in the .chatMessage
selector so long words will wrap correctly and satisfy stylelint.

In `@packages/genui/a2ui-playground/src/pages/DemosPage.css`:
- Around line 109-111: Remove the deprecated and redundant CSS declaration
`page-break-inside: avoid;` (the line shown between `break-inside: avoid;` and
`-webkit-column-break-inside: avoid;`) so only the modern `break-inside: avoid;`
and the vendor-prefixed `-webkit-column-break-inside: avoid;` remain; update the
rule containing these properties to delete `page-break-inside` to avoid using
deprecated syntax.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.css`:
- Around line 126-132: The keyframe name chunkAppear violates kebab-case; rename
the `@keyframes` identifier (currently "chunkAppear") to a kebab-case name such as
"chunk-appear" and update the .playbackChunkNew rule's animation value to
reference the new name; specifically modify the `@keyframes` declaration and the
animation property in the .playbackChunkNew selector so both use the same
kebab-case keyframe name.
- Around line 170-179: The CSS rule .playbackChunkJson uses the deprecated
property value word-break: break-word; remove that deprecated declaration and
replace it with modern wrapping rules by setting overflow-wrap: anywhere and
(optionally) word-break: normal to preserve standard break behavior; update the
.playbackChunkJson rule to use overflow-wrap: anywhere instead of word-break:
break-word so stylelint stops flagging it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a64ca59d-471c-4543-9f2b-9077d93e0bec

📥 Commits

Reviewing files that changed from the base of the PR and between a8f0065 and d4781e5.

📒 Files selected for processing (14)
  • .changeset/lucky-worms-invent.md
  • packages/genui/a2ui-playground/src/App.tsx
  • packages/genui/a2ui-playground/src/demos.ts
  • packages/genui/a2ui-playground/src/pages/AIChatPage.css
  • packages/genui/a2ui-playground/src/pages/AIChatPage.tsx
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.css
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.tsx
  • packages/genui/a2ui-playground/src/pages/DemosListPage.tsx
  • packages/genui/a2ui-playground/src/pages/DemosPage.css
  • packages/genui/a2ui-playground/src/pages/DemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/OpenUIDemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.css
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx
  • packages/genui/a2ui-playground/src/styles.css
✅ Files skipped from review due to trivial changes (7)
  • packages/genui/a2ui-playground/src/pages/DemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/OpenUIDemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/AIChatPage.tsx
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.tsx
  • .changeset/lucky-worms-invent.md
  • packages/genui/a2ui-playground/src/pages/DemosListPage.tsx
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.css
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/genui/a2ui-playground/src/demos.ts
  • packages/genui/a2ui-playground/src/App.tsx
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx

@HuJean HuJean force-pushed the p/a2ui-playback branch from d4781e5 to 514d49f Compare May 12, 2026 12:26
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (3)
packages/genui/a2ui-playground/src/pages/PlaybackPage.css (2)

178-178: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Replace deprecated word-break: break-word.

Use modern wrapping properties to avoid the stylelint deprecation error.

🔧 Proposed fix
-  word-break: break-word;
+  overflow-wrap: anywhere;
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.css` at line 178, The
CSS uses the deprecated declaration "word-break: break-word"; replace it by
removing that declaration and instead add modern wrapping rules—set "word-break:
normal" (or omit if default) and add "overflow-wrap: anywhere" (or
"overflow-wrap: break-word" if you prefer less aggressive breaks) to the same
rule in PlaybackPage.css so stylelint no longer flags the deprecated property.

126-131: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Rename keyframes to kebab-case to satisfy stylelint.

The keyframe name chunkAppear violates the configured naming rule. Rename to chunk-appear and update the animation reference.

🔧 Proposed fix
 .playbackChunkNew {
-  animation: chunkAppear 300ms ease-out;
+  animation: chunk-appear 300ms ease-out;
   border-color: var(--geist-border-hover);
 }
 
-@keyframes chunkAppear {
+@keyframes chunk-appear {
   from {
     opacity: 0;
     transform: translateY(8px);
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.css` around lines 126 -
131, The keyframe name chunkAppear violates stylelint; rename the `@keyframes`
rule from chunkAppear to chunk-appear and update the animation reference in the
.playbackChunkNew rule (animation: chunk-appear 300ms ease-out) so the class and
keyframes match the kebab-case name; ensure any other references to chunkAppear
in the codebase are updated to chunk-appear as well.
packages/genui/a2ui-playground/src/pages/DemosPage.css (1)

109-111: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove deprecated page-break-inside declaration.

This issue was previously flagged: page-break-inside is deprecated and should be removed. The modern break-inside property on line 109 already handles this, and the -webkit-column-break-inside vendor prefix is also unnecessary in modern browsers.

🔧 Proposed fix
  break-inside: avoid;
- page-break-inside: avoid;
- -webkit-column-break-inside: avoid;
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/DemosPage.css` around lines 109 -
111, Remove the deprecated declarations in the CSS rule that already uses
break-inside: avoid; — specifically delete the page-break-inside: avoid; and
-webkit-column-break-inside: avoid; lines and keep only break-inside: avoid; so
the rule relies on the modern property.
🧹 Nitpick comments (1)
packages/genui/a2ui-playground/src/pages/DemosPage.css (1)

521-521: ⚡ Quick win

Specify transition properties explicitly instead of using all.

Using transition: all can impact performance and makes the code less explicit. Consider specifying only the properties that need to transition, following the pattern used elsewhere in this file (e.g., lines 100-104, 224-228).

♻️ Proposed refactor
- transition: all var(--geist-transition);
+ transition:
+   background var(--geist-transition),
+   border-color var(--geist-transition),
+   color var(--geist-transition),
+   transform var(--geist-transition);
🤖 Prompt for 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.

In `@packages/genui/a2ui-playground/src/pages/DemosPage.css` at line 521, The rule
currently uses a broad transition: "transition: all var(--geist-transition);"
which harms performance; replace "all" with only the properties that actually
animate (e.g., transform, opacity, color, background-color, box-shadow) to match
patterns used elsewhere (see similar blocks around lines 100-104 and 224-228).
Locate the exact declaration "transition: all var(--geist-transition);" and
change it to a comma-separated list of the specific properties your component
animates (for example transform and opacity), keeping the same timing variable
var(--geist-transition) so only those properties transition.
🤖 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 `@packages/genui/a2ui-playground/src/pages/ComponentsPage.css`:
- Around line 24-84: The sidebar items lack keyboard focus styles; add :focus
and preferably :focus-visible rules for .compSidebarAll and .compSidebarItem
that mirror the existing :hover/.active visual feedback (set color and
background to var(--geist-foreground)/var(--geist-surface) and apply a visible
focus indicator such as an outline or box-shadow using a theme variable like
var(--geist-focus) or var(--geist-border-hover)); ensure the focus rule does not
conflict with .active and include focus-visible to show the ring only for
keyboard navigation.
- Around line 161-177: Add a keyboard-focus style for the .compCopyBtn to match
the hover affordance and improve accessibility: update the stylesheet to include
a .compCopyBtn:focus rule (and optionally .compCopyBtn:focus-visible) that sets
color to var(--geist-foreground), border-color to var(--geist-border-hover), and
a visible focus indicator (e.g., outline or box-shadow) while keeping outline:
none if you use box-shadow; ensure the selector targets .compCopyBtn so keyboard
users see the same state as hover.

---

Duplicate comments:
In `@packages/genui/a2ui-playground/src/pages/DemosPage.css`:
- Around line 109-111: Remove the deprecated declarations in the CSS rule that
already uses break-inside: avoid; — specifically delete the page-break-inside:
avoid; and -webkit-column-break-inside: avoid; lines and keep only break-inside:
avoid; so the rule relies on the modern property.

In `@packages/genui/a2ui-playground/src/pages/PlaybackPage.css`:
- Line 178: The CSS uses the deprecated declaration "word-break: break-word";
replace it by removing that declaration and instead add modern wrapping
rules—set "word-break: normal" (or omit if default) and add "overflow-wrap:
anywhere" (or "overflow-wrap: break-word" if you prefer less aggressive breaks)
to the same rule in PlaybackPage.css so stylelint no longer flags the deprecated
property.
- Around line 126-131: The keyframe name chunkAppear violates stylelint; rename
the `@keyframes` rule from chunkAppear to chunk-appear and update the animation
reference in the .playbackChunkNew rule (animation: chunk-appear 300ms ease-out)
so the class and keyframes match the kebab-case name; ensure any other
references to chunkAppear in the codebase are updated to chunk-appear as well.

---

Nitpick comments:
In `@packages/genui/a2ui-playground/src/pages/DemosPage.css`:
- Line 521: The rule currently uses a broad transition: "transition: all
var(--geist-transition);" which harms performance; replace "all" with only the
properties that actually animate (e.g., transform, opacity, color,
background-color, box-shadow) to match patterns used elsewhere (see similar
blocks around lines 100-104 and 224-228). Locate the exact declaration
"transition: all var(--geist-transition);" and change it to a comma-separated
list of the specific properties your component animates (for example transform
and opacity), keeping the same timing variable var(--geist-transition) so only
those properties transition.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 33202dab-e98c-469d-9e0c-24bfdbbe78f5

📥 Commits

Reviewing files that changed from the base of the PR and between d4781e5 and 514d49f.

📒 Files selected for processing (14)
  • .changeset/lucky-worms-invent.md
  • packages/genui/a2ui-playground/src/App.tsx
  • packages/genui/a2ui-playground/src/demos.ts
  • packages/genui/a2ui-playground/src/pages/AIChatPage.css
  • packages/genui/a2ui-playground/src/pages/AIChatPage.tsx
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.css
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.tsx
  • packages/genui/a2ui-playground/src/pages/DemosListPage.tsx
  • packages/genui/a2ui-playground/src/pages/DemosPage.css
  • packages/genui/a2ui-playground/src/pages/DemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/OpenUIDemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.css
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx
  • packages/genui/a2ui-playground/src/styles.css
💤 Files with no reviewable changes (1)
  • packages/genui/a2ui-playground/src/styles.css
✅ Files skipped from review due to trivial changes (6)
  • packages/genui/a2ui-playground/src/pages/OpenUIDemosPage.tsx
  • packages/genui/a2ui-playground/src/demos.ts
  • .changeset/lucky-worms-invent.md
  • packages/genui/a2ui-playground/src/pages/DemosPage.tsx
  • packages/genui/a2ui-playground/src/pages/DemosListPage.tsx
  • packages/genui/a2ui-playground/src/pages/AIChatPage.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/genui/a2ui-playground/src/pages/ComponentsPage.tsx
  • packages/genui/a2ui-playground/src/App.tsx
  • packages/genui/a2ui-playground/src/pages/PlaybackPage.tsx

Comment thread packages/genui/a2ui-playground/src/pages/ComponentsPage.css
Comment thread packages/genui/a2ui-playground/src/pages/ComponentsPage.css
@HuJean HuJean enabled auto-merge (squash) May 12, 2026 13:14
@HuJean HuJean merged commit ee6bf27 into main May 12, 2026
41 checks passed
@HuJean HuJean deleted the p/a2ui-playback branch May 12, 2026 13:39
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