Skip to content

Extract web-host agent launch path to fix max-lines lint break on main#8174

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/split-launch-agent-web-host-tab
Jul 10, 2026
Merged

Extract web-host agent launch path to fix max-lines lint break on main#8174
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/split-launch-agent-web-host-tab

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Summary

verify is currently failing on every open PR — including ones that don't touch this file — because src/renderer/src/lib/launch-agent-in-new-tab.ts is over the oxlint max-lines limit (303/300 counted lines) on main:

This extracts the web-runtime host launch branch (stale-local-tab pruning + createWebRuntimeSessionTerminal call with its created/failed handling) into launch-agent-web-host-tab.ts. launchAgentInNewTab's public API and behavior are unchanged; the moved toast keeps its existing i18n key so all five locale catalogs are untouched.

Testing

  • pnpm exec oxlint — repo-wide max-lines errors: 0 (was 1)
  • npx vitest run --config config/vitest.config.ts on launch-agent-in-new-tab.test.ts, QuickLaunchButton.test.ts, terminal-agent-session-fork.test.ts, source-control-ai-commit-failure-launch.test.ts, launch-ai-vault-session.test.ts — 61/61 pass
  • pnpm typecheck:web — clean

Unblocks #8172 (and any other PR whose verify re-runs after this merges).

launch-agent-in-new-tab.ts crossed the 300-line oxlint max-lines limit
(303 counted lines) after #5510 and #7944 both grew it; verify only runs
on PRs, so the over-limit state landed on main via a merge race and now
fails lint for every open PR.

Move the web-runtime host launch branch (stale-local-tab pruning plus
createWebRuntimeSessionTerminal call) into launch-agent-web-host-tab.ts.
No behavior change; the i18n key is kept so locale catalogs are
untouched.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cf6f8e85-c261-469f-b35e-f8b0c2f69c08

📥 Commits

Reviewing files that changed from the base of the PR and between b93a7ee and ebb7c89.

📒 Files selected for processing (2)
  • src/renderer/src/lib/launch-agent-in-new-tab.ts
  • src/renderer/src/lib/launch-agent-web-host-tab.ts

📝 Walkthrough

Walkthrough

The web-runtime-session-active branch in launchAgentInNewTab now delegates to launchAgentInWebHostTab. The new helper handles stale local agent-tab removal, web runtime session terminal creation, conditional prompt and startup parameters, failure toasts, active tab type updates, and prompt delivery callbacks.solete inline web-terminal imports and the local stale-tab helper were removed from the original module.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and testing, but it omits required template sections like Screenshots, AI Review Report, Security Audit, and Notes. Add the missing template sections, including screenshots or no visual change, AI review, security audit, and notes, and confirm the required cross-platform checks.
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes extracting the web-host agent launch path to address the max-lines lint issue.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@brennanb2025
brennanb2025 merged commit ce1a9d4 into main Jul 10, 2026
3 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