Skip to content

refactor(agentcontainer): split IDE setup out of setup.go and share helpers - #1584

Merged
skevetter merged 1 commit into
mainfrom
refactor/agentcontainer-ide-setup-split
Oct 19, 2026
Merged

skevetter merged 1 commit into
mainfrom
refactor/agentcontainer-ide-setup-split

Conversation

@skevetter

@skevetter skevetter commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Moves the IDE-installation block (VS Code, JetBrains, notebook IDEs, browser IDE, background extension install) from cmd/internal/agentcontainer/setup.go into setup_ide.go (//go:build !windows, same tag as the moved code).
  • Dedupes two copy-pasted flows: vscodeSettingsJSON replaces the settings-marshal in setupVSCode and setupBrowserIDE; startExtensionsInstallInBackground replaces the duplicated command.StartBackgroundOnce launcher.
  • setupVSCode's two early-return checks collapse to one len(Extensions) == 0 check.

Why

setup.go mixes IDE setup with container, git, and mount wiring. Isolating IDE setup shrinks it and removes duplicated launcher code. Behaviour, log text, lock keys, and arg order are unchanged.

Validation

  • mise run cli:format: clean, no new changes.
  • mise run cli:lint:ci: 0 issues.
  • go test ./cmd/internal/...: pass.
  • go build ./cmd/... on darwin, linux, windows: pass.
  • go vet ./cmd/internal/agentcontainer/ (darwin, windows): pass.
  • GOOS=windows golangci-lint run ./cmd/internal/agentcontainer/...: 5 issues, identical on base 91c36557c (pre-existing, not introduced).

CodeRabbit CLI

coderabbit review --agent --committed --base-commit 91c36557c failed twice with WebSocket closed (recoverable connection error). No findings were produced. Not verified.

Auto-merge

Eligible: yes. Non-test changed lines: ~288 counting the verbatim move once (218 moved + 39 edited/added + 25 new-file header + 6 removed imports); 456 raw add+delete. 2 files, no test files touched.

Next

Move mount streaming and git credentials out of setup.go.

Summary by CodeRabbit

  • Improvements
    • IDE setup continues to support VS Code, JetBrains, browser-based IDEs, and notebook environments.
    • Configured extensions continue to install in the background where supported.
    • Setup and configuration errors are reported when setup cannot be completed.

@skevetter skevetter added the surface-refactor Unattended refactor (surface) label Oct 19, 2026
@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 6bea087
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6ad5f39b697674d38e2c37d5

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 306a6258-7e7f-4fd9-9352-07dfff7191aa
📥 Commits

Reviewing files that changed from the base of the PR and between 91c3655 and 6bea087.

📒 Files selected for processing: 2
  • cmd/internal/agentcontainer/setup.go
  • cmd/internal/agentcontainer/setup_ide.go
💤 Files with no reviewable changes: 1
  • cmd/internal/agentcontainer/setup.go

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

📝 Walkthrough

IDE setup registries, dispatch, installation paths, and background extension-install helpers move from setup.go into a non-Windows implementation in setup_ide.go.

Changes: IDE setup

Layer / File(s) Summary
Registries and dispatch
cmd/internal/agentcontainer/setup.go, cmd/internal/agentcontainer/setup_ide.go
setup.go removes IDE-specific imports, registries, and installation helpers. setup_ide.go adds registries and dispatch for VS Code flavors, JetBrains servers, browser IDEs, and notebook IDEs. It also handles none and unmatched names.
VS Code and browser installation
cmd/internal/agentcontainer/setup_ide.go
VS Code setup formats and serializes settings, installs the selected flavor, and starts background extension installation when configured. Browser IDE setup configures and installs the selected server, optionally starts background extension installation, and then starts the server.
Background extension installation
cmd/internal/agentcontainer/setup_ide.go
Background helpers build internal setup commands and resolve the current executable. The browser helper uses the IDE’s async command for its lock key and subcommand.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 6bea0

No actionable issue was established in the IDE setup move. The change is ready for normal merge 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 refactor, motivation, behavior expectations, validation results, and known pre-existing lint issues. It does not follow the repository template because it omits the requir… Update the description to use the repository template. Mark Refactor as the change type, complete the AI assistance section, state the issue reference, document the test commands and the reason no integration test was needed, complete the c…
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. Analyzed 3 functions across 1 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 identifies the main change: moving IDE setup out of setup.go and sharing helper logic.
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 refactor, motivation, behavior expectations, validation results, and known pre-existing lint issues. It does not follow the repository template because it omits the required Type of change, AI assistance, Checklist, and structured Testing sections, and it does not state an issue reference such as “none.”

Resolution

Update the description to use the repository template. Mark Refactor as the change type, complete the AI assistance section, state the issue reference, document the test commands and the reason no integration test was needed, complete the checklist, and retain the existing validation details and reviewer notes.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
✨ Simplify code
  • 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.

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 6bea087
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6ad5f39c96726b5530e4db6a

@skevetter
skevetter marked this pull request as ready for review October 19, 2026 13:17
@mergify

mergify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@skevetter
skevetter merged commit 2c0ecda into main Oct 19, 2026
111 checks passed
@skevetter
skevetter deleted the refactor/agentcontainer-ide-setup-split branch October 19, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l surface-refactor Unattended refactor (surface)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant