fix(desktop): settings chat-defaults column alignment + assistant-tone textarea resize [AI cross reviewed] - #2256
Merged
Astro-Han merged 2 commits intoAug 5, 2026
Conversation
The 默认权限模式 selector passed width={320} to Astryx Selector, which
sizes the OUTER field, while the settings CSS sizes the inner trigger to
260px — the trigger left-aligned inside the wider field and the two
adjacent rows staggered by 60px. The Selector branch of
PermissionModeSelect has no other consumer (the composer uses the icon
appearance), so the prop served nobody; dropping it lets the field wrap
the trigger and the CSS own the column, as the select.css comment
already prescribed. That comment now also states the contract: the rule
works only while neither component passes Selector's width prop.
The two triggers also rendered at different sizes (sm vs md). ModelPicker's
sm dated from the composer footer, which has since moved to ghost
DropdownMenus — General Settings is its only production host, and settings
rows are md. The size is a fact of the component now, hardcoded md, and
its EmptyCatalog story renders the production size inside a 260px frame
matching the column the desktop's select.css imposes (the one part a
packages/ui story cannot import; the annotation says so per FIDELITY.md).
Measured after the fix: both controls at left 916 / right 1176 / height 32.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ac5rv6WUKWtMZgQb5QPN16
The field passed style={{ height: calc(…) }} to TextArea, which lands as
an inline height on the visible wrapper and pins it at 84px. The inner
native textarea keeps the design system's resize: vertical, so dragging
the grip resized an element with a transparent background overflowing an
unmoving box — only the grip appeared to travel.
Drop the fixed height (and the boxSizing that existed for it): rows={4}
already owns the default height (90px vs the pinned 84), and the wrapper
follows the textarea, so the grip now resizes the visible control.
Verified live: textarea 80→220px moves the wrapper 90→230px.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ac5rv6WUKWtMZgQb5QPN16
Contributor
Author
|
CI note: the failing |
Astro-Han
approved these changes
Aug 5, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
Nice catch on both — I verified the mechanics in the source and they hold up:
width={320}on the permission-mode Selector indeed lands on the outerField(Astryx'swidthsizes the whole field, whileclassNamelands on the trigger container), so the 60px stagger is exactly as described. Dropping it restores the 260px trigger column, andselect.css's contract is structurally safe: neither product component exposes Selector'swidthprop.- The textarea
stylelands on the visible wrapper whilerowsand the nativeresize: verticallive on the inner textarea — the pinned-wrapper explanation checks out. - No side effects:
ModelPicker's only production consumer is Settings (composer usesNewChatModelPicker), and the Selector branch ofPermissionModeSelectis Settings-only (composer goes throughappearance="icon"). - Re-ran locally on this branch:
@maka/ui382/382, ui + desktop typecheck, biome lint & format clean. - The failing
e2e_shard (2/2)(prompt-rail) doesn't touch this diff — consistent with your pre-existing-on-main note.
Non-blocking P3 nits for later:
- The alignment fix has no regression test. A cheap computed-style contract (both triggers at 260px) would lock it in if the renderer test infra can run DOM.
- No live-app screenshot or
settings-pages.stories.tsxupdate per the repo's visual-change convention (the DOM measurements are solid evidence regardless). - The tone textarea default grows 84→90px (
rows={4}owning the height) — a small visible change, already called out in the PR. - Pre-existing:
align="end"passed by Settings isn't consumed by either branch ofPermissionModeSelect— a dead prop that could be dropped while touching this area.
Thanks for the clean two-commit split and the measurements!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two Settings → 通用 paper cuts, one commit each.
1. The chat-defaults selects staggered by 60px
The 默认模型 and 默认权限模式 rows are meant to form one trailing-control column —
select.csssizes both triggers to 260px and its comment prescribes exactly that. But the 默认权限模式 selector passedwidth={320}to Astryx Selector, which sizes the outer field, while the CSS sizes the inner trigger: the 260px trigger left-aligned inside the 320px field and the two adjacent rows staggered by the 60px difference.The Selector branch of
PermissionModeSelecthas no other consumer (the composer uses the icon appearance), so the prop served nobody. Dropping it lets the field wrap the trigger and the CSS own the column. Theselect.csscomment now states the contract explicitly: the rule works only while neither component passes Selector'swidthprop.The two triggers also rendered at different sizes (
smvsmd). ModelPicker'ssmdated from the composer footer, which has since moved to ghost DropdownMenus — General Settings is its only production host, and settings rows aremd. The size is hardcodedmdnow, and theEmptyCatalogstory renders the production size inside a 260px frame matching the column the desktop'sselect.cssimposes (the one part apackages/uistory cannot import; the annotation says so per FIDELITY.md).Measured after the fix: both controls at left 916 / right 1176 / height 32, aligned at 1280/900/620/480 viewport widths with no horizontal overflow.
2. Dragging the assistant-tone textarea's resize grip moved only the grip
The field passed
style={{ height: calc(…) }}to TextArea, which lands as an inline height on the visible wrapper and pins it at 84px. The inner native textarea keeps the design system'sresize: vertical, so dragging resized an element with a transparent background overflowing an unmoving box — only the grip appeared to travel.Dropped the fixed height (and the
boxSizingthat existed for it):rows={4}already owns the default height (90px vs the pinned 84), and the wrapper follows the textarea, so the grip now resizes the visible control. Verified live: textarea 80→220px moves the wrapper 90→230px.Validation
@maka/uisuite 382/382; typecheck (ui + desktop), biome lint, full monorepo build cleanCo-Authored-By: Claude noreply@anthropic.com
https://claude.ai/code/session_01Ac5rv6WUKWtMZgQb5QPN16