Skip to content

Commit defb19e

Browse files
committed
feat(site): track scroll viewport auto-follow
1 parent d4a9934 commit defb19e

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,13 @@ For `"manual"` and `"unprobed"` features, set the `probe` field to
357357
`"Manual verification required — no automated probe available."` and don't add a
358358
matching entry in `packages/probe-defs/`.
359359

360+
For UI-owned viewport behavior, prefer `"manual"` plus an exact reproduction
361+
recipe over a fake automated probe. Examples: whether output while the user is
362+
scrolled up yanks the viewport to the live bottom, whether a scrollbar appears,
363+
or whether a copy/search UI opens. App-side PTY probes can observe parser output,
364+
cursor position, cell state, and query responses; they cannot observe the user's
365+
scrollback viewport unless a terminal exposes a separate automation API.
366+
360367
### Valid Tags
361368

362369
Tags in `features.json` **must** match keys in `standards.json` or `categories.json`. Using an

content/categories.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"scrollback": {
3333
"label": "Scrollback",
3434
"order": 7,
35-
"description": "Scroll buffer behavior, reverse index, total line tracking, and alternate screen interaction. Scrollback handling is one of the least standardized areas of terminal emulation — terminals differ in buffer size limits, whether alternate screen content enters scrollback, and how reverse index interacts with scroll regions.\n\nScrollback is the most implementation-specific area of terminal behavior. The ECMA-48 standard says nothing about scroll buffers — it's entirely a terminal emulator convention. Buffer sizes range from 0 lines (Alacritty's default was famously 0 on first release, fixed after user revolt) to 10 million+ (iTerm2). Kitty chose a different approach entirely: infinite scrollback stored efficiently on disk. The debate over whether the alternate screen should preserve scrollback has generated more terminal GitHub issues than almost any other topic."
35+
"description": "Scroll buffer behavior, reverse index, total line tracking, viewport auto-follow policy, and alternate screen interaction. Scrollback handling is one of the least standardized areas of terminal emulation — terminals differ in buffer size limits, whether alternate screen content enters scrollback, whether new output yanks a scrolled-up viewport back to the live bottom, and how reverse index interacts with scroll regions.\n\nScrollback is the most implementation-specific area of terminal behavior. The ECMA-48 standard says nothing about scroll buffers — it's entirely a terminal emulator convention. Buffer sizes range from 0 lines (Alacritty's default was famously 0 on first release, fixed after user revolt) to 10 million+ (iTerm2). Kitty chose a different approach entirely: infinite scrollback stored efficiently on disk. The debate over whether the alternate screen should preserve scrollback, and whether output should auto-follow while the user is reading history, has generated more terminal GitHub issues than almost any other topic."
3636
},
3737
"reset": {
3838
"label": "Reset",

content/features.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,16 @@
11971197
"body": "DECSTBM with no parameters (<code>ESC [ r</code>) resets the scroll region to the full screen. After reset, scrolling operations should affect all rows. Applications use this to restore normal scrolling behavior after using scroll regions. Failing to properly reset can leave the terminal in a state where only part of the screen scrolls, causing rendering corruption for subsequent applications.",
11981198
"probe": "Set DECSTBM 5;10, then send <code>\\x1b[r</code> (no params), write 30 lines, verify full-screen scrolling works (total lines > screen height)."
11991199
},
1200+
"scrollback.viewport-hold-output": {
1201+
"name": "Viewport holds on output",
1202+
"slug": "viewport-holds-on-output",
1203+
"url": "https://invisible-island.net/xterm/manpage/xterm.html",
1204+
"tags": ["xterm-extensions"],
1205+
"baseline": "modern",
1206+
"body": "Tests whether the visible scrollback viewport stays anchored when new output arrives while the user is scrolled up in the main screen. This is a terminal UI policy, not a VT escape sequence: the application can write output, but the terminal emulator owns the user's viewport position.\n\nThis behavior matters for long-running inline applications, build logs, and agent UIs. If output forces the viewport back to the live bottom, users lose their place while reading history. If the viewport stays anchored, the newest output remains below the visible region until the user scrolls back down or presses a key that the terminal treats as an explicit return to the live region.\n\nTerminals expose this policy under different names and defaults. xterm has <code>scrollTtyOutput</code>; Ghostty exposes <code>scroll-to-bottom</code> with separate <code>keystroke</code> and <code>output</code> flags. Synchronized output (<code>DECSET 2026</code>) should only batch painting, but the manual probe repeats the test inside a synchronized-output block because terminal UI policies can still differ around batched output.",
1207+
"probe": "Manual UI probe. Fill scrollback with at least two pages of lines, scroll the viewport up until the live bottom is no longer visible, then emit a uniquely named marker line without keyboard input. Pass if the viewport remains on the old lines; fail if it jumps to the marker at the bottom. Repeat with the marker wrapped in <code>\\x1b[?2026h</code> ... <code>\\x1b[?2026l</code> to check synchronized output, and record any terminal setting that changes the result.",
1208+
"probeStatus": "manual"
1209+
},
12001210
"extensions.kitty-keyboard": {
12011211
"name": "Kitty keyboard protocol",
12021212
"slug": "kitty-keyboard-protocol",

scripts/generate-api.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,9 @@ export function generateApi(outDir?: string): { dataPath: string; badgeCount: nu
288288
kitty: "kitty",
289289
}
290290

291-
// Merge all feature IDs
292-
const allFeatureIds = new Set([...app.featureIds, ...headless.featureIds])
291+
// Merge all feature IDs. features.json is authoritative for published
292+
// feature pages; result files may lag for manual/unprobed features.
293+
const allFeatureIds = new Set([...Object.keys(featuresJson), ...app.featureIds, ...headless.featureIds])
293294

294295
// Build features map
295296
const features: ApiData["features"] = {}

0 commit comments

Comments
 (0)