fix(chat): centre the empty-chat hero in the reading column - #2153
Merged
Conversation
Astryx's ChatMessageList renders a `flex: 1` spacer ahead of its rows so a short conversation rests on the composer instead of hanging from the top. The spacer is unconditional, so on the empty surface it split the column with the empty-state holder — itself `flex: 1` and centring — and the hero landed centred in the bottom half, measured 172px below the reading column's centre. Collapse the spacer when the list's last row is an empty state, which hands the whole column back to the holder. Keyed on the empty-state content rather than on "no messages" so a one-message conversation keeps the push-to-bottom. The invariant is a live metric, not a CSS read: the rule matches ChatMessageList's internal DOM, so a static check could only prove the selector is written, never that it still applies.
Astro-Han
marked this pull request as ready for review
August 4, 2026 13:23
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.
Summary
The empty chat surface rendered its hero — the wordmark plus the time-of-day greeting — noticeably low, sitting against the composer rather than in the middle of the reading column.
The cause is in Astryx's
ChatMessageList: it renders aflex: 1spacer ahead of its rows so a short conversation rests on the composer instead of hanging from the top. That spacer is unconditional, so on the empty surface it split the column with the empty-state holder — which is itselfflex: 1and centres its content — and the hero ended up centred in the bottom half. Measured onmain: hero centre 552px against a column centre of 380px, a 172px drop, plus the list's own 16px gap.This collapses the spacer when the list's last row is an empty state, handing the whole column back to the holder so its centring is true to the surface. The rule is keyed on the empty-state content rather than on "no messages" because a one-message conversation must keep the push-to-bottom.
The accompanying check is a live metric rather than a static CSS read: the selector matches
ChatMessageList's internal DOM, so a CSS contract could only prove the rule is written, never that it still matches after an Astryx bump.Verification
apps/desktopPlaywright — fulle2e/scroll-geometry.spec.ts, 6 passed, including the newthe empty-chat hero centres in the reading column.npm run lint,npm run format:check,node scripts/check-dead-css.mjs --check(the allowlist entry is forastryx-empty-state, which Astryx emits throughthemePropsat runtime and never appears as a className literal in Maka source).display: block, so push-to-bottom is intact.