Skip to content

fix: keep embedded channel view inside narrow host panels#107

Merged
steipete merged 2 commits into
mainfrom
steipete/clickclack-openclaw-layout-0e8f7b
Jul 21, 2026
Merged

fix: keep embedded channel view inside narrow host panels#107
steipete merged 2 commits into
mainfrom
steipete/clickclack-openclaw-layout-0e8f7b

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw embeds the ClickClack channel view in its discussion side panel, which is only ~400-450px wide. OpenClaw session channels have long unbreakable names like s-8a4123d56515f4446b2cdef3f5693a66, and at those widths the embed rendered wider than its host: the "Open in ClickClack" header link and the composer send button were clipped off the right edge, and the empty-state welcome heading ran past the panel boundary.

Why This Change Was Made

.embed-channel-shell is a single-column CSS grid. Implicit grid columns size to the largest child min-content width, and grid items default to min-width: auto, so the empty-state heading's unbreakable channel-name token forced the entire column to ~443px regardless of the actual viewport. The shell's overflow: hidden then clipped everything on the right. Constraining the column with grid-template-columns: minmax(0, 1fr) caps the track at the host width so children shrink and truncate as designed, and overflow-wrap: anywhere on the empty-state heading lets long channel names wrap instead of overflowing.

The new Playwright regression test loads an empty channel with an OpenClaw-session-style name at a 400px viewport and asserts the header, message list, composer dock, header link, and send button all stay inside the viewport, before and after posting a message with a long unbreakable token. The bounding-box assertions fail without the CSS fix (header 440px wide, link right edge at 424px, send button at 417px); the test settles document.fonts.ready first because the overflow margin only exists with the display webfont's wider metrics active.

User Impact

ClickClack embedded in narrow host panels (OpenClaw's discussion sidebar and any similar embed) now fits: the header link and send button stay visible and the welcome message wraps inside the panel.

Evidence

Before (400px viewport, dark mode)

Embedded channel clipped at 400px before the fix

After (400px viewport, dark mode)

Embedded channel fitting at 400px after the fix

  • pnpm test:e2e tests/e2e/embed-channel.spec.ts tests/e2e/embed-thread.spec.ts
  • Pre-fix failure verified: with the two CSS changes stashed, headless Chromium with fonts settled measures the header at 440px and the link/send right edges at 424px/417px in a 400px viewport.
  • The embedded thread view was verified unaffected at 400px and left untouched.

steipete added 2 commits July 21, 2026 00:52
OpenClaw embeds the channel view in a ~400px discussion sidebar. The
embed shell's implicit grid column sized to the largest child
min-content width, so long unbreakable OpenClaw session channel names
in the empty-state heading forced the layout to ~443px and clipped the
header link and send button. Cap the column with minmax(0, 1fr), let
the empty-state heading wrap with overflow-wrap: anywhere, and add a
400px-viewport Playwright regression test that fails without the fix
once webfonts settle.
@clawsweeper

clawsweeper Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix: keep embedded channel view inside narrow host panels This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit 7106b25 into main Jul 21, 2026
7 checks passed
@steipete
steipete deleted the steipete/clickclack-openclaw-layout-0e8f7b branch July 21, 2026 07:59
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