mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-17 04:50:51 +00:00
* feat(ui): add chat infrastructure modules (slice 1 of dashboard-v2) New self-contained chat modules extracted from dashboard-v2-structure: - chat/slash-commands.ts: slash command definitions and completions - chat/slash-command-executor.ts: execute slash commands via gateway RPC - chat/slash-command-executor.node.test.ts: test coverage - chat/speech.ts: speech-to-text (STT) support - chat/input-history.ts: per-session input history navigation - chat/pinned-messages.ts: pinned message management - chat/deleted-messages.ts: deleted message tracking - chat/export.ts: shared exportChatMarkdown helper - chat-export.ts: re-export shim for backwards compat Gateway fix: - Restore usage/cost stripping in chat.history sanitization - Add test coverage for sanitization behavior These modules are additive and tree-shaken — no existing code imports them yet. They will be wired in subsequent slices. * feat(ui): add utilities, theming, and i18n updates (slice 2 of dashboard-v2) UI utilities and theming improvements extracted from dashboard-v2-structure: Icons & formatting: - icons.ts: expanded icon set for new dashboard views - format.ts: date/number formatting helpers - tool-labels.ts: human-readable tool name mappings Theming: - theme.ts: enhanced theme resolution and system theme support - theme-transition.ts: simplified transition logic - storage.ts: theme parsing improvements for settings persistence Navigation & types: - navigation.ts: extended tab definitions for dashboard-v2 - app-view-state.ts: expanded view state management - types.ts: new type definitions (HealthSummary, ModelCatalogEntry, etc.) Components: - components/dashboard-header.ts: reusable header component i18n: - Updated en, pt-BR, zh-CN, zh-TW locales with new dashboard strings All changes are additive or backwards-compatible. Build passes. Part of #36853. * feat(ui): dashboard-v2 views refactor (slice 3 of dashboard-v2) Complete views refactor from dashboard-v2-structure, building on slice 1 (chat infra, #41497) and slice 2 (utilities/theming, #41500). Core app wiring: - app.ts: updated host component with new state properties - app-render.ts: refactored render pipeline for new dashboard layout - app-render.helpers.ts: extracted render helpers - app-settings.ts: theme listener lifecycle fix, cron runs on tab load - app-gateway.ts: refactored chat event handling - app-chat.ts: slash command integration New views: - views/command-palette.ts: command palette (Cmd+K) - views/login-gate.ts: authentication gate - views/bottom-tabs.ts: mobile tab navigation - views/overview-*.ts: modular overview dashboard (cards, attention, event log, hints, log tail, quick actions) - views/agents-panels-overview.ts: agent overview panel Refactored views: - views/chat.ts: major refactor with STT, slash commands, search, export, pinned messages, input history - views/config.ts: restructured config management - views/agents.ts: streamlined agent management - views/overview.ts: modular composition from sub-views - views/sessions.ts: enhanced session management Controllers: - controllers/health.ts: new health check controller - controllers/models.ts: new model catalog controller - controllers/agents.ts: tools catalog improvements - controllers/config.ts: config form enhancements Tests & infrastructure: - Updated test helpers, browser tests, node tests - vite.config.ts: build configuration updates - markdown.ts: rendering improvements Build passes ✅ | 44 files | +6,626/-1,499 Part of #36853. Depends on #41497 and #41500. * UI: fix chat review follow-ups * fix(ui): repair chat clear and attachment regressions * fix(ui): address remaining chat review comments * fix(ui): address review follow-ups * fix(ui): replay queued local slash commands * fix(ui): repair control-ui type drift * fix(ui): restore control UI styling * feat(ui): enhance layout and styling for config and topbar components - Updated grid layout for the config layout to allow full-width usage. - Introduced new styles for top tabs and search components to improve usability. - Added theme mode toggle styling for better visual integration. - Implemented tests for layout and theme mode components to ensure proper rendering and functionality. * feat(ui): add config file opening functionality and enhance styles - Implemented a new handler to open the configuration file using the default application based on the operating system. - Updated various CSS styles across components for improved visual consistency and usability, including adjustments to padding, margins, and font sizes. - Introduced new styles for the data table and sidebar components to enhance layout and interaction. - Added tests for the collapsed navigation rail to ensure proper functionality in different states. * refactor(ui): update CSS styles for improved layout and consistency - Simplified font-body declaration in base.css for cleaner code. - Adjusted transition properties in components.css for better readability. - Added new .workspace-link class in components.css for enhanced link styling. - Changed config layout from grid to flex in config.css for better responsiveness. - Updated related tests to reflect layout changes in config-layout.browser.test.ts. * feat(ui): enhance theme handling and loading states in chat interface - Updated CSS to support new theme mode attributes for better styling consistency across light and dark themes. - Introduced loading skeletons in the chat view to improve user experience during data fetching. - Refactored command palette to manage focus more effectively, enhancing accessibility. - Added tests for the appearance theme picker and loading states to ensure proper rendering and functionality. * refactor(ui): streamline ephemeral state management in chat and config views - Introduced interfaces for ephemeral state in chat and config views to encapsulate related variables. - Refactored state management to utilize a single object for better organization and maintainability. - Removed legacy state variables and updated related functions to reference the new state structure. - Enhanced readability and consistency across the codebase by standardizing state handling. * chore: remove test files to reduce PR scope * fix(ui): resolve type errors in debug props and chat search * refactor(ui): remove stream mode functionality across various components - Eliminated stream mode related translations and CSS styles to streamline the user interface. - Updated multiple components to remove references to stream mode, enhancing code clarity and maintainability. - Adjusted rendering logic in views to ensure consistent behavior without stream mode. - Improved overall readability by cleaning up unused variables and props. * fix(ui): add msg-meta CSS and fix rebase type errors * fix(ui): add CSS for chat footer action buttons (TTS, delete) and msg-meta * feat(ui): add delete confirmation with remember-decision checkbox * fix(ui): delete confirmation with remember, attention icon sizing * fix(ui): open delete confirm popover to the left (not clipped) * fix(ui): show all nav items in collapsed sidebar, remove gap * fix(ui): address P1/P2 review feedback — session queue clear, kill scope, palette guard, stop button * fix(ui): address Greptile re-review — kill scope, queue flush, idle handling, parallel fetch - SECURITY: /kill <target> now enforces session tree scope (not just /kill all) - /kill reports idle sessions gracefully instead of throwing - Queue continues draining after local slash commands - /model fetches sessions.list + models.list in parallel (perf fix) * fix(ui): style update banner close button — SVG stroke + sizing * fix(ui): update layout styles for sidebar and content spacing * UI: restore colon slash command parsing * UI: restore slash command session queries * Refactor thinking resolution: Introduce resolveThinkingDefaultForModel function and update model-selection to utilize it. Add tests for new functionality in thinking.test.ts. * fix(ui): constrain welcome state logo size, add missing CSS for new session view --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
464 lines
9.8 KiB
CSS
464 lines
9.8 KiB
CSS
:root {
|
|
/* Background - Deep, rich dark with layered depth */
|
|
--bg: #0e1015;
|
|
--bg-accent: #13151b;
|
|
--bg-elevated: #191c24;
|
|
--bg-hover: #1f2330;
|
|
--bg-muted: #1f2330;
|
|
|
|
/* Card / Surface - Clear hierarchy between levels */
|
|
--card: #161920;
|
|
--card-foreground: #f0f0f2;
|
|
--card-highlight: rgba(255, 255, 255, 0.04);
|
|
--popover: #191c24;
|
|
--popover-foreground: #f0f0f2;
|
|
|
|
/* Panel */
|
|
--panel: #0e1015;
|
|
--panel-strong: #191c24;
|
|
--panel-hover: #1f2330;
|
|
--chrome: rgba(14, 16, 21, 0.96);
|
|
--chrome-strong: rgba(14, 16, 21, 0.98);
|
|
|
|
/* Text - Clean contrast */
|
|
--text: #d4d4d8;
|
|
--text-strong: #f4f4f5;
|
|
--chat-text: #d4d4d8;
|
|
--muted: #636370;
|
|
--muted-strong: #4e4e5a;
|
|
--muted-foreground: #636370;
|
|
|
|
/* Border - Whisper-thin, barely there */
|
|
--border: #1e2028;
|
|
--border-strong: #2e3040;
|
|
--border-hover: #3e4050;
|
|
--input: #1e2028;
|
|
--ring: #ff5c5c;
|
|
|
|
/* Accent - Punchy signature red */
|
|
--accent: #ff5c5c;
|
|
--accent-hover: #ff7070;
|
|
--accent-muted: #ff5c5c;
|
|
--accent-subtle: rgba(255, 92, 92, 0.1);
|
|
--accent-foreground: #fafafa;
|
|
--accent-glow: rgba(255, 92, 92, 0.2);
|
|
--primary: #ff5c5c;
|
|
--primary-foreground: #ffffff;
|
|
|
|
/* Secondary */
|
|
--secondary: #161920;
|
|
--secondary-foreground: #f0f0f2;
|
|
--accent-2: #14b8a6;
|
|
--accent-2-muted: rgba(20, 184, 166, 0.7);
|
|
--accent-2-subtle: rgba(20, 184, 166, 0.1);
|
|
|
|
/* Semantic */
|
|
--ok: #22c55e;
|
|
--ok-muted: rgba(34, 197, 94, 0.75);
|
|
--ok-subtle: rgba(34, 197, 94, 0.08);
|
|
--destructive: #ef4444;
|
|
--destructive-foreground: #fafafa;
|
|
--warn: #f59e0b;
|
|
--warn-muted: rgba(245, 158, 11, 0.75);
|
|
--warn-subtle: rgba(245, 158, 11, 0.08);
|
|
--danger: #ef4444;
|
|
--danger-muted: rgba(239, 68, 68, 0.75);
|
|
--danger-subtle: rgba(239, 68, 68, 0.08);
|
|
--info: #3b82f6;
|
|
|
|
/* Focus */
|
|
--focus: rgba(255, 92, 92, 0.2);
|
|
--focus-ring: 0 0 0 2px var(--bg), 0 0 0 3px color-mix(in srgb, var(--ring) 60%, transparent);
|
|
--focus-glow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ring), 0 0 16px var(--accent-glow);
|
|
|
|
/* Grid */
|
|
--grid-line: rgba(255, 255, 255, 0.03);
|
|
|
|
/* Theme transition */
|
|
--theme-switch-x: 50%;
|
|
--theme-switch-y: 50%;
|
|
|
|
/* Typography */
|
|
--mono:
|
|
"JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
|
|
--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
--font-display: var(--font-body);
|
|
|
|
/* Shadows - Subtle, layered depth */
|
|
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
|
|
--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
|
|
--shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);
|
|
--shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5);
|
|
--shadow-glow: 0 0 24px var(--accent-glow);
|
|
|
|
/* Radii - Slightly larger for modern feel */
|
|
--radius-sm: 6px;
|
|
--radius-md: 10px;
|
|
--radius-lg: 14px;
|
|
--radius-xl: 20px;
|
|
--radius-full: 9999px;
|
|
--radius: 10px;
|
|
|
|
/* Transitions - Crisp and responsive */
|
|
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
|
|
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
--duration-fast: 100ms;
|
|
--duration-normal: 180ms;
|
|
--duration-slow: 300ms;
|
|
|
|
color-scheme: dark;
|
|
}
|
|
|
|
/* Light theme tokens apply to every light-mode family. */
|
|
:root[data-theme-mode="light"] {
|
|
--bg: #f8f9fa;
|
|
--bg-accent: #f1f3f5;
|
|
--bg-elevated: #ffffff;
|
|
--bg-hover: #eceef0;
|
|
--bg-muted: #eceef0;
|
|
--bg-content: #f1f3f5;
|
|
|
|
--card: #ffffff;
|
|
--card-foreground: #1a1a1e;
|
|
--card-highlight: rgba(0, 0, 0, 0.02);
|
|
--popover: #ffffff;
|
|
--popover-foreground: #1a1a1e;
|
|
|
|
--panel: #f8f9fa;
|
|
--panel-strong: #f1f3f5;
|
|
--panel-hover: #e6e8eb;
|
|
--chrome: rgba(248, 249, 250, 0.96);
|
|
--chrome-strong: rgba(248, 249, 250, 0.98);
|
|
|
|
--text: #3c3c43;
|
|
--text-strong: #1a1a1e;
|
|
--chat-text: #3c3c43;
|
|
--muted: #8e8e93;
|
|
--muted-strong: #636366;
|
|
--muted-foreground: #8e8e93;
|
|
|
|
--border: #e5e5ea;
|
|
--border-strong: #d1d1d6;
|
|
--border-hover: #aeaeb2;
|
|
--input: #e5e5ea;
|
|
|
|
--accent: #dc2626;
|
|
--accent-hover: #ef4444;
|
|
--accent-muted: #dc2626;
|
|
--accent-subtle: rgba(220, 38, 38, 0.08);
|
|
--accent-foreground: #ffffff;
|
|
--accent-glow: rgba(220, 38, 38, 0.1);
|
|
--primary: #dc2626;
|
|
--primary-foreground: #ffffff;
|
|
|
|
--secondary: #f1f3f5;
|
|
--secondary-foreground: #3c3c43;
|
|
--accent-2: #0d9488;
|
|
--accent-2-muted: rgba(13, 148, 136, 0.75);
|
|
--accent-2-subtle: rgba(13, 148, 136, 0.08);
|
|
|
|
--ok: #16a34a;
|
|
--ok-muted: rgba(22, 163, 74, 0.75);
|
|
--ok-subtle: rgba(22, 163, 74, 0.08);
|
|
--destructive: #dc2626;
|
|
--destructive-foreground: #fafafa;
|
|
--warn: #d97706;
|
|
--warn-muted: rgba(217, 119, 6, 0.75);
|
|
--warn-subtle: rgba(217, 119, 6, 0.08);
|
|
--danger: #dc2626;
|
|
--danger-muted: rgba(220, 38, 38, 0.75);
|
|
--danger-subtle: rgba(220, 38, 38, 0.08);
|
|
--info: #2563eb;
|
|
|
|
--focus: rgba(220, 38, 38, 0.15);
|
|
--focus-ring: 0 0 0 2px var(--bg), 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
|
|
--focus-glow: 0 0 0 2px var(--bg), 0 0 0 3px var(--ring), 0 0 12px var(--accent-glow);
|
|
|
|
--grid-line: rgba(0, 0, 0, 0.04);
|
|
|
|
/* Light shadows - Subtle, clean */
|
|
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
|
|
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
|
|
--shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08);
|
|
--shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.1);
|
|
--shadow-glow: 0 0 20px var(--accent-glow);
|
|
|
|
color-scheme: light;
|
|
}
|
|
|
|
/* Theme families override accent tokens while keeping shared surfaces/layout. */
|
|
:root[data-theme="openknot"] {
|
|
--ring: #14b8a6;
|
|
--accent: #14b8a6;
|
|
--accent-hover: #2dd4bf;
|
|
--accent-muted: #14b8a6;
|
|
--accent-subtle: rgba(20, 184, 166, 0.12);
|
|
--accent-glow: rgba(20, 184, 166, 0.22);
|
|
--primary: #14b8a6;
|
|
}
|
|
|
|
:root[data-theme="openknot-light"] {
|
|
--ring: #0d9488;
|
|
--accent: #0d9488;
|
|
--accent-hover: #0f766e;
|
|
--accent-muted: #0d9488;
|
|
--accent-subtle: rgba(13, 148, 136, 0.1);
|
|
--accent-glow: rgba(13, 148, 136, 0.14);
|
|
--primary: #0d9488;
|
|
}
|
|
|
|
:root[data-theme="dash"] {
|
|
--ring: #3b82f6;
|
|
--accent: #3b82f6;
|
|
--accent-hover: #60a5fa;
|
|
--accent-muted: #3b82f6;
|
|
--accent-subtle: rgba(59, 130, 246, 0.14);
|
|
--accent-glow: rgba(59, 130, 246, 0.22);
|
|
--primary: #3b82f6;
|
|
}
|
|
|
|
:root[data-theme="dash-light"] {
|
|
--ring: #2563eb;
|
|
--accent: #2563eb;
|
|
--accent-hover: #1d4ed8;
|
|
--accent-muted: #2563eb;
|
|
--accent-subtle: rgba(37, 99, 235, 0.1);
|
|
--accent-glow: rgba(37, 99, 235, 0.14);
|
|
--primary: #2563eb;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font: 400 13.5px/1.55 var(--font-body);
|
|
letter-spacing: -0.01em;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
/* Theme transition */
|
|
@keyframes theme-circle-transition {
|
|
0% {
|
|
clip-path: circle(0% at var(--theme-switch-x, 50%) var(--theme-switch-y, 50%));
|
|
}
|
|
100% {
|
|
clip-path: circle(150% at var(--theme-switch-x, 50%) var(--theme-switch-y, 50%));
|
|
}
|
|
}
|
|
|
|
html.theme-transition {
|
|
view-transition-name: theme;
|
|
}
|
|
|
|
html.theme-transition::view-transition-old(theme) {
|
|
mix-blend-mode: normal;
|
|
animation: none;
|
|
z-index: 1;
|
|
}
|
|
|
|
html.theme-transition::view-transition-new(theme) {
|
|
mix-blend-mode: normal;
|
|
z-index: 2;
|
|
animation: theme-circle-transition 0.4s var(--ease-out) forwards;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
html.theme-transition::view-transition-old(theme),
|
|
html.theme-transition::view-transition-new(theme) {
|
|
animation: none !important;
|
|
}
|
|
}
|
|
|
|
openclaw-app {
|
|
display: block;
|
|
position: relative;
|
|
z-index: 1;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
a {
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
button,
|
|
input,
|
|
textarea,
|
|
select {
|
|
font: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
::selection {
|
|
background: var(--accent-subtle);
|
|
color: var(--text-strong);
|
|
}
|
|
|
|
/* Scrollbar styling - Minimal, barely visible */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border-radius: var(--radius-full);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(255, 255, 255, 0.14);
|
|
}
|
|
|
|
/* Animations - Polished with spring feel */
|
|
@keyframes rise {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(8px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes fade-in {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes scale-in {
|
|
from {
|
|
opacity: 0;
|
|
transform: scale(0.95);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
@keyframes dashboard-enter {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(12px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% {
|
|
background-position: -200% 0;
|
|
}
|
|
100% {
|
|
background-position: 200% 0;
|
|
}
|
|
}
|
|
|
|
/* Skeleton loading primitives */
|
|
.skeleton {
|
|
background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-hover) 50%, var(--bg-muted) 75%);
|
|
background-size: 200% 100%;
|
|
animation: shimmer 1.5s ease-in-out infinite;
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.skeleton-line {
|
|
height: 14px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.skeleton-line--short {
|
|
width: 40%;
|
|
}
|
|
|
|
.skeleton-line--medium {
|
|
width: 65%;
|
|
}
|
|
|
|
.skeleton-line--long {
|
|
width: 85%;
|
|
}
|
|
|
|
.skeleton-stat {
|
|
height: 28px;
|
|
width: 60px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
.skeleton-block {
|
|
height: 48px;
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
@keyframes pulse-subtle {
|
|
0%,
|
|
100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.7;
|
|
}
|
|
}
|
|
|
|
@keyframes glow-pulse {
|
|
0%,
|
|
100% {
|
|
box-shadow: 0 0 0 rgba(255, 92, 92, 0);
|
|
}
|
|
50% {
|
|
box-shadow: 0 0 20px var(--accent-glow);
|
|
}
|
|
}
|
|
|
|
/* Stagger animation delays for grouped elements */
|
|
.stagger-1 {
|
|
animation-delay: 0ms;
|
|
}
|
|
.stagger-2 {
|
|
animation-delay: 50ms;
|
|
}
|
|
.stagger-3 {
|
|
animation-delay: 100ms;
|
|
}
|
|
.stagger-4 {
|
|
animation-delay: 150ms;
|
|
}
|
|
.stagger-5 {
|
|
animation-delay: 200ms;
|
|
}
|
|
.stagger-6 {
|
|
animation-delay: 250ms;
|
|
}
|
|
|
|
/* Focus visible styles */
|
|
:focus-visible {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring);
|
|
}
|