Skip to content

test: remove 332 low-value renderer tests - #37517

Merged
OrcaWin merged 4 commits into
mainfrom
codex/remove-low-value-tests-962-963
Nov 2, 2026
Merged

OrcaWin merged 4 commits into
mainfrom
codex/remove-low-value-tests-962-963

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 54 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​39 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7018 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6979
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​42 $\color{#cf222e}{\Huge{\mathbf{−}}}$​82 $\color{#cf222e}{\Huge{\mathbf{−}}}$​40

ELI 5

Remove 332 low-value renderer test declarations, including 23 entire suites.

What Changed

Review 450 authored declarations across 60 sources; remove 332 and retain 118 unchanged. Delete mocked forwarding, call-order transcripts, fixture projections, private bookkeeping and smoke checks. Remove unused test fixtures/imports, 23 timing rows and retired assertions from four reliability gates. Preserve historical executed commands and explicitly limit their current coverage claims. Production code is unchanged.

Why

These examples provide little regression protection for their maintenance and execution cost. Whole-suite deletion was considered for every source. Retained tests check concrete DOM focus and layout outcomes, actual xterm reflow, GC collectability, queue and work limits, stale callbacks, cancellation and delivery-credit boundaries. Removing the other examples deliberately loses their specific alarms; no equivalent replacement coverage is claimed.

Linked Issue

Maintainer-requested comprehensive test audit; no pre-existing issue.

Visual Proof

N/A — tests and related metadata only.

Testing

  • Pinned external formatting/parsing, retained callback/context integrity, removed-import checks and inert lint passed.
  • Combined timing and reliability metadata changes verified; historical executed commands preserved.
  • Exact publication tree, source outcomes, owner pins and commit parent independently verified.
  • Fresh current-head CI and aggregate PR gate passed (pending).

No local project tests, builds, typechecks, installs or apps ran. CI provides project execution.

Risk

Low: test and metadata changes only. The removed examples no longer provide their former alarms, including registry atlas-recovery routing, reveal/repaint call ordering, fake marker cleanup and mocked metric/resize forwarding. Retained tests are not replacements. Historical results do not validate the changed current commands. Reverting restores the tests. Cross-platform, remote/mixed-version, mobile and folder-workspace alarm losses were considered.

AI Disclosure

Prepared with Codex and recommendation-only audit agents; final finite decisions and original source bodies root-reviewed.

Review

All 450 recommendations and 60 original test bodies reviewed. Dependency reads remain bounded; comprehensive audit and historical identity reconciliation remain open.

Agent skill upstream boundary

  • Not applicable: no upstream skill-installer material copied or translated.

Checklist

  • Rationale, losses, compatibility impact and revert path reviewed.
  • Visual proof is N/A with reason.
  • Current-head CI and aggregate PR gate passed (pending).

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Walkthrough

The pull request removes or narrows tests across renderer library and pane-manager areas. It also updates reliability-gate commands, coverage claims, and historical-evidence notes to reflect those removals. CI shard timing entries are deleted. No product implementation changes are shown.

Merge Risk: Low · up to f193f

Blink restoration when a retained WebGL pane is revealed is no longer tested. This bounded coverage gap is suitable for follow-up and does not by itself block merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title "test: remove 332 low-value renderer tests" matches the main change: the PR removes 332 test declarations (including 23 entire suites) from renderer test files, with no production code chang…
Description check Passed The description follows the repository template's sections. It has an ELI5 summary, a What Changed section, a Why section, a Linked Issue section, Visual Proof marked N/A with a reason, Testing with c…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test: remove 332 low-value renderer tests" matches the main change: the PR removes 332 test declarations (including 23 entire suites) from renderer test files, with no production code changes. It is specific and follows the conventional-commit style. The title does not mention the timing and reliability-gate metadata edits, which the description says is a secondary part of the change.

Full details: Description check

Explanation

The description follows the repository template's sections. It has an ELI5 summary, a What Changed section, a Why section, a Linked Issue section, Visual Proof marked N/A with a reason, Testing with checkboxes, a Risk section, and AI Disclosure. The Linked Issue section says there is no pre-existing issue and cites a maintainer request. The Risk section names the lost alarms and the revert path. The Risk section does not set a Level value (it still contains the template placeholder), and the Testing section marks CI as pending. The description also says the 'Fixes #' line is absent. These gaps are minor. The description is mostly complete.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 14 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread config/reliability-gates.jsonc Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up Comments

Nitpick Restore one parsed foreground refresh test at the scheduler boundary.

30-113: Trivial · Functional Correctness · Quick win

Restore one parsed foreground refresh test at the scheduler boundary.

The PR deletes the only test that asserts a visible-row refresh after a foreground writeTerminalOutput(..., { forceForegroundRefresh: true }) parses. The retained tests pass that option but do not assert the refresh. The current behavior works. A future change to the forwarding in pane-terminal-output-writer.ts:210-214 could leave foreground TUI output stale until more output arrives, and no retained test would fail.

Restore one focused test in the retained scheduler test file:

Suggested fix
-import { createTerminal, loadScheduler } from './pane-terminal-output-scheduler-test-harness'
+import {
+  createForegroundTerminal,
+  createTerminal,
+  loadScheduler
+} from './pane-terminal-output-scheduler-test-harness'
+  it('synchronously refreshes visible rows after foreground output parses', async () => {
+    const { writeTerminalOutput } = await loadScheduler()
+    const terminal = createForegroundTerminal()
+    terminal.write.mockImplementation((_data: string, callback?: () => void) => {
+      terminal.buffer.active.cursorY = 3
+      callback?.()
+    })
+
+    writeTerminalOutput(terminal, '中文 PowerShell repaint\r\n', {
+      foreground: true,
+      forceForegroundRefresh: true
+    })
+
+    expect(terminal._core.refresh).toHaveBeenCalledWith(0, 23, true)
+    expect(terminal.refresh).not.toHaveBeenCalled()
+  })
+
   it('rotates terminals with remaining backlog behind untouched queued terminals', async () => {

Open the source location


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2b6bed64-f854-4b29-a223-61dcd4cf1d1a
Commits

Reviewing files that changed from the base of the PR and between fb988f6 and 968e300.

Files selected for processing: 1
  • config/reliability-gates.jsonc

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up Comments

Nitpick Restore coverage for blink restoration with retained WebGL.

53-53: Trivial · Functional Correctness · Quick win

Restore coverage for blink restoration with retained WebGL.

The normal PaneManager path retains WebGL addons during suspension. The surviving cursor tests always use webglAddon: null, so they do not detect a regression in the combined retained-WebGL and cursor-blink lifecycle. Restore the fixture option and the removed focused case at this changed line.

Suggested fix
-function createTestPane(options: { cursorBlink?: boolean } = {}): TestPane {
+function createTestPane(options: { cursorBlink?: boolean; webglAddon?: boolean } = {}): TestPane {
...
-    webglAddon: null,
+    webglAddon: options.webglAddon ? ({ dispose: vi.fn() } as never) : null,
...
+  it('restores blink on the retained-hidden-WebGL path, which skips dispose', async () => {
+    const owner = {}
+    const pane = createTestPane({ webglAddon: true })
+    const addon = pane.webglAddon
+    await write(pane.terminal, 'ready$ ')
+    await flushRender()
+
+    suspendPaneRendering([pane], { owner, livePanes: () => [pane] })
+    expect(addon?.dispose).not.toHaveBeenCalled()
+    expect(isTerminalCursorBlinkSuspended(pane.terminal)).toBe(true)
+
+    resumePaneRendering([pane], owner)
+    pane.terminal.focus()
+    await nextFrame()
+    expect(rendersBlinkingCursor(pane)).toBe(true)
+  })

Open the source location


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 71c549df-3ae1-4fa5-afba-c6b0b934bf56
Commits

Reviewing files that changed from the base of the PR and between 968e300 and f193f4b.

Files selected for processing: 1
  • src/renderer/src/lib/pane-manager/pane-cursor-blink-suspension.test.ts
Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/lib/pane-manager/pane-cursor-blink-suspension.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@OrcaWin
OrcaWin merged commit 509461a into main Nov 2, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant