Skip to content

Commit 6347cba

Browse files
committed
refactor: tighten memory summary header
1 parent 099420b commit 6347cba

3 files changed

Lines changed: 36 additions & 23 deletions

File tree

console/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>MathClaw Console</title>
7-
<link rel="stylesheet" href="./styles.css?v=20260404b" />
7+
<link rel="stylesheet" href="./styles.css?v=20260404c" />
88
</head>
99
<body>
1010
<div id="app"></div>
11-
<script type="module" src="./main.js?v=20260404b"></script>
11+
<script type="module" src="./main.js?v=20260404c"></script>
1212
</body>
1313
</html>

console/main.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,9 +2916,9 @@ function graphLegendItems(graphKey) {
29162916
function graphTheme(graphKey) {
29172917
if (graphKey === "error") {
29182918
return {
2919-
kicker: "错题诊断图",
2920-
title: "把高频错误模式拆成可执行的纠错路径",
2921-
summary: "优先沿着重复出现和纠正建议两条线看,先定位错误模式,再回到对应知识点补漏洞。",
2919+
kicker: "",
2920+
title: "错题图谱",
2921+
summary: "先看重复出现和纠正建议,先定位错误模式,再回到对应知识点补漏洞。",
29222922
emptyTitle: "从一类错误开始查看",
29232923
emptyText: "点击左侧节点后,右侧会展示严重度、重复次数、代表样本和建议修正动作。",
29242924
overlayHint: "拖动画布定位高频错误,优先查看重复出现和纠正建议链路。",
@@ -2930,9 +2930,9 @@ function graphTheme(graphKey) {
29302930
}
29312931

29322932
return {
2933-
kicker: "知识导航图",
2934-
title: "把薄弱知识点整理成有先后关系的学习地图",
2935-
summary: "优先看前置依赖和相似知识点,先补基础,再回到当前节点做专项复盘。",
2933+
kicker: "",
2934+
title: "知识点图谱",
2935+
summary: "优先看前置依赖和相似知识点,先补基础,再回到当前节点复盘。",
29362936
emptyTitle: "从一个知识点开始查看",
29372937
emptyText: "点击左侧节点后,右侧会显示风险、掌握度、前置关系和近期样本,方便判断先补哪里。",
29382938
overlayHint: "焦点视图只保留最近更新和核心关联,适合快速确认当前学习主线。",
@@ -3796,7 +3796,7 @@ function renderMemoryPage(root) {
37963796
? "正在同步知识图谱..."
37973797
: `${updatedLabel} · ${state.memoryView === "focus" ? "只看最近更新和核心关联" : "查看全部活跃节点"}`;
37983798
const summaryText = selectedNode
3799-
? `${selectedNode.label} 当前处于${selectedNode.isFocus ? "焦点" : selectedNode.status === "candidate" ? "候选" : "活跃"}层,建议先看右侧详情,再沿着相连节点继续扩展。`
3799+
? `当前焦点:${selectedNode.label}。先看右侧详情,再沿相连节点继续扩展。`
38003800
: theme.summary;
38013801
const emptyState = !graph.nodes.length
38023802
? `
@@ -3817,7 +3817,7 @@ function renderMemoryPage(root) {
38173817
<section class="panel graph-workspace graph-workspace--${fullGraph.accent}">
38183818
<div class="graph-summary">
38193819
<div class="graph-summary__main">
3820-
<span class="page-kicker">${theme.kicker}</span>
3820+
${theme.kicker ? `<span class="page-kicker">${theme.kicker}</span>` : ""}
38213821
<h3>${theme.title}</h3>
38223822
<p>${escapeHtml(summaryText)}</p>
38233823
</div>

console/styles.css

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3712,7 +3712,7 @@ button {
37123712

37133713
.graph-summary {
37143714
display: grid;
3715-
grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
3715+
grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
37163716
gap: 14px;
37173717
align-items: stretch;
37183718
}
@@ -3727,59 +3727,72 @@ button {
37273727
}
37283728

37293729
.graph-summary__main {
3730-
padding: 22px 24px;
3730+
display: flex;
3731+
flex-direction: column;
3732+
justify-content: center;
3733+
min-height: 136px;
3734+
padding: 18px 22px;
37313735
background: var(--graph-surface);
37323736
}
37333737

37343738
.graph-summary__main::after,
37353739
.detail-hero::after {
37363740
content: "";
37373741
position: absolute;
3738-
inset: auto -44px -84px auto;
3739-
width: 180px;
3740-
height: 180px;
3742+
inset: auto -36px -78px auto;
3743+
width: 148px;
3744+
height: 148px;
37413745
border-radius: 999px;
37423746
background: radial-gradient(circle, var(--graph-accent-glow), transparent 70%);
37433747
pointer-events: none;
37443748
}
37453749

37463750
.graph-summary__main h3 {
3747-
margin: 8px 0 10px;
3748-
font-size: 26px;
3751+
margin: 0;
3752+
font-size: 20px;
37493753
line-height: 1.18;
37503754
letter-spacing: -0.03em;
37513755
}
37523756

37533757
.graph-summary__main p {
37543758
margin: 0;
3755-
max-width: 760px;
3759+
max-width: 640px;
3760+
font-size: 14px;
37563761
color: var(--muted);
3757-
line-height: 1.75;
3762+
line-height: 1.55;
3763+
display: -webkit-box;
3764+
-webkit-box-orient: vertical;
3765+
-webkit-line-clamp: 2;
3766+
overflow: hidden;
37583767
}
37593768

37603769
.graph-summary__stats {
37613770
display: grid;
37623771
grid-template-columns: repeat(3, minmax(0, 1fr));
37633772
gap: 12px;
3773+
min-height: 136px;
37643774
}
37653775

37663776
.graph-summary__tile {
3767-
padding: 16px 18px;
3777+
display: flex;
3778+
flex-direction: column;
3779+
justify-content: center;
3780+
padding: 14px 16px;
37683781
background: rgba(255, 255, 255, 0.95);
37693782
}
37703783

37713784
.graph-summary__tile span {
37723785
display: block;
3773-
margin-bottom: 10px;
3786+
margin-bottom: 8px;
37743787
color: var(--muted);
37753788
font-size: 12px;
37763789
letter-spacing: 0.04em;
37773790
}
37783791

37793792
.graph-summary__tile strong {
37803793
display: block;
3781-
font-size: 17px;
3782-
line-height: 1.38;
3794+
font-size: 15px;
3795+
line-height: 1.35;
37833796
color: var(--text);
37843797
}
37853798

0 commit comments

Comments
 (0)