A local-first multi-agent app development platform, built on PenguinHarness
fix(ui): 极客主题的图表连线改为点间直线(#1131 移植)
lmlihengb13540495189
diff --git a/changelog/unreleased/2026-10-16-console-chart-lines.md b/changelog/unreleased/2026-10-16-console-chart-lines.mdnew file mode 100644index 00000000..dc3c79d2--- /dev/null+++ b/changelog/unreleased/2026-10-16-console-chart-lines.md@@ -0,0 +1,27 @@+# The Console theme's chart lines connect points straight++- **Date:** 2026-10-16+- **Type:** fix+- **Scope:** `ui`++[中文版](2026-10-16-console-chart-lines.zh.md)++Ported from upstream PenguinHarness (#1131, commit `bba0e3c9`).++The Console theme used to join adjacent readings with **stepped** lines: each value ran sideways half a+cell, then jumped vertically to the next one, so a reading looked like it held over a stretch of its+own. That theme already draws a square at every point and an outline on every bar — a bar standing+over its own cell is how a value holds — so the line said the same thing twice. The line now runs+straight from one point to the next (`--ui-chart-curve: linear`) and the fill follows the same line;+the 1 px stroke, the 2 px square points and the bars' geometry are untouched. Primer has always run+straight and Frost curves, so Console is the only theme that changed.++## Details++- `packages/ui/src/themes/geek.css`: `--ui-chart-curve` goes from `step` to `linear`, and the note+ above it now reads "directly connecting points" rather than "stepped between points".+- **Only the theme's value changed — no drawing code did**: `linear` is a value the app already+ knows. `readChartStyle()` singles out `smooth` / `step` and draws everything else (including+ `linear`) as straight segments, which is what `DEFAULT_CHART_STYLE` uses too.+- `packages/ui/test/token-contract.test.ts` gains a case pinning each theme's curve (Primer and+ Console straight, Frost smooth). Upstream's commit carries no test; the guard is this fork's.diff --git a/changelog/unreleased/2026-10-16-console-chart-lines.zh.md b/changelog/unreleased/2026-10-16-console-chart-lines.zh.mdnew file mode 100644index 00000000..147de219--- /dev/null+++ b/changelog/unreleased/2026-10-16-console-chart-lines.zh.md@@ -0,0 +1,24 @@+# 极客主题的图表连线改为点间直线++- **Date:** 2026-10-16+- **Type:** fix+- **Scope:** `ui`++[English](2026-10-16-console-chart-lines.md)++移植自上游 PenguinHarness(#1131,提交 `bba0e3c9`)。++极客(Console)主题的图表此前把相邻数据点用**阶梯线**连起来:每个值先横向走半格、再竖着跳到下一个值,+于是读数看上去像在自己的格子里「保持」了一段。这个主题本来就给每个点画一个方块、给每根柱子描一条边+——值由柱子占住自己的格子来表达,线再说一遍就是同一句话写两遍。现在线直接从一点连到下一点+(`--ui-chart-curve: linear`),下方的填充跟着同一条线走;细线(1 px)、方块点(2 px)与柱子的几何+一概未动。通用(Primer)一直是直线、白领(Frost)是平滑曲线,这次只有极客变。++## 细节++- `packages/ui/src/themes/geek.css`:`--ui-chart-curve` 由 `step` 改为 `linear`,并把那段说明里的+ 「stepped between points」一并改成「directly connecting points」。+- **只改主题里的取值,不动任何绘制代码**:`linear` 本来就是应用认识的值 —— `readChartStyle()` 只把+ `smooth` / `step` 挑出来,其余(含 `linear`)一律按直线画,`DEFAULT_CHART_STYLE` 用的也正是它。+- `packages/ui/test/token-contract.test.ts` 新增一条用例,钉住三个主题各自的连线方式(通用 / 极客+ 直线、白领平滑)。上游这一笔没带用例,这条回归护栏是本 fork 加的。diff --git a/packages/ui/src/themes/geek.css b/packages/ui/src/themes/geek.cssindex a4e39c64..ef246592 100644--- a/packages/ui/src/themes/geek.css+++ b/packages/ui/src/themes/geek.css@@ -156,7 +156,7 @@/* Charts: terminal hues in the roles (indigo, ochre, cobalt, crimson, phosphor, magenta,cyan, orange — the presets' own hues, deep enough for paper), the reference curve in themuted ink, the token-kind blues, and a plotter's geometry — thin solid bars with square- tops outlined 1px in the ink, 1px lines stepped between points, small square points, next+ tops outlined 1px in the ink, 1px lines directly connecting points, small square points, nextto no fill under a line. */--ui-chart-1: #5b3fd6;--ui-chart-2: #a87d00;@@ -176,7 +176,7 @@--ui-chart-bar-radius: 0px;--ui-chart-line-width: 1px;--ui-chart-point-radius: 2px;- --ui-chart-curve: step;+ --ui-chart-curve: linear;--ui-chart-area-opacity: 0.06;--ui-chart-bar-stroke: 1px;--ui-chart-bar-stroke-color: var(--ui-fg);diff --git a/packages/ui/test/token-contract.test.ts b/packages/ui/test/token-contract.test.tsindex 8c06e17d..e1c1254d 100644--- a/packages/ui/test/token-contract.test.ts+++ b/packages/ui/test/token-contract.test.ts@@ -721,6 +721,21 @@ describe("the chart style tokens (round 7)", () => {const all = THEME_IDS.map(geometry).filter((value) => value !== null);expect(new Set(all).size).toBe(all.length);});++ it("runs Console's chart lines straight from reading to reading (2026-10-16)", () => {+ // Console stands its bars over their own cell, so a line that stepped to the next reading+ // said the same thing twice; straight segments leave the readings as all the line says.+ // Primer has always run straight and Frost curves — this is the theme that changed.+ const expected: Readonly<Record<ThemeId, string>> = {+ github: "linear",+ modern: "smooth",+ geek: "linear",+ };+ for (const theme of THEMES) {+ if (theme.status !== "filled") continue;+ expect(theme.analysis.modes.light.get("--ui-chart-curve"), theme.id).toBe(expected[theme.id]);+ }+ });});describe("the streaming tokens (2026-09-30)", () => {