refactor(client): drop the Context Trend card's subtitle hint

The "✂ marks compaction/prune, Step/Turn switches granularity" caption
restated controls that are already visible in the card's own title row,
so it only crowded the header. The subtitle span now renders solely for
the transient focus state ("Showing {cat} only"), and the unused
trend.hint key leaves both dictionaries.
This commit is contained in:
Bowen Liang committed 2026-09-08 19:35:41 +08:00
1 parent 40a054b99b
commit 14ecf44ce4
3 files changed
+6 -5

No files matched your search

+3 -1
View File
@@ -380,7 +380,9 @@ export function makeContextView(
<div className="lc-card">
<div className="lc-card-title">
<span className="lc-card-title-text">{t('trend.title')}</span>
<span className="lc-card-sub">{focusCat !== null ? t('trend.focus', { cat: kit.catLabel(focusCat) }) : t('trend.hint')}</span>
{focusCat !== null
? <span className="lc-card-sub">{t('trend.focus', { cat: kit.catLabel(focusCat) })}</span>
: null}
<div className="lc-trend-ctl">
<div className="lc-gran">
<button
-2
View File
@@ -57,7 +57,6 @@ export const DICT_ZH: Record<string, string> = {
'settings.readOnly': '当前环境的设置为只读',
'gran.total': '全量', 'gran.delta': '增量',
'gran.modeHint': '全量:累计构成;增量:相对上一条请求的变化量',
'trend.hint': '✂ 表示压缩/剪枝,步骤/轮次 切换粒度',
'trend.focus': '仅展示 {cat}',
'trend.empty': '发起一轮对话后,这里会展示每次模型请求的上下文构成',
'detail.step': '第 {t} 轮 · 第 {s} 步',
@@ -282,7 +281,6 @@ export const DICT_EN: Record<string, string> = {
'settings.readOnly': 'Settings are read-only in this environment',
'gran.total': 'Total', 'gran.delta': 'Delta',
'gran.modeHint': 'Total: cumulative makeup; Delta: change vs the previous request',
'trend.hint': '✂ marks compaction/prune, Step/Turn switches granularity',
'trend.focus': 'Showing {cat} only',
'trend.empty': 'Send a message and each model request’s context makeup shows up here',
'detail.step': 'Turn {t} · Step {s}',
+3 -2
View File
@@ -401,11 +401,12 @@ describe('ContextView — interactions', () => {
assert.ok(text(m.container).includes(DICT_EN['trend.focus'].replace('{cat}', DICT_EN['cat.assistant'])),
'the card subtitle names the focused category')
// Collapsing the category restores the whole composition and the usage hint.
// Collapsing the category restores the whole composition and drops the subtitle.
await click(queryAll(m.container, '.lc-br-cat-row')[4])
assert.equal(text(query(m.container, '.lc-axis-top')), '420')
assert.equal(queryAll(m.container, '.lc-bar[data-seq="4"] .lc-bar-stack > .lc-cat-seg').length, 5)
assert.ok(text(m.container).includes(DICT_EN['trend.hint']))
const trendCard = queryAll(m.container, '.lc-card').find(c => text(c).includes(DICT_EN['trend.title']))
assert.ok(trendCard !== undefined && trendCard.querySelector('.lc-card-sub') === null, 'unfocused: no subtitle')
await m.unmount()
})