Skip to content

test: remove redundant cases and strengthen browser and attachment coverage - #33144

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/comprehensive-test-audit-90
Oct 24, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/comprehensive-test-audit-90

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​191 $\color{#cf222e}{\Huge{\mathbf{−}}}$​127 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​64
Prod 1 0 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1

Browser close, mobile image delivery, and performance report tests had gaps that allowed incorrect routing, expired send budgets, or later-stage failures to pass. This change strengthens those checks and exercises the mobile session wrapper through its real child hooks. It also removes three redundant test declarations whose retained coverage rejects the same faults.

  • Require both browser close destinations, correct teardown ordering, and replay after the previous operation settles.
  • Verify upload slot addressing, empty uploads, the exact remaining send budget, actual image delivery, and refusal paths. Remove the repaired fixture's stale mobile typecheck exception.
  • Check each report stage's failure status and prevent subsequent stages from running; reject unknown permission modes.

Validation: 20 test sources audited; 161 → 158 test declarations. Combined focused runs pass 203 original / 204 revised runtime cases with zero skips. Node, CLI, web, and mobile test typechecks, changed-code quality, formatting, and commit hooks pass. Paired fault controls authenticate removed redundancy and strengthened assertions. No production code changes.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: 7aef6f49-c865-496b-87b7-8dae6525e611
Commits

Reviewing files that changed from the base of the PR and between 9ebe41a and c16b893.

Files selected for processing: 10
  • config/scripts/run-terminal-scale-perf-report-gate.test.mjs
  • mobile/src/session/mobile-agent-session-attachment-upload.test.ts
  • mobile/src/session/use-mobile-native-chat-image-attachments.test.ts
  • mobile/src/session/use-mobile-session-image-attachments.test.tsx
  • mobile/tests-typecheck-baseline.txt
  • src/renderer/src/runtime/browser-client-host-identity.test.ts
  • src/renderer/src/runtime/browser-workspace-tab-close-plan.test.ts
  • src/renderer/src/runtime/browser-workspace-tab-close.test.ts
  • src/renderer/src/runtime/client-hosted-browser-close-intent-replay.test.ts
  • src/shared/agent-chat-permission-host-support.test.ts
Files with no reviewable changes: 3
  • mobile/tests-typecheck-baseline.txt
  • src/renderer/src/runtime/browser-workspace-tab-close-plan.test.ts
  • src/renderer/src/runtime/browser-client-host-identity.test.ts

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

Walkthrough

The changes update tests across the performance gate, mobile image attachments, browser runtime, and permission-host support. The tests add coverage for pipeline-stage failures, upload request details, attachment send conditions, browser close and replay behavior, and unknown permission modes. One mobile test is removed from the typecheck-baseline list.

Priority: Low

Merge Risk: Minimal · up to c16b8

The updated tests retain coverage for the checked close and permission behaviors. No actionable merge-blocking issue remains after normal checks.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the main changes and validation results, but it omits required template sections, including the linked issue, visual proof or N/A explanation, testing checkboxes, AI disclosur… Complete the required template sections. Add an actual issue link after “Fixes #”, provide visual proof or state “N/A” with a reason, document testing and platforms, complete the applicable AI Disclosure and Agent skill upstream boundary se…
Docstring Coverage Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: removing redundant test cases and strengthening browser and attachment test coverage.
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: Description check

Explanation

The description explains the main changes and validation results, but it omits required template sections, including the linked issue, visual proof or N/A explanation, testing checkboxes, AI disclosure, review notes, boundary declaration, and checklist confirmations.

Resolution

Complete the required template sections. Add an actual issue link after “Fixes #”, provide visual proof or state “N/A” with a reason, document testing and platforms, complete the applicable AI Disclosure and Agent skill upstream boundary sections, add Notes for security and compatibility, and confirm the Checklist items.

Finishing Touches: 💡 1
📝 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 @coderabbitai help to get the list of available commands.

@OrcaWin
OrcaWin merged commit 38ffe31 into main Oct 24, 2026
34 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