Skip to content

Commit a73fb48

Browse files
committed
fix(ui): keep the new-session composer sized outside the chat surface
The composer shell tokens are declared on .chat, but the new-session page reuses .agent-chat__composer-shell outside it. There the var() had no value, so the whole width declaration was invalid and dropped, and the composer stretched full-width instead of holding its 48rem centered box. Give both tokens their literal fallback at the use site, matching the neighbouring --chat-thread-max-width. The custodian surface was already immune because it overrides width outright. Caught by ui/src/e2e/new-session-page.places.e2e.test.ts, which is the regression test for this: it failed on the previous head and passes now.
1 parent 17bf6d6 commit a73fb48

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎ui/src/styles/chat/layout.css‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,9 +1690,11 @@ button.chat-reply-preview--message:disabled {
16901690
grid-template-columns: minmax(0, 1fr);
16911691
align-items: end;
16921692
gap: 6px;
1693-
width: calc(100% - var(--chat-composer-side-inset));
1693+
/* The new-session page reuses this shell outside .chat, where the tokens are
1694+
not defined; the fallbacks keep its geometry identical there. */
1695+
width: calc(100% - var(--chat-composer-side-inset, 36px));
16941696
max-width: var(--chat-thread-max-width, 48rem);
1695-
margin: 8px auto var(--chat-composer-bottom-gap);
1697+
margin: 8px auto var(--chat-composer-bottom-gap, 14px);
16961698
}
16971699

16981700
/* Floating tray pinned to the conversation's top-right (the positioned

‎ui/src/styles/chat/progress-card.css‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,14 @@
408408
.session-progress-card--dock {
409409
position: absolute;
410410
z-index: 3;
411-
inset-block-end: var(--chat-composer-bottom-gap);
411+
inset-block-end: var(--chat-composer-bottom-gap, 14px);
412412
inset-inline-end: var(--chat-thread-gutter);
413413
inset-inline-start: calc(
414-
50% + min(50% - var(--chat-composer-side-inset) / 2, var(--chat-thread-max-width, 48rem) / 2) +
414+
50% +
415+
min(
416+
50% - var(--chat-composer-side-inset, 36px) / 2,
417+
var(--chat-thread-max-width, 48rem) / 2
418+
) +
415419
var(--space-3)
416420
);
417421
max-height: min(46%, 420px);

0 commit comments

Comments
 (0)