Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

fix(web): the context panel's pending value reads larger, the room past the cutter is hatched, segments pin on click (#723)

Yaowei Zhengeda3fc568384
diff --git a/changelog/unreleased/2026-09-14-context-gauge-polish.md b/changelog/unreleased/2026-09-14-context-gauge-polish.md
new file mode 100644
index 00000000..a83860d1
--- /dev/null
+++ b/changelog/unreleased/2026-09-14-context-gauge-polish.md
@@ -0,0 +1,14 @@
+# The context panel reads better while the cutter is dragged
+
+- **Date:** 2026-09-14
+- **Type:** fix
+- **Scope:** `web`
+- **PR:** [#723](https://github.com/Prism-Shadow/penguin-harness/pull/723)
+
+[中文版](2026-09-14-context-gauge-polish.zh.md)
+
+## What changed
+
+- The value that floats under the compaction cutter while it is dragged (or arrowed) now uses the panel's own text size instead of a ten-pixel chip that was hard to read mid-gesture.
+- The stretch of the bar to the right of the cutter, up to the model window, is hatched: it is room the model has but compaction fires before the Session can use, so it no longer looks like the plain free run left of the cutter. The hatching follows the pending value while the cutter moves, the coloured fills still draw over it, and hovering it says what it is.
+- Bar segments and the six legend rows are clickable: a click pins the highlight — the segment and its row together — until the same item is clicked again or another one is picked, so a highlight survives the pointer moving away. The legend rows are real buttons, so the pin is reachable by keyboard, and a pinned row carries a ring the hover tint does not draw — a pin and a passing pointer are told apart without moving away. Hover still wins while it lasts; the tool and file rankings stay hover-only.
diff --git a/changelog/unreleased/2026-09-14-context-gauge-polish.zh.md b/changelog/unreleased/2026-09-14-context-gauge-polish.zh.md
new file mode 100644
index 00000000..af19803a
--- /dev/null
+++ b/changelog/unreleased/2026-09-14-context-gauge-polish.zh.md
@@ -0,0 +1,14 @@
+# 拖动压缩切刀时,上下文面板更好读
+
+- **Date:** 2026-09-14
+- **Type:** fix
+- **Scope:** `web`
+- **PR:** [#723](https://github.com/Prism-Shadow/penguin-harness/pull/723)
+
+[English](2026-09-14-context-gauge-polish.md)
+
+## 变更内容
+
+- 拖动(或用方向键调节)压缩切刀时浮出的待定值,改用面板正文的字号,不再是拖动中难以辨认的十像素小字。
+- 切刀右侧直到模型窗口的一段条形改为斜纹虚化:这是模型还有、但压缩先触发因而暂时用不到的空间,不再与切刀左侧的空余轨道长得一样。斜纹随待定值实时移动,彩色填充段仍覆在其上,悬停会说明它是什么。
+- 条形的填充段与六个图例行可以点击:点击即把该项的高亮钉住——条形段与图例行一起亮——直到再点一次或点别的项,高亮不再随指针离开而消失。图例行是真正的按钮,钉住因此可由键盘到达;钉住的那一行还带一圈悬停不会画的描边,不必移开指针就能分辨钉住与路过。悬停期间仍以悬停为准,工具与文件排行保持只响应悬停。
diff --git a/packages/docs/content/web-app.en.md b/packages/docs/content/web-app.en.md
index 57b3876b..b8b16e5c 100644
--- a/packages/docs/content/web-app.en.md
+++ b/packages/docs/content/web-app.en.md
@@ -80,7 +80,7 @@ Copy buttons across the app confirm at the button itself: the copy icon flips to
- While a Task is running the input stays live and the toolbar keeps a single action button: an empty composer shows **Stop**, and typing turns it into **Send**, whose behavior follows the **mid-run send mode** from the toolbar's More-settings popover (a compact extensible settings panel, also available in draft state; the choice is remembered): **Steer** (default) delivers the text **and any attached images** mid-run as a `[user_steering]` user message with the next turn (an image with no caption sends on its own, and the delivered message renders as a steering chip with its images inside it), **Queue** holds the whole message server-side as a follow-up and auto-sends it as an ordinary new message when the run finishes (an "N queued" hint shows near the input until then; the queue survives page reloads). A draft steering cannot carry — selected skills, file attachments, or a staged `/agent` or `/model` pick, with no text and no image — falls back to the queue for that one send, so the button never sits disabled with Stop displaced. Each queued hint line — an undelivered steering message or a queued follow-up — ends in a **recall** control (a curved-back arrow, "Recall") that withdraws the message back into the input box (attachments included) for editing and resending; a steering message that already reached the model can no longer be recalled. When the run ends before a steering message was delivered — pressing Stop while a tool is still running is the usual way — you do not have to reach for that control: the message returns to the input box on its own, attachments and all, ready to edit and send again, so an interrupt never eats what you had already typed;
- **Goal mode** (the "+" menu, or `/goal`) turns the draft into an objective the system loops Tasks against. Attached images ride along and are always sent as scratchpad paths (a goal objective is re-injected as text every round — see [Goal mode](/goal-mode)); text is still required, since a picture alone states no objective, and file attachments are refused. Round 1's bubble shows the attachments in full, later rounds collapse them into a chip that expands on click;
- `/agent` and `/model` stage their pick instead of acting on it: the chosen Agent or model becomes a chip above the text body and nothing is sent yet, so you keep typing — Enter/Send is what hands the conversation over (a new chat for that Agent) or forks it onto the chosen model, carrying the text along; with an empty composer a default message is filled in, and the chip's × cancels. Both chips are cached with the draft, so they survive a reload or a trip to another conversation together with the text. A model fork additionally waits for the Session to be idle — it continues from the Session's Trace, which a running turn or a compaction is still writing — and a line above the composer says so while it waits;
-- The toolbar's right side carries a **context ring**: a single-colour gauge of how full the context is, measured against the point compaction fires (the Agent's `compaction.max_context_length`, capped by what the model window leaves room for), amber past 80% and red past 95%. Clicking it opens the **context panel** — the used/threshold figures, a bar that runs to the model's full window split into the six things the context is made of (system prompt, tool definitions, user messages, model messages, tool requests, tool results), with "Max context N" naming that scale underneath it, and a Top 5 of the tools, or of the files the file tools touched, switched by a pair of text buttons on the heading line and listing file names alone with the full path on hover. The dashed cutter on that bar is where compaction fires, and it is draggable: drag it (or focus it and use the arrow keys — Shift for a coarser step) and releasing asks to confirm the new threshold in a dialog whose number you can still edit. Confirming writes it to the Agent and it applies to this conversation immediately, mid-run included;
+- The toolbar's right side carries a **context ring**: a single-colour gauge of how full the context is, measured against the point compaction fires (the Agent's `compaction.max_context_length`, capped by what the model window leaves room for), amber past 80% and red past 95%. Clicking it opens the **context panel** — the used/threshold figures, a bar that runs to the model's full window split into the six things the context is made of (system prompt, tool definitions, user messages, model messages, tool requests, tool results), with "Max context N" naming that scale underneath it, and a Top 5 of the tools, or of the files the file tools touched, switched by a pair of text buttons on the heading line and listing file names alone with the full path on hover. The dashed cutter on that bar is where compaction fires, and it is draggable: drag it (or focus it and use the arrow keys — Shift for a coarser step) and releasing asks to confirm the new threshold in a dialog whose number you can still edit. The stretch of the bar past the cutter is hatched — room the model has but compaction fires before the Session can use — and moves with the value while you drag. Bar segments and legend rows are clickable: a click pins the highlight until you click it again or pick another. The legend rows are buttons, so the pin is reachable by keyboard, and a pinned row keeps a ring that hover alone does not draw. Confirming writes it to the Agent and it applies to this conversation immediately, mid-run included;
- When human approval is required, tool calls show inline allow/deny buttons in the message stream; the approval mode can be changed mid-Session;
- While the engine waits out a reconnect backoff (≥2s), the retry line shows a live countdown to the next attempt with inline **Retry now** (skips the remaining wait) and **Give up** (the ordinary abort) controls;
- When the model API rejects the Session's credentials (an authentication failure), the composer grays out and disables — recoverably: the Session pins only the model reference, and credentials come from the current Project config. The notice's primary button opens the Models page; saving a new API key there unlocks the composer by itself (open tabs unlock live via a `credentials_updated` event, and after a reload the composer stays unlocked because the credential update is newer than the recorded auth failure). A "Retry" button clears the state manually for another attempt (it re-arms if the key is still bad), a completed request always clears it, and "New Session" remains as the escape to a fresh draft. The disabled composer keeps its draft selectable, so a long message that failed to send can still be copied out.
diff --git a/packages/docs/content/web-app.zh.md b/packages/docs/content/web-app.zh.md
index 6b9a920d..ed0c0d3d 100644
--- a/packages/docs/content/web-app.zh.md
+++ b/packages/docs/content/web-app.zh.md
@@ -79,7 +79,7 @@ penguin web
- 输入 `/` 打开快捷菜单:触发上下文压缩(`/compact`)、把会话交接给其他 Agent(`/agent`)、切换模型(`/model`)——两个切换命令都只在进行中的会话里提供,草稿没有可切换的对话,Agent 与模型本就在草稿页选定——或勾选已安装的 Skill——所选 Skill 会以 `[use_skills]` 块随消息发送;
- Task 运行期间输入框保持可用,工具条只保留一个操作按钮:输入框为空时是**停止**,一旦输入内容即变为**发送**,其行为遵循工具条「更多设置」弹出分组中的**运行中发送方式**(一个可扩展的设置面板,草稿态同样可设,选择会被记忆):**插话**(默认)把文字以 `[user_steering]` 用户消息随下一轮送达运行中的 Agent;**排队** 把整条消息暂存在服务端,本轮结束后自动作为普通新消息发出(期间在输入框附近显示「N 条已排队」提示;队列存放在服务端,刷新页面不丢失)。每条排队提示——未送达的插话或排队中的跟进消息——行尾都带一枚**撤回**按钮(一个向回弯的箭头图标),可把消息(含附件)撤回到输入框编辑后重新发送;插话一旦送达模型即不可撤回。运行在插话送达之前结束时(工具跑着的时候按停止是最常见的情形)不用你动手:这条插话会自动回到输入框,附件一并还原,改完可以直接再发——打断不会吃掉已经打好的话;
- `/agent` 与 `/model` 都是暂存而非立即生效:选中的 Agent 或模型只在文本区上方留下一枚 chip,此时不发送任何内容,可以继续输入——按 Enter / 点发送才真正交接(为该 Agent 新开一个对话)或换用所选模型继续本对话,输入的文字随之带走;正文为空时自动填入默认消息,点 chip 上的 × 即可取消。两枚 chip 都随草稿缓存,刷新页面或切到别的会话再回来时与文字一同恢复;其中切换模型还需等待会话空闲——新会话要从本会话的 Trace 接续,而运行中的一轮或压缩仍在写入——等待期间输入框上方会给出说明;
-- 工具条右侧是**上下文占用圆环**:单色圆环,标尺是压缩真正触发的那个点(Agent 的 `compaction.max_context_length`,被模型窗口留出的余地钳住),>80% 转琥珀、>95% 转红。点击展开**上下文构成面板**:`已用 / 阈值` 数字、一条以模型完整窗口为标尺的条形(已填充部分按系统提示词、工具定义、用户消息、模型消息、工具请求、工具结果六项细分,条形下方以「最大上下文 N」标出该标尺),以及工具 / 文件两份 Top 5(标题行上的一对文字按钮切换,文件视图只列出 `read_file` / `edit_file` / `write_file` 触及的文件名,完整路径悬停可见)。条形上的虚线切刀标出压缩触发点,且可以拖动——拖动它(或聚焦后用方向键,按住 Shift 步长更大),松手即弹出确认框,框内的数值仍可编辑;确认后写入该 Agent,并对当前这段对话立即生效,运行中也不例外;
+- 工具条右侧是**上下文占用圆环**:单色圆环,标尺是压缩真正触发的那个点(Agent 的 `compaction.max_context_length`,被模型窗口留出的余地钳住),>80% 转琥珀、>95% 转红。点击展开**上下文构成面板**:`已用 / 阈值` 数字、一条以模型完整窗口为标尺的条形(已填充部分按系统提示词、工具定义、用户消息、模型消息、工具请求、工具结果六项细分,条形下方以「最大上下文 N」标出该标尺),以及工具 / 文件两份 Top 5(标题行上的一对文字按钮切换,文件视图只列出 `read_file` / `edit_file` / `write_file` 触及的文件名,完整路径悬停可见)。条形上的虚线切刀标出压缩触发点,且可以拖动——拖动它(或聚焦后用方向键,按住 Shift 步长更大),松手即弹出确认框,框内的数值仍可编辑;切刀右侧直到模型窗口的一段以斜纹虚化——这是模型还有、但压缩先触发因而暂时用不到的空间,与左侧的空余轨道分开,拖动时随待定值实时移动;条形的填充段与图例行都可点击:点击即钉住该项的高亮,再点一次或点别的项解除——图例行是按钮,钉住也可由键盘到达,钉住的那一行带一圈悬停不会画的描边;确认后写入该 Agent,并对当前这段对话立即生效,运行中也不例外;
- 需要人工审批时,工具调用在消息流中内联显示“允许 / 拒绝”按钮;审批模式在会话中途可随时调整;
- 引擎在重连退避等待(≥2 秒)期间,重试提示行会实时倒计时到下一次尝试,并内联提供**立即重试**(跳过剩余等待)与**放弃**(普通中断)两个按钮;
- 模型 API 拒绝该 Session 的凭据(鉴权失败)时,输入框会置灰禁用——但可恢复:Session 锁定的只是模型引用,凭据取自当前 Project 配置。提示条的主按钮跳转到模型配置页;在那里保存新的 API key 后输入框会自动解锁(已打开的标签页经 `credentials_updated` 事件即时解锁;刷新后也保持解锁,因为凭据更新时间晚于记录的鉴权失败时间)。「重试」按钮可手动清除该状态再试一次(key 仍无效时会重新变灰),一次成功的请求总会清除该状态,「新建会话」仍作为跳到全新草稿的出口。禁用态的输入框保留草稿且可选中——发送失败的长消息仍能复制出来。
diff --git a/packages/web/src/features/chat/context-gauge.tsx b/packages/web/src/features/chat/context-gauge.tsx
index e5eef2d4..a9d029aa 100644
--- a/packages/web/src/features/chat/context-gauge.tsx
+++ b/packages/web/src/features/chat/context-gauge.tsx
@@ -42,7 +42,11 @@
* derivation, so they differ only when the Agent's config changed after this page loaded. The
* parts subdivide the filled run; their exact shares are the legend's job, since at low
* occupancy the run is only a few pixels wide. Hovering a segment or its legend row links the
- * two: the row lights up and the other segments fade.
+ * two: the row lights up and the other segments fade, and clicking either pins that link until
+ * it is clicked again or another part is picked — the pinned legend row carries a ring as well
+ * as the wash, so it does not read as a hover that happened to stay. The stretch past the
+ * cutter is hatched rather than plain: it is room the model has but compaction fires before the
+ * Session can use, and it follows the pending value while the cutter is dragged.
*
* The cutter is also the control that moves the threshold. Dragging it (or focusing it and
* using the arrow keys) proposes a value on a 1,000-token lattice, and the release opens a
@@ -367,6 +371,13 @@ function ContextPanel({
// below. One piece of state for both lists, so a hovered ranking row cannot also dim the bar
// it has no segment in.
const [hovered, setHovered] = useState<string | null>(null);
+ // A click pins a part's highlight — the segment and its legend row together — until the
+ // same part is clicked again or another one is picked, so a reader can hold a highlight
+ // while moving the pointer elsewhere; a hover still wins while it lasts.
+ const [pinned, setPinned] = useState<string | null>(null);
+ const togglePinned = (key: string): void =>
+ setPinned((current) => (current === key ? null : key));
+ const lit = hovered ?? pinned;
const [ranking, setRanking] = useState<RankingView>(lastRankingView);
const pickRanking = (view: RankingView) => {
lastRankingView = view;
@@ -409,7 +420,14 @@ function ContextPanel({
// rather than zero, so both render `—` instead of describing a context that no longer exists.
const unmeasured = unknown || data?.contextClosed === true;
const composition = data === null ? null : contextComposition(data, now);
- const hoveredPart = composition?.parts.some((p) => p.key === hovered) ? hovered : null;
+ const litPart = composition?.parts.some((p) => p.key === lit) ? lit : null;
+ // The room past the compaction threshold, as a fraction of the bar: hatched below the fills
+ // so it reads as room the model has but compaction fires before the Session can use —
+ // distinct from the plain free run left of the cutter — and it follows the pending value
+ // while the cutter is dragged.
+ const shownThreshold = pendingThreshold ?? threshold;
+ const beyondFraction =
+ shownThreshold === null ? null : thresholdFraction(shownThreshold, windowTokens);
return (
<>
@@ -452,6 +470,13 @@ function ContextPanel({
style={{ marginBottom: MARK_OVERHANG_PX }}
>
<div aria-hidden className="absolute inset-0 bg-gray-200 dark:bg-gray-800">
+ {beyondFraction !== null && beyondFraction < 1 && (
+ <div
+ title={S.chat.contextBeyondThreshold}
+ className="context-hatch absolute inset-y-0 right-0"
+ style={{ left: `${beyondFraction * 100}%` }}
+ />
+ )}
<div
className="absolute inset-y-0 left-0 flex overflow-hidden"
style={{ width: `${fill * 100}%`, minWidth: now > 0 ? MIN_FILL_PX : 0 }}
@@ -463,9 +488,10 @@ function ContextPanel({
title={`${PART_LABELS[p.key]()} ~${humanizeTokens(p.tokens)} · ${p.percent}%`}
onMouseEnter={() => setHovered(p.key)}
onMouseLeave={() => setHovered(null)}
+ onClick={() => togglePinned(p.key)}
style={{ flexGrow: p.tokens, flexBasis: 0 }}
- className={`h-full transition-opacity duration-150 ${p.color} ${
- hoveredPart !== null && hoveredPart !== p.key ? "opacity-25" : ""
+ className={`h-full cursor-pointer transition-opacity duration-150 ${p.color} ${
+ litPart !== null && litPart !== p.key ? "opacity-25" : ""
}`}
/>
) : null,
@@ -505,8 +531,10 @@ function ContextPanel({
swatch={p.color}
tokens={p.tokens}
percent={p.percent}
- highlighted={hovered === p.key}
+ highlighted={lit === p.key}
+ pinned={pinned === p.key}
onHover={(on) => setHovered(on ? p.key : null)}
+ onSelect={() => togglePinned(p.key)}
/>
))}
</ul>
@@ -735,7 +763,7 @@ function ThresholdCutter({
style={
fraction > 0.5 ? { right: `${(1 - fraction) * 100}%` } : { left: `${fraction * 100}%` }
}
- className="absolute -bottom-5 rounded bg-gray-900 px-1 py-px font-mono text-[10px] whitespace-nowrap text-white dark:bg-gray-100 dark:text-gray-900"
+ className="absolute -bottom-6 rounded bg-gray-900 px-1.5 py-0.5 font-mono text-xs whitespace-nowrap text-white dark:bg-gray-100 dark:text-gray-900"
>
{humanizeTokens(shown)}
</span>
@@ -832,7 +860,9 @@ function ShareRow({
percent,
mono = false,
highlighted = false,
+ pinned = false,
onHover,
+ onSelect,
}: {
label: string;
/** Tooltip of the label, when it should say more than the label does; the label is its own otherwise. */
@@ -844,16 +874,20 @@ function ShareRow({
percent: number;
mono?: boolean;
highlighted?: boolean;
+ /** Pinned rather than merely hovered — the carrier hover never draws, so `aria-pressed` has something to agree with. */
+ pinned?: boolean;
onHover?: (on: boolean) => void;
+ /** A click pins the row's highlight (the six parts); the rankings pass none and stay hover-only. */
+ onSelect?: () => void;
}) {
- return (
- <li
- onMouseEnter={() => onHover?.(true)}
- onMouseLeave={() => onHover?.(false)}
- className={`-mx-1 flex items-center gap-1.5 rounded px-1 py-px transition-colors duration-150 ${
- highlighted ? "bg-gray-100 dark:bg-gray-800" : ""
- }`}
- >
+ // The row's own box: padding, rounding and both highlight carriers. It sits on the <li> for a
+ // hover-only row and on the <button> for a selectable one, so the two measure identically and
+ // the button's hit area is the whole padded row rather than the text inside it.
+ const boxClass = `flex items-center gap-1.5 rounded px-1 py-px transition-colors duration-150 ${
+ highlighted ? "bg-gray-100 dark:bg-gray-800" : ""
+ } ${pinned ? "inset-ring-1 inset-ring-gray-400 dark:inset-ring-gray-600" : ""}`;
+ const cells = (
+ <>
{swatch !== undefined && (
<span aria-hidden className={`h-2 w-2 shrink-0 rounded-[2px] ${swatch}`} />
)}
@@ -869,6 +903,29 @@ function ShareRow({
<span className="w-8 shrink-0 text-right font-mono text-gray-400 dark:text-gray-500">
{percent}%
</span>
+ </>
+ );
+ // The bar's segments sit inside its aria-hidden track and stay mouse-only, so the legend is the
+ // only surface pinning can be reached from at all: a selectable row is a real button carrying
+ // the toggle's state, and the <li> then keeps nothing but the negative margin.
+ return (
+ <li
+ onMouseEnter={() => onHover?.(true)}
+ onMouseLeave={() => onHover?.(false)}
+ className={onSelect === undefined ? `-mx-1 ${boxClass}` : "-mx-1"}
+ >
+ {onSelect === undefined ? (
+ cells
+ ) : (
+ <button
+ type="button"
+ aria-pressed={pinned}
+ onClick={onSelect}
+ className={`w-full cursor-pointer text-left outline-none focus-visible:ring-2 focus-visible:ring-gray-400/60 ${boxClass}`}
+ >
+ {cells}
+ </button>
+ )}
</li>
);
}
diff --git a/packages/web/src/lib/strings-en.ts b/packages/web/src/lib/strings-en.ts
index eb2b4a77..8bfe28cf 100644
--- a/packages/web/src/lib/strings-en.ts
+++ b/packages/web/src/lib/strings-en.ts
@@ -2178,6 +2178,9 @@ Scenarios:
contextBreakdownFailed: "Could not read the context composition",
contextThresholdCutter: "Compaction threshold",
contextThresholdHover: (n: string): string => `Compaction threshold ${n} (drag to adjust)`,
+ /** Tooltip of the hatched stretch of the bar past the cutter: room the model has, unusable before compaction fires. */
+ contextBeyondThreshold:
+ "Room past the compaction threshold: compaction fires first, so this part is not usable yet",
contextThresholdTitle: "Change the compaction threshold",
contextThresholdBody: (agentName: string, old: string): string =>
`Change ${agentName}'s compaction threshold from ${old} to the value below? It takes effect immediately, including the running conversation.`,
diff --git a/packages/web/src/lib/strings.ts b/packages/web/src/lib/strings.ts
index 3d7a78ea..a7b05103 100644
--- a/packages/web/src/lib/strings.ts
+++ b/packages/web/src/lib/strings.ts
@@ -2176,6 +2176,8 @@ Benchmark:
/** The dashed cutter on the panel's bar: its accessible name, and its tooltip naming the threshold it stands on. */
contextThresholdCutter: "压缩阈值",
contextThresholdHover: (n: string): string => `压缩阈值 ${n}(拖动可调整)`,
+ /** Tooltip of the hatched stretch of the bar past the cutter: room the model has, unusable before compaction fires. */
+ contextBeyondThreshold: "压缩阈值之上的空间:压缩会先触发,这部分暂时用不到",
/** Confirmation for a dragged (or arrowed) threshold: dialog name, body (agent name + the threshold being replaced), the editable field and its rejection, the note when the model window will cut the typed value down, and the toast on success. */
contextThresholdTitle: "修改压缩阈值",
contextThresholdBody: (agentName: string, old: string): string =>
diff --git a/packages/web/src/styles.css b/packages/web/src/styles.css
index 27b35763..0ccc53d1 100644
--- a/packages/web/src/styles.css
+++ b/packages/web/src/styles.css
@@ -525,6 +525,28 @@
still present, just not moving. */
}
+/* The stretch of the context panel's bar past the compaction threshold: hatched, so it reads as
+ room the model has but compaction fires before the Session can use — distinct from the plain
+ free run left of the cutter. The stripe is the only carrier of that meaning (its `title` sits
+ inside the bar's aria-hidden track), so each theme weights its own ink to clear 3:1 against
+ the track it is drawn on: gray-200 in light, and in dark this app's own override of gray-800
+ (#1f1f1f, far darker than the stock value), which is why the dark stripe is the lighter ink
+ of the two. */
+.context-hatch {
+ background-image: repeating-linear-gradient(
+ 135deg,
+ color-mix(in oklab, var(--color-gray-600) 70%, transparent) 0 2px,
+ transparent 2px 6px
+ );
+}
+.dark .context-hatch {
+ background-image: repeating-linear-gradient(
+ 135deg,
+ color-mix(in oklab, var(--color-gray-400) 60%, transparent) 0 2px,
+ transparent 2px 6px
+ );
+}
+
/* ---------- Minimal typography for Markdown body content (no typography plugin) ---------- */
.md-body {