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.
499 lines
13 KiB
CSS
499 lines
13 KiB
CSS
/* The shell: one contained, rounded application surface floating on a lit
|
|
* canvas.
|
|
*
|
|
* The dashboard is a *workspace*, not a document that fills the viewport --
|
|
* framing it gives the panels an edge to sit against, and lets the canvas
|
|
* behind read as light rather than wallpaper. Everything inside is translucent
|
|
* so that light carries through instead of stopping at the first opaque card.
|
|
*/
|
|
|
|
body {
|
|
/* The luminous canvas. Large, off-axis and low-frequency, so it lights the
|
|
workspace rather than competing with it. */
|
|
background:
|
|
radial-gradient(70rem 40rem at 8% -10%, var(--wash-a), transparent 62%),
|
|
radial-gradient(56rem 34rem at 92% 4%, var(--wash-b), transparent 58%),
|
|
radial-gradient(48rem 30rem at 50% 108%, var(--wash-c), transparent 60%),
|
|
var(--bg);
|
|
background-attachment: fixed;
|
|
padding: var(--sp-4);
|
|
}
|
|
|
|
.shell {
|
|
min-height: calc(100vh - var(--sp-4) * 2);
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-radius: var(--radius-xl);
|
|
border: 1px solid var(--hairline);
|
|
background: var(--workspace);
|
|
backdrop-filter: blur(28px) saturate(120%);
|
|
box-shadow: var(--shadow-workspace);
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* ── Command bar ────────────────────────────────────────────────────────── */
|
|
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-4);
|
|
padding: var(--sp-3) var(--sp-4);
|
|
border-bottom: 1px solid var(--hairline);
|
|
background: var(--bg-blur);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
.brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-2);
|
|
font-weight: 600;
|
|
font-size: var(--text-sm);
|
|
letter-spacing: -0.01em;
|
|
flex: none;
|
|
}
|
|
|
|
.brand-mark {
|
|
width: 26px;
|
|
height: 26px;
|
|
border-radius: 8px;
|
|
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
|
display: grid;
|
|
place-items: center;
|
|
color: #fff;
|
|
font-size: var(--text-xs);
|
|
font-weight: 700;
|
|
}
|
|
|
|
/* Navigation is always labelled. Operators should never have to memorise an
|
|
icon vocabulary just to move around the control plane. */
|
|
.nav {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
margin: 0 auto;
|
|
/* The nav is the only region that can afford to lose width, so it is the
|
|
only one allowed to shrink. min-width:0 lets it actually do so inside a
|
|
flex row, and the scroll is the last resort before anything clips --
|
|
.app sets overflow:hidden, so an unshrinkable row loses the utility
|
|
cluster off the right edge with no way to reach it. */
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
overflow-x: auto;
|
|
scrollbar-width: none;
|
|
padding: 3px;
|
|
border-radius: var(--radius-pill);
|
|
background: var(--surface-glass-strong);
|
|
border: 1px solid var(--hairline);
|
|
}
|
|
|
|
.nav::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.nav-item {
|
|
display: inline-flex;
|
|
flex: none;
|
|
align-items: center;
|
|
gap: var(--sp-2);
|
|
padding: var(--sp-2) var(--sp-3);
|
|
border-radius: var(--radius-pill);
|
|
color: var(--fg-muted);
|
|
font-size: var(--text-sm);
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
transition: background var(--transition), color var(--transition);
|
|
}
|
|
|
|
.nav-item:hover {
|
|
color: var(--fg);
|
|
background: var(--surface-hover);
|
|
}
|
|
|
|
.nav-item[aria-current="page"] {
|
|
background: var(--accent);
|
|
color: var(--accent-fg);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.nav-item .nav-label {
|
|
display: inline;
|
|
}
|
|
|
|
/* ── Utility cluster ────────────────────────────────────────────────────── */
|
|
|
|
.topbar-end {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-2);
|
|
flex: none;
|
|
}
|
|
|
|
.topbar-search {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-2);
|
|
padding: var(--sp-2) var(--sp-3);
|
|
border-radius: var(--radius-pill);
|
|
background: var(--surface-glass-strong);
|
|
border: 1px solid var(--hairline);
|
|
color: var(--fg-subtle);
|
|
}
|
|
|
|
.topbar-search input {
|
|
background: none;
|
|
border: 0;
|
|
color: var(--fg);
|
|
font: inherit;
|
|
font-size: var(--text-sm);
|
|
width: 8rem;
|
|
outline: none;
|
|
}
|
|
|
|
.topbar-search input::placeholder {
|
|
color: var(--fg-subtle);
|
|
}
|
|
|
|
.mobile-search-toggle {
|
|
display: none;
|
|
}
|
|
|
|
.icon-btn {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: var(--radius-pill);
|
|
border: 1px solid var(--hairline);
|
|
background: var(--surface-glass-strong);
|
|
color: var(--fg-muted);
|
|
cursor: pointer;
|
|
transition: color var(--transition), background var(--transition);
|
|
}
|
|
|
|
.icon-btn:hover {
|
|
color: var(--fg);
|
|
background: var(--surface-hover);
|
|
}
|
|
|
|
.avatar {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: var(--radius-pill);
|
|
display: grid;
|
|
place-items: center;
|
|
font-size: var(--text-xs);
|
|
font-weight: 600;
|
|
color: #fff;
|
|
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
|
cursor: pointer;
|
|
flex: none;
|
|
}
|
|
|
|
.ico {
|
|
flex: none;
|
|
display: block;
|
|
}
|
|
|
|
/* ── Canvas ─────────────────────────────────────────────────────────────── */
|
|
|
|
.main {
|
|
padding: var(--sp-6);
|
|
width: 100%;
|
|
flex: 1;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* ── Chat launcher and panel ─────────────────────────────────────────── */
|
|
/* A floating launcher, bottom-right, and the panel it opens immediately to
|
|
its left. The two share a bottom edge and the panel grows out of the button,
|
|
so the launcher never moves and always reads as the thing that produced the
|
|
panel.
|
|
|
|
Deliberately not a modal: no scrim, no body scroll lock, no focus trap. The
|
|
operator asks Archie about the page they are on, so that page has to stay
|
|
readable, scrollable and clickable while the panel is open. */
|
|
.chat-dock {
|
|
--fab-size: 56px;
|
|
--fab-inset: var(--sp-5);
|
|
--fab-gap: var(--sp-3);
|
|
position: fixed;
|
|
right: var(--fab-inset);
|
|
bottom: var(--fab-inset);
|
|
z-index: 40;
|
|
}
|
|
|
|
.chat-fab {
|
|
position: relative;
|
|
display: grid;
|
|
place-items: center;
|
|
width: var(--fab-size);
|
|
height: var(--fab-size);
|
|
border: 0;
|
|
border-radius: var(--radius-pill);
|
|
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
|
color: #fff;
|
|
cursor: pointer;
|
|
box-shadow: var(--shadow-md);
|
|
transition: transform var(--transition), box-shadow var(--transition);
|
|
}
|
|
|
|
.chat-fab:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 12px 34px color-mix(in srgb, var(--accent) 38%, transparent);
|
|
}
|
|
|
|
.chat-fab:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Both glyphs are stacked and cross-faded, so the button keeps one size and
|
|
the swap cannot reflow the dock. */
|
|
.chat-fab-icon {
|
|
grid-area: 1 / 1;
|
|
display: grid;
|
|
place-items: center;
|
|
transition: opacity var(--transition), transform var(--transition);
|
|
}
|
|
|
|
.chat-fab-icon-close,
|
|
.chat-dock.is-open .chat-fab-icon-open {
|
|
opacity: 0;
|
|
transform: scale(0.7) rotate(-45deg);
|
|
}
|
|
|
|
.chat-fab-icon-open,
|
|
.chat-dock.is-open .chat-fab-icon-close {
|
|
opacity: 1;
|
|
transform: none;
|
|
}
|
|
|
|
/* The panel is positioned off the dock, not the viewport: it sits one gap to
|
|
the left of the launcher and rises from the shared bottom edge. */
|
|
.chat-drawer {
|
|
position: absolute;
|
|
right: calc(var(--fab-size) + var(--fab-gap));
|
|
bottom: 0;
|
|
width: min(440px, calc(100vw - var(--fab-size) - var(--fab-gap) - var(--fab-inset) * 2));
|
|
height: min(640px, calc(100vh - var(--fab-inset) * 2));
|
|
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;
|
|
/* 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);
|
|
box-shadow: var(--shadow-md);
|
|
overflow: hidden;
|
|
|
|
opacity: 0;
|
|
border-radius: var(--radius-pill);
|
|
transform-origin: bottom right;
|
|
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
|
|
must not take hits or reach the tab order while invisible. */
|
|
.chat-drawer:not(.is-open) .chat-drawer-panel {
|
|
pointer-events: none;
|
|
visibility: hidden;
|
|
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 {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--sp-2);
|
|
padding: var(--sp-3) var(--sp-4);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
/* Below this there is no room beside the launcher, so the panel stops being
|
|
anchored to it and becomes a sheet on the viewport. The launcher hides while
|
|
the sheet is up: its own close button is the way out. */
|
|
@media (max-width: 720px) {
|
|
.chat-dock {
|
|
--fab-inset: var(--sp-4);
|
|
}
|
|
|
|
.chat-drawer {
|
|
position: fixed;
|
|
right: var(--fab-inset);
|
|
left: 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(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 right;
|
|
transform: translateY(calc(var(--fab-size) + var(--fab-gap))) scale(0.16);
|
|
}
|
|
|
|
/* 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;
|
|
}
|
|
}
|
|
|
|
/* ── Collapsed search ───────────────────────────────────────────────────── */
|
|
|
|
/* The always-open "Jump to" field is the widest thing in the utility cluster
|
|
and the least often used. Past this width it collapses to its icon and
|
|
expands on demand, which is what keeps the nav from having to scroll at
|
|
ordinary laptop sizes. Measured: the labelled nav needs 917px and the
|
|
collapsed cluster 160px, so an expanded field does not fit beside them until
|
|
about 1430px -- collapsing to 1500 keeps 1440 comfortable rather than
|
|
marginal. */
|
|
@media (max-width: 1500px) {
|
|
.topbar-search {
|
|
padding: 0;
|
|
border: 0;
|
|
background: transparent;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.topbar-search-icon {
|
|
display: none;
|
|
}
|
|
|
|
.mobile-search-toggle {
|
|
display: grid;
|
|
}
|
|
|
|
.topbar-search input {
|
|
width: 0;
|
|
padding: 0;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: width var(--transition), opacity var(--transition);
|
|
}
|
|
|
|
.topbar-search.is-open,
|
|
.topbar-search:focus-within {
|
|
padding-right: var(--sp-2);
|
|
border: 1px solid var(--hairline);
|
|
background: var(--surface-glass-strong);
|
|
}
|
|
|
|
.topbar-search.is-open input,
|
|
.topbar-search:focus-within input {
|
|
width: min(9rem, 34vw);
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
}
|
|
|
|
/* ── Constrained desktop ────────────────────────────────────────────────── */
|
|
|
|
/* The nav needs 917px on one line. Below the width where it still fits beside
|
|
the brand and the collapsed cluster it takes a row of its own, which reads
|
|
better than the scroll that would otherwise kick in. */
|
|
@media (max-width: 1270px) and (min-width: 901px) {
|
|
.topbar {
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.nav {
|
|
order: 3;
|
|
width: 100%;
|
|
margin: 0;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
border-radius: var(--radius-lg);
|
|
}
|
|
}
|
|
|
|
/* ── Narrow screens ─────────────────────────────────────────────────────── */
|
|
|
|
/* The frame is a desktop affordance. Below the breakpoint the workspace goes
|
|
edge to edge -- a rounded card inset on a phone wastes the only axis that
|
|
matters -- and the icon bar becomes a scrollable labelled row. */
|
|
@media (max-width: 900px) {
|
|
body {
|
|
padding: 0;
|
|
}
|
|
|
|
.shell {
|
|
min-height: 100vh;
|
|
border-radius: 0;
|
|
border: 0;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.topbar {
|
|
flex-wrap: wrap;
|
|
padding: var(--sp-3);
|
|
gap: var(--sp-2);
|
|
}
|
|
|
|
.nav {
|
|
order: 3;
|
|
width: 100%;
|
|
overflow-x: auto;
|
|
justify-content: flex-start;
|
|
flex-wrap: nowrap;
|
|
border-radius: var(--radius-lg);
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.nav::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
.nav-item .nav-label {
|
|
display: inline;
|
|
}
|
|
|
|
|
|
.main {
|
|
padding: var(--sp-4);
|
|
}
|
|
}
|