Repository navigation
fix(react-core): keep the left padding of a Select without an icon - #7963
tylerslaton wants to merge 1 commit into
Conversation
The Select spread paddingLeft: undefined when it had no icon, and React cleared the left padding that controlStyle set, so the text touched the edge of the pill. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Conditional Select padding packages/react-core/src/v2/generative-ui/standard/inputs.tsx, packages/react-core/src/v2/generative-ui/standard/__tests__/inputs.test.tsx |
Select preserves controlStyle padding when no icon is present. Tests check 18px padding without an icon and 42px with the "search" icon. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- CopilotKit/CopilotKit#7819: Introduced the standard generative UI catalog and the
Selectcomponent changed here.
Merge Risk: 
Minimal · up to cbb47
-
The Select padding fix is narrowly scoped and mergeable with normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
|
Size Change: +15 B (0%) Total Size: 2.27 MB 📦 View Changed
ℹ️ View Unchanged
|
@copilotkit/a2ui-renderer
@copilotkit/agentcore-runner
@copilotkit/angular
@copilotkit/channels
@copilotkit/channels-core
@copilotkit/channels-discord
@copilotkit/channels-intelligence
@copilotkit/channels-slack
@copilotkit/channels-teams
@copilotkit/channels-telegram
@copilotkit/channels-ui
@copilotkit/channels-whatsapp
@copilotkit/core
@copilotkit/intelligence-langgraph
@copilotkit/intelligence-mastra
@copilotkit/learning
@copilotkit/mcp-apps-renderer
@copilotkit/react-core
@copilotkit/react-native
@copilotkit/react-textarea
@copilotkit/react-ui
@copilotkit/runtime
@copilotkit/runtime-client-gql
@copilotkit/sdk-js
@copilotkit/shared
@copilotkit/sqlite-runner
@copilotkit/voice
@copilotkit/vue
@copilotkit/web-components
@copilotkit/web-inspector
commit: |
…nd Gemini (#7965) ## What this is **A2UI Playground** (`examples/showcases/a2ui`) is a demo of native generative UI. It runs a TanStack Start app with a Google ADK agent on Gemini over AG-UI, CopilotKit Intelligence threads, and the standard catalog (`standardUI`) over the markdown transport. - **Answers with views.** The agent answers in prose and draws a view from the standard catalog when one helps. The prompt never names a component. - **Views stream in.** Each component arrives as soon as its JSON closes. `agent/src/research_desk/fences.py` repairs and streams fence lines. - **Decompile.** Every view has an **A2UI** button that pixelates the view into the A2UI that made it, and back again. - **Catalog.** A bento gallery of the standard catalog in its seven groups, at `?catalog`. Each specimen is real A2UI with its own A2UI button and info panel. - **Works signed out, sign in to keep it (Clerk).** By default nothing is kept. Signing in keeps a reader's threads in Intelligence (`identifyUser` returns the Clerk user) and unlocks Connections. The runtime route serves a signed-out runtime and a signed-in runtime. - **Actions in the reader's Google apps (Composio).** - Readers connect Gmail, Calendar, Drive, Docs and Sheets. - The agent loads a short list of tools for each connected app, per reader. The reader is named by the runtime in a header the agent trusts over run state. - Anything that sends, creates, changes or deletes pauses for an in-chat Confirm card. That uses ADK tool confirmation, which reaches the chat as an AG-UI interrupt handled by `useInterrupt`. - **Date and time.** The agent knows the reader's local date and time, from the browser's time zone. - **Look.** Solarized light and dark, following the system setting. - **Also included:** a report sheet, pictures (`find_images`), grounded research with favicons, a model picker, and the + menu. ### From Mark (folded in from his stacked PRs, with authorship kept) - **#7973:** a view picked from the + menu leaves its icon as a badge on the sent question. It's saved as AG-UI message metadata, so it survives reloads. - **#7976:** **A2UI Express** as a second authoring format next to JSON. It's compiled with Google's A2UI SDK, and the server streams validated JSON fences. Changing format starts a new thread. ## Library changes carried here | Change | Where | Also in | | --- | --- | --- | | Horizontal bar value labels beside the bars | `standard/Chart.tsx` | #7961 | | Table header for templated rows | `standard/data.tsx` | #7962 | | Select padding without an icon | `standard/inputs.tsx` | #7963 | | `errorBoundary.fallback` covers cyclic refs, unknown components and invalid props | `boundaries.tsx`, `SurfaceView.tsx` | n/a | | `pow(x, n)` in `calc`, and the prompt says what calc takes | `calc.ts`, `shared/.../prompt.ts` | n/a | | Markdown surfaces show again on a thread revisit (`forgetSurface`) | `markdown/source.ts`, `surface-manager.ts` | n/a | The custom chat input textarea fix landed separately in #7964, so it is no longer carried here. ## Run it See `examples/showcases/a2ui/README.md`. Keys go in a gitignored `.env`; `.env.example` lists them, all empty. Clerk and Composio are optional: without Composio, Connections is off. ## Checks - react-core and shared tests pass. - Agent tests pass (117). - The example type-checks. - Mark's badge tests pass (7, via `tsx --test`). - Lint and format are clean. - A live signed-out run works. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added an A2UI research desk showcase with web and image research, generated reports, selectable views and models, and JSON or Express display formats. * Browse a component catalog, inspect generated A2UI source, save notes, manage connected Google apps, and confirm sensitive actions. Stateful mode adds sign-in and thread history; stateless mode remains available by default. * Added deployment configuration for the showcase. * **Bug Fixes** * Improved horizontal chart labels and axis sizing, table headers for child-based rows, and select-control padding. * Corrected how removed surfaces are cleared so they can be recreated. * **Documentation** * Added setup instructions and product and design guides. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
A
Selectwithout aniconhad no left padding, so its text touched the left edge of the pill.The style object always set
paddingLeft, asundefinedwhen there was no icon. React clears a style key whose value isundefined, which wiped out the left padding fromcontrolStyle'spaddingshorthand.What changed
In
standard/inputs.tsx,paddingLeftis now spread in only when the Select has an icon. That is a two-line change plus a comment.Verification
__tests__/inputs.test.tsx: a Select without an icon keeps an18pxleft padding, and one with an icon gets42px. Without the fix, the first check fails withpaddingLeftof''.nx run-many -t test,check-types -p @copilotkit/react-corepassed.🤖 Generated with Claude Code
Summary by CodeRabbit