Skip to content

Agent Zero AI framework

Refresh welcome screen and composer

Alessandro0e262f7b8782
diff --git a/extensions/python/banners/_30_system_resources.py b/extensions/python/banners/_30_system_resources.py
index 25c65a670..3c1949f4f 100644
--- a/extensions/python/banners/_30_system_resources.py
+++ b/extensions/python/banners/_30_system_resources.py
@@ -69,34 +69,37 @@ class SystemResourcesCheck(Extension):
"priority": 10,
"title": "System Resources",
"html": (
- "<div style=\"display:flex;flex-direction:column;gap:14px;padding-top:6px;\">"
- "<div style=\"display:flex;flex-direction:column;gap:12px;\">"
- "<div style=\"display:flex;flex-wrap:wrap;column-gap:12px;row-gap:10px;align-items:center;\">"
- "<div style=\"flex:0 1 140px;min-width:110px;display:flex;flex-direction:column;gap:6px;\">"
- "<div style=\"font-size:12px;letter-spacing:.10em;text-transform:uppercase;opacity:.65;line-height:1.1\">CPU</div>"
- f"<div style=\"font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:.02em;line-height:1.1\">{cpu_value}</div>"
+ "<div class=\"system-resource-body\">"
+ "<div class=\"system-resource-meter\">"
+ "<div class=\"system-resource-label\">"
+ "<div class=\"system-resource-name\">CPU</div>"
+ f"<div class=\"system-resource-value\">{cpu_value}</div>"
"</div>"
f"{cpu_bar}"
"</div>"
- "<div style=\"display:flex;flex-wrap:wrap;column-gap:12px;row-gap:10px;align-items:center;\">"
- "<div style=\"flex:0 1 140px;min-width:110px;display:flex;flex-direction:column;gap:6px;\">"
- "<div style=\"font-size:12px;letter-spacing:.10em;text-transform:uppercase;opacity:.65;line-height:1.1\">RAM</div>"
- f"<div style=\"font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:.02em;line-height:1.1\">{ram_value}</div>"
+ "<div class=\"system-resource-meter\">"
+ "<div class=\"system-resource-label\">"
+ "<div class=\"system-resource-name\">RAM</div>"
+ f"<div class=\"system-resource-value\">{ram_value}</div>"
"</div>"
f"{ram_bar}"
"</div>"
- "<div style=\"display:flex;flex-wrap:wrap;column-gap:12px;row-gap:10px;align-items:center;\">"
- "<div style=\"flex:0 1 140px;min-width:110px;display:flex;flex-direction:column;gap:6px;\">"
- "<div style=\"font-size:12px;letter-spacing:.10em;text-transform:uppercase;opacity:.65;line-height:1.1\">Disk</div>"
- f"<div style=\"font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:.02em;line-height:1.1\">{disk_value}</div>"
+ "<div class=\"system-resource-meter\">"
+ "<div class=\"system-resource-label\">"
+ "<div class=\"system-resource-name\">Disk</div>"
+ f"<div class=\"system-resource-value\">{disk_value}</div>"
"</div>"
f"{disk_bar}"
"</div>"
+ "<div class=\"system-resource-footer\">"
+ "<div class=\"system-resource-detail\">"
+ "<div class=\"system-resource-detail-title\">Load (1/5/15)</div>"
+ f"<div class=\"system-resource-detail-value\">{load_value}</div>"
+ "</div>"
+ "<div class=\"system-resource-detail\">"
+ "<div class=\"system-resource-detail-title\">Net (since boot)</div>"
+ f"<div class=\"system-resource-detail-value\">{net_sent} sent / {net_recv} recv</div>"
"</div>"
- "<div style=\"height:1px;background:rgba(255,255,255,.08);\"></div>"
- "<div style=\"display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;\">"
- f"<div><div style=\"font-size:12px;letter-spacing:.10em;text-transform:uppercase;opacity:.65;margin-bottom:6px;\">Load (1/5/15)</div><div style=\"font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;opacity:.85;font-variant-numeric:tabular-nums\">{load_value}</div></div>"
- f"<div><div style=\"font-size:12px;letter-spacing:.10em;text-transform:uppercase;opacity:.65;margin-bottom:6px;\">Net (since boot)</div><div style=\"font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;opacity:.85;font-variant-numeric:tabular-nums\">{net_sent} sent / {net_recv} recv</div></div>"
"</div>"
"</div>"
),
@@ -117,9 +120,8 @@ class SystemResourcesCheck(Extension):
color = "#22c55e"
return (
- "<div style=\"flex:1 1 220px;width:100%;max-width:260px;height:10px;border-radius:999px;"
- "background:rgba(255,255,255,.10);overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);\">"
- f"<div style=\"height:100%;width:{p:.0f}%;background:{color};border-radius:999px;\"></div>"
+ "<div class=\"system-resource-track\">"
+ f"<span class=\"system-resource-fill\" style=\"--resource-value:{p:.0f}%;--resource-color:{color};\"></span>"
"</div>"
)
diff --git a/plugins/_discovery/AGENTS.md b/plugins/_discovery/AGENTS.md
index d2440d5ab..0a41f079b 100644
--- a/plugins/_discovery/AGENTS.md
+++ b/plugins/_discovery/AGENTS.md
@@ -15,6 +15,7 @@
- Discovery cards must be accurate, dismissible where appropriate, and avoid advertising already-complete setup.
- CTA actions must match supported welcome-screen action contracts.
- Keep card IDs unique and plugin-prefixed.
+- The Welcome screen `welcome-actions-end` surface renders feature channel cards plus the compact OAuth account-provider card; other hero discovery cards stay out of the lower welcome grid.
## Work Guidance
diff --git a/plugins/_discovery/extensions/python/banners/10_discovery_cards.py b/plugins/_discovery/extensions/python/banners/10_discovery_cards.py
index c0bc5cdee..bba6c1c85 100644
--- a/plugins/_discovery/extensions/python/banners/10_discovery_cards.py
+++ b/plugins/_discovery/extensions/python/banners/10_discovery_cards.py
@@ -87,11 +87,11 @@ class DiscoveryCardsExtension(Extension):
banners.append({
"id": "discovery-telegram",
"type": "feature",
- "title": "Connect Telegram",
- "description": "Chat with Agent Zero from Telegram wherever you are.",
+ "title": "Telegram",
+ "description": "Chat on Telegram wherever you are.",
"thumbnail": "/plugins/_discovery/webui/assets/thumb-telegram.png",
"icon": "send",
- "cta_text": "Setup",
+ "cta_text": "Connect",
"cta_action": "open-plugin-config:_telegram_integration",
"dismissible": True,
"priority": 50,
@@ -105,11 +105,11 @@ class DiscoveryCardsExtension(Extension):
banners.append({
"id": "discovery-email",
"type": "feature",
- "title": "Setup Email",
+ "title": "Email",
"description": "Let Agent Zero read and send emails on your behalf.",
"thumbnail": "/plugins/_discovery/webui/assets/thumb-email.png",
"icon": "mail",
- "cta_text": "Open Setup",
+ "cta_text": "Connect",
"cta_action": "open-plugin-config:_email_integration",
"dismissible": True,
"priority": 50,
@@ -121,11 +121,11 @@ class DiscoveryCardsExtension(Extension):
banners.append({
"id": "discovery-whatsapp",
"type": "feature",
- "title": "Connect WhatsApp",
+ "title": "WhatsApp",
"description": "Send and receive WhatsApp messages through A0.",
"thumbnail": "/plugins/_discovery/webui/assets/thumb-whatsapp.png",
"icon": "chat",
- "cta_text": "Setup",
+ "cta_text": "Connect",
"cta_action": "open-plugin-config:_whatsapp_integration",
"dismissible": True,
"priority": 50,
diff --git a/plugins/_discovery/extensions/webui/onboarding-success-end/discovery-cards.html b/plugins/_discovery/extensions/webui/onboarding-success-end/discovery-cards.html
index fd68a9dc4..cf54f176b 100644
--- a/plugins/_discovery/extensions/webui/onboarding-success-end/discovery-cards.html
+++ b/plugins/_discovery/extensions/webui/onboarding-success-end/discovery-cards.html
@@ -19,14 +19,6 @@
@click="$store.discoveryStore.executeCta(card.cta_action)"
@keydown.enter.prevent="$store.discoveryStore.executeCta(card.cta_action)"
@keydown.space.prevent="$store.discoveryStore.executeCta(card.cta_action)">
- <button class="discovery-dismiss discovery-dismiss-small"
- type="button"
- x-show="card.dismissible"
- @click.stop="$store.discoveryStore.dismissCard(card.id)"
- :aria-label="`Dismiss ${card.title}`"
- title="Dismiss">
- <span class="material-symbols-outlined">close</span>
- </button>
<div class="discovery-feature-head">
<div class="discovery-feature-thumb">
@@ -40,8 +32,6 @@
<h4 class="discovery-feature-title" x-text="card.title"></h4>
</div>
- <p class="discovery-feature-desc" x-text="card.description"></p>
-
<button class="btn btn primary"
type="button"
@click.stop="$store.discoveryStore.executeCta(card.cta_action)">
@@ -281,6 +271,7 @@
gap: 0.62rem;
width: 100%;
min-width: 0;
+ margin-bottom: 1rem;
}
.discovery-feature-thumb {
@@ -575,6 +566,7 @@
.discovery-feature-head {
grid-column: 1;
min-width: 0;
+ margin-bottom: 0;
}
.discovery-feature-thumb {
diff --git a/plugins/_discovery/extensions/webui/welcome-actions-end/discovery-cards.html b/plugins/_discovery/extensions/webui/welcome-actions-end/discovery-cards.html
index 21b3362e6..c0c9b6810 100644
--- a/plugins/_discovery/extensions/webui/welcome-actions-end/discovery-cards.html
+++ b/plugins/_discovery/extensions/webui/welcome-actions-end/discovery-cards.html
@@ -7,73 +7,15 @@
<div class="discovery-slot"
@modal-closed.window="$store.discoveryStore.refreshCards()"
x-create="$store.discoveryStore.refreshCards()"
- x-show="!($store.welcomeStore?.banners || []).some(b => b.id === 'missing-api-key') && ($store.discoveryStore.cards.length > 0 || $store.discoveryStore.hasDismissedCards)">
-
- <div class="discovery-section">
- <template x-for="card in $store.discoveryStore.topHeroCards" :key="card.id">
- <article class="discovery-hero"
- role="button"
- tabindex="0"
- @click="$store.discoveryStore.executeCta(card.cta_action)"
- @keydown.enter.prevent="$store.discoveryStore.executeCta(card.cta_action)"
- @keydown.space.prevent="$store.discoveryStore.executeCta(card.cta_action)">
- <button class="discovery-dismiss"
- type="button"
- x-show="card.dismissible"
- @click.stop="$store.discoveryStore.dismissCard(card.id)"
- :aria-label="`Dismiss ${card.title}`"
- title="Dismiss">
- <span class="material-symbols-outlined">close</span>
- </button>
-
- <div class="discovery-hero-content">
- <h3 class="discovery-hero-title" x-text="card.title"></h3>
- <p class="discovery-hero-desc" x-show="card.description" x-text="card.description"></p>
- <div class="discovery-account-chips" x-show="(card.account_chips || []).length">
- <template x-for="chip in card.account_chips" :key="`${card.id}-${chip.provider_id}`">
- <span class="discovery-account-chip" :class="{ connected: chip.connected }">
- <span x-text="chip.label"></span>
- <small x-show="chip.detail" x-text="chip.detail"></small>
- </span>
- </template>
- </div>
- <div class="discovery-usage" x-show="(card.usage_windows || []).length">
- <template x-for="window in card.usage_windows" :key="`${card.id}-${window.key}`">
- <div class="discovery-usage-window">
- <div class="discovery-usage-head">
- <span>
- <span x-text="window.title"></span>
- <small x-show="window.label" x-text="window.label"></small>
- </span>
- <strong x-text="$store.discoveryStore.formatRemainingPercent(window)"></strong>
- </div>
- <div class="discovery-usage-bar" aria-hidden="true">
- <i :style="{ width: $store.discoveryStore.usageWidth(window) }"></i>
- </div>
- <p x-show="$store.discoveryStore.formatReset(window)" x-text="`Resets in ${$store.discoveryStore.formatReset(window)}`"></p>
- </div>
- </template>
- </div>
- <button class="btn btn-ok"
- type="button"
- @click.stop="$store.discoveryStore.executeCta(card.cta_action)">
- <span x-text="card.cta_text"></span>
- <span class="material-symbols-outlined">arrow_forward</span>
- </button>
- </div>
+ x-show="!($store.welcomeStore?.banners || []).some(b => b.id === 'missing-api-key') && ($store.discoveryStore.featureCards.length > 0 || $store.discoveryStore.oauthAccountCards.length > 0 || $store.discoveryStore.hasDismissedCards)">
- <div class="discovery-hero-thumb" x-show="card.thumbnail || card.icon">
- <template x-if="card.thumbnail">
- <img :src="card.thumbnail" :alt="card.title" loading="lazy">
- </template>
- <template x-if="!card.thumbnail && card.icon">
- <span class="material-symbols-outlined discovery-hero-icon" x-text="card.icon"></span>
- </template>
- </div>
- </article>
- </template>
+ <section class="discovery-features-panel" x-show="$store.discoveryStore.featureCards.length > 0">
+ <header class="discovery-panel-header">
+ <h2>Connect Channels</h2>
+ <p>Extend Agent Zero across your favorite platforms.</p>
+ </header>
- <div class="discovery-features" x-show="$store.discoveryStore.featureCards.length > 0">
+ <div class="discovery-features">
<template x-for="card in $store.discoveryStore.featureCards" :key="card.id">
<article class="discovery-feature-card"
role="button"
@@ -81,14 +23,6 @@
@click="$store.discoveryStore.executeCta(card.cta_action)"
@keydown.enter.prevent="$store.discoveryStore.executeCta(card.cta_action)"
@keydown.space.prevent="$store.discoveryStore.executeCta(card.cta_action)">
- <button class="discovery-dismiss discovery-dismiss-small"
- type="button"
- x-show="card.dismissible"
- @click.stop="$store.discoveryStore.dismissCard(card.id)"
- :aria-label="`Dismiss ${card.title}`"
- title="Dismiss">
- <span class="material-symbols-outlined">close</span>
- </button>
<div class="discovery-feature-head">
<div class="discovery-feature-thumb">
@@ -102,339 +36,141 @@
<h4 class="discovery-feature-title" x-text="card.title"></h4>
</div>
- <p class="discovery-feature-desc" x-text="card.description"></p>
-
<button class="btn btn primary"
type="button"
@click.stop="$store.discoveryStore.executeCta(card.cta_action)">
<span x-text="card.cta_text"></span>
- <span class="material-symbols-outlined">arrow_forward</span>
</button>
</article>
</template>
</div>
+ </section>
+
+ <template x-for="card in $store.discoveryStore.oauthAccountCards" :key="card.id">
+ <article class="discovery-account-card">
+ <button class="discovery-dismiss"
+ type="button"
+ x-show="card.dismissible"
+ @click.stop="$store.discoveryStore.dismissCard(card.id)"
+ :aria-label="`Dismiss ${card.title}`"
+ title="Dismiss">
+ <span class="material-symbols-outlined">close</span>
+ </button>
- <template x-for="card in $store.discoveryStore.bottomHeroCards" :key="card.id">
- <article class="discovery-hero"
- role="button"
- tabindex="0"
- @click="$store.discoveryStore.executeCta(card.cta_action)"
- @keydown.enter.prevent="$store.discoveryStore.executeCta(card.cta_action)"
- @keydown.space.prevent="$store.discoveryStore.executeCta(card.cta_action)">
- <button class="discovery-dismiss"
- type="button"
- x-show="card.dismissible"
- @click.stop="$store.discoveryStore.dismissCard(card.id)"
- :aria-label="`Dismiss ${card.title}`"
- title="Dismiss">
- <span class="material-symbols-outlined">close</span>
- </button>
-
- <div class="discovery-hero-content">
- <h3 class="discovery-hero-title" x-text="card.title"></h3>
- <p class="discovery-hero-desc" x-show="card.description" x-text="card.description"></p>
- <div class="discovery-account-chips" x-show="(card.account_chips || []).length">
- <template x-for="chip in card.account_chips" :key="`${card.id}-${chip.provider_id}`">
- <span class="discovery-account-chip" :class="{ connected: chip.connected }">
- <span x-text="chip.label"></span>
- <small x-show="chip.detail" x-text="chip.detail"></small>
+ <header class="discovery-account-header">
+ <span class="material-symbols-outlined discovery-account-icon">key</span>
+ <div class="discovery-account-copy">
+ <h2 x-text="card.title"></h2>
+ <p x-show="card.description" x-text="card.description"></p>
+ </div>
+ </header>
+
+ <div class="discovery-account-chips" x-show="(card.account_chips || []).length > 0">
+ <template x-for="chip in card.account_chips || []" :key="chip.provider_id || chip.label">
+ <span class="discovery-account-chip" :class="{ 'is-connected': chip.connected }">
+ <span class="discovery-account-chip-dot" aria-hidden="true"></span>
+ <span class="discovery-account-chip-label" x-text="chip.label"></span>
+ <span class="discovery-account-chip-detail" x-show="chip.detail" x-text="chip.detail"></span>
+ </span>
+ </template>
+ </div>
+
+ <div class="discovery-account-usage" x-show="(card.usage_windows || []).length > 0">
+ <template x-for="window in card.usage_windows || []" :key="window.key || window.title">
+ <div class="discovery-account-usage-row">
+ <div class="discovery-account-usage-label">
+ <span x-text="window.title"></span>
+ <small x-show="$store.discoveryStore.formatReset(window)"
+ x-text="`Resets in ${$store.discoveryStore.formatReset(window)}`"></small>
+ </div>
+ <div class="discovery-account-usage-meter">
+ <span class="discovery-account-usage-track">
+ <span class="discovery-account-usage-fill"
+ :style="`width: ${$store.discoveryStore.usageWidth(window)}`"></span>
</span>
- </template>
- </div>
- <div class="discovery-usage" x-show="(card.usage_windows || []).length">
- <template x-for="window in card.usage_windows" :key="`${card.id}-${window.key}`">
- <div class="discovery-usage-window">
- <div class="discovery-usage-head">
- <span>
- <span x-text="window.title"></span>
- <small x-show="window.label" x-text="window.label"></small>
- </span>
- <strong x-text="$store.discoveryStore.formatRemainingPercent(window)"></strong>
- </div>
- <div class="discovery-usage-bar" aria-hidden="true">
- <i :style="{ width: $store.discoveryStore.usageWidth(window) }"></i>
- </div>
- <p x-show="$store.discoveryStore.formatReset(window)" x-text="`Resets in ${$store.discoveryStore.formatReset(window)}`"></p>
- </div>
- </template>
+ <span class="discovery-account-usage-value"
+ x-text="$store.discoveryStore.formatRemainingPercent(window)"></span>
+ </div>
</div>
- <button class="btn btn-ok"
- type="button"
- @click.stop="$store.discoveryStore.executeCta(card.cta_action)">
- <span x-text="card.cta_text"></span>
- <span class="material-symbols-outlined">arrow_forward</span>
- </button>
- </div>
-
- <div class="discovery-hero-thumb" x-show="card.thumbnail || card.icon">
- <template x-if="card.thumbnail">
- <img :src="card.thumbnail" :alt="card.title" loading="lazy">
- </template>
- <template x-if="!card.thumbnail && card.icon">
- <span class="material-symbols-outlined discovery-hero-icon" x-text="card.icon"></span>
- </template>
- </div>
- </article>
- </template>
-
- <div class="discovery-undismiss" x-show="$store.discoveryStore.hasDismissedCards">
- <button type="button"
- class="discovery-undismiss-btn"
- @click="$store.discoveryStore.undismissCards()">
- <span class="material-symbols-outlined">undo</span>
- <span>Show dismissed suggestions</span>
+ </template>
+ </div>
+
+ <button class="btn btn primary discovery-account-cta"
+ type="button"
+ @click="$store.discoveryStore.executeCta(card.cta_action)">
+ <span x-text="card.cta_text"></span>
+ <span class="material-symbols-outlined">arrow_forward</span>
</button>
- </div>
+ </article>
+ </template>
+
+ <div class="discovery-undismiss" x-show="$store.discoveryStore.hasDismissedCards">
+ <button type="button"
+ class="discovery-undismiss-btn"
+ @click="$store.discoveryStore.undismissCards()">
+ <span class="material-symbols-outlined">undo</span>
+ <span>Show dismissed suggestions</span>
+ </button>
</div>
</div>
</template>
<style>
.discovery-slot {
- grid-column: 1 / -1;
- width: 100%;
- }
-
- .discovery-section {
- display: flex;
- flex-direction: column;
+ display: grid;
gap: 1rem;
+ min-width: 0;
width: 100%;
- margin-top: 0.1rem;
}
- .discovery-hero,
- .discovery-feature-card {
- position: relative;
- border: 1px solid var(--color-border);
- border-radius: 12px;
- background: var(--color-panel);
+ .discovery-features-panel,
+ .discovery-account-card {
+ border: 1px solid color-mix(in srgb, var(--color-border) 66%, transparent);
+ border-radius: 8px;
+ background: color-mix(in srgb, var(--color-panel) 78%, var(--color-background) 22%);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.026);
+ backdrop-filter: blur(18px);
text-align: left;
- transition:
- border-color 0.2s ease,
- background-color 0.2s ease,
- box-shadow 0.2s ease,
- transform 0.2s ease;
}
- .discovery-hero:hover,
- .discovery-feature-card:hover,
- .discovery-hero:focus-visible,
- .discovery-feature-card:focus-visible {
- border-color: color-mix(in srgb, var(--color-primary) 72%, white 6%);
- box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
- outline: none;
- }
-
- .discovery-hero {
- display: flex;
- align-items: center;
- gap: 1rem;
- min-height: 152px;
- overflow: hidden;
- padding: 1.25rem 1.25rem 1.25rem 1.5rem;
- background:
- linear-gradient(
- 135deg,
- color-mix(in srgb, var(--color-primary) 10%, transparent),
- transparent 58%
- ),
- radial-gradient(
- circle at 92% 24%,
- color-mix(in srgb, var(--color-primary) 12%, transparent),
- transparent 42%
- ),
- var(--color-panel);
- }
-
- .discovery-hero-content,
- .discovery-hero-thumb {
- position: relative;
- z-index: 1;
- }
-
- .discovery-hero-content {
- flex: 1 1 auto;
- min-width: 0;
- }
-
- .discovery-hero-title {
- margin: 0 0 var(--spacing-sm);
- color: var(--color-text);
- font-size: 1.08rem;
- font-weight: 600;
- letter-spacing: 0.01em;
- }
-
- .discovery-hero-desc {
- margin: 0 0 1rem;
- color: var(--color-text);
- font-size: 0.86rem;
- line-height: 1.5;
- max-width: 38ch;
+ .discovery-features-panel {
+ min-height: 100%;
+ padding: 1.7rem 1.55rem 1.55rem;
}
- .discovery-usage {
+ .discovery-panel-header {
display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 0.6rem;
- max-width: 520px;
- margin: -0.15rem 0 1rem;
- }
-
- .discovery-account-chips {
- display: flex;
- flex-wrap: wrap;
- gap: 0.45rem;
- max-width: 560px;
- margin: -0.25rem 0 0.95rem;
- }
-
- .discovery-account-chip {
- display: inline-flex;
- min-width: 0;
- max-width: 100%;
- align-items: center;
- gap: 0.4rem;
- padding: 0.28rem 0.5rem;
- border: 1px solid color-mix(in srgb, var(--color-border) 74%, transparent);
- border-radius: 999px;
- background: color-mix(in srgb, var(--color-border) 28%, transparent);
- color: var(--color-text);
- font-size: 0.72rem;
- font-weight: 750;
- line-height: 1.15;
- }
-
- .discovery-account-chip.connected {
- border-color: color-mix(in srgb, #35d07f 44%, var(--color-border));
- background: color-mix(in srgb, #35d07f 13%, transparent);
- }
-
- .discovery-account-chip small {
- overflow: hidden;
- max-width: 18ch;
- color: var(--color-secondary);
- font-size: 0.68rem;
- font-weight: 700;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
-
- .discovery-usage-window {
- display: grid;
- min-width: 0;
gap: 0.42rem;
+ margin-bottom: 1.28rem;
}
- .discovery-usage-head {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 0.65rem;
- }
-
- .discovery-usage-head span {
- display: inline-flex;
- min-width: 0;
- align-items: center;
- gap: 0.35rem;
- color: var(--color-secondary);
- font-size: 0.75rem;
- font-weight: 700;
- }
-
- .discovery-usage-head small {
- padding: 0.12rem 0.34rem;
- border-radius: 999px;
- background: color-mix(in srgb, var(--color-border) 56%, transparent);
- color: var(--color-secondary);
- font-size: 0.68rem;
- line-height: 1;
- }
-
- .discovery-usage-head strong {
+ .discovery-panel-header h2 {
+ margin: 0;
color: var(--color-text);
- font-size: 0.78rem;
- white-space: nowrap;
- }
-
- .discovery-usage-bar {
- overflow: hidden;
- height: 0.48rem;
- border-radius: 999px;
- background: color-mix(in srgb, var(--color-border) 54%, transparent);
- }
-
- .discovery-usage-bar i {
- display: block;
- width: 0;
- height: 100%;
- border-radius: inherit;
- background: #35d07f;
- transition: width 0.22s ease;
+ font-size: 1.05rem;
+ font-weight: 520;
+ line-height: 1.2;
}
- .discovery-usage-window p {
+ .discovery-panel-header p {
margin: 0;
- color: var(--color-secondary);
- font-size: 0.7rem;
- }
-
- .discovery-cta-link,
- .discovery-undismiss-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 0.35rem;
- cursor: pointer;
- transition:
- background-color 0.2s ease,
- border-color 0.2s ease,
- color 0.2s ease,
- transform 0.2s ease;
- }
-
- .discovery-hero-thumb {
- flex: 0 0 132px;
- width: 132px;
- height: 108px;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .discovery-hero-thumb img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.12));
- }
-
- .discovery-hero-icon {
- font-size: 3rem;
- color: var(--color-highlight-dark);
+ color: color-mix(in srgb, var(--color-text) 58%, transparent);
+ font-size: 0.92rem;
+ line-height: 1.35;
}
.discovery-features {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
- gap: 1rem;
+ gap: 0.7rem;
}
.discovery-feature-card {
+ position: relative;
display: flex;
flex-direction: column;
align-items: flex-start;
- min-height: 188px;
- padding: 1rem;
- background:
- linear-gradient(
- 180deg,
- color-mix(in srgb, var(--color-primary) 4%, transparent),
- transparent 38%
- ),
- var(--color-panel);
+ text-align: left;
}
.discovery-feature-head {
@@ -444,6 +180,7 @@
gap: 0.75rem;
width: 100%;
min-width: 0;
+ margin-bottom: 1rem;
}
.discovery-feature-thumb {
@@ -453,7 +190,7 @@
display: flex;
align-items: center;
justify-content: center;
- border-radius: 14px;
+ border-radius: 999px;
overflow: hidden;
background: color-mix(in srgb, var(--color-primary) 10%, transparent);
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 10%, transparent);
@@ -475,39 +212,34 @@
flex: 1 1 auto;
min-width: 0;
color: var(--color-text);
- font-size: 0.92rem;
- font-weight: 600;
+ font-size: 0.96rem;
+ font-weight: 520;
line-height: 1.25;
}
.discovery-feature-desc {
- margin: 0.55rem 0 0;
+ margin: 1.12rem 0 0;
padding-bottom: var(--spacing-md);
- color: var(--color-text);
- font-size: 0.8rem;
- line-height: 1.45;
+ color: color-mix(in srgb, var(--color-text) 72%, transparent);
+ font-size: 0.86rem;
+ line-height: 1.48;
}
.discovery-feature-card > .btn {
margin-top: auto;
- }
-
- .discovery-cta-link {
- margin-top: 0.95rem;
- border: 1px solid color-mix(in srgb, var(--color-primary) 34%, var(--color-border));
+ min-width: 6.1rem;
+ min-height: 2.35rem;
+ border: 0;
border-radius: 8px;
- background: transparent;
- color: var(--color-primary);
- padding: 0.42rem 0.72rem;
- font-size: 0.79rem;
- font-weight: 600;
+ color: #fff;
+ font-family: var(--font-family-main, "Rubik", Arial, Helvetica, sans-serif);
+ font-size: 0.88rem;
+ font-weight: 460;
}
- .discovery-cta-link:hover,
- .discovery-cta-link:focus-visible {
- background: var(--color-primary);
- border-color: var(--color-primary);
- color: #fff;
+ .discovery-feature-card > .btn:hover,
+ .discovery-feature-card > .btn:focus-visible {
+ filter: brightness(1.06);
outline: none;
}
@@ -540,10 +272,10 @@
height: 26px;
}
- .discovery-hero:hover .discovery-dismiss,
- .discovery-hero:focus-visible .discovery-dismiss,
.discovery-feature-card:hover .discovery-dismiss,
- .discovery-feature-card:focus-visible .discovery-dismiss {
+ .discovery-feature-card:focus-visible .discovery-dismiss,
+ .discovery-account-card:hover .discovery-dismiss,
+ .discovery-account-card:focus-within .discovery-dismiss {
opacity: 0.68;
}
@@ -559,18 +291,226 @@
font-size: 1rem;
}
+ .discovery-account-card {
+ position: relative;
+ display: grid;
+ gap: 1.1rem;
+ padding: 1.35rem 1.45rem 1.4rem;
+ }
+
+ .discovery-account-header {
+ display: grid;
+ grid-template-columns: auto minmax(0, 1fr);
+ gap: 0.95rem;
+ align-items: center;
+ min-width: 0;
+ padding-right: 2.1rem;
+ }
+
+ .discovery-account-icon {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 3rem;
+ height: 3rem;
+ border-radius: 10px;
+ color: #2f6bff;
+ background: color-mix(in srgb, var(--color-primary) 10%, transparent);
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 12%, transparent);
+ font-size: 1.7rem;
+ }
+
+ .discovery-account-copy {
+ display: grid;
+ gap: 0.3rem;
+ min-width: 0;
+ }
+
+ .discovery-account-copy h2 {
+ margin: 0;
+ color: var(--color-text);
+ font-size: 1.05rem;
+ font-weight: 520;
+ line-height: 1.2;
+ }
+
+ .discovery-account-copy p {
+ margin: 0;
+ color: color-mix(in srgb, var(--color-text) 58%, transparent);
+ font-size: 0.9rem;
+ line-height: 1.42;
+ }
+
+ .discovery-account-chips {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.5rem;
+ min-width: 0;
+ }
+
+ .discovery-account-chip {
+ display: inline-grid;
+ grid-template-columns: auto auto minmax(0, auto);
+ align-items: center;
+ gap: 0.4rem;
+ max-width: 100%;
+ min-height: 2rem;
+ padding: 0.32rem 0.58rem;
+ border: 1px solid color-mix(in srgb, var(--color-border) 52%, transparent);
+ border-radius: 999px;
+ background: color-mix(in srgb, var(--color-background) 50%, transparent);
+ color: color-mix(in srgb, var(--color-text) 74%, transparent);
+ font-size: 0.8rem;
+ line-height: 1.2;
+ }
+
+ .discovery-account-chip-dot {
+ width: 0.44rem;
+ height: 0.44rem;
+ border-radius: 999px;
+ background: color-mix(in srgb, var(--color-text) 34%, transparent);
+ }
+
+ .discovery-account-chip.is-connected .discovery-account-chip-dot {
+ background: #22c55e;
+ }
+
+ .discovery-account-chip-label,
+ .discovery-account-chip-detail {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .discovery-account-chip-label {
+ color: var(--color-text);
+ font-weight: 500;
+ }
+
+ .discovery-account-chip-detail {
+ color: color-mix(in srgb, var(--color-text) 52%, transparent);
+ }
+
+ .discovery-account-usage {
+ display: grid;
+ gap: 0.74rem;
+ padding-top: 0.12rem;
+ }
+
+ .discovery-account-usage-row {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) minmax(8rem, 0.82fr);
+ gap: 1rem;
+ align-items: center;
+ min-width: 0;
+ }
+
+ .discovery-account-usage-label {
+ display: grid;
+ gap: 0.22rem;
+ min-width: 0;
+ }
+
+ .discovery-account-usage-label span,
+ .discovery-account-usage-label small {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .discovery-account-usage-label span {
+ color: color-mix(in srgb, var(--color-text) 74%, transparent);
+ font-size: 0.84rem;
+ line-height: 1.25;
+ }
+
+ .discovery-account-usage-label small {
+ color: color-mix(in srgb, var(--color-text) 44%, transparent);
+ font-size: 0.72rem;
+ line-height: 1.2;
+ }
+
+ .discovery-account-usage-meter {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.58rem;
+ align-items: center;
+ min-width: 0;
+ }
+
+ .discovery-account-usage-track {
+ height: 0.52rem;
+ overflow: hidden;
+ border-radius: 999px;
+ background: color-mix(in srgb, var(--color-border) 70%, transparent);
+ }
+
+ .discovery-account-usage-fill {
+ display: block;
+ height: 100%;
+ border-radius: inherit;
+ background: #22c55e;
+ transition: width 0.22s ease;
+ }
+
+ .discovery-account-usage-value {
+ color: color-mix(in srgb, var(--color-text) 70%, transparent);
+ font-family: var(--font-family-code, "Roboto Mono", monospace);
+ font-size: 0.74rem;
+ line-height: 1;
+ white-space: nowrap;
+ }
+
+ .discovery-account-cta {
+ justify-self: start;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 0.36rem;
+ min-height: 2.35rem;
+ min-width: 8.65rem;
+ border: 0;
+ border-radius: 8px;
+ padding: 0.55rem 0.9rem;
+ background-color: #4248f1;
+ color: #fff;
+ font-family: var(--font-family-main, "Rubik", Arial, Helvetica, sans-serif);
+ font-size: 0.88rem;
+ font-weight: 460;
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
+ }
+
+ .discovery-account-cta:hover,
+ .discovery-account-cta:focus-visible {
+ background-color: #353bc5;
+ filter: none;
+ outline: none;
+ }
+
+ .discovery-account-cta .material-symbols-outlined {
+ font-size: 1.05rem;
+ }
+
.discovery-undismiss {
display: flex;
justify-content: flex-start;
}
.discovery-undismiss-btn {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 0.35rem;
border: none;
background: transparent;
padding: 0;
color: var(--color-secondary);
+ cursor: pointer;
font-size: 0.8rem;
font-weight: 500;
+ transition: color 0.2s ease;
}
.discovery-undismiss-btn:hover,
@@ -579,7 +519,6 @@
outline: none;
}
- .discovery-cta-link .material-symbols-outlined,
.discovery-undismiss-btn .material-symbols-outlined {
font-size: 1rem;
}
@@ -591,21 +530,6 @@
}
@media (max-width: 768px) {
- .discovery-section {
- gap: 0.85rem;
- }
-
- .discovery-hero {
- min-height: 0;
- padding: 1rem;
- }
-
- .discovery-hero-thumb {
- flex-basis: 92px;
- width: 92px;
- height: 76px;
- }
-
.discovery-features {
grid-template-columns: 1fr;
gap: 0.75rem;
@@ -617,12 +541,12 @@
gap: 0.75rem;
min-height: 0;
align-items: center;
- padding: 0.85rem 1rem;
}
.discovery-feature-head {
grid-column: 1;
min-width: 0;
+ margin-bottom: 0;
}
.discovery-feature-thumb {
@@ -641,8 +565,9 @@
margin-top: 0;
}
- .discovery-cta-link {
- margin-top: 0;
+ .discovery-account-usage-row {
+ grid-template-columns: 1fr;
+ gap: 0.45rem;
}
}
@@ -651,29 +576,28 @@
margin-top: 0.15rem;
}
- .discovery-hero {
- padding-right: 0.95rem;
+ .discovery-feature-card {
+ grid-template-columns: minmax(0, 1fr) auto;
+ padding-right: 3rem;
}
- .discovery-hero-thumb {
- display: none;
+ .discovery-feature-card > .btn {
+ justify-self: end;
}
- .discovery-hero-title {
- font-size: 1rem;
+ .discovery-account-card {
+ padding: 1.05rem;
}
- .discovery-usage {
+ .discovery-account-header {
grid-template-columns: 1fr;
+ padding-right: 2.2rem;
}
- .discovery-feature-card {
- grid-template-columns: minmax(0, 1fr) auto;
- padding-right: 3rem;
- }
-
- .discovery-feature-card > .btn {
- justify-self: end;
+ .discovery-account-icon {
+ width: 2.55rem;
+ height: 2.55rem;
+ font-size: 1.45rem;
}
}
</style>
diff --git a/plugins/_discovery/webui/discovery-store.js b/plugins/_discovery/webui/discovery-store.js
index 520ba3ec4..8dbb52919 100644
--- a/plugins/_discovery/webui/discovery-store.js
+++ b/plugins/_discovery/webui/discovery-store.js
@@ -154,6 +154,10 @@ const model = {
return this.cards.filter((card) => card.type === "hero" && card.placement === "after-features");
},
+ get oauthAccountCards() {
+ return this.bottomHeroCards.filter((card) => card.id === "discovery-oauth-accounts");
+ },
+
get heroCards() {
return [...this.topHeroCards, ...this.bottomHeroCards];
},
diff --git a/plugins/_whisper_stt/extensions/webui/chat-input-box-end/microphone-button.html b/plugins/_whisper_stt/extensions/webui/chat-input-box-end/microphone-button.html
index c6fb47f3e..aed23ba3a 100644
--- a/plugins/_whisper_stt/extensions/webui/chat-input-box-end/microphone-button.html
+++ b/plugins/_whisper_stt/extensions/webui/chat-input-box-end/microphone-button.html
@@ -1,58 +1,75 @@
<div x-data>
<style>
#microphone-button {
- color: var(--color-background);
+ order: 1;
+ border-color: transparent;
+ border-radius: 12px;
+ background-color: transparent;
+ color: grey;
transition:
background-color 0.2s ease,
+ border-color 0.2s ease,
box-shadow 0.12s ease-in-out,
- filter 0.12s ease-in-out,
+ color 0.2s ease,
opacity 0.12s ease-in-out;
}
+ #microphone-button svg {
+ transform-origin: center;
+ transition: color 0.2s ease, transform 0.12s ease-in-out;
+ }
+
#microphone-button.mic-disabled {
- background-color: #5f6368;
+ color: #5f6368;
cursor: not-allowed;
opacity: 0.58;
}
#microphone-button.mic-inactive {
- background-color: grey;
+ color: grey;
}
#microphone-button.mic-activating {
- background-color: silver;
- animation: whisper-stt-mic-pulse 0.8s infinite;
+ color: silver;
}
#microphone-button.mic-listening {
- background-color: red;
+ color: red;
}
#microphone-button.mic-recording {
- background-color: green;
+ color: green;
}
#microphone-button.mic-waiting {
- background-color: teal;
+ color: teal;
}
#microphone-button.mic-processing {
- background-color: darkcyan;
+ color: darkcyan;
+ }
+
+ #microphone-button.mic-activating svg,
+ #microphone-button.mic-processing svg {
animation: whisper-stt-mic-pulse 0.8s infinite;
- transform-origin: center;
}
@media (hover: hover) {
#microphone-button:not(.mic-disabled):hover {
- filter: brightness(1.08);
- box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08),
- 0 6px 14px rgba(0, 0, 0, 0.18);
+ box-shadow: none;
+ }
+
+ #microphone-button:not(.mic-disabled):hover svg {
+ transform: scale(1.08);
}
}
#microphone-button:not(.mic-disabled):active {
- filter: brightness(0.92);
- box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
+ box-shadow: none;
+ }
+
+ #microphone-button:not(.mic-disabled):active svg {
+ transform: scale(0.92);
}
@keyframes whisper-stt-mic-pulse {
diff --git a/plugins/_whisper_stt/webui/whisper-stt.css b/plugins/_whisper_stt/webui/whisper-stt.css
index 0242442ad..aae550b4d 100644
--- a/plugins/_whisper_stt/webui/whisper-stt.css
+++ b/plugins/_whisper_stt/webui/whisper-stt.css
@@ -1,56 +1,73 @@
#microphone-button {
- color: var(--color-background);
+ order: 1;
+ border-color: transparent;
+ border-radius: 12px;
+ background-color: transparent;
+ color: grey;
transition:
background-color 0.2s ease,
+ border-color 0.2s ease,
box-shadow 0.12s ease-in-out,
- filter 0.12s ease-in-out,
+ color 0.2s ease,
opacity 0.12s ease-in-out;
}
+#microphone-button svg {
+ transform-origin: center;
+ transition: color 0.2s ease, transform 0.12s ease-in-out;
+}
+
#microphone-button.mic-disabled {
- background-color: #5f6368;
+ color: #5f6368;
cursor: not-allowed;
opacity: 0.58;
}
#microphone-button.mic-inactive {
- background-color: grey;
+ color: grey;
}
#microphone-button.mic-activating {
- background-color: silver;
- animation: whisper-stt-mic-pulse 0.8s infinite;
+ color: silver;
}
#microphone-button.mic-listening {
- background-color: red;
+ color: red;
}
#microphone-button.mic-recording {
- background-color: green;
+ color: green;
}
#microphone-button.mic-waiting {
- background-color: teal;
+ color: teal;
}
#microphone-button.mic-processing {
- background-color: darkcyan;
+ color: darkcyan;
+}
+
+#microphone-button.mic-activating svg,
+#microphone-button.mic-processing svg {
animation: whisper-stt-mic-pulse 0.8s infinite;
- transform-origin: center;
}
@media (hover: hover) {
#microphone-button:not(.mic-disabled):hover {
- filter: brightness(1.08);
- box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08),
- 0 6px 14px rgba(0, 0, 0, 0.18);
+ box-shadow: none;
+ }
+
+ #microphone-button:not(.mic-disabled):hover svg {
+ transform: scale(1.08);
}
}
#microphone-button:not(.mic-disabled):active {
- filter: brightness(0.92);
- box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
+ box-shadow: none;
+}
+
+#microphone-button:not(.mic-disabled):active svg {
+ transform: scale(0.92);
}
@keyframes whisper-stt-mic-pulse {
diff --git a/tests/test_oauth_static.py b/tests/test_oauth_static.py
index 155681e68..4b7b165bd 100644
--- a/tests/test_oauth_static.py
+++ b/tests/test_oauth_static.py
@@ -166,7 +166,7 @@ def test_oauth_model_wrappers_do_not_add_box_borders_or_lateral_padding():
assert "'is-codex'" not in config_html
-def test_connected_codex_welcome_card_renders_usage_limit_bars():
+def test_oauth_discovery_card_renders_in_welcome_account_panel():
discovery_cards = (
PROJECT_ROOT
/ "plugins/_discovery/extensions/python/banners/10_discovery_cards.py"
@@ -186,8 +186,11 @@ def test_connected_codex_welcome_card_renders_usage_limit_bars():
assert '"icon": "account_circle"' not in discovery_cards
assert "usage_windows" in discovery_cards
assert "account_chips" in discovery_cards
+ assert "discovery-account-card" in welcome_cards
assert "discovery-account-chip" in welcome_cards
- assert 'x-show="card.thumbnail || card.icon"' in welcome_cards
- assert "discovery-usage" in welcome_cards
- assert "discovery-usage-bar" in welcome_cards
- assert "formatRemainingPercent(window)" in welcome_cards + discovery_store
+ assert "discovery-account-usage" in welcome_cards
+ assert "formatRemainingPercent(window)" in welcome_cards
+ assert "formatRemainingPercent(window)" in discovery_store
+ assert "usageWidth(window)" in discovery_store
+ assert "oauthAccountCards" in discovery_store
+ assert 'card.id === "discovery-oauth-accounts"' in discovery_store
diff --git a/tests/test_speech_plugin_split.py b/tests/test_speech_plugin_split.py
index 7770d1364..624b4a348 100644
--- a/tests/test_speech_plugin_split.py
+++ b/tests/test_speech_plugin_split.py
@@ -215,9 +215,19 @@ def test_chat_bar_keeps_existing_send_and_mic_icon_contract() -> None:
assert f"#microphone-button.mic-{state}" in whisper_css
assert f"#microphone-button.mic-{state}" in mic_extension
- assert "background-color: red;" in whisper_css
- assert "background-color: green;" in whisper_css
- assert "background-color: teal;" in whisper_css
- assert "background-color: grey;" in mic_extension
+ assert "border-radius: 12px;" in whisper_css
+ assert "background-color: transparent;" in whisper_css
+ assert "#microphone-button.mic-inactive {\n color: grey;" in whisper_css
+ assert "background-color: grey;" not in whisper_css
+ assert "#microphone-button.mic-listening {\n color: red;" in whisper_css
+ assert "#microphone-button.mic-recording {\n color: green;" in whisper_css
+ assert "#microphone-button.mic-waiting {\n color: teal;" in whisper_css
+ assert "#microphone-button.mic-processing {\n color: darkcyan;" in whisper_css
+ assert "#microphone-button.mic-activating svg" in whisper_css
+ assert "#microphone-button.mic-processing svg" in whisper_css
+ assert "#microphone-button:not(.mic-disabled):hover svg" in whisper_css
+ assert "#microphone-button:not(.mic-disabled):active svg" in whisper_css
+ assert "box-shadow: none;" in whisper_css
+ assert "order: 1;" in mic_extension
assert "whisper-stt-mic-pulse 0.8s infinite" in mic_extension
assert "whisper-stt-mic-pulse 0.8s infinite" in whisper_css
diff --git a/tests/test_welcome_composer_static.py b/tests/test_welcome_composer_static.py
new file mode 100644
index 000000000..11ab62311
--- /dev/null
+++ b/tests/test_welcome_composer_static.py
@@ -0,0 +1,93 @@
+from pathlib import Path
+
+
+PROJECT_ROOT = Path(__file__).resolve().parents[1]
+
+
+def _read(relative_path: str) -> str:
+ return (PROJECT_ROOT / relative_path).read_text(encoding="utf-8")
+
+
+def test_welcome_screen_embeds_shared_new_chat_composer() -> None:
+ welcome = _read("webui/components/welcome/welcome-screen.html")
+ index = _read("webui/index.html")
+ discovery_cards = _read(
+ "plugins/_discovery/extensions/webui/welcome-actions-end/discovery-cards.html"
+ )
+
+ assert 'class="welcome-composer"' in welcome
+ assert 'path="chat/attachments/inputPreview.html"' in welcome
+ assert 'path="chat/input/chat-bar-input.html"' in welcome
+ assert '<h2>Quick Actions</h2>' in welcome
+ assert 'class="welcome-lower-grid"' in welcome
+ assert 'x-extension id="welcome-actions-end"' in welcome
+
+ assert "x-if=\"$store.welcomeStore && $store.welcomeStore.isVisible\"" in index
+ assert "x-if=\"!$store.welcomeStore || !$store.welcomeStore.isVisible\"" in index
+ assert "Connect Channels" in discovery_cards
+ assert "oauthAccountCards" in discovery_cards
+ assert "discovery-account-card" in discovery_cards
+ assert "topHeroCards" not in discovery_cards
+ assert "bottomHeroCards" not in discovery_cards
+ assert "background: var(--color-background);" in welcome
+ assert "radial-gradient" not in welcome
+
+
+def test_welcome_composer_can_create_a_chat_before_sending() -> None:
+ input_store = _read("webui/components/chat/input/input-store.js")
+ chats_store = _read("webui/components/sidebar/chats/chats-store.js")
+
+ assert 'return "Ask anything to start a new chat";' in input_store
+ assert "if (!chatsStore.selected" in input_store
+ assert "await chatsStore.newChat()" in input_store
+ assert "return response.ctxid;" in chats_store
+ assert 'return "arrow_forward";' in input_store
+
+
+def test_welcome_composer_buttons_keep_target_geometry_without_glow() -> None:
+ chat_bar = _read("webui/components/chat/input/chat-bar-input.html")
+ mic_css = _read("plugins/_whisper_stt/webui/whisper-stt.css")
+
+ assert "#send-button {\n order: 2;\n border-radius: 12px;" in chat_bar
+ assert "background-color: #4248f1;" in chat_bar
+ assert "background-color: #e67e22;" in chat_bar
+ assert "linear-gradient" not in chat_bar
+ assert "#microphone-button {\n order: 1;" in mic_css
+ assert "border-radius: 12px;" in mic_css
+ assert "background-color: transparent;" in mic_css
+ assert "#microphone-button.mic-inactive {\n color: grey;" in mic_css
+ assert "background-color: grey;" not in mic_css
+ assert "#microphone-button.mic-listening {\n color: red;" in mic_css
+ assert "#microphone-button.mic-recording {\n color: green;" in mic_css
+ assert "#microphone-button.mic-activating svg" in mic_css
+ assert "rgba(34, 68, 255" not in chat_bar
+ assert "rgba(217, 119, 6" not in chat_bar
+
+
+def test_welcome_hover_and_focus_borders_use_neutral_tokens() -> None:
+ surfaces = "\n".join(
+ [
+ _read("webui/components/welcome/welcome-screen.html"),
+ _read("webui/components/chat/input/chat-bar-input.html"),
+ _read("plugins/_discovery/extensions/webui/welcome-actions-end/discovery-cards.html"),
+ ]
+ )
+
+ assert "#315cf6" not in surfaces
+ assert "rgba(34, 68, 255" not in surfaces
+ assert "linear-gradient" not in surfaces
+ assert "border-color: color-mix(in srgb, var(--color-primary" not in surfaces
+ assert "border-color: var(--color-primary" not in surfaces
+ assert "border-color: color-mix(in srgb, var(--color-border) 88%, var(--color-text) 12%)" in surfaces
+
+
+def test_composer_uses_rubik_until_caret_enters_fenced_code() -> None:
+ chat_bar = _read("webui/components/chat/input/chat-bar-input.html")
+ input_store = _read("webui/components/chat/input/input-store.js")
+
+ assert "font-family: var(--font-family-main" in chat_bar
+ assert "#chat-input.is-code-context" in chat_bar
+ assert "font-family: var(--font-family-code" in chat_bar
+ assert "'is-code-context': $store.chatInput.isCodeContext" in chat_bar
+ assert "_isCaretInsideFence(text, index)" in input_store
+ assert "matches.length % 2 === 1" in input_store
diff --git a/webui/AGENTS.md b/webui/AGENTS.md
index 2185539e0..b0400b627 100644
--- a/webui/AGENTS.md
+++ b/webui/AGENTS.md
@@ -26,6 +26,7 @@
- Do not bypass WebSocket origin/auth/CSRF assumptions from frontend code.
- Avoid editing vendored files unless intentionally updating the vendor asset.
- Rubik (`--font-family-main`) is the default WebUI text and control font; use the code/mono font tokens only for code, logs, paths, and fixed-width data.
+- Hover, focus, and active border treatments should follow existing neutral border/background patterns; avoid hard-coded blue border highlights unless matching an established specialized surface.
## Work Guidance
diff --git a/webui/components/chat/AGENTS.md b/webui/components/chat/AGENTS.md
index 220667ecb..6203b8976 100644
--- a/webui/components/chat/AGENTS.md
+++ b/webui/components/chat/AGENTS.md
@@ -17,6 +17,8 @@
- Preserve Store Gating for all store-backed chat components.
- Use shared API, WebSocket, notification, and attachment helpers where available.
- Do not bypass CSRF or WebSocket state-sync expectations.
+- The shared composer can be mounted on the Welcome screen with no selected chat; sending from that state must create and select a chat context before dispatch.
+- Composer text uses the main UI font by default and switches to the code font while the caret is inside an open triple-backtick fenced block.
## Work Guidance
diff --git a/webui/components/chat/attachments/attachmentsStore.js b/webui/components/chat/attachments/attachmentsStore.js
index 82e117b1d..872fc853f 100644
--- a/webui/components/chat/attachments/attachmentsStore.js
+++ b/webui/components/chat/attachments/attachmentsStore.js
@@ -136,7 +136,10 @@ const model = {
console.log("Setting up paste handler...");
document.addEventListener("paste", (e) => {
// console.log("Paste event detected, target:", e.target.id);
- if(e.target.id != "chat-input" && e.target.id != "full-screen-input") return;
+ if (
+ e.target.id !== "chat-input" &&
+ e.target.id !== "full-screen-input"
+ ) return;
const items = e.clipboardData.items;
let imageFound = false;
diff --git a/webui/components/chat/input/bottom-actions.html b/webui/components/chat/input/bottom-actions.html
index 88befe494..bc8bc254f 100644
--- a/webui/components/chat/input/bottom-actions.html
+++ b/webui/components/chat/input/bottom-actions.html
@@ -14,7 +14,7 @@
<div class="chat-bottom-actions-menu">
<input
type="file"
- id="chat-file-input"
+ x-ref="chatFileInput"
class="chat-bottom-menu-file-input"
accept="*"
multiple
@@ -23,7 +23,7 @@
<button
type="button"
class="chat-bottom-menu-item"
- @click.stop="document.getElementById('chat-file-input')?.click()"
+ @click.stop="$refs.chatFileInput?.click()"
>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z" />
@@ -33,7 +33,7 @@
<input
type="file"
- id="chat-folder-input"
+ x-ref="chatFolderInput"
class="chat-bottom-menu-file-input"
webkitdirectory
directory
@@ -43,7 +43,7 @@
<button
type="button"
class="chat-bottom-menu-item"
- @click.stop="document.getElementById('chat-folder-input')?.click()"
+ @click.stop="$refs.chatFolderInput?.click()"
>
<span class="material-symbols-outlined" aria-hidden="true">drive_folder_upload</span>
<span>Attach folder</span>
@@ -73,6 +73,7 @@
class="chat-bottom-menu-item"
id="history_inspect"
@click="$store.history.open(); $store.chatInput.closeChatMoreMenu()"
+ :disabled="!$store.chats.selected"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="5 10 85 85" width="18" height="18" aria-hidden="true">
<path fill="currentColor" d="m59.572,57.949c-.41,0-.826-.105-1.207-.325l-9.574-5.528c-.749-.432-1.21-1.231-1.21-2.095v-14.923c0-1.336,1.083-2.419,2.419-2.419s2.419,1.083,2.419,2.419v13.526l8.364,4.829c1.157.668,1.554,2.148.886,3.305-.448.776-1.261,1.21-2.097,1.21Zm30.427-7.947c0,10.684-4.161,20.728-11.716,28.283-6.593,6.59-15.325,10.69-24.59,11.544-1.223.113-2.448.169-3.669.169-7.492,0-14.878-2.102-21.22-6.068l-15.356,5.733c-.888.331-1.887.114-2.557-.556s-.887-1.669-.556-2.557l5.733-15.351c-4.613-7.377-6.704-16.165-5.899-24.891.854-9.266,4.954-17.998,11.544-24.588,7.555-7.555,17.6-11.716,28.285-11.716s20.73,4.161,28.285,11.716c7.555,7.555,11.716,17.599,11.716,28.283Zm-15.137-24.861c-13.71-13.71-36.018-13.71-49.728,0-11.846,11.846-13.682,30.526-4.365,44.417.434.647.53,1.464.257,2.194l-4.303,11.523,11.528-4.304c.274-.102.561-.153.846-.153.474,0,.944.139,1.348.41,13.888,9.315,32.568,7.479,44.417-4.365,13.707-13.708,13.706-36.014,0-49.723Zm-24.861-4.13c-15.989,0-28.996,13.006-28.996,28.992s13.008,28.992,28.996,28.992c1.336,0,2.419-1.083,2.419-2.419s-1.083-2.419-2.419-2.419c-13.32,0-24.157-10.835-24.157-24.153s10.837-24.153,24.157-24.153,24.153,10.835,24.153,24.153c0,1.336,1.083,2.419,2.419,2.419c0-15.986-13.006-28.992-28.992-28.992Zm25.041,33.531c-1.294.347-2.057,1.673-1.71,2.963.343,1.289,1.669,2.057,2.963,1.71,1.289-.343,2.053-1.669,1.71-2.963-.347-1.289-1.673-2.057-2.963-1.71Zm-2.03,6.328c-1.335,0-2.419,1.084-2.419,2.419s1.084,2.419,2.419,2.419,2.419-1.084,2.419-2.419-1.084-2.419-2.419-2.419Zm-3.598,5.587c-1.289-.347-2.615.416-2.963,1.71-.343,1.289.421,2.615,1.71,2.963,1.294.347,2.62-.421,2.963-1.71.347-1.294-.416-2.62-1.71-2.963Zm-4.919,4.462c-1.157-.667-2.638-.27-3.306.887-.667,1.157-.27,2.638.887,3.305,1.157.668,2.638.27,3.306-.887.667-1.157.27-2.638-.887-3.306Zm-9.327,3.04c-.946.946-.946,2.478,0,3.42.942.946,2.473.946,3.42,0,.946-.942.946-2.473,0-3.42-.946-.942-2.478-.946-3.42,0Z"></path>
@@ -85,6 +86,7 @@
class="chat-bottom-menu-item"
id="ctx_window"
@click="$store.context.open(); $store.chatInput.closeChatMoreMenu()"
+ :disabled="!$store.chats.selected"
>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="17 15 70 70" width="18" height="18" fill="currentColor" aria-hidden="true">
<path d="m63 25c1.1016 0 2-0.89844 2-2s-0.89844-2-2-2h-26c-1.1016 0-2 0.89844-2 2s0.89844 2 2 2z"></path>
diff --git a/webui/components/chat/input/chat-bar-input.html b/webui/components/chat/input/chat-bar-input.html
index 621ca7b00..001265161 100644
--- a/webui/components/chat/input/chat-bar-input.html
+++ b/webui/components/chat/input/chat-bar-input.html
@@ -25,11 +25,16 @@
</div>
<!-- Container for textarea and expand button -->
- <div id="chat-input-container" style="position: relative;">
+ <div id="chat-input-container">
<textarea id="chat-input" :placeholder="$store.chatInput.inputPlaceholder" rows="1"
@keydown.enter="if (!$event.shiftKey && !$event.isComposing && $event.keyCode !== 229) { $event.preventDefault(); $store.chatInput.sendMessage(); }"
@keydown.up="$store.chatInput.historyPrev($event)" @keydown.down="$store.chatInput.historyNext($event)"
- @input="$store.chatInput.adjustTextareaHeight()" x-model="$store.chatInput.message"></textarea>
+ @input="$store.chatInput.handleInput($event)"
+ @keyup="$store.chatInput._syncCaretFromEvent($event)"
+ @click="$store.chatInput._syncCaretFromEvent($event)"
+ @select="$store.chatInput._syncCaretFromEvent($event)"
+ :class="{ 'progress-active': $store.chatInput.progressActive, 'is-code-context': $store.chatInput.isCodeContext }"
+ x-model="$store.chatInput.message"></textarea>
<div id="chat-input-progress-placeholder" x-show="$store.chatInput.showProgressPlaceholder"
x-html="$store.chatInput.progressPlaceholderHtml"
:class="{ 'progress-active': $store.chatInput.progressActive }" aria-hidden="true" style="display: none;">
@@ -59,9 +64,25 @@
.input-row {
display: flex;
align-items: center;
- gap: var(--spacing-xs);
+ gap: 0.72rem;
width: 100%;
+ min-height: 4.25rem;
+ padding: 0.42rem 0.52rem 0.42rem 0.72rem;
+ border: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
+ border-radius: 16px;
+ background: color-mix(in srgb, var(--color-panel) 72%, var(--color-background) 28%);
+ box-shadow:
+ inset 0 1px 0 rgba(255, 255, 255, 0.035),
+ 0 18px 46px rgba(0, 0, 0, 0.18);
white-space: nowrap;
+ transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
+ }
+
+ .input-row:focus-within {
+ border-color: color-mix(in srgb, var(--color-border) 88%, var(--color-text) 12%);
+ box-shadow:
+ inset 0 1px 0 rgba(255, 255, 255, 0.045),
+ 0 22px 54px rgba(0, 0, 0, 0.22);
}
.attachment-wrapper {
@@ -77,21 +98,22 @@
.chat-more-trigger {
cursor: pointer;
color: var(--color-text);
- opacity: 0.75;
- transition: opacity 0.2s ease;
+ opacity: 0.82;
+ transition: opacity 0.16s ease, background-color 0.16s ease, color 0.16s ease;
display: flex;
align-items: center;
justify-content: center;
- width: 2.25rem;
- height: 2.25rem;
+ width: 2.5rem;
+ height: 2.5rem;
padding: 0;
border: none;
- border-radius: 50%;
+ border-radius: 10px;
background: transparent;
}
.chat-more-trigger:hover {
opacity: 1;
+ background: color-mix(in srgb, var(--color-border) 36%, transparent);
}
.chat-more-trigger:active {
@@ -99,7 +121,7 @@
}
.chat-more-trigger .material-symbols-outlined {
- font-size: 1.5rem;
+ font-size: 1.7rem;
line-height: 1;
}
@@ -113,12 +135,12 @@
max-height: min(70vh, 20rem);
overflow-x: hidden;
overflow-y: auto;
- background-color: var(--color-panel);
+ background-color: color-mix(in srgb, var(--color-panel) 90%, black 10%);
border: 1px solid var(--color-border);
- border-radius: 0.4rem;
- box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
+ border-radius: 12px;
+ box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
z-index: 1050;
- padding: 0.2rem 0;
+ padding: 0.3rem;
}
.light-mode .chat-more-panel {
@@ -129,32 +151,41 @@
#chat-input-container {
position: relative;
width: 100%;
+ min-width: 0;
+ display: flex;
+ align-items: center;
}
#chat-input {
- background-color: var(--color-input);
- border: 1px solid var(--color-border);
- border-radius: 8px;
+ background-color: transparent;
+ border: 0;
+ border-radius: 0;
color: var(--color-text);
flex-grow: 1;
- font-family: "Roboto Mono", monospace;
+ font-family: var(--font-family-main, "Rubik", Arial, Helvetica, sans-serif);
font-optical-sizing: auto;
-webkit-font-optical-sizing: auto;
- font-size: 0.9rem;
+ font-size: 1rem;
+ line-height: 1.45;
max-height: 30vh;
- min-height: 3.05rem;
+ min-height: 2.8rem;
width: 100%;
- padding: 0.48rem 40px var(--spacing-sm) var(--spacing-sm);
- margin-right: var(--spacing-xs);
+ padding: 0.68rem 2.2rem 0.68rem 0.1rem;
+ margin: 0;
overflow-y: auto;
scroll-behavior: smooth;
resize: none;
- align-content: start;
+ align-content: center;
background-clip: border-box;
- border: 6px solid transparent;
- outline: 1px solid var(--color-border);
- transition: all 0.3s ease;
- -webkit-transition: all 0.3s ease;
+ outline: none;
+ transition: color 0.16s ease, background-color 0.16s ease;
+ -webkit-transition: color 0.16s ease, background-color 0.16s ease;
+ }
+
+ #chat-input.is-code-context {
+ font-family: var(--font-family-code, "Roboto Mono", monospace);
+ font-size: 0.94rem;
+ align-content: start;
}
#chat-input::-webkit-scrollbar {
@@ -180,16 +211,14 @@
}
#chat-input:focus {
- outline: 0.05rem solid rgba(155, 155, 155, 0.5);
- font-size: 0.955rem;
- padding-top: 0.45rem;
- background-color: var(--color-input-focus);
+ outline: none;
+ background-color: transparent;
}
#chat-input::placeholder {
- color: var(--color-text-muted);
- opacity: 0.7;
- transition: color 0.3s ease;
+ color: color-mix(in srgb, var(--color-text) 62%, transparent);
+ opacity: 0.78;
+ transition: color 0.16s ease;
}
/* Progress ghost text animation — gentle pulse on placeholder */
@@ -216,12 +245,12 @@
#chat-input-progress-placeholder {
position: absolute;
- top: calc(6px + 0.48rem);
- left: calc(6px + var(--spacing-sm));
+ top: 0.74rem;
+ left: 0.12rem;
right: 46px;
color: var(--color-text-muted);
opacity: 0.7;
- font-family: "Roboto Mono", monospace;
+ font-family: var(--font-family-code, "Roboto Mono", monospace);
font-size: 0.9rem;
line-height: 1.45;
white-space: nowrap;
@@ -251,7 +280,7 @@
#expand-button {
position: absolute;
top: 12px;
- right: 6px;
+ right: 0;
background: transparent;
border: none;
cursor: pointer;
@@ -278,52 +307,60 @@
/* Chat buttons (Send/Mic) */
#chat-buttons-wrapper {
- gap: var(--spacing-xs);
- padding-left: var(--spacing-xs);
- line-height: 0.5rem;
+ gap: 0.58rem;
+ padding-left: 0;
+ line-height: 1;
display: -webkit-flex;
display: flex;
+ align-items: center;
}
.chat-button {
- border: none;
+ border: 1px solid transparent;
border-radius: 50%;
- color: var(--color-background);
+ color: #fff;
cursor: pointer;
font-size: var(--font-size-normal);
- height: 2.525rem;
- width: 2.525rem;
- margin: 0 0.18rem 0 0 var(--spacing-xs);
+ height: 3.15rem;
+ width: 3.15rem;
+ margin: 0;
display: -webkit-flex;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
flex-grow: 0;
- min-width: 2.525rem;
- -webkit-transition: background-color var(--transition-speed), box-shadow 0.12s ease-in-out, filter 0.12s ease-in-out;
- transition: background-color var(--transition-speed), box-shadow 0.12s ease-in-out, filter 0.12s ease-in-out;
+ min-width: 3.15rem;
+ -webkit-transition: background-color var(--transition-speed), border-color 0.16s ease, box-shadow 0.16s ease, filter 0.12s ease-in-out, transform 0.12s ease;
+ transition: background-color var(--transition-speed), border-color 0.16s ease, box-shadow 0.16s ease, filter 0.12s ease-in-out, transform 0.12s ease;
}
#send-button {
+ order: 2;
+ border-radius: 12px;
background-color: #4248f1;
+ box-shadow: none;
}
#send-button.send-queue {
background-color: #e67e22;
+ box-shadow: none;
}
#send-button:hover {
background-color: #353bc5;
- box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 6px 14px rgba(0, 0, 0, 0.2);
+ filter: none;
+ box-shadow: none;
}
#send-button.send-queue:hover {
background-color: #d35400;
+ filter: none;
}
#send-button:active {
background-color: #2b309c;
+ transform: translateY(1px) scale(0.98);
filter: brightness(0.96);
}
@@ -333,25 +370,42 @@
}
#send-button .material-symbols-outlined {
- font-size: 1.5rem;
+ font-size: 1.78rem;
}
/* Responsive tweaks */
@media (max-width: 640px) {
#chat-input {
- min-height: 5.3rem;
- align-content: start;
+ min-height: 4.2rem;
+ align-content: center;
}
#chat-buttons-wrapper {
display: flex;
- gap: var(--spacing-xs);
- padding: 0 0 0 var(--spacing-sm) !important;
- width: 3.5rem;
- flex-wrap: wrap;
+ gap: 0.42rem;
+ padding: 0 !important;
+ width: auto;
+ flex-wrap: nowrap;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
+
+ .input-row {
+ gap: 0.42rem;
+ min-height: 4rem;
+ padding: 0.36rem 0.42rem 0.36rem 0.48rem;
+ }
+
+ .chat-more-trigger {
+ width: 2.15rem;
+ height: 2.15rem;
+ }
+
+ .chat-button {
+ width: 2.75rem;
+ height: 2.75rem;
+ min-width: 2.75rem;
+ }
}
@media (min-width: 768px) {
@@ -364,4 +418,4 @@
</style>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/webui/components/chat/input/input-store.js b/webui/components/chat/input/input-store.js
index cc860420e..0ace742bf 100644
--- a/webui/components/chat/input/input-store.js
+++ b/webui/components/chat/input/input-store.js
@@ -56,6 +56,7 @@ const model = {
chatMoreMenuOpen: false,
progressText: "",
progressActive: false,
+ _caretIndex: 0,
toggleChatMoreMenu() {
this.chatMoreMenuOpen = !this.chatMoreMenuOpen;
@@ -76,12 +77,17 @@ const model = {
},
get inputPlaceholder() {
+ if (!chatsStore.selected) return "Ask anything to start a new chat";
const state = this._getSendState();
if (state === "all") return "Press Enter to send queued messages";
if (this.showProgressPlaceholder) return "";
return "Type your message here...";
},
+ get isCodeContext() {
+ return this._isCaretInsideFence(this.message, this._caretIndex);
+ },
+
get showProgressPlaceholder() {
return (
this._getSendState() !== "all" &&
@@ -102,7 +108,7 @@ const model = {
const state = this._getSendState();
if (state === "all") return "send_and_archive";
if (state === "queue") return "schedule_send";
- return "send";
+ return "arrow_forward";
},
// Computed: send button CSS class
@@ -129,15 +135,59 @@ const model = {
async sendMessage() {
// Capture sent prompt to per-chat history (bash-style)
try { this._pushHistory(this.message); } catch (_e) { /* ignore */ }
+
+ if (!chatsStore.selected && (this.message.trim() || attachmentsStore?.attachments?.length > 0)) {
+ const ctxid = await chatsStore.newChat();
+ if (!ctxid && !chatsStore.selected) return;
+ }
+
// Delegate to the global function
if (globalThis.sendMessage) {
await globalThis.sendMessage();
}
},
- adjustTextareaHeight() {
- const chatInput = document.getElementById("chat-input");
- if (chatInput) {
+ _composerTextareas(target = null) {
+ if (target?.tagName === "TEXTAREA") return [target];
+ return ["chat-input"]
+ .map((id) => document.getElementById(id))
+ .filter(Boolean);
+ },
+
+ _activeTextarea() {
+ const active = document.activeElement;
+ if (active?.id === "chat-input") {
+ return active;
+ }
+ return document.getElementById("chat-input");
+ },
+
+ _syncCaretFromEvent($event = null) {
+ const ta = ($event && $event.target?.tagName === "TEXTAREA")
+ ? $event.target
+ : this._activeTextarea();
+ if (!ta) {
+ this._caretIndex = this.message.length;
+ return;
+ }
+ this._caretIndex = Number.isFinite(ta.selectionStart) ? ta.selectionStart : this.message.length;
+ },
+
+ _isCaretInsideFence(text, index) {
+ const source = String(text || "");
+ const caret = Math.max(0, Math.min(source.length, Number(index) || 0));
+ const matches = source.slice(0, caret).match(/```/g);
+ return Boolean(matches && matches.length % 2 === 1);
+ },
+
+ handleInput($event) {
+ this._syncCaretFromEvent($event);
+ this.adjustTextareaHeight($event);
+ },
+
+ adjustTextareaHeight($event = null) {
+ const target = $event?.target || null;
+ for (const chatInput of this._composerTextareas(target)) {
if (!this.message) chatInput.value = "";
chatInput.style.height = "auto";
chatInput.style.height = chatInput.scrollHeight + "px";
@@ -284,7 +334,7 @@ const model = {
},
focus() {
- const chatInput = document.getElementById("chat-input");
+ const chatInput = this._activeTextarea();
if (chatInput) {
chatInput.focus();
}
@@ -379,10 +429,11 @@ const model = {
_setCaretStart() {
queueMicrotask(() => {
- const ta = document.getElementById("chat-input");
+ const ta = this._activeTextarea();
if (ta) {
try { ta.setSelectionRange(0, 0); } catch (_e) { /* ignore */ }
try { ta.scrollTop = 0; } catch (_e) { /* ignore */ }
+ this._syncCaretFromEvent({ target: ta });
}
this.adjustTextareaHeight();
});
@@ -390,11 +441,12 @@ const model = {
_setCaretEnd() {
queueMicrotask(() => {
- const ta = document.getElementById("chat-input");
+ const ta = this._activeTextarea();
if (ta) {
const end = ta.value.length;
try { ta.setSelectionRange(end, end); } catch (_e) { /* ignore */ }
try { ta.scrollTop = ta.scrollHeight; } catch (_e) { /* ignore */ }
+ this._syncCaretFromEvent({ target: ta });
}
this.adjustTextareaHeight();
});
@@ -402,7 +454,7 @@ const model = {
historyPrev($event) {
if ($event && ($event.isComposing || $event.keyCode === 229)) return;
- const ta = ($event && $event.target) ? $event.target : document.getElementById("chat-input");
+ const ta = ($event && $event.target) ? $event.target : this._activeTextarea();
if (!ta) return;
const start = ta.selectionStart;
const end = ta.selectionEnd;
@@ -424,7 +476,7 @@ const model = {
historyNext($event) {
if ($event && ($event.isComposing || $event.keyCode === 229)) return;
- const ta = ($event && $event.target) ? $event.target : document.getElementById("chat-input");
+ const ta = ($event && $event.target) ? $event.target : this._activeTextarea();
if (!ta) return;
const value = ta.value;
const start = ta.selectionStart;
@@ -447,6 +499,7 @@ const model = {
this.message = "";
attachmentsStore.clearAttachments();
this.chatMoreMenuOpen = false;
+ this._caretIndex = 0;
this._historyIndex = null;
this._draft = "";
this.adjustTextareaHeight();
diff --git a/webui/components/sidebar/chats/chats-store.js b/webui/components/sidebar/chats/chats-store.js
index 1469c08d2..4dc563ac8 100644
--- a/webui/components/sidebar/chats/chats-store.js
+++ b/webui/components/sidebar/chats/chats-store.js
@@ -210,12 +210,13 @@ const model = {
if (response.ok) {
await this.selectChat(response.ctxid);
document.dispatchEvent(new CustomEvent("chat-created", { detail: { ctxid: response.ctxid } }));
- return;
+ return response.ctxid;
}
} catch (e) {
toastFetchError("Error creating new chat", e);
}
+ return null;
},
deselectChat(){
diff --git a/webui/components/welcome/AGENTS.md b/webui/components/welcome/AGENTS.md
index 4237418aa..624209b3b 100644
--- a/webui/components/welcome/AGENTS.md
+++ b/webui/components/welcome/AGENTS.md
@@ -14,10 +14,13 @@
- Keep banner and discovery card behavior compatible with Python `banners` extensions.
- Supported banner/card CTA actions must stay synchronized with plugin discovery contracts.
- Do not show setup prompts for already configured plugins when backend status can prevent it.
+- The welcome screen mounts the shared chat composer to start a new chat; keep it mutually exclusive with the normal chat input DOM.
+- Render `system-resources` as the dedicated System Resources panel, not as a generic alert banner.
## Work Guidance
- Coordinate visual card or CTA changes with plugin discovery and onboarding surfaces.
+- Keep the lower welcome grid focused on Connect Channels, OAuth accounts, and System Resources unless the target design changes.
## Verification
diff --git a/webui/components/welcome/welcome-screen.html b/webui/components/welcome/welcome-screen.html
index 95a4192c3..d27472373 100644
--- a/webui/components/welcome/welcome-screen.html
+++ b/webui/components/welcome/welcome-screen.html
@@ -12,534 +12,598 @@
<div x-init="$store.welcomeStore.init(); if ($store.welcomeStore.isVisible) { $store.welcomeStore.onCreate(); } $watch('$store.welcomeStore.isVisible', (visible) => { if (visible) { $store.welcomeStore.onCreate(); } });"
class="welcome-container">
<x-extension id="welcome-screen-start"></x-extension>
- <div class="welcome-content">
- <!-- Action Cards -->
- <div class="welcome-actions">
- <x-extension id="welcome-actions-start"></x-extension>
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('new-chat')">
- <span class="material-symbols-outlined welcome-action-icon">add_circle</span>
- <h3 class="welcome-action-title">New Chat</h3>
- </div>
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('projects')">
- <span class="material-symbols-outlined welcome-action-icon">folder</span>
- <h3 class="welcome-action-title">Projects</h3>
- </div>
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('memory')">
- <span class="material-symbols-outlined welcome-action-icon">memory</span>
- <h3 class="welcome-action-title">Memory</h3>
+ <main class="welcome-shell">
+ <header class="welcome-hero">
+ <h1>Welcome back <span aria-hidden="true">&#128075;</span></h1>
+ <p>Agent Zero is ready to help.</p>
+ </header>
+
+ <section class="welcome-composer" aria-label="Start a new chat">
+ <x-component path="chat/attachments/inputPreview.html"></x-component>
+ <x-component path="chat/input/chat-bar-input.html"></x-component>
+ </section>
+
+ <section class="welcome-alerts"
+ x-show="$store.welcomeStore.sortedBanners.length > 0 || $store.welcomeStore.hasDismissedBanners">
+ <div class="welcome-banners" x-show="$store.welcomeStore.sortedBanners.length > 0">
+ <x-extension id="welcome-banners-start"></x-extension>
+ <template x-for="banner in $store.welcomeStore.sortedBanners" :key="banner.id">
+ <article class="welcome-banner" :class="$store.welcomeStore.getBannerClass(banner.type)">
+ <div class="welcome-banner-icon">
+ <span class="material-symbols-outlined" x-text="$store.welcomeStore.getBannerIcon(banner.type)"></span>
+ </div>
+ <div class="welcome-banner-content">
+ <div class="welcome-banner-title" x-text="banner.title"></div>
+ <div class="welcome-banner-html" x-html="banner.html"></div>
+ </div>
+ <button class="welcome-banner-dismiss"
+ type="button"
+ x-show="banner.dismissible !== false"
+ @click.stop="$store.welcomeStore.dismissBanner(banner.id)"
+ title="Dismiss"
+ aria-label="Dismiss">
+ <span class="material-symbols-outlined">close</span>
+ </button>
+ </article>
+ </template>
+ <x-extension id="welcome-banners-end"></x-extension>
</div>
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('scheduler')">
- <span class="material-symbols-outlined welcome-action-icon">schedule</span>
- <h3 class="welcome-action-title">Tasks</h3>
- </div>
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('settings')">
- <span class="material-symbols-outlined welcome-action-icon">settings</span>
- <h3 class="welcome-action-title">Settings</h3>
- </div>
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('plugins')">
- <span class="material-symbols-outlined welcome-action-icon">extension</span>
- <h3 class="welcome-action-title">Plugins</h3>
- </div>
-
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('files')">
- <span class="material-symbols-outlined welcome-action-icon">folder_open</span>
- <h3 class="welcome-action-title">Files</h3>
- </div>
- <div class="welcome-action-card" @click="$store.welcomeStore.executeAction('website')">
- <span class="material-symbols-outlined welcome-action-icon">language</span>
- <h3 class="welcome-action-title">Visit Website</h3>
- </div>
- <x-extension id="welcome-actions-end"></x-extension>
- </div>
-
- <div class="welcome-actions-footer">
<button type="button"
- class="welcome-refresh-button"
- @click="$store.welcomeStore.refreshBanners(true)"
- :disabled="$store.welcomeStore.bannersLoading"
- title="Refresh banners">
- <span class="material-symbols-outlined" :class="{ 'welcome-spin': $store.welcomeStore.bannersLoading }">refresh</span>
- </button>
-
- <button type="button"
- class="welcome-refresh-button"
- @click="$store.welcomeStore.undismissBanners()"
+ class="welcome-undismiss-button"
x-show="$store.welcomeStore.hasDismissedBanners"
:disabled="$store.welcomeStore.bannersLoading"
- title="Undismiss all banners">
+ @click="$store.welcomeStore.undismissBanners()">
<span class="material-symbols-outlined">undo</span>
+ <span>Show dismissed notices</span>
</button>
- </div>
-
- <!-- Banner Section -->
- <div class="welcome-banners" x-show="$store.welcomeStore.banners && $store.welcomeStore.banners.length > 0">
- <x-extension id="welcome-banners-start"></x-extension>
- <template x-for="banner in $store.welcomeStore.sortedBanners" :key="banner.id">
- <div class="welcome-banner" :class="$store.welcomeStore.getBannerClass(banner.type)">
- <!-- Banner Icon -->
- <div class="welcome-banner-icon">
- <span class="material-symbols-outlined" x-text="$store.welcomeStore.getBannerIcon(banner.type)"></span>
- </div>
-
- <!-- Banner Content -->
- <div class="welcome-banner-content">
- <div class="welcome-banner-title" x-text="banner.title"></div>
- <div class="welcome-banner-html" x-html="banner.html"></div>
- </div>
-
- <!-- Dismiss Button -->
- <button class="welcome-banner-dismiss"
- x-show="banner.dismissible !== false"
- @click.stop="$store.welcomeStore.dismissBanner(banner.id)"
- title="Dismiss">
- <span class="material-symbols-outlined">close</span>
- </button>
- </div>
- </template>
- <x-extension id="welcome-banners-end"></x-extension>
- </div>
- </div>
+ </section>
+
+ <section class="welcome-quick-section">
+ <h2>Quick Actions</h2>
+ <div class="welcome-actions">
+ <x-extension id="welcome-actions-start"></x-extension>
+ <button type="button" class="welcome-action-card" @click="$store.welcomeStore.executeAction('projects')">
+ <span class="material-symbols-outlined welcome-action-icon">folder</span>
+ <span class="welcome-action-copy">
+ <span class="welcome-action-title">Projects</span>
+ <span class="welcome-action-description">Organize and track your work.</span>
+ </span>
+ <span class="material-symbols-outlined welcome-action-arrow">chevron_right</span>
+ </button>
+ <button type="button" class="welcome-action-card" @click="$store.welcomeStore.executeAction('memory')">
+ <span class="material-symbols-outlined welcome-action-icon">memory</span>
+ <span class="welcome-action-copy">
+ <span class="welcome-action-title">Memory</span>
+ <span class="welcome-action-description">Access saved context and knowledge.</span>
+ </span>
+ <span class="material-symbols-outlined welcome-action-arrow">chevron_right</span>
+ </button>
+ <button type="button" class="welcome-action-card" @click="$store.welcomeStore.executeAction('scheduler')">
+ <span class="material-symbols-outlined welcome-action-icon">schedule</span>
+ <span class="welcome-action-copy">
+ <span class="welcome-action-title">Tasks</span>
+ <span class="welcome-action-description">View and manage your tasks.</span>
+ </span>
+ <span class="material-symbols-outlined welcome-action-arrow">chevron_right</span>
+ </button>
+ <button type="button" class="welcome-action-card" @click="$store.welcomeStore.executeAction('files')">
+ <span class="material-symbols-outlined welcome-action-icon">folder_open</span>
+ <span class="welcome-action-copy">
+ <span class="welcome-action-title">Files</span>
+ <span class="welcome-action-description">Search and manage your files.</span>
+ </span>
+ <span class="material-symbols-outlined welcome-action-arrow">chevron_right</span>
+ </button>
+ <button type="button" class="welcome-action-card" @click="$store.welcomeStore.executeAction('settings')">
+ <span class="material-symbols-outlined welcome-action-icon">settings</span>
+ <span class="welcome-action-copy">
+ <span class="welcome-action-title">Settings</span>
+ <span class="welcome-action-description">Configure Agent Zero to your preferences.</span>
+ </span>
+ <span class="material-symbols-outlined welcome-action-arrow">chevron_right</span>
+ </button>
+ <button type="button" class="welcome-action-card" @click="$store.welcomeStore.executeAction('plugins')">
+ <span class="material-symbols-outlined welcome-action-icon">extension</span>
+ <span class="welcome-action-copy">
+ <span class="welcome-action-title">Plugins</span>
+ <span class="welcome-action-description">Extend Agent Zero with integrations.</span>
+ </span>
+ <span class="material-symbols-outlined welcome-action-arrow">chevron_right</span>
+ </button>
+ <button type="button" class="welcome-action-card is-wide" @click="$store.welcomeStore.executeAction('website')">
+ <span class="material-symbols-outlined welcome-action-icon">language</span>
+ <span class="welcome-action-copy">
+ <span class="welcome-action-title">Visit Website</span>
+ <span class="welcome-action-description">Explore Agent Zero online and resources.</span>
+ </span>
+ <span class="material-symbols-outlined welcome-action-arrow">open_in_new</span>
+ </button>
+ </div>
+ </section>
+
+ <section class="welcome-lower-grid">
+ <x-extension id="welcome-actions-end"></x-extension>
+
+ <article class="welcome-system-card"
+ x-show="$store.welcomeStore.systemResourceBanner"
+ x-transition.opacity>
+ <header class="welcome-panel-header">
+ <h2 x-text="$store.welcomeStore.systemResourceBanner?.title || 'System Resources'"></h2>
+ <span class="material-symbols-outlined">monitoring</span>
+ </header>
+ <div class="welcome-system-body"
+ x-html="$store.welcomeStore.systemResourceBanner?.html || ''"></div>
+ </article>
+ </section>
+ </main>
+
<x-extension id="welcome-screen-end"></x-extension>
</div>
</template>
</div>
<style>
- /* Welcome Screen Styles */
.welcome-container {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 3%;
- text-align: center;
- background: var(--color-background);
- color: var(--color-text);
- min-height: 100vh;
position: relative;
+ min-height: 100vh;
overflow: hidden;
+ padding: clamp(4.8rem, 8vh, 6.4rem) clamp(1.25rem, 5.4vw, 6.5rem) 3.5rem;
+ background: var(--color-background);
+ color: var(--color-text);
+ font-family: var(--font-family-main, "Rubik", Arial, Helvetica, sans-serif);
}
+
.welcome-container > x-extension,
.welcome-actions > x-extension,
- .welcome-banners > x-extension {
+ .welcome-banners > x-extension,
+ .welcome-lower-grid > x-extension,
+ .welcome-lower-grid > x-extension > x-component,
+ .welcome-lower-grid > x-extension > x-component > div[x-data] {
display: contents;
}
.welcome-container::before {
content: "";
position: absolute;
- inset: 0;
+ inset: -6% -8% -10% 10%;
background-image: url("./public/darkSymbol.svg");
background-repeat: no-repeat;
- background-position: center;
- background-size: 80% auto;
- opacity: 0.07;
+ background-position: center top;
+ background-size: min(78vw, 980px) auto;
+ opacity: 0.105;
pointer-events: none;
}
.light-mode .welcome-container::before {
filter: invert(0.55);
- opacity: 0.06;
- }
-
- .dark-mode .welcome-container::before {
- filter: invert(0.85);
- opacity: 0.08;
+ opacity: 0.055;
}
- .welcome-content {
+ .welcome-shell {
position: relative;
z-index: 1;
- width: 100%;
display: flex;
flex-direction: column;
- align-items: center;
+ gap: 1.55rem;
+ width: min(100%, 1220px);
+ margin: 0 auto;
}
- /* Welcome container styles */
- .welcome-logo-container {
- display: flex;
- justify-content: center;
- align-items: center;
+ .welcome-hero h1 {
+ margin: 0;
+ color: var(--color-text);
+ font-size: clamp(2rem, 3.4vw, 2.75rem);
+ font-weight: 440;
+ letter-spacing: 0;
+ line-height: 1.08;
}
- .welcome-logo {
- width: 7rem;
- height: 7rem;
+ .welcome-hero p {
+ margin: 0.5rem 0 0;
+ color: color-mix(in srgb, var(--color-text) 66%, transparent);
+ font-size: clamp(1.08rem, 1.8vw, 1.35rem);
+ line-height: 1.35;
}
- /* Themes adjustments for logo */
- .light-mode .welcome-logo {
- filter: invert(0.5);
+ .welcome-composer {
+ width: 100%;
}
- .dark-mode .welcome-logo {
- filter: invert(0.8);
+ .welcome-composer > x-component,
+ .welcome-composer > x-component > div[x-data],
+ .welcome-composer > x-component > div[x-data] > template + div {
+ display: contents;
}
- .welcome-title {
- font-size: 2rem;
- font-weight: 400;
- margin: var(--spacing-xs) 0 0 0;
- color: var(--color-text);
+ .welcome-composer .input-row {
+ min-height: 4.9rem;
+ padding: 0.58rem 0.7rem 0.58rem 0.86rem;
+ border-radius: 16px;
+ background: color-mix(in srgb, var(--color-panel) 64%, var(--color-background) 36%);
}
- .welcome-action-title {
+ .welcome-composer #chat-input {
+ min-height: 3.2rem;
+ font-size: 1.03rem;
+ }
+
+ .welcome-composer #expand-button {
+ display: none;
+ }
+
+ .welcome-composer .chat-more-panel {
+ top: calc(100% + 0.55rem);
+ bottom: auto;
+ margin-top: 0;
margin-bottom: 0;
}
- .welcome-subtitle {
- font-size: 1rem;
- margin-bottom: 2rem;
- color: var(--color-secondary);
- max-width: 600px;
- line-height: 1.5;
+ .welcome-alerts {
+ display: grid;
+ gap: 0.7rem;
}
- .welcome-actions {
+ .welcome-banners {
display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 1rem;
- max-width: 640px;
- width: 100%;
- margin: 1.5rem 0;
+ gap: 0.75rem;
}
- .welcome-actions-footer {
- max-width: 640px;
- width: 100%;
+ .welcome-banner,
+ .welcome-action-card,
+ .welcome-panel-card,
+ .welcome-system-card {
+ border: 1px solid color-mix(in srgb, var(--color-border) 66%, transparent);
+ background: color-mix(in srgb, var(--color-panel) 78%, var(--color-background) 22%);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.026);
+ backdrop-filter: blur(18px);
+ }
+
+ .welcome-banner {
+ position: relative;
display: flex;
- justify-content: flex-start;
- gap: 0.5rem;
- margin-top: -0.75rem;
+ align-items: flex-start;
+ gap: 0.78rem;
+ padding: 0.9rem 1rem;
+ border-radius: 12px;
+ text-align: left;
}
- .welcome-refresh-button {
- width: 38px;
- height: 38px;
+ .welcome-banner.banner-info {
+ border-left: 4px solid #2f6bff;
+ }
+
+ .welcome-banner.banner-warning {
+ border-left: 4px solid #f59e0b;
+ }
+
+ .welcome-banner.banner-error {
+ border-left: 4px solid #ef4444;
+ }
+
+ .welcome-banner-icon {
display: flex;
+ width: 1.6rem;
+ height: 1.6rem;
align-items: center;
justify-content: center;
- background: transparent;
- border: 1px solid var(--color-border);
- border-radius: 10px;
- color: var(--color-secondary);
- cursor: pointer;
- transition: all 0.2s ease;
+ color: #2f6bff;
}
- .welcome-refresh-button:hover {
- border-color: var(--color-primary);
- background: var(--color-message-bg);
- color: var(--color-text);
+ .banner-warning .welcome-banner-icon {
+ color: #f59e0b;
}
- .welcome-refresh-button:disabled {
- opacity: 0.6;
- cursor: default;
+ .banner-error .welcome-banner-icon {
+ color: #ef4444;
}
- .welcome-refresh-button .material-symbols-outlined {
+ .welcome-banner-icon .material-symbols-outlined {
font-size: 1.25rem;
}
- .welcome-spin {
- animation: welcome-spin 0.9s linear infinite;
- }
-
- @keyframes welcome-spin {
- from { transform: rotate(0deg); }
- to { transform: rotate(360deg); }
+ .welcome-banner-content {
+ flex: 1;
+ min-width: 0;
}
- .welcome-action-card {
- background: var(--color-panel);
- border: 1px solid var(--color-border);
- border-radius: 12px;
- padding: 0.6rem;
- transition: all 0.3s ease;
- cursor: pointer;
- text-decoration: none;
- color: inherit;
- display: flex;
- flex-direction: column;
- align-items: center;
- text-align: center;
- justify-content: center;
- aspect-ratio: 1 / 1;
+ .welcome-banner-title {
+ margin-bottom: 0.25rem;
+ color: var(--color-text);
+ font-size: 0.92rem;
+ font-weight: 650;
+ line-height: 1.25;
}
- .welcome-action-card:hover {
- border-color: var(--color-primary);
- background: var(--color-message-bg);
+ .welcome-banner-html {
+ color: color-mix(in srgb, var(--color-text) 68%, transparent);
+ font-size: 0.84rem;
+ line-height: 1.45;
}
- .welcome-action-icon {
- font-size: 2.1rem;
- margin-bottom: 0.25rem;
- color: var(--color-highlight-dark);
+ .welcome-banner-html a {
+ color: #5f83ff;
+ text-decoration: none;
}
- .welcome-action-title {
- font-size: 0.9rem;
+ .welcome-banner-html a:hover {
+ text-decoration: underline;
}
- /* Banner Styles */
- .welcome-banners {
- display: flex;
- flex-direction: column;
- gap: 0.75rem;
- max-width: 680px;
- width: 100%;
- margin-top: 1.5rem;
+ .welcome-banner-dismiss,
+ .welcome-undismiss-button {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: 0.4rem;
+ border: 0;
+ background: transparent;
+ color: color-mix(in srgb, var(--color-text) 64%, transparent);
+ cursor: pointer;
+ font-family: var(--font-family-main, "Rubik", Arial, Helvetica, sans-serif);
}
- .welcome-banner {
- display: flex;
- align-items: flex-start;
- gap: 12px;
- padding: 14px 16px;
- background: var(--color-panel);
- border: 1px solid var(--color-border);
+ .welcome-banner-dismiss {
+ width: 2rem;
+ height: 2rem;
border-radius: 8px;
- text-align: left;
- position: relative;
- transition: all 0.2s ease;
}
- .welcome-banner:hover {
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+ .welcome-banner-dismiss:hover,
+ .welcome-undismiss-button:hover {
+ color: var(--color-text);
+ background: color-mix(in srgb, var(--color-border) 45%, transparent);
}
- /* Banner Type Styles */
- .welcome-banner.banner-info {
- border-left: 4px solid #2196F3;
+ .welcome-undismiss-button {
+ justify-self: start;
+ border-radius: 9px;
+ padding: 0.45rem 0.55rem;
+ font-size: 0.82rem;
}
- .welcome-banner.banner-warning {
- border-left: 4px solid #FF9800;
+ .welcome-quick-section {
+ display: grid;
+ gap: 0.82rem;
}
- .welcome-banner.banner-error {
- border-left: 4px solid #F44336;
+ .welcome-quick-section h2,
+ .welcome-panel-header h2 {
+ margin: 0;
+ color: var(--color-text);
+ font-size: 1.05rem;
+ font-weight: 520;
+ line-height: 1.2;
}
- /* Banner Icon */
- .welcome-banner-icon {
- flex-shrink: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 24px;
- height: 24px;
- margin-top: 2px;
+ .welcome-actions {
+ display: grid;
+ grid-template-columns: repeat(4, minmax(0, 1fr));
+ gap: 1rem;
+ width: 100%;
}
- .welcome-banner-icon .material-symbols-outlined {
- font-size: 1.25rem;
+ .welcome-action-card {
+ display: grid;
+ grid-template-columns: auto minmax(0, 1fr) auto;
+ align-items: center;
+ gap: 1rem;
+ min-height: 6.1rem;
+ border-radius: 8px;
+ padding: 1.05rem 1rem;
+ color: inherit;
+ cursor: pointer;
+ font-family: var(--font-family-main, "Rubik", Arial, Helvetica, sans-serif);
+ text-align: left;
+ transition:
+ border-color 0.18s ease,
+ background-color 0.18s ease,
+ box-shadow 0.18s ease,
+ transform 0.18s ease;
}
- .banner-info .welcome-banner-icon {
- color: #2196F3;
+ .welcome-action-card.is-wide {
+ grid-column: span 2;
}
- .banner-warning .welcome-banner-icon {
- color: #FF9800;
+ .welcome-action-card:hover,
+ .welcome-action-card:focus-visible {
+ border-color: color-mix(in srgb, var(--color-border) 88%, var(--color-text) 12%);
+ background: color-mix(in srgb, var(--color-panel) 86%, var(--color-background) 14%);
+ box-shadow:
+ inset 0 1px 0 rgba(255, 255, 255, 0.036),
+ 0 16px 34px rgba(0, 0, 0, 0.18);
+ outline: none;
+ transform: translateY(-1px);
}
- .banner-error .welcome-banner-icon {
- color: #F44336;
+ .welcome-action-icon {
+ color: #2f6bff;
+ font-size: 2.35rem;
+ line-height: 1;
}
- /* Banner Content */
- .welcome-banner-content {
- flex: 1;
+ .welcome-action-copy {
+ display: grid;
min-width: 0;
+ gap: 0.28rem;
}
- .welcome-banner-title {
- font-weight: 600;
- font-size: 0.9rem;
+ .welcome-action-title {
color: var(--color-text);
- margin-bottom: 4px;
- line-height: 1.3;
+ font-size: 1rem;
+ font-weight: 520;
+ line-height: 1.25;
}
- .welcome-banner-html {
- font-size: 0.85rem;
- color: var(--color-secondary);
- line-height: 1.5;
+ .welcome-action-description {
+ color: color-mix(in srgb, var(--color-text) 58%, transparent);
+ font-size: 0.92rem;
+ line-height: 1.42;
}
- .welcome-banner-html a {
- color: var(--color-primary);
- text-decoration: underline;
- cursor: pointer;
+ .welcome-action-arrow {
+ color: var(--color-text);
+ font-size: 1.35rem;
+ opacity: 0.8;
}
- .welcome-banner-html a:hover {
- color: var(--color-highlight-dark);
+ .welcome-lower-grid {
+ display: grid;
+ grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
+ gap: 1rem;
+ align-items: stretch;
}
- .welcome-banner-html strong {
- color: var(--color-text);
- font-weight: 600;
+ .welcome-lower-grid .discovery-slot {
+ grid-column: auto;
+ min-width: 0;
+ width: 100%;
}
- /* Banner Dismiss Button */
- .welcome-banner-dismiss {
- flex-shrink: 0;
- background: transparent;
- border: none;
- border-radius: 4px;
- color: var(--color-secondary);
- cursor: pointer;
- padding: 4px;
+ .welcome-system-card {
+ min-width: 0;
+ border-radius: 8px;
+ padding: 1.6rem 1.7rem;
+ text-align: left;
+ }
+
+ .welcome-panel-header {
display: flex;
align-items: center;
- justify-content: center;
- transition: all 0.2s ease;
- opacity: 0.6;
+ justify-content: space-between;
+ gap: 1rem;
+ margin-bottom: 1.5rem;
}
- .welcome-banner-dismiss:hover {
- background: var(--color-border);
+ .welcome-panel-header .material-symbols-outlined {
color: var(--color-text);
- opacity: 1;
+ font-size: 1.35rem;
+ opacity: 0.86;
}
- .welcome-banner-dismiss .material-symbols-outlined {
- font-size: 1.1rem;
+ .system-resource-body {
+ display: grid;
+ gap: 1.22rem;
}
- /* Light mode adjustments */
- .light-mode .welcome-title {
- color: #2d2d2d;
+ .system-resource-meter {
+ display: grid;
+ grid-template-columns: 8.2rem minmax(0, 1fr);
+ gap: 1rem;
+ align-items: center;
}
- .light-mode .welcome-subtitle {
- color: #666;
+ .system-resource-label {
+ display: grid;
+ gap: 0.38rem;
+ min-width: 0;
}
- .light-mode .welcome-action-title {
- color: #2d2d2d;
+ .system-resource-name,
+ .system-resource-detail-title {
+ color: color-mix(in srgb, var(--color-text) 58%, transparent);
+ font-size: 0.82rem;
+ font-weight: 430;
+ letter-spacing: 0.02em;
}
- .light-mode .welcome-action-description {
- color: #666;
+ .system-resource-value,
+ .system-resource-detail-value {
+ color: color-mix(in srgb, var(--color-text) 76%, transparent);
+ font-size: 0.96rem;
+ font-variant-numeric: tabular-nums;
+ line-height: 1.2;
+ white-space: nowrap;
}
- .light-mode .welcome-footer {
- color: #666;
+ .system-resource-track {
+ height: 0.64rem;
+ overflow: hidden;
+ border-radius: 999px;
+ background: color-mix(in srgb, var(--color-border) 70%, transparent);
}
- .light-mode .welcome-banner {
- background: var(--color-panel);
+ .system-resource-fill {
+ display: block;
+ width: var(--resource-value, 0%);
+ height: 100%;
+ border-radius: inherit;
+ background: var(--resource-color, #22c55e);
+ transition: width 0.22s ease;
}
- .light-mode .welcome-banner-title {
- color: var(--color-text);
+ .system-resource-footer {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 1rem 1.5rem;
+ margin-top: 0.15rem;
+ padding-top: 1.02rem;
+ border-top: 1px solid color-mix(in srgb, var(--color-border) 55%, transparent);
}
- .light-mode .welcome-banner-html {
- color: var(--color-primary);
+ .system-resource-detail-value {
+ margin-top: 0.48rem;
+ font-family: var(--font-family-code, "Roboto Mono", monospace);
+ font-size: 0.88rem;
}
- /* Responsive design */
- @media (max-width: 768px) {
+ @media (max-width: 1180px) {
.welcome-container {
- padding: 1rem;
- padding-top: 3rem;
+ padding-inline: clamp(1.25rem, 4vw, 3rem);
}
- .welcome-logo {
- width: 5rem;
- height: 5rem;
+ .welcome-actions {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
}
- .welcome-logo-container {
- margin-top: 2rem;
+ .welcome-lower-grid {
+ grid-template-columns: 1fr;
}
+ }
- .welcome-title {
- font-size: 1.5rem;
- margin: 0 !important;
+ @media (max-width: 720px) {
+ .welcome-container {
+ min-height: 100%;
+ padding: 4.5rem 1rem 2rem;
}
- .welcome-subtitle {
- font-size: 1rem;
- margin-top: var(--spacing-xs);
- margin-bottom: 0;
+ .welcome-shell {
+ gap: 1.2rem;
}
.welcome-actions {
- grid-template-columns: repeat(4, 1fr);
+ grid-template-columns: 1fr;
gap: 0.75rem;
- margin-bottom: 1.5rem;
}
- .welcome-action-card {
- aspect-ratio: 1 / 1;
- padding: 0.5rem;
+ .welcome-action-card,
+ .welcome-action-card.is-wide {
+ grid-column: auto;
+ min-height: 5.25rem;
+ padding: 0.85rem;
}
.welcome-action-icon {
- font-size: 1.6rem;
- }
-
- .welcome-action-title {
- font-size: 0.85rem;
+ font-size: 2rem;
}
- .welcome-banners {
- max-width: 100%;
+ .welcome-composer .input-row {
+ min-height: 4.35rem;
}
- .welcome-banner {
- padding: 12px 14px;
+ .welcome-system-card {
+ padding: 1.15rem;
}
- .welcome-banner-title {
- font-size: 0.85rem;
- }
-
- .welcome-banner-html {
- font-size: 0.8rem;
- }
- }
-
- @media (max-width: 520px) {
- .welcome-actions {
+ .system-resource-meter {
grid-template-columns: 1fr;
- gap: 0.5rem;
+ gap: 0.55rem;
}
- .welcome-action-card {
- aspect-ratio: auto;
- padding: 0.5rem 0.75rem;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- text-align: left;
- border-radius: 10px;
- min-height: 44px;
- }
-
- .welcome-action-icon {
- margin-bottom: 0;
- margin-right: 0.5rem;
- font-size: 1.35rem;
- line-height: 1;
- display: flex;
- align-items: center;
- }
-
- .welcome-action-title {
- font-size: 0.95rem;
- margin: 0;
- line-height: 1.2;
+ .system-resource-footer {
+ grid-template-columns: 1fr;
}
}
</style>
diff --git a/webui/components/welcome/welcome-store.js b/webui/components/welcome/welcome-store.js
index 13fc5d730..521b94dbf 100644
--- a/webui/components/welcome/welcome-store.js
+++ b/webui/components/welcome/welcome-store.js
@@ -1,5 +1,4 @@
import { createStore } from "/js/AlpineStore.js";
-import { getContext } from "/index.js";
import { store as chatsStore } from "/components/sidebar/chats/chats-store.js";
import { store as memoryStore } from "/plugins/_memory/webui/memory-dashboard-store.js";
import { store as projectsStore } from "/components/projects/projects-store.js";
@@ -143,10 +142,15 @@ const model = {
get sortedBanners() {
return [...this.banners]
+ .filter((b) => b.id !== "system-resources")
.filter((b) => b.type !== "hero" && b.type !== "feature")
.sort((a, b) => (b.priority || 0) - (a.priority || 0));
},
+ get systemResourceBanner() {
+ return this.banners.find((b) => b.id === "system-resources") || null;
+ },
+
/**
* Dismiss a banner by ID.
*
diff --git a/webui/index.html b/webui/index.html
index 5a7889211..d7a2ee70c 100644
--- a/webui/index.html
+++ b/webui/index.html
@@ -96,8 +96,12 @@
<x-component path="chat/top-section/chat-top.html"></x-component>
<!-- Welcome Screen Component -->
- <div x-data x-show="$store.welcomeStore && $store.welcomeStore.isVisible">
- <x-component path="welcome/welcome-screen.html"></x-component>
+ <div x-data>
+ <template x-if="$store.welcomeStore && $store.welcomeStore.isVisible">
+ <div class="welcome-host">
+ <x-component path="welcome/welcome-screen.html"></x-component>
+ </div>
+ </template>
</div>
<!-- Message History (actual messages) -->
<div id="chat-area-wrapper" x-data x-show="!$store.welcomeStore || !$store.welcomeStore.isVisible">
@@ -135,11 +139,15 @@
<button class="toast__close">Close</button>
</div>
<!-- Chat Input Area -->
- <div x-show="!$store.welcomeStore || !$store.welcomeStore.isVisible">
- <!-- Progress Bar -->
- <x-component path="chat/input/progress.html"></x-component>
- <!-- Input Section -->
- <x-component path="chat/input/chat-bar.html"></x-component>
+ <div x-data>
+ <template x-if="!$store.welcomeStore || !$store.welcomeStore.isVisible">
+ <div>
+ <!-- Progress Bar -->
+ <x-component path="chat/input/progress.html"></x-component>
+ <!-- Input Section -->
+ <x-component path="chat/input/chat-bar.html"></x-component>
+ </div>
+ </template>
</div>
</div>
<x-component path="canvas/right-canvas.html"></x-component>
diff --git a/webui/index.js b/webui/index.js
index 9320ad064..de5b64bc3 100644
--- a/webui/index.js
+++ b/webui/index.js
@@ -14,6 +14,7 @@ import { store as chatTopStore } from "/components/chat/top-section/chat-top-sto
import { store as _tooltipsStore } from "/components/tooltips/tooltip-store.js";
import { store as messageQueueStore } from "/components/chat/message-queue/message-queue-store.js";
import { store as syncStore } from "/components/sync/sync-store.js"
+import { store as welcomeStore } from "/components/welcome/welcome-store.js";
import { getUserHour12, getUserTimezone } from "/js/time-utils.js";
globalThis.fetchApi = api.fetchApi; // TODO - backward compatibility for non-modular scripts, remove once refactored to alpine
@@ -58,7 +59,7 @@ export async function sendMessage() {
if (message || hasAttachments) {
// Check if agent is busy - queue instead of sending
- if (chatsStore.selectedContext.running || messageQueueStore.hasQueue) {
+ if (chatsStore.selectedContext?.running || messageQueueStore.hasQueue) {
const success = messageQueueStore.addToQueue(message, attachmentsWithUrls);
// no await for the queue
// if (success) {
@@ -231,12 +232,7 @@ globalThis.loadKnowledge = async function () {
};
function adjustTextareaHeight() {
- const chatInputEl = document.getElementById("chat-input");
- if (chatInputEl) {
- if (!inputStore.message) chatInputEl.value = "";
- chatInputEl.style.height = "auto";
- chatInputEl.style.height = chatInputEl.scrollHeight + "px";
- }
+ inputStore.adjustTextareaHeight();
}
export const sendJsonData = async function (url, data) {
@@ -593,7 +589,7 @@ export const deselectChat = function () {
sessionStorage.removeItem("lastSelectedTask");
// Clear the chat history
- chatHistory.innerHTML = "";
+ if (chatHistory) chatHistory.innerHTML = "";
};
globalThis.deselectChat = deselectChat;