Skip to content

Dock More counted under SSR; end slot stays inside the inset (0.28.2) - #60

Merged
kualta merged 1 commit into
mainfrom
dock-ssr-end-inset
Nov 26, 2026
Merged

kualta merged 1 commit into
mainfrom
dock-ssr-end-inset

Conversation

@kualta

@kualta kualta commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Two fixes the app rollouts found, released as 0.28.2.

  1. Dock: More is counted under server rendering.
    • The bug: the hidden measuring row keyed More as data-key="\u0000more". The HTML parser turns U+0000 into U+FFFD in server-rendered markup, and hydration doesn't patch the attribute, so More measured as 0px. On dash at 320px the bar kept 5 slots and More landed partly off screen (x 281–337).
    • The fix: More's measuring label is now marked with data-more instead of a key.
    • Audit: this was the only control character in src/, app/ or tests/ (src/loaders/ excluded).
  2. FloatingHeader: the end slot never crosses the right inset.
    • No overflow past the inset: the slot's content is right-aligned with plain flex-end.
    • Soft first 8px: content too wide for the slot may use the slot's first 8px, so the 16px gap to the brand shrinks to 8px before anything moves.
    • Compact form: below 4.5rem of slot, a button in the end slot tightens its padding to 8px and is capped (label clipped) rather than reaching the brand or the screen edge.
    • Unchanged: the profile pill still truncates and drops its name below 5rem, with the ring's outer edge on the inset.

No API changes.

Testing

New spec tests/dock-ssr.spec.ts (added to the visual job):

  • It renders a Dock with eight items to a string, hydrates it at 320px and asserts every visible bar item and More sit within x 16–304, More's measuring label has width, and there are no page errors.
  • Against the old key it fails with More's right edge at x 339.5; with the fix it passes.

tests/floating-header.spec.ts now covers 24 row cases: 320, 360 and 390px; "Flow Industries" and "Flow Time"; the short name "fern", a 27-character name, Join and Sign in.

  • Brand gap: end content stays at least 8px from the wordmark.
  • Inset: buttons end on or inside the right inset.
  • Ring and name: the ring's outer edge sits on the inset, the avatar centre at y 48, the accessible name stays " Online", and the name is never a sliver.

Measurements at 320px with "Flow Industries", light and dark:

End content Start, end (px) Gap to brand box Note
Join 255 → 304 11 compact padding
Sign in 250 → 304 6 (8 from the wordmark) compact and capped; label fits edge to edge
fern / long name pill to 308, ring at 304 24 name dropped

At 360 and 390px, Join and Sign in keep their full padding.

Local checks:

  • bun run lint shows only the 9 warnings already on main, and bun run typecheck passes.
  • Specs pass locally (67 tests): dock-ssr, floating-header, floating, presence, a11y and header.

Simplify pass: the measuring class is shared between items and More. Nothing else to simplify.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T16:38:53.143333Z 2c4b9d9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kualta
kualta merged commit f14217d into main Nov 26, 2026
5 checks passed
@kualta
kualta deleted the dock-ssr-end-inset branch November 26, 2026 16:38

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c4b9d99e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/styles/floating.css
Comment on lines +205 to +208
@container flow-top-row-end (width < 4.5rem) {
[data-slot="floating-header-end"] > [data-slot="button"] {
padding-inline: 0.5rem;
overflow: hidden;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clip capped buttons whenever their label overflows

When the end slot is at least 4.5rem wide but a button label is still wider than the available space—for example, a translated “Sign in” label or another longer CTA—the direct-child max-width caps only the button box while its whitespace-nowrap text continues painting outside because overflow: hidden is limited to this query. The visible label can therefore cross the right inset or overlap the brand despite the new containment guarantee; apply clipping to capped end-slot buttons regardless of this fixed width threshold.

Useful? React with 👍 / 👎.

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.

1 participant