Skip to content

test: remove redundant mobile and GitLab checks - #22748

Merged
AmethystLiang merged 1 commit into
mainfrom
rm-useless-tests
Sep 25, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
rm-useless-tests

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46 $\color{#cf222e}{\Huge{\mathbf{−}}}$​488 $\color{#cf222e}{\Huge{\mathbf{−}}}$​442
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​12 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11

ELI5

Orca behaves the same, while the test suite has fewer checks that repeated stronger checks or inspected source text. A reviewer can change internal organization without repairing those redundant tests.

What Changed

  • Removed 43 redundant test cases across mobile terminal, dictation, drawer, route, worktree, and GitLab code.
  • Kept behavior checks at their owning boundaries, including mounted mobile RPC recordings, route helper tests, GitLab API response tests, and terminal document tests.
  • Removed an unused drawer scroll observer and a GitLab function export that existed only for tests.
  • Net change: 11 fewer production lines and 442 fewer test and test-support lines.

Why

The removed cases duplicated stronger tests, inspected source spelling, checked fixtures against themselves, or exercised private helpers in isolation. Keeping the existing owner-boundary tests gives the same regression signal with less maintenance than rewriting each check at another layer. Distinct platform, protocol, release, and lifecycle guards remain.

Linked Issue

Fixes #22747

Visual Proof

N/A. There is no intended visual or interaction change; the drawer code removed tracked a scroll value that nothing read.

Testing

  • I manually tested these changes locally
  • Automated tests updated by removing duplicated cases; existing owner-boundary tests remain.

On macOS:

  • ORCA_BACKGROUND_LAUNCH=1 pnpm test src/main/gitlab — 18 files, 276 tests passed after rebase.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm --dir mobile test src/tasks/mobile-tasks-session-href.test.ts src/host-route-action-state.test.ts src/test-support/rpc-recording/pilot-recordings.test.ts -t 'host-worktree-actions-pin-open-delete|a session href built under the tasks tree|host route action state' — 11 selected tests passed after rebase.
  • Before rebase, the broader affected mobile set passed: 183 files, 1,422 tests. The full mobile suite was not completed.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm tc:node, ORCA_BACKGROUND_LAUNCH=1 pnpm --dir mobile typecheck, pnpm run check:code-quality:changed, formatting, and git diff --check passed.
  • Linux, Windows, SSH, full lint, full tests, and build are left to CI.

Review

The removed scroll value had no reader. The remaining mobile RPC recording runs the actual hook with the expected notifyClients: false and navigation: 'caller' request; the tasks route helper has its own encoding tests. GitLab diff counts remain verified through fetchMRFiles.

Agent skill upstream boundary

  • Not applicable; no skill installer code or assets changed.

Notes

This audit changes no wire or storage format. The only production edits remove unused local drawer state and a test-only export. Mobile and GitLab owner tests cover the cross-platform and SSH-adjacent paths touched here.

Checklist

  • This PR is focused on removing redundant tests and their dead seams
  • The user-facing before and after, mechanism, and reason are explained
  • Visual proof marked N/A with a reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered
  • Full pnpm lint, pnpm typecheck, pnpm test, and pnpm build will run in CI; targeted local checks passed

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes — audited the full 17-file diff and verified every removed case is duplicated by a stronger owner-boundary test, plus the two production deletions.

  • Dead drawer scroll state removed — RightDrawer.tsx drops the write-only scrollOffsetY shared value, its useAnimatedScrollHandler, and the ScrollView's onScroll/scrollEventThrottle; the value had no reader, so this is pure dead-code removal.
  • countDiffLines made private — mr-file-diffs.ts loses the test-only export; the only reference is the internal mapMRFile call.
  • Redundant tests deleted — 43 cases across mobile and GitLab removed. The one rewritten block now drives GitLab line counts through fetchMRFiles instead of the private helper, so it tests the reachable header-less payload shape end-to-end.

I spot-checked the load-bearing coverage claims rather than taking them on faith: ping/pong (host-seams.test.ts, native-document-bundle.test.ts), surface-tap routing (terminal-webview-tap-routing.test.ts), no-CDN/WebGL (terminal-webview-engine.test.ts:94), route encoding (host-route-action-state.test.ts), the worktree-activation golden, and the dictation audio budget all remain. write-queue.test.ts still uses PREVIOUS_WRITE_QUEUE_SOURCE, and its oracle-distinctness is still pinned by the assertions at lines 154-155 / 185-186. No stale references to the deleted files remain, and no unused imports or constants were left behind.

Verification this run: pnpm test src/main/gitlab/work-item-details.test.ts (10 passed) and pnpm --dir mobile test over the 12 touched files (131 passed).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

The change removes or narrows mobile and GitLab tests. RightDrawer no longer tracks scroll offset. GitLab diff-count tests now call fetchMRFiles, and countDiffLines is no longer exported.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 8e09d

The change is mergeable with follow-up test coverage for terminal font options and PR drawer scrolling. No current user-facing failure is established.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: removing redundant mobile and GitLab tests.
Description check ✅ Passed The description includes all required sections, explains the changes and rationale, links issue #22747, records visual proof as N/A with a reason, and documents targeted testing plus checks left to CI…
Linked Issues check ✅ Passed The changes implement issue #22747. They remove redundant mobile source-inspection, duplicate-oracle, route, worktree, terminal, drawer, dictation, and GitLab parser or helper tests. They retain disti…
Out of Scope Changes check ✅ Passed The reviewed changes stay within issue #22747. Production changes remove code made unused by the test cleanup or remove a test-only export. Test changes remove redundant coverage and strengthen bounda…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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 @coderabbitai help to get the list of available commands.

@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.

🧹 Nitpick comments (2)
mobile/src/terminal/terminal-webview-text-zoom.test.ts (1)

8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Assert the font options at terminal initialization.

The existing host-seams.test.ts test captures the options passed through terminal-init.ts, but it only checks cols. Assert fontFamily, fontWeight, and fontWeightBold at this owner boundary.

Suggested assertions
 expect(options[0]!.cols).toBe(80)
+expect(options[0]!.fontFamily).toBe(scope.terminalFontFamily)
+expect(options[0]!.fontWeight).toBe('300')
+expect(options[0]!.fontWeightBold).toBe('500')
config/scripts/mobile-web-app-source-control-render.test.mjs (1)

286-287: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover PR drawer scrolling in a device proof.

The drawer proof opens only the Filter sheet. It does not open a PR drawer or assert vertical scrolling. The existing PR-comments E2E test uses a seeded store fixture and checks comment cards, not device-level drawer scrolling.

This is a coverage gap, not a production scrolling defect.

Suggested note update
- * scroll behavior belongs with the device proof, which reaches a real PR.
+ * scroll behavior is not exercised here; cover it in a device proof that opens a real PR and
+ * checks vertical scrolling.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 30d0c07b-b044-4808-9762-db9079c54dea

📥 Commits

Reviewing files that changed from the base of the PR and between 9678dfb and 8e09dd7.

📒 Files selected for processing (17)
  • config/scripts/mobile-web-app-source-control-render.test.mjs
  • mobile/src/components/RightDrawer.tsx
  • mobile/src/components/right-drawer-scroll-handler.test.ts
  • mobile/src/hooks/use-mobile-dictation-source.test.ts
  • mobile/src/tasks/mobile-tasks-session-href.test.ts
  • mobile/src/terminal/document/write-queue.test.ts
  • mobile/src/terminal/terminal-webview-engine.test.ts
  • mobile/src/terminal/terminal-webview-reflow.test.ts
  • mobile/src/terminal/terminal-webview-scroll-routing.test.ts
  • mobile/src/terminal/terminal-webview-text-zoom.test.ts
  • mobile/src/terminal/terminal-webview-theme.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.test.ts
  • mobile/src/worktree/mobile-worktree-activation-source.test.ts
  • src/main/gitlab/gl-utils.test.ts
  • src/main/gitlab/mr-file-diffs.ts
  • src/main/gitlab/project-ref-parser.test.ts
  • src/main/gitlab/work-item-details.test.ts
💤 Files with no reviewable changes (11)
  • mobile/src/terminal/terminal-webview-engine.test.ts
  • mobile/src/components/RightDrawer.tsx
  • mobile/src/components/right-drawer-scroll-handler.test.ts
  • mobile/src/worktree/mobile-worktree-activation-source.test.ts
  • mobile/src/terminal/terminal-webview-reflow.test.ts
  • src/main/gitlab/project-ref-parser.test.ts
  • mobile/src/hooks/use-mobile-dictation-source.test.ts
  • mobile/src/terminal/terminal-webview-url-tap.test.ts
  • src/main/gitlab/gl-utils.test.ts
  • mobile/src/terminal/terminal-webview-theme.test.ts
  • mobile/src/tasks/mobile-tasks-session-href.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@AmethystLiang
AmethystLiang merged commit b419b31 into main Sep 25, 2026
30 of 33 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.

Remove redundant mobile and GitLab tests

1 participant