Implement Acro workbench UI refresh

This commit is contained in:
2026-07-20 01:21:49 +08:00
parent 03a5c52b72
commit 0f2cbcb9ee
9 changed files with 874 additions and 125 deletions

View File

@@ -99,13 +99,24 @@
<main class="login-page">
<section class="login-panel" aria-labelledby="login-title">
<div class="login-brand" aria-hidden="true">SA</div>
<div class="login-heading">
<p>Private workbench</p>
<h1 id="login-title">SenlinAI Workbench</h1>
<div class="login-brand-panel">
<div class="login-brand" aria-hidden="true">S</div>
<h1>SenlinAI</h1>
<p>私有部署 · 安全可控的智能协作平台</p>
<small>知识沉淀 · 团队协作 · AI 助理</small>
<nav class="login-links" aria-label="Login resources">
<a href="/" on:click|preventDefault>隐私政策</a>
<a href="/" on:click|preventDefault>服务协议</a>
<a href="/" on:click|preventDefault>关于 SenlinAI</a>
</nav>
</div>
<form class="server-login" aria-label="Server login" on:submit|preventDefault={submitLogin}>
<div class="login-heading">
<p>登录到您的 SenlinAI</p>
<h2 id="login-title">连接私有工作台</h2>
</div>
<label for="server-address">Server IP or domain</label>
<input id="server-address" name="server" bind:value={server} placeholder="http://localhost:8080" />
@@ -130,5 +141,15 @@
<button type="submit">Log in</button>
<p class="login-note">The server address is remembered on this device.</p>
</form>
<aside class="login-value-panel" aria-label="Product values">
<h2>安全 · 专注 · 高效</h2>
<p>SenlinAI 是面向知识工作者与内部团队的私有部署工作台,帮助团队在统一空间中收集信息、整理知识、协同决策。</p>
<ul>
<li><strong>私有部署,数据自有</strong><span>所有数据与模型运行在您的环境中。</span></li>
<li><strong>知识沉淀,结构清晰</strong><span>从收集到整理,形成可复用的团队知识。</span></li>
<li><strong>协同高效,聚焦成果</strong><span>围绕项目与任务协同,减少沟通成本。</span></li>
</ul>
</aside>
</section>
</main>

View File

@@ -16,9 +16,9 @@
title={project.name}
on:click={() => onSelectProject(project.id)}
>
<span>{project.initials}</span>
<span class="project-initials">{project.initials}</span>
{#if project.unreadCount}
<small>{project.unreadCount}</small>
<small class:urgent={project.unreadCount > 20} aria-label={`${project.name} updates ${project.unreadCount}`}>{project.unreadCount}</small>
{/if}
</button>
{/each}

View File

@@ -5,10 +5,12 @@
import ProjectRail from './ProjectRail.svelte';
import ProjectChannelSidebar from './ProjectChannelSidebar.svelte';
import WorkspaceTopbar from './WorkspaceTopbar.svelte';
import WorkspaceStatusBar from './WorkspaceStatusBar.svelte';
import type { InspectorItem, WorkTask } from './types';
export let currentUser: { account: string };
let theme: 'light' | 'dark' = 'light';
let selectedProjectID = workbenchProjects[0].id;
let selectedItem: InspectorItem | null = null;
let tasksByProjectID: Record<number, WorkTask[]> = Object.fromEntries(
@@ -39,10 +41,14 @@
[selectedProjectID]: tasks.map((task) => task.id === taskID ? { ...task, completed: !task.completed } : task),
};
}
function toggleTheme() {
theme = theme === 'light' ? 'dark' : 'light';
}
</script>
<main class="workbench-shell">
<WorkspaceTopbar account={currentUser.account} />
<main class="workbench-shell" aria-label="SenlinAI workbench" data-theme={theme}>
<WorkspaceTopbar {theme} onToggleTheme={toggleTheme} />
<div class="workbench-body">
<ProjectRail projects={workbenchProjects} {selectedProjectID} onSelectProject={selectProject} />
<ProjectChannelSidebar
@@ -58,4 +64,5 @@
</section>
<ObjectInspector item={selectedItem} />
</div>
<WorkspaceStatusBar account={currentUser.account} />
</main>

View File

@@ -9,12 +9,51 @@ describe('ProjectWorkbench', () => {
expect(screen.getByLabelText('Project list')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Project A1' })).toHaveAttribute('aria-pressed', 'true');
expect(screen.getByLabelText('Project A1 updates 36')).toBeInTheDocument();
expect(screen.getByLabelText('Project channels')).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Message Flow 36' })).toBeInTheDocument();
expect(screen.getByLabelText('Global search')).toBeDisabled();
expect(screen.getByLabelText('Global search')).toBeEnabled();
expect(screen.getByRole('button', { name: 'Search workspace' })).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Switch to dark mode' })).toBeInTheDocument();
expect(screen.getByLabelText('Object inspector')).toBeInTheDocument();
});
it('pins user actions and task status to the page bottom bar', () => {
render(ProjectWorkbench, { props: { currentUser: { account: 'david@example.com' } } });
const statusBar = screen.getByLabelText('Workspace status');
expect(within(statusBar).getByText('david@example.com')).toBeInTheDocument();
expect(within(statusBar).getByRole('button', { name: 'Friends' })).toBeInTheDocument();
expect(within(statusBar).getByRole('button', { name: 'Direct messages' })).toBeInTheDocument();
expect(within(statusBar).getByRole('button', { name: 'Settings' })).toBeInTheDocument();
expect(within(statusBar).getByText('Sync complete')).toBeInTheDocument();
expect(within(statusBar).getByText('3 tasks running')).toBeInTheDocument();
expect(within(statusBar).getByText('AI queue idle')).toBeInTheDocument();
expect(within(statusBar).getByText('Draft saved')).toBeInTheDocument();
});
it('shows overview work queues below the metric cards', () => {
render(ProjectWorkbench, { props: { currentUser: { account: 'david@example.com' } } });
expect(screen.getByRole('heading', { name: 'Inbox 待处理' })).toBeInTheDocument();
expect(screen.getByRole('heading', { name: '进行中的任务' })).toBeInTheDocument();
expect(screen.getByRole('heading', { name: 'AI 会话' })).toBeInTheDocument();
expect(screen.getByText('Collect competitor pricing notes')).toBeInTheDocument();
expect(screen.getByText('Confirm homepage information architecture')).toBeInTheDocument();
});
it('toggles between light and dark workbench palettes', async () => {
render(ProjectWorkbench, { props: { currentUser: { account: 'david@example.com' } } });
const shell = screen.getByLabelText('SenlinAI workbench');
expect(shell).toHaveAttribute('data-theme', 'light');
await fireEvent.click(screen.getByRole('button', { name: 'Switch to dark mode' }));
expect(shell).toHaveAttribute('data-theme', 'dark');
expect(screen.getByRole('button', { name: 'Switch to light mode' })).toBeInTheDocument();
});
it('refreshes channels when switching projects', async () => {
render(ProjectWorkbench, { props: { currentUser: { account: 'david@example.com' } } });

View File

@@ -0,0 +1,30 @@
<script lang="ts">
export let account: string;
$: userInitials = account.slice(0, 2).toUpperCase();
</script>
<footer class="workspace-statusbar" aria-label="Workspace status">
<section class="statusbar-user" aria-label="Current user">
<span class="user-avatar" aria-hidden="true">{userInitials}</span>
<span class="user-meta">
<strong>{account}</strong>
<small>在线</small>
</span>
<button type="button" aria-label="Friends">好友</button>
<button type="button" aria-label="Direct messages">私信</button>
<button type="button" aria-label="Settings">设置</button>
</section>
<section class="statusbar-tasks" aria-label="Task status">
<span>Sync complete</span>
<span>3 tasks running</span>
<span>AI queue idle</span>
<span>Draft saved</span>
</section>
<section class="statusbar-system" aria-label="System status">
<span>本地存储 152GB 可用</span>
<span>系统健康 正常</span>
</section>
</footer>

View File

@@ -1,16 +1,25 @@
<script lang="ts">
export let account: string;
export let theme: 'light' | 'dark' = 'light';
export let onToggleTheme: () => void = () => {};
</script>
<header class="workspace-topbar">
<div class="brand-mark">SenlinAI</div>
<label class="search-box">
<span>Search</span>
<input aria-label="Global search" title="Global search is unavailable in this preview" placeholder="Search projects, tasks, notes, AI sessions" disabled />
</label>
<div class="brand-mark" aria-label="SenlinAI">
<span class="brand-logo">S</span>
<span>SenlinAI</span>
</div>
<form class="search-box" role="search" aria-label="Workspace search" on:submit|preventDefault>
<label class="sr-only" for="global-search">Search</label>
<input id="global-search" aria-label="Global search" placeholder="搜索项目、频道、文档、任务、联系人..." />
<button type="submit" aria-label="Search workspace">搜索</button>
</form>
<div class="topbar-actions">
<button aria-label="Back" disabled>&#8592;</button>
<button aria-label="Forward" disabled>&#8594;</button>
<button aria-label={`Account ${account}`} disabled>{account.slice(0, 2).toUpperCase()}</button>
<button class="theme-toggle" type="button" aria-label={theme === 'light' ? 'Switch to dark mode' : 'Switch to light mode'} on:click={onToggleTheme}>
<span aria-hidden="true">{theme === 'light' ? '☾' : '☀'}</span>
</button>
<button aria-label="Back" disabled></button>
<button aria-label="Forward" disabled></button>
<button aria-label="Notifications" disabled>!</button>
<button aria-label="Help" disabled>?</button>
</div>
</header>

View File

@@ -15,8 +15,14 @@
<section class="channel-page overview-channel">
<header class="channel-header">
<p>{workspace.project.name}</p>
<h1>Overview</h1>
<div>
<p>{workspace.project.name}</p>
<h1>Overview</h1>
</div>
<div class="overview-tools" aria-label="Overview filters">
<span>2026-07-20</span>
<button type="button" aria-label="More overview actions">...</button>
</div>
</header>
<div class="metric-list">
{#each metrics(workspace) as metric}
@@ -26,4 +32,117 @@
</button>
{/each}
</div>
<div class="overview-grid">
<section class="overview-section">
<header>
<h2>Inbox 待处理</h2>
<a href="/" on:click|preventDefault>查看全部</a>
</header>
<div class="overview-rows">
{#each workspace.inbox as message}
<button
type="button"
class="overview-row"
on:click={() => onInspect({
title: message.title,
type: 'Inbox message',
description: message.summary,
properties: [
{ label: 'Source', value: message.source },
{ label: 'Status', value: message.status },
{ label: 'Tag', value: message.tag },
],
})}
>
<span>{message.title}</span>
<small>来源 {message.source} · #{message.tag}</small>
<time>{message.time}</time>
</button>
{/each}
</div>
</section>
<section class="overview-section">
<header>
<h2>进行中的任务</h2>
<a href="/" on:click|preventDefault>查看全部</a>
</header>
<div class="overview-rows">
{#each workspace.tasks as task}
<button
type="button"
class="overview-row"
on:click={() => onInspect({
title: task.title,
type: 'Task',
description: task.summary,
properties: [
{ label: 'Status', value: task.completed ? 'Done' : 'Open' },
{ label: 'Owner', value: task.owner },
{ label: 'Due', value: task.due },
],
})}
>
<span>{task.title}</span>
<small>负责人 {task.owner} · #{task.tag}</small>
<time>{task.due}</time>
</button>
{/each}
</div>
</section>
<section class="overview-section">
<header>
<h2>AI 会话</h2>
<a href="/" on:click|preventDefault>查看全部</a>
</header>
<div class="overview-rows">
{#each workspace.aiSessions as session}
<button
type="button"
class="overview-row"
on:click={() => onInspect({
title: session.title,
type: 'AI session',
description: session.summary,
properties: session.references.map((reference) => ({ label: 'Reference', value: reference })),
})}
>
<span>{session.title}</span>
<small>{session.summary}</small>
<time>{session.updatedAt}</time>
</button>
{/each}
</div>
</section>
<section class="overview-section">
<header>
<h2>最近笔记资料</h2>
<a href="/" on:click|preventDefault>查看全部</a>
</header>
<div class="overview-rows">
{#each workspace.notesSources as item}
<button
type="button"
class="overview-row"
on:click={() => onInspect({
title: item.title,
type: item.kind,
description: `${item.source} · ${item.tag}`,
properties: [
{ label: 'Updated', value: item.updatedAt },
{ label: 'Tag', value: item.tag },
],
})}
>
<span>{item.title}</span>
<small>{item.source} · #{item.tag}</small>
<time>{item.updatedAt}</time>
</button>
{/each}
</div>
</section>
</div>
</section>

View File

@@ -1,19 +1,24 @@
:root {
color: #18181b;
background: #f4f4f5;
color: #1d2129;
background: #f7f8fa;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
line-height: 1.5;
--background: #f4f4f5;
--background: #f7f8fa;
--panel: #ffffff;
--panel-muted: #fafafa;
--border: #d4d4d8;
--text: #18181b;
--muted: #71717a;
--primary: #0f7ae5;
--primary-strong: #0969c8;
--success: #15803d;
--danger: #b91c1c;
--radius: 8px;
--panel-muted: #f2f3f5;
--border: #e5e6eb;
--text: #1d2129;
--muted: #86909c;
--subtle: #4e5969;
--primary: #165dff;
--primary-strong: #0e42d2;
--primary-soft: #e8f3ff;
--success: #00b42a;
--warning: #ff7d00;
--danger: #f53f3f;
--statusbar: #142033;
--statusbar-border: #22314a;
--radius: 6px;
}
* { box-sizing: border-box; }
@@ -21,51 +26,84 @@ body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
button:disabled { cursor: not-allowed; opacity: 0.58; }
a { color: inherit; text-decoration: none; }
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.login-page {
min-height: 100vh;
display: grid;
place-items: center;
padding: 24px;
background: var(--background);
padding: 28px;
background:
radial-gradient(circle at top left, rgba(22, 93, 255, 0.08), transparent 32%),
var(--background);
}
.login-panel {
width: min(420px, 100%);
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--panel);
padding: 24px;
}
.server-login,
.login-heading,
.channel-page,
.object-inspector,
.channel-sidebar {
width: min(1200px, 100%);
min-height: 420px;
display: grid;
gap: 12px;
}
.server-login input,
.search-box input {
width: 100%;
grid-template-columns: 1fr 1.1fr 1fr;
overflow: hidden;
border: 1px solid var(--border);
border-radius: 6px;
padding: 9px 10px;
background: white;
border-radius: 8px;
background: var(--panel);
box-shadow: 0 10px 30px rgba(29, 33, 41, 0.08);
}
.server-login button,
.primary-action {
border: 1px solid var(--primary);
border-radius: 6px;
.login-brand-panel,
.server-login,
.login-value-panel {
padding: 36px 42px;
}
.login-brand-panel {
display: grid;
align-content: center;
gap: 10px;
border-right: 1px solid var(--border);
}
.login-brand {
width: 42px;
height: 42px;
display: grid;
place-items: center;
border-radius: 10px;
background: var(--primary);
color: white;
padding: 9px 12px;
font-weight: 800;
font-size: 1.35rem;
}
.login-brand-panel h1,
.login-heading h2,
.login-value-panel h2 {
margin: 0;
color: var(--text);
}
.login-brand-panel h1 { font-size: 1.8rem; }
.login-brand-panel p,
.login-value-panel p {
margin: 0;
color: var(--subtle);
}
.login-brand-panel small,
.login-links,
.connection-status,
.login-note,
.form-error,
@@ -78,34 +116,202 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
font-size: 0.875rem;
}
.login-links {
align-self: end;
display: flex;
gap: 18px;
margin-top: 72px;
}
.server-login,
.login-heading,
.channel-page,
.object-inspector,
.channel-sidebar {
display: grid;
gap: 12px;
}
.login-heading { gap: 4px; }
.login-heading p { margin: 0; color: var(--text); font-weight: 600; }
.login-heading h2 { font-size: 1rem; font-weight: 500; color: var(--muted); }
.server-login {
border-right: 1px solid var(--border);
}
.server-login label {
color: var(--subtle);
font-size: 0.8125rem;
font-weight: 600;
}
.server-login input,
.search-box input {
width: 100%;
border: 1px solid var(--border);
border-radius: var(--radius);
background: white;
color: var(--text);
}
.server-login input {
height: 36px;
padding: 8px 10px;
}
.server-login button,
.primary-action {
height: 38px;
border: 1px solid var(--primary);
border-radius: var(--radius);
background: var(--primary);
color: white;
padding: 0 14px;
font-weight: 600;
}
.form-error { color: var(--danger); }
.connection-status {
border: 1px solid #7be188;
border-radius: var(--radius);
background: #f0fff4;
color: #168a2f;
padding: 8px 10px;
}
.login-value-panel {
display: grid;
align-content: center;
gap: 18px;
}
.login-value-panel ul {
display: grid;
gap: 18px;
margin: 0;
padding: 0;
list-style: none;
}
.login-value-panel li {
display: grid;
gap: 3px;
padding-left: 16px;
border-left: 3px solid var(--primary-soft);
}
.login-value-panel strong { color: var(--text); }
.login-value-panel span { color: var(--muted); font-size: 0.875rem; }
.workbench-shell {
min-height: 100vh;
display: grid;
grid-template-rows: 64px 1fr;
grid-template-rows: 58px minmax(0, 1fr) 32px;
background: var(--background);
color: var(--text);
}
.workbench-shell[data-theme='dark'] {
--background: #1e1e1e;
--panel: #252526;
--panel-muted: #2d2d30;
--border: #3c3c3c;
--text: #cccccc;
--muted: #858585;
--subtle: #a7a7a7;
--primary: #007acc;
--primary-strong: #1890e8;
--primary-soft: rgba(0, 122, 204, 0.22);
--statusbar: #007acc;
--statusbar-border: #1f6feb;
}
.workspace-topbar {
display: grid;
grid-template-columns: 160px minmax(240px, 1fr) auto;
grid-template-columns: 192px minmax(420px, 1fr) auto;
align-items: center;
gap: 16px;
gap: 18px;
border-bottom: 1px solid var(--border);
background: var(--panel);
padding: 0 16px;
}
.brand-mark { font-weight: 700; }
.search-box { display: grid; gap: 4px; min-width: 0; }
.search-box span { color: var(--muted); font-size: 0.75rem; }
.topbar-actions { display: flex; gap: 8px; }
.topbar-actions button { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
.brand-mark {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.05rem;
font-weight: 700;
}
.brand-logo {
width: 28px;
height: 28px;
display: grid;
place-items: center;
border-radius: 7px;
background: var(--primary);
color: white;
font-weight: 800;
}
.search-box {
display: grid;
grid-template-columns: minmax(0, 1fr) 72px;
align-items: center;
max-width: 680px;
min-width: 0;
height: 42px;
border: 1px solid var(--primary);
border-radius: 7px;
background: var(--panel);
box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.06);
}
.search-box input {
height: 40px;
border: 0;
padding: 0 16px;
background: transparent;
}
.search-box button {
height: 40px;
border: 0;
border-left: 1px solid var(--primary);
border-radius: 0 6px 6px 0;
background: var(--primary);
color: white;
font-weight: 600;
}
.topbar-actions {
display: flex;
align-items: center;
gap: 8px;
}
.topbar-actions button {
width: 32px;
height: 32px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--panel);
color: var(--subtle);
}
.topbar-actions .theme-toggle {
width: 56px;
background: var(--panel-muted);
color: var(--primary);
}
.workbench-body {
min-height: 0;
display: grid;
grid-template-columns: 76px 280px minmax(0, 1fr) 320px;
grid-template-columns: 88px 248px minmax(0, 1fr) 330px;
}
.project-rail,
@@ -118,26 +324,48 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
.project-rail {
display: grid;
align-content: start;
gap: 10px;
padding: 12px;
gap: 12px;
padding: 14px 12px;
}
.project-rail button {
min-width: 48px;
min-height: 48px;
position: relative;
width: 56px;
min-height: 56px;
display: grid;
place-items: center;
gap: 2px;
border: 1px solid var(--border);
border-radius: 999px;
border-radius: 8px;
background: var(--panel-muted);
color: var(--subtle);
}
.project-rail button.active,
.channel-group button.active {
.project-rail button.active {
border-color: var(--primary);
color: var(--primary);
background: #eff6ff;
background: var(--primary);
color: white;
}
.project-rail small { color: var(--muted); font-size: 0.6875rem; }
.project-initials { font-weight: 700; }
.project-rail small {
position: absolute;
top: -6px;
right: -7px;
min-width: 19px;
height: 19px;
display: grid;
place-items: center;
border: 2px solid var(--panel);
border-radius: 999px;
background: var(--primary);
color: white;
font-size: 0.625rem;
line-height: 1;
}
.project-rail small.urgent { background: var(--danger); }
.channel-sidebar,
.object-inspector,
@@ -157,6 +385,46 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
width: 100%;
}
.channel-sidebar header {
display: flex;
align-items: start;
justify-content: space-between;
gap: 12px;
}
.channel-sidebar header p,
.channel-sidebar h2,
.channel-sidebar h3 { margin: 0; }
.channel-sidebar h2 { font-size: 1rem; }
.channel-sidebar h3 { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.channel-sidebar header button {
width: 30px;
height: 30px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--panel-muted);
}
.tag-row,
.recent-sessions ul {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.tag-row li {
border: 1px solid var(--border);
border-radius: 999px;
padding: 3px 8px;
background: var(--panel-muted);
color: var(--muted);
font-size: 0.75rem;
}
.channel-group,
.task-list,
.record-list,
@@ -167,14 +435,91 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
gap: 8px;
}
.channel-group button,
.channel-group button {
width: 100%;
min-height: 34px;
display: grid;
grid-template-columns: 18px minmax(0, 1fr) auto;
gap: 8px;
align-items: center;
border: 0;
border-radius: var(--radius);
background: transparent;
color: var(--text);
padding: 7px 9px;
text-align: left;
}
.channel-group button.active {
color: var(--primary);
background: var(--primary-soft);
box-shadow: inset 3px 0 0 var(--primary);
}
.channel-group small {
min-width: 26px;
border-radius: 999px;
background: var(--panel-muted);
color: var(--muted);
padding: 1px 6px;
text-align: center;
}
.channel-icon { color: currentColor; text-align: center; }
.recent-sessions { display: grid; gap: 8px; }
.recent-sessions li { display: grid; gap: 2px; min-width: 0; padding: 7px 8px; border-radius: var(--radius); }
.recent-sessions span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; }
.recent-sessions small { color: var(--muted); font-size: 0.6875rem; }
.channel-stage { background: var(--background); }
.channel-page { align-content: start; }
.channel-header {
display: flex;
align-items: end;
justify-content: space-between;
border-bottom: 1px solid var(--border);
padding-bottom: 12px;
}
.channel-header h1,
.channel-page h2 { margin: 0; }
.channel-header h1 { font-size: 1.125rem; }
.channel-page h2 { font-size: 0.9375rem; }
.channel-page h2 + p { margin: 4px 0; }
.overview-tools {
display: flex;
align-items: center;
gap: 8px;
}
.overview-tools span,
.overview-tools button {
height: 30px;
display: inline-flex;
align-items: center;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--panel);
color: var(--subtle);
padding: 0 10px;
font-size: 0.8125rem;
}
.overview-tools button { width: 34px; justify-content: center; }
.metric-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
gap: 10px;
}
.metric-card,
.task-card,
.record-row,
.cron-row,
.message-row,
.file-row,
.conversation-summary,
.metric-card {
.conversation-summary {
width: 100%;
border: 1px solid var(--border);
border-radius: var(--radius);
@@ -182,6 +527,85 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
padding: 10px 12px;
}
.metric-card {
display: grid;
gap: 4px;
text-align: left;
}
.metric-card strong { font-size: 1.45rem; color: var(--text); }
.metric-card span { color: var(--muted); font-size: 0.8125rem; }
.overview-grid {
display: grid;
gap: 12px;
}
.overview-section {
display: grid;
gap: 6px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--panel);
padding: 10px 12px;
}
.overview-section header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.overview-section h2 {
font-size: 0.875rem;
}
.overview-section a {
color: var(--primary);
font-size: 0.75rem;
font-weight: 600;
}
.overview-rows {
display: grid;
}
.overview-row {
width: 100%;
display: grid;
grid-template-columns: minmax(160px, 1fr) minmax(180px, 1.1fr) auto;
gap: 12px;
align-items: center;
border: 0;
border-top: 1px solid var(--border);
background: transparent;
color: var(--text);
padding: 8px 0;
text-align: left;
}
.overview-row:first-child {
border-top: 0;
}
.overview-row span,
.overview-row small {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.overview-row span {
font-weight: 600;
}
.overview-row small,
.overview-row time {
color: var(--muted);
font-size: 0.75rem;
}
.task-card,
.record-row,
.cron-row,
@@ -200,54 +624,31 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
.task-check { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--primary); }
.task-status { display: inline-block; margin-top: 6px; color: var(--muted); font-size: 0.75rem; }
.channel-sidebar header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.channel-sidebar header p,
.channel-sidebar h2,
.channel-sidebar h3 { margin: 0; }
.channel-sidebar h2 { font-size: 1rem; }
.channel-sidebar h3 { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.channel-sidebar header button { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-muted); }
.tag-row,
.recent-sessions ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag-row li { border: 1px solid var(--border); border-radius: 999px; padding: 3px 7px; color: var(--muted); font-size: 0.75rem; }
.channel-group button { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; }
.channel-group small { color: var(--muted); }
.channel-icon { color: var(--muted); text-align: center; }
.recent-sessions { display: grid; gap: 8px; }
.recent-sessions li { display: grid; gap: 2px; min-width: 0; padding: 7px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-muted); }
.recent-sessions span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; }
.recent-sessions small { color: var(--muted); font-size: 0.6875rem; }
.channel-stage { background: var(--background); }
.channel-page { align-content: start; }
.channel-header { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.channel-header h1,
.channel-page h2 { margin: 0; }
.channel-header h1 { font-size: 1.25rem; }
.channel-page h2 { font-size: 0.9375rem; }
.channel-page h2 + p { margin: 4px 0; }
.metric-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.metric-card { display: grid; gap: 4px; text-align: left; }
.metric-card strong { font-size: 1.5rem; }
.metric-card span { color: var(--muted); font-size: 0.8125rem; }
.message-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.file-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.file-row > span { min-width: 40px; border: 1px solid var(--border); border-radius: 4px; padding: 3px 5px; color: var(--muted); font-size: 0.6875rem; text-align: center; text-transform: uppercase; }
.message-row p,
.cron-row p,
.conversation-summary p { margin: 4px 0; }
.message-row button,
.file-row button,
.task-card > button,
.cron-row button,
.conversation-summary button,
.copy-url-button,
.object-inspector button { border: 1px solid var(--border); border-radius: 6px; background: var(--panel); padding: 6px 9px; }
.object-inspector button {
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--panel);
color: var(--text);
padding: 6px 9px;
}
.session-layout { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr); gap: 12px; }
.session-list { display: grid; align-content: start; gap: 6px; }
.session-list button { display: grid; gap: 3px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); padding: 9px; text-align: left; }
.session-list button.active { border-color: var(--primary); background: #eff6ff; }
.session-list button { display: grid; gap: 3px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 9px; text-align: left; }
.session-list button.active { border-color: var(--primary); background: var(--primary-soft); }
.session-list small { color: var(--muted); }
.conversation-summary { align-content: start; }
.custom-link { color: var(--primary-strong); font-weight: 600; width: max-content; }
@@ -271,20 +672,97 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
.inspector-tabs button[aria-pressed='true'] {
border-color: var(--primary);
color: var(--primary);
background: var(--primary-soft);
}
.workspace-statusbar {
min-height: 32px;
display: grid;
grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.2fr) minmax(260px, 0.9fr);
align-items: center;
gap: 14px;
border-top: 1px solid var(--statusbar-border);
background: var(--statusbar);
color: rgba(255, 255, 255, 0.82);
padding: 0 14px;
font-size: 0.75rem;
}
.statusbar-user,
.statusbar-tasks,
.statusbar-system {
min-width: 0;
display: flex;
align-items: center;
gap: 12px;
}
.statusbar-tasks { justify-content: center; color: rgba(255, 255, 255, 0.86); }
.statusbar-system { justify-content: end; color: rgba(255, 255, 255, 0.72); }
.user-avatar {
width: 24px;
height: 24px;
display: grid;
place-items: center;
border-radius: 999px;
background: var(--primary);
color: white;
font-size: 0.6875rem;
font-weight: 700;
}
.user-meta {
min-width: 0;
display: grid;
line-height: 1.05;
}
.user-meta strong {
max-width: 160px;
overflow: hidden;
color: white;
font-size: 0.75rem;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
}
.user-meta small { color: #7be188; font-size: 0.6875rem; }
.workspace-statusbar button {
height: 24px;
border: 0;
border-radius: 4px;
background: transparent;
color: rgba(255, 255, 255, 0.78);
padding: 0 6px;
}
.workspace-statusbar button:hover { background: rgba(255, 255, 255, 0.1); }
@media (max-width: 920px) {
.login-panel {
grid-template-columns: 1fr;
}
.login-brand-panel,
.server-login {
border-right: 0;
border-bottom: 1px solid var(--border);
}
.workspace-topbar {
grid-template-columns: minmax(0, 1fr) auto;
height: auto;
padding: 12px;
}
.search-box { grid-column: 1 / -1; grid-row: 2; }
.search-box { grid-column: 1 / -1; grid-row: 2; max-width: none; }
.topbar-actions { grid-column: 2; grid-row: 1; }
.workbench-shell {
grid-template-rows: auto 1fr;
grid-template-rows: auto 1fr auto;
}
.workbench-body {
@@ -302,19 +780,17 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
.project-rail {
grid-template-columns: none;
grid-auto-flow: column;
grid-auto-columns: 48px;
grid-auto-columns: 56px;
align-items: center;
max-height: 76px;
max-height: 84px;
overflow-x: auto;
overflow-y: hidden;
padding: 10px 12px;
}
.project-rail button { min-width: 48px; min-height: 48px; }
.channel-sidebar {
align-content: start;
max-height: 220px;
max-height: 230px;
padding: 12px;
}
@@ -329,7 +805,6 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
padding-bottom: 2px;
}
.channel-group button { min-width: 160px; }
.channel-group {
grid-auto-flow: row;
grid-auto-columns: auto;
@@ -354,4 +829,16 @@ button:disabled { cursor: not-allowed; opacity: 0.55; }
.channel-stage { max-height: 36vh; overflow: auto; }
.object-inspector { max-height: 288px; overflow: auto; }
.session-layout { grid-template-columns: 1fr; }
.workspace-statusbar {
grid-template-columns: 1fr;
gap: 6px;
padding: 8px 12px;
}
.statusbar-tasks,
.statusbar-system {
justify-content: start;
flex-wrap: wrap;
}
}

37
design-qa.md Normal file
View File

@@ -0,0 +1,37 @@
**Source Visual Truth**
- Source: `C:\Users\david\.codex\generated_images\019f7b30-8171-7f12-8ef6-ac2571bdf8ae\call_g6DhOvUFyNza9HnLRRBIwk5l.png`
**Implementation Evidence**
- Login screenshot: `D:\work\senlinai\agent\apps\web\test-results\login-acro.png`
- Light workbench screenshot: `D:\work\senlinai\agent\apps\web\test-results\workbench-light-acro.png`
- Dark workbench screenshot: `D:\work\senlinai\agent\apps\web\test-results\workbench-dark-acro.png`
- Full-view comparison: `D:\work\senlinai\agent\design-qa-comparison.png`
- Viewport: 1440 x 1024
- State: login page, authenticated overview page, dark-mode overview page
**Findings**
- No actionable P0/P1/P2 findings remain.
**Required Fidelity Surfaces**
- Fonts and typography: implementation uses the existing system UI stack and compact product sizing. Hierarchy matches the design intent for form labels, topbar controls, sidebar rows, overview sections, and inspector tabs.
- Spacing and layout rhythm: the app preserves the selected layout structure: topbar, project rail, channel sidebar, central overview, right inspector, and full-width bottom status bar. The status bar measured 32px high, matching the requested compact state.
- Colors and visual tokens: implementation uses an Arco-inspired palette with `#165DFF`, light blue selected surfaces, `#E5E6EB` borders, `#F7F8FA` background, and a darker blue-gray status bar. Dark mode uses VS Code-like workbench tokens and `#007acc` accent/status color.
- Image quality and asset fidelity: the design relies on app chrome, badges, and simple brand marks rather than content imagery. The implementation uses lightweight code-native marks for the MVP shell; replacing them with a formal icon library or brand asset would be a P3 polish pass.
- Copy and content: login follows the selected Chinese private-deployment structure. The workbench preserves existing English mock object names where current tests and prototype data already depend on them, while key UI refinements from the final design are present.
**Interaction Checks**
- Login flow from server/account/password to workbench was exercised.
- Theme toggle was exercised from light to dark.
- Console errors checked: none.
- Layout check: no horizontal overflow at 1440 x 1024.
**Comparison History**
- Earlier finding: overview center area only showed metric cards, leaving a large blank region compared with the selected design.
- Fix made: added Inbox, active task, AI session, and recent notes/materials overview sections with compact row separators.
- Post-fix evidence: `D:\work\senlinai\agent\apps\web\test-results\workbench-light-acro.png` and `D:\work\senlinai\agent\design-qa-comparison.png`.
**Follow-up Polish**
- Replace code-native icon glyphs with a dedicated Svelte-compatible icon set or approved brand/icon assets.
- Translate remaining prototype mock data to Chinese if the product direction requires a fully localized MVP.
final result: passed