mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 12:39:42 +02:00
A visible-frame capture repaints each row at an absolute position, counting up to the pane's height. A terminal shorter than that clamps every address past its own height onto its last line. The overflow rows then overwrite one another, and the rows underneath are lost. Replaying a real 50-row capture into a 30-row terminal rendered 28 lines of a 45-line command and drew the frame twice. Nothing in the response said what height the frame was built for, so the client could not detect this. A capture now reports the geometry it was really taken at through `capturedGeometry` on `PaneCaptureOptions`, and the terminal response carries it as `captureCols` and `captureRows`. When the captured pane is taller than the terminal, or the size that produced the capture did not survive the load, `selectSession` replays once at the size that stuck. `resizeRetry` caps that at one attempt, so two competing fits cannot trade replays forever. The retry re-arms the full-history flag only when the pass that ran had consumed it. A tab switch takes the bounded tail, so its retry takes the tail too: clearing the flag unconditionally would upgrade that switch into a fresh scrollback capture the user never asked for, which the route's own comments put at tens of megabytes. What this repairs is a capture that won a race against the resize meant to precede it. It does not repair a capture whose pane was too tall because `Session.resize` declined the resize outright, which it does for a small viewport while a desktop viewport's size claim is live. The retry re-sends the same declined resize and captures the same pane, and `resizeRetry` then stops it. Repairing that means changing who owns the pane size, which is a policy question this does not touch. The reported geometry still helps there, because the client can see the mismatch at all rather than being blind to it. Follows #395, #396 and #397, which fixed the other ways the replayed frame and the terminal could disagree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
52 lines
2.2 KiB
TypeScript
52 lines
2.2 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/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
|
|
];
|
|
|
|
/**
|
|
* 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];
|