fix(ui): 回答不再折叠,次级页侧栏改真链接并补回头像
真机走查第二批: 1. 普通对话的回答,首个 H2 之后的全部内容(带推理的那一半)被 <details class="answer-detail">「完整分析」默认收起——用户「输出根本 看不到」。折叠控件与组件文件一并删除,报告层直接渲染进正文。 技法审计表保留自己的折叠:那是给人核对的证据,不是回复正文。 product-voice.ts 同步改掉「UI 会折叠」那句,否则模型继续按折叠写。 2. 次级页侧栏点不了头像、头像样式与首页不一致。根因是 R4 的取舍: SecondaryShell 共用,但里面挂的是新写的 AppNavRail 而不是 AppSidebar。 现在 use-nav-rail 也取 avatar,渲染同一个 UserAvatar;页脚改成真链接, 指向 / —— 账户菜单连着设置弹窗栈,留在那儿,不在这里复制第二份。 3. 「新建对话」整页刷新。原来走 location.assign,现在是 next/link。 /login 保留硬跳转:它跨鉴权边界,要先存返回目标。 注意:第一版我改成了 useRouter(),它在 app-router 上下文外会抛 「invariant expected app router to be mounted」,打红 12 条渲染测试。 改用 <Link>,静态渲染也安全;折叠态 tooltip 换成原生 title。 测试 3369,fail 仍 31 且与基线逐条一致;四个路由标记不变; CSS gzip 40,002。 未修:截图里 `## 适合推进 / 需要避开` 被当字面量渲染,是模型输出里 那两个 H2 前面没有换行,属生成层,另记。 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
49bc4a8ba1
commit
524015cfc1
@@ -363,6 +363,9 @@ button:disabled { cursor: default; opacity: .45; }
|
||||
.message-assistant .message-content { width: auto; max-width: none; flex: 1; }
|
||||
.message p { max-width: none; margin: 0; color: var(--color-ink); font-size: var(--type-body-md); line-height: 1.65; white-space: pre-wrap; }
|
||||
.message-markdown { color: var(--color-ink); font-size: var(--type-body-md); line-height: 1.65; }
|
||||
/* The report body, inline where the collapsed 完整分析 control used to be. */
|
||||
.answer-report-body { margin-top: var(--space-4); }
|
||||
.answer-report-body > .message-markdown > *:first-child { margin-top: 0; }
|
||||
.message-markdown > *:first-child { margin-top: 0; }
|
||||
.message-markdown > *:last-child { margin-bottom: 0; }
|
||||
.claim-boundary-badge { width: fit-content; margin: 0 0 var(--space-2); padding: var(--space-1) var(--space-2); border: 1px solid color-mix(in srgb, var(--color-action) 24%, transparent); border-radius: 999px; background: var(--color-action-soft); color: var(--color-action-hover); font-size: var(--type-overline); line-height: 1.45; }
|
||||
@@ -1445,50 +1448,6 @@ button:disabled { cursor: default; opacity: .45; }
|
||||
font-size: inherit;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.answer-detail {
|
||||
margin-top: var(--space-5);
|
||||
padding-top: var(--space-3);
|
||||
border-top: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
|
||||
}
|
||||
.answer-detail > summary {
|
||||
width: fit-content;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
min-height: 32px;
|
||||
margin-inline: calc(var(--space-1) * -1);
|
||||
padding: 0 var(--space-2);
|
||||
border-radius: var(--radius-sm);
|
||||
color: var(--color-ink-tertiary);
|
||||
cursor: pointer;
|
||||
list-style: none;
|
||||
font-size: var(--type-caption);
|
||||
font-weight: 500;
|
||||
}
|
||||
.answer-detail > summary::-webkit-details-marker { display: none; }
|
||||
.answer-detail > summary::before {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-inline-end: 1.5px solid currentColor;
|
||||
border-bottom: 1.5px solid currentColor;
|
||||
content: "";
|
||||
transform: rotate(-45deg);
|
||||
transition: transform 120ms ease-out;
|
||||
}
|
||||
.answer-detail[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
|
||||
.answer-detail > summary:hover { background: var(--color-canvas-muted); color: var(--color-ink-secondary); }
|
||||
.answer-detail > summary:focus-visible {
|
||||
outline: 2px solid color-mix(in srgb, var(--color-focus) 52%, transparent);
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.answer-detail > summary small {
|
||||
color: var(--color-ink-tertiary);
|
||||
font-size: inherit;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.answer-detail-panel {
|
||||
margin-top: var(--space-3);
|
||||
}
|
||||
.technique-audit-panel {
|
||||
max-width: 100%;
|
||||
margin-top: var(--space-2);
|
||||
@@ -4801,7 +4760,6 @@ button.nav-rail-identity:hover { background: var(--sidebar-accent); }
|
||||
-webkit-text-fill-color: currentColor;
|
||||
}
|
||||
.technique-audit > summary::before { transition: none; }
|
||||
.answer-detail > summary::before { transition: none; }
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
|
||||
Reference in New Issue
Block a user