Extract web-host agent launch path to fix max-lines lint break on main#8174
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe web-runtime-session-active branch in 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
Summary
verifyis currently failing on every open PR — including ones that don't touch this file — becausesrc/renderer/src/lib/launch-agent-in-new-tab.tsis over the oxlintmax-lineslimit (303/300 counted lines) onmain:verify, but their combination onmaincrossed the limit (merge race —verifydoesn't run onmainpushes, so this landed silently).config/max-lines-baseline.txt, and per AGENTS.md the fix is to split, not suppress.This extracts the web-runtime host launch branch (stale-local-tab pruning +
createWebRuntimeSessionTerminalcall with its created/failed handling) intolaunch-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-widemax-lineserrors: 0 (was 1)npx vitest run --config config/vitest.config.tsonlaunch-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 passpnpm typecheck:web— cleanUnblocks #8172 (and any other PR whose
verifyre-runs after this merges).