Skip to content

fix(ChatMessages,Checkbox,RadioGroup): allow a per-side colour, wrap option rows - #537

Merged
IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-bbf1e149
Sep 5, 2026
Merged

IgorShevchik merged 1 commit into
mainfrom
sync/nuxt-bbf1e149

Conversation

@IgorShevchik

Copy link
Copy Markdown
Collaborator

Ports bbf1e149 and 90c45a66 — a contiguous pair taken in one PR per §6 4b. Cursor moves to 90c45a66; two upstream commits remain in the queue (c4ee0ea3 Link prefetch, fbb9e220 ProseCodeTree) and get their own PR.

bbf1e149 — a colour that could not be set for a whole side

ChatMessages lets a caller set defaults for every user or assistant message through two Pick<>s of ChatMessage's own props. color was missing from both, so it could be set per message and not per side — an omission rather than a decision, the neighbouring variant and side being there.

Two lines, applying verbatim with the standing ui → b24ui rename inside the picked key list.

Checked rather than assumed that the key exists to pick. ChatMessage.vue:34 declares color?: ChatMessage['variants']['color']. A Pick<> of a key the source type lacks is a type error and would not have survived typecheck — but the reason for looking is that it could have been a prop this fork dropped, and then the right answer would have been a no-op rather than a port.

No render change, no snapshots: this widens a type, and nothing in the suite passes color through user or assistant.

90c45a66 — rows that overflowed instead of wrapping

fieldset lays the options out with flex, so in the horizontal orientation a row simply overflowed its container and options past the edge were unreachable. One class on each of two variants.

table is excluded on both sides: its rows are seamed together with -space-x-px / -space-y-px, where wrapping would break the seam rather than fix an overflow.

One shape difference from upstream — its card was {} and gains a single key; ours already carries item styling, so fieldset: 'flex-wrap' goes in as the first entry alongside it.

This one is worth more here than upstream, and checkably so

Our fieldset already declares a vertical gap at every size — gap-x-[12px] gap-y-[4px] at the smallest through gap-x-[16px] gap-y-2 at the largest, in both files.

A gap-y on a non-wrapping single-line flex row is inert: it can only take effect once the row wraps. So the theme was already written for wrapped rows, and the one property that produces them was missing.

Snapshots

126 lines across four files. Checked rather than accepted — matching each -/+ pair and extracting the differing substring gives:

insertions 126, all of them the flex-wrap token
deletions 0
attribute names before vs after identical

That last check is the one a per-line diff cannot do: a class dropped from every element at once reads as ordinary churn otherwise.

Ours moves 126 lines against upstream's 148, this fork having fewer size variants covered by the list/card cases.

Verification

lint · typecheck · build (3.86 MB) · test — 342 files, 7842 passed, 6 skipped · test:module.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb


Generated by Claude Code

…option rows

Ports `bbf1e149` and `90c45a66` — a contiguous pair taken in one PR per
PORTING.md §6 4b.

`ChatMessages` lets a caller set defaults for every user or assistant message
through two `Pick<>`s of `ChatMessage`'s props, and `color` was missing from
both, so it could be set per message but not for a whole side. Two lines, with
the standing `ui` → `b24ui` rename inside the key list. Checked rather than
assumed that the key exists to pick — `ChatMessage.vue:34` declares it — because
had this fork dropped the prop the right answer would have been a no-op.

`fieldset` lays the options out with `flex`, so a horizontal row overflowed its
container and options past the edge were unreachable. `flex-wrap` on the `list`
and `card` variants of both groups; `table` is excluded on both sides, its rows
being seamed with `-space-x-px` where wrapping would break the seam.

That second fix is worth more here than upstream, and checkably so: our
`fieldset` already declares a vertical gap at every size, from
`gap-x-[12px] gap-y-[4px]` to `gap-x-[16px] gap-y-2`. A `gap-y` on a
non-wrapping single-line flex row is inert — it can only take effect once rows
wrap. The theme was written for wrapped rows and the property producing them was
missing.

126 snapshot lines move, and the movement was checked rather than accepted:
extracting the differing substring from each pair gives insertions only, all of
them the `flex-wrap` token, with no deletions; and the set of attribute names is
identical before and after, which is what catches a class dropped from every
element at once.

Gate: lint, typecheck, build (3.86 MB), test (342 files, 7842 passed),
test:module.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb
@IgorShevchik
IgorShevchik merged commit 2227a69 into main Sep 5, 2026
2 checks passed
@IgorShevchik
IgorShevchik deleted the sync/nuxt-bbf1e149 branch September 5, 2026 03:59
IgorShevchik added a commit that referenced this pull request Sep 5, 2026
The four entries written during this run carried `pending-merge` in both `pr`
and `b24ui_sha`, because the entry goes in with the port before its PR has a
number or a squash SHA. Both PRs have now merged:

- `bbf1e149`, `90c45a66` → #537 / `2227a69e`
- `c4ee0ea3`, `fbb9e220` → #538 / `941e9f2c`

Bookkeeping only — no entry is added, the cursor does not move, and no decision
changes. The cursor is `fbb9e220`, which is nuxt/ui v4 HEAD, so the sync is
caught up and no entry carries the placeholder.
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