feat(ui): 报告中心改行式列表,阅读页并入外壳并把目录挪到右侧常驻
报告中心原来是卡片方阵,状态只靠三块底色区分;报告一多,扫读成本
按卡片数线性涨。现在一列一行:带色点的状态 chip、标题、创建时间 ·
深度 · 主题,操作靠右。失败原因从右边一小块挪进行内,能完整读到。
chip 里原来的 StatusIcon(generating 转圈、ready 打勾、failed 警告)
换成 5px 色点——原型如此,且列表是轮询不是演出。失败行不加「重新
生成」,顶栏已经有唯一的生成入口。
行内小字只写接口真给的东西。GET /api/reports 不返回节数和盘数,所以
不写「9 节 · 22 张盘」(VOICE.md 第 2 条),原型图上那行是 mock。
/reports/[reportId] 是最后一个脱离外壳的全屏路由,九个 phase 全部并进
SecondaryShell,根节点从 <main> 改成 <div>(外壳自己就是 main)。
任务书 E10「没有目录」已过期:目录在 cfcd369d 就存在。本轮把它从左栏
挪到正文右侧并定稿视觉,位置用 grid-column 显式指定而不是靠 DOM 次序,
这样窄屏抽屉仍能排在源码最前面,不会掉到全文末尾。860px 以下常驻栏
消失、折叠抽屉保留——删掉抽屉等于窄屏彻底失去章节定位。
挂外壳带出一个真实风险:window.print() 打的是整篇,而 .chat-app /
.chat-panel 是 height:100%;overflow:hidden,会把九节报告裁成一页。阅读
页因此多挂一条 media="print" 样式,把外壳既隐藏又解锁。放组件里而不是
globals.css:它只在阅读页挂载期存在,对话页的打印不受影响,也不用
:has() 去够祖先,更不越界到并行轮次的 CSS 区段。
纸面三个 token 一个没动,--report-accent 仍是 #85432f;目录栏用应用
调色板,因为它是 chrome 不是纸。report-chart-grid-rehype.ts 一行未动,
新增断言守住它仍然接线(BUG-616/617)。
tsc 0 错;lint 0 error / 118 warning(未增);3350→3355 条,0 条既有
断言被改,31 条无 Docker 失败与基线逐条一致;四个路由渲染标记不变,
/ 首屏 gzip −0.58%。
「20 张盘以上不重叠、滚动不卡」与「挂外壳后的打印真实输出」无真机做
不了,已写成环境缺口,清单在 docs/testing/cend-report-20260916.md。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
This commit is contained in:
co-authored by
Claude Opus 5
parent
c3bcddb652
commit
a1a78c7ebc
@@ -3444,19 +3444,28 @@ button.nav-rail-identity:hover { background: var(--sidebar-accent); }
|
||||
font-size: var(--type-body-sm);
|
||||
}
|
||||
.report-center-section-heading button:hover { color: var(--color-action); }
|
||||
.report-center-list { display: grid; gap: var(--space-3); }
|
||||
.report-center-card {
|
||||
/* Row list, not a card grid. A card grid costs one scan per card; past five or
|
||||
six reports the status is what the reader is looking for, and a single column
|
||||
of rows puts every status chip on the same x. D12. */
|
||||
.report-center-list {
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
/* The 1px gap shows this through: one hairline per row, no double borders. */
|
||||
background: var(--color-border);
|
||||
}
|
||||
.report-center-row {
|
||||
min-width: 0;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: var(--space-6);
|
||||
padding: var(--space-5);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
gap: var(--space-5);
|
||||
padding: var(--space-4) var(--space-5);
|
||||
background: var(--color-canvas);
|
||||
}
|
||||
.report-center-card-body { min-width: 0; display: grid; gap: var(--space-1); }
|
||||
.report-center-row-main { min-width: 0; display: grid; gap: var(--space-1); }
|
||||
.report-center-status {
|
||||
width: fit-content;
|
||||
display: inline-flex;
|
||||
@@ -3469,33 +3478,53 @@ button.nav-rail-identity:hover { background: var(--sidebar-accent); }
|
||||
font-size: var(--type-caption);
|
||||
font-weight: 500;
|
||||
}
|
||||
/* The status dot. It carries the state at a glance; the three chips used to be
|
||||
told apart only by their fill, which is a weak signal at caption size. */
|
||||
.report-center-status::before {
|
||||
content: "";
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
}
|
||||
.report-center-status.is-ready { background: var(--color-success-muted); color: var(--color-success); }
|
||||
.report-center-status.is-generating { background: var(--color-action-soft); color: var(--color-action); }
|
||||
.report-center-status.is-failed,
|
||||
.report-center-failure { background: var(--color-danger-muted); color: var(--color-danger); }
|
||||
/* The failure reason reads inside the row now, under the meta line, instead of
|
||||
being a right-hand block competing with the row's action. */
|
||||
.report-center-failure {
|
||||
max-width: 220px;
|
||||
padding: 8px 12px;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
margin: var(--space-1) 0 0;
|
||||
padding: 6px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--type-caption);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.report-center-card h3 {
|
||||
.report-center-row h3 {
|
||||
margin: 0;
|
||||
color: var(--color-ink);
|
||||
font-family: var(--font-body);
|
||||
font-size: var(--type-title-md);
|
||||
font-weight: 500;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.report-center-card p {
|
||||
.report-center-row-meta {
|
||||
margin: 0;
|
||||
color: var(--color-ink-tertiary);
|
||||
font-size: var(--type-caption);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.report-center-row-note {
|
||||
max-width: 62ch;
|
||||
margin: 0;
|
||||
color: var(--color-ink-secondary);
|
||||
font-size: var(--type-body-sm);
|
||||
line-height: 1.55;
|
||||
}
|
||||
.report-center-card small { color: var(--color-ink-tertiary); font-size: var(--type-caption); }
|
||||
.report-center-card-actions {
|
||||
.report-center-row-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
@@ -3564,10 +3593,8 @@ button.nav-rail-identity:hover { background: var(--sidebar-accent); }
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.report-center-hero { grid-template-columns: 1fr; align-items: start; gap: var(--space-6); padding-block: var(--space-8) var(--space-6); }
|
||||
.report-center-card { grid-template-columns: 1fr; gap: var(--space-4); }
|
||||
.report-center-card-actions,
|
||||
.report-center-card > a,
|
||||
.report-center-card > button,
|
||||
.report-center-row { grid-template-columns: 1fr; gap: var(--space-3); }
|
||||
.report-center-row-actions { justify-content: flex-start; justify-self: start; }
|
||||
.report-center-failure { justify-self: start; }
|
||||
.report-center-export-error { text-align: left; }
|
||||
.report-center-section-heading { align-items: center; }
|
||||
@@ -3595,23 +3622,33 @@ button.nav-rail-identity:hover { background: var(--sidebar-accent); }
|
||||
background: var(--color-canvas-soft);
|
||||
}
|
||||
.personal-report-reader-body { width: min(1120px, 100%); margin: 0 auto; padding: 0 var(--space-6) var(--space-16); }
|
||||
/* The rail sits to the right of the paper, and stays there: a report is nine
|
||||
sections and twenty-odd charts, so the reader needs to see where they are
|
||||
without scrolling back. Placement is explicit rather than DOM-ordered, so the
|
||||
narrow-screen drawer can keep coming first in the source. D11. */
|
||||
.personal-report-md-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
|
||||
grid-template-columns: minmax(0, 1fr) minmax(11rem, 15rem);
|
||||
gap: var(--space-6);
|
||||
align-items: start;
|
||||
}
|
||||
.personal-report-md-article { grid-column: 1; grid-row: 1; }
|
||||
.personal-report-toc {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
position: sticky;
|
||||
/* The report's own action bar is sticky at the top of the same scroller and
|
||||
runs ~54px tall; 72px clears it. */
|
||||
top: 72px;
|
||||
max-height: calc(100vh - 96px);
|
||||
/* The shell's 46px header is outside the scroller, so the rail's cap has to
|
||||
allow for it on top of the action bar it is already clearing. */
|
||||
max-height: calc(100vh - 150px);
|
||||
overflow: auto;
|
||||
padding: var(--space-3);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--color-canvas);
|
||||
padding: var(--space-2) 0 var(--space-3);
|
||||
}
|
||||
.personal-report-toc ol {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
@@ -3619,18 +3656,30 @@ button.nav-rail-identity:hover { background: var(--sidebar-accent); }
|
||||
.personal-report-toc li[data-level="3"] { padding-left: var(--space-3); }
|
||||
.personal-report-toc a {
|
||||
display: block;
|
||||
padding: 4px 0;
|
||||
padding: 6px var(--space-2);
|
||||
border-left: 2px solid transparent;
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--color-ink-secondary);
|
||||
font-size: var(--type-caption);
|
||||
line-height: 1.45;
|
||||
text-decoration: none;
|
||||
}
|
||||
.personal-report-toc a.is-current,
|
||||
/* The rail is app chrome, not paper, so it reads in the app palette. The three
|
||||
--report-* tokens stay off it by design (D11/D3). */
|
||||
.personal-report-toc a.is-current {
|
||||
border-left-color: var(--color-action);
|
||||
background: var(--color-canvas-muted);
|
||||
color: var(--color-ink);
|
||||
}
|
||||
.personal-report-toc a:hover { color: var(--color-ink); }
|
||||
.personal-report-toc-drawer { display: none; }
|
||||
.personal-report-toc-desktop p {
|
||||
margin: 0 0 var(--space-2);
|
||||
padding: 0 var(--space-2);
|
||||
color: var(--color-ink-tertiary);
|
||||
font-size: var(--type-caption);
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
letter-spacing: .08em;
|
||||
}
|
||||
.personal-report-md-article {
|
||||
min-width: 0;
|
||||
@@ -3688,7 +3737,19 @@ button.nav-rail-identity:hover { background: var(--sidebar-accent); }
|
||||
body. 860 is the content width of that rail, not a device cut. */
|
||||
@media (max-width: 860px) {
|
||||
.personal-report-md-layout { grid-template-columns: 1fr; }
|
||||
.personal-report-toc { position: static; max-height: none; }
|
||||
.personal-report-md-article { grid-column: auto; grid-row: auto; }
|
||||
/* The persistent rail is gone below this width; what is left is the collapsed
|
||||
drawer, which needs the box the rail no longer draws. */
|
||||
.personal-report-toc {
|
||||
grid-column: auto;
|
||||
grid-row: auto;
|
||||
position: static;
|
||||
max-height: none;
|
||||
padding: var(--space-3);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--color-canvas);
|
||||
}
|
||||
.personal-report-toc-desktop { display: none; }
|
||||
.personal-report-toc-drawer { display: block; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user