mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 16:59:43 +02:00
#555 made the primary pane page opencode's transcript with PageUp/PageDown from the wheel, because opencode draws in place on the alternate screen and leaves the browser's buffer with no scrollback. A TerminalTile (a grid tile, the split's Pane B) left every wheel to xterm, so in an opencode tile the wheel scrolled nothing, or only stale rows. The tile now runs the primary pane's own gates aimed at itself (its terminal, its session, never the active one): xterm's tracking mode, the Claude forwarding gate, then the hollow-buffer test. A wheel that passes them is consumed in the capture phase and turned into PageUp/PageDown through the shared pageKeysForTravel math, coalesced per tile (40 ms, 512 bytes, the twin of the primary pane's queue) and sent ephemeral on the tile's own socket. Every other wheel stays with xterm as before, the shell history pull included. The file names no CLI: the mode rules stay in terminal-ui.js, and terminal-tile.js joins the frontend no-id-branching guard. A plain port of the primary's baseY === 0 test would almost never fire in a grid. A tile's first capture is taken at the PTY's previous size (usually the taller primary pane's) and written into a shorter xterm, and its own row-shrinking fits (zoom-out, divider drags, tile count changes) push more rows above the screen. The tile counts those rows as its own overflow: all of them after a load whose capture held a single screen (the server's captureRows), plus whatever a local fit or a PTY geometry report pushes up, reset by a clear and clamped to baseY. The paging gate gets baseY minus that count. Output that scrolls real lines still counts as history, so the tile stops paging there. #555's other half, stripping opencode's mouse DECSETs so a drag selects text, is server-side and already reached tile sockets. It also left the tile's xterm unable to encode opencode's clicks, so the tile now installs the primary pane's desktop click report (bubble phase, gated on the session's cliMouseTracking, the tile's own link hover and selection). Both listeners, the flush timer and the page-key state are torn down in destroy(). Still out of scope, as the fileoverview now says: touch paging (tiles have no touch path) and SGR wheel forwarding to Claude's fullscreen renderer (tile-grid-plan follow-up 4), so a fullscreen Claude tile keeps leaving the wheel to xterm. Tests: test/terminal-tile-scroll.test.ts drives a real tile in the vm harness (session targeting, every no-page case, accumulation, the cap, coalescing, byte parity with the primary pane, the overflow discount through a load, a fit, a geometry report and a clear, the click report and destroy); the discount cases fail with it removed. The fake xterm gains opt-in row emulation. test/terminal-tile-scroll.browser.test.ts checks the same model against a real xterm with trusted wheel events (browser suite, not the gate). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
67 lines
2.9 KiB
TypeScript
67 lines
2.9 KiB
TypeScript
/**
|
|
* The test suites that `npm test` deliberately does NOT run, in one place.
|
|
*
|
|
* Why this file exists: the exclusion list used to live only in
|
|
* config/vitest.ci.config.ts, as literals. Anything excluded there was
|
|
* therefore reachable only by running the everything-config by hand and reading
|
|
* past its failures — and a newly excluded file was reachable by nothing at
|
|
* all, silently, because nothing pointed at it. Both configs now derive their
|
|
* globs from the arrays below, so adding a suite here puts it in exactly one
|
|
* runner and takes it out of exactly one gate.
|
|
*
|
|
* Adding a new test that cannot run in CI: put its glob in the array that
|
|
* describes WHY it cannot, not in whichever one is shortest.
|
|
*/
|
|
|
|
/**
|
|
* Playwright-driven: needs chromium and, in most cases, a live Codeman server
|
|
* on a real port. Deterministic where the environment provides both, which is
|
|
* why these are a runnable suite (`npm run test:browser`) rather than skipped.
|
|
*/
|
|
export const BROWSER_TEST_GLOBS = [
|
|
'test/tab-rail-resize.browser.test.ts',
|
|
'test/tab-activation.browser.test.ts',
|
|
'test/tab-layout-editing.browser.test.ts',
|
|
'test/session-sidebar-ux.browser.test.ts',
|
|
'test/session-options-responsive.browser.test.ts',
|
|
'test/inline-rename.test.ts',
|
|
'test/opencode-resize.test.ts',
|
|
'test/webgl-fallback.test.ts',
|
|
'test/terminal-copy-shortcut.test.ts',
|
|
'test/terminal-keycode229-recovery.browser.test.ts',
|
|
'test/capture-load-window.browser.test.ts',
|
|
'test/capture-geometry-retry.browser.test.ts',
|
|
'test/codex-predictive-echo.test.ts', // also needs a real codex binary
|
|
'test/split-pane-terminal.browser.test.ts',
|
|
'test/terminal-tile-scroll.browser.test.ts',
|
|
'test/shift-enter-keypress.browser.test.ts',
|
|
'test/key-tester.browser.test.ts',
|
|
'test/webhook-settings.browser.test.ts',
|
|
'test/case-custom-path.browser.test.ts',
|
|
'test/doctor-settings.browser.test.ts',
|
|
'test/git-status.browser.test.ts',
|
|
'test/split-pane-orchestration.browser.test.ts',
|
|
'test/split-pane-auto-collapse.browser.test.ts',
|
|
'test/spreadsheet-preview.browser.test.ts',
|
|
'test/mobile-ime-preview.browser.test.ts',
|
|
'test/run-mode-menu-scroll.browser.test.ts',
|
|
];
|
|
|
|
/**
|
|
* Wall-clock benchmarks. They assert on durations, so a loaded shared runner
|
|
* fails them for reasons that have nothing to do with the diff under test.
|
|
*/
|
|
export const PERF_TEST_GLOBS = ['test/perf-*.test.ts'];
|
|
|
|
/**
|
|
* Browser + visual regression: chromium AND environment-specific PNG baselines
|
|
* that are generated per machine. Has its own config
|
|
* (test/mobile/vitest.config.ts) because it needs serial execution, a longer
|
|
* timeout and the `pretest:mobile` vendor step — run it with
|
|
* `npm run test:mobile`, not through the configs here.
|
|
*/
|
|
export const MOBILE_TEST_GLOBS = ['test/mobile/**'];
|
|
|
|
/** Everything `npm test` skips. */
|
|
export const NON_CI_TEST_GLOBS = [...MOBILE_TEST_GLOBS, ...PERF_TEST_GLOBS, ...BROWSER_TEST_GLOBS];
|