fix(webui): make the chat panel behave like a chat window

Remediation from testing the launcher (archie-core-ifay), plus the morph Sam
asked for.

The panel grows out of the launcher rather than fading in beside it: closed, it
is collapsed to a pill the size of the button and translated over it; open, it
is the full panel. Scale, border-radius and position interpolate together, and
the contents fade in once the shape has mostly arrived, so the button reads as
becoming the panel. The launcher stays visible throughout and is the only
control that opens and closes it, so the panel carries no close button.

  - Header shows the open conversation's name; ChatApp owns the header now,
    because the title and the actions that change it belong to the same
    component.
  - New chat became the Lucide message-circle-plus glyph and moved into the
    header. Added to the icon set, which is the same 24-grid stroke system.
  - The commands accordion is gone. The composer's slash palette was already
    the command surface and floats above the input; having both was two
    answers to one question.
  - Arrow keys scroll the palette so the selection stays visible. The decision
    is pure arithmetic in command-scroll.js, including the case of an option
    taller than the list, which aligns to its top so the command name is not
    the part scrolled out of sight.
  - The settings popover closes on any pointerdown or focus outside it.
  - Stop renders only while a reply is streaming.
  - The composer keeps focus and stays writeable during a send, so the next
    message can be typed while one streams. It was `disabled`, which also made
    the focus() in the send's finally block a silent no-op. sendMessage already
    refuses a second concurrent turn via isSendingRef.
  - Composer actions sit at the right of the input row, the resize handle is
    gone, and the Enter/Shift+Enter hint is removed.
  - Message bubbles dropped their "Archie"/"You" labels; side and colour
    already say who spoke.
  - Fixed an empty band under the composer: the panel still declared two grid
    rows from when the launcher owned the header.
This commit is contained in:
sam committed 2026-09-20 16:30:01 +10:00
1 parent 30a9be4dc5
commit 1d2e58ebaa
12 files changed
+278 -77

No files matched your search

+51 -18
View File
@@ -281,22 +281,51 @@ body {
pointer-events: none;
}
/* The panel grows out of the launcher. Closed, it is collapsed to a small
round shape sitting exactly over the button; open, it is the full panel
beside it. Scaling from the bottom-right corner and translating by the
launcher's own width is what makes the button appear to become the panel,
rather than a panel merely fading in next to it. */
.chat-drawer-panel {
pointer-events: auto;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
/* One child: ChatApp, which owns its own header row. A second track here
left an empty band under the composer. */
grid-template-rows: minmax(0, 1fr);
width: 100%;
height: 100%;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
overflow: hidden;
opacity: 0;
/* Grows out of the launcher: the origin is the corner nearest the button. */
border-radius: var(--radius-pill);
transform-origin: bottom right;
transform: scale(0.92) translateX(var(--sp-3));
transition: opacity var(--transition), transform var(--transition);
transform: translateX(calc(var(--fab-size) + var(--fab-gap))) scale(0.16);
transition:
opacity 160ms cubic-bezier(0.4, 0, 0.2, 1),
transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
border-radius 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.chat-drawer.is-open .chat-drawer-panel {
opacity: 1;
border-radius: var(--radius-lg);
transform: none;
}
/* The contents follow the shape rather than stretching with it: they fade in
once the panel is most of the way open, so the morph reads as a container
opening instead of a page being scaled up. */
.chat-drawer-panel > * {
opacity: 0;
transition: opacity 120ms linear;
}
.chat-drawer.is-open .chat-drawer-panel > * {
opacity: 1;
transition: opacity 160ms linear 120ms;
}
/* A closed panel is still mounted so the session and its stream survive. It
@@ -304,12 +333,11 @@ body {
.chat-drawer:not(.is-open) .chat-drawer-panel {
pointer-events: none;
visibility: hidden;
}
.chat-drawer.is-open .chat-drawer-panel {
opacity: 1;
transform: none;
visibility: visible;
transition:
opacity 140ms cubic-bezier(0.4, 0, 0.2, 1),
transform 200ms cubic-bezier(0.4, 0, 1, 1),
border-radius 200ms cubic-bezier(0.4, 0, 1, 1),
visibility 0s linear 200ms;
}
.chat-drawer-head {
@@ -333,19 +361,24 @@ body {
position: fixed;
right: var(--fab-inset);
left: var(--fab-inset);
bottom: var(--fab-inset);
/* Clears the launcher, which stays put as the close control. */
bottom: calc(var(--fab-inset) + var(--fab-size) + var(--fab-gap));
width: auto;
height: min(78vh, calc(100vh - var(--fab-inset) * 2));
height: min(72vh, calc(100vh - var(--fab-inset) * 2 - var(--fab-size) - var(--fab-gap)));
}
/* The sheet sits above the launcher rather than beside it, so it grows down
toward the button instead of sideways. */
.chat-drawer-panel {
transform-origin: bottom center;
transform: scale(0.98) translateY(var(--sp-3));
transform-origin: bottom right;
transform: translateY(calc(var(--fab-size) + var(--fab-gap))) scale(0.16);
}
.chat-dock.is-open .chat-fab {
opacity: 0;
pointer-events: none;
/* The launcher is the only way to close the panel, so it stays above the
sheet rather than hiding under it. */
.chat-fab {
position: relative;
z-index: 1;
}
}