coder / coder/vscode-coder

Split remote.ts by topic, starting with migrations

オープン
#1,066 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Improvement tech-debt vs-code
主要言語
TypeScript
スター
130
フォーク
48
平均マージ
3日 3時間
マージ済み PR(30日)
15

説明

\`src/remote/remote.ts\` is 1,207 lines and mixes every concern of remote setup in one class. Recent work (per-editor SSH configs, legacy authority migration) keeps growing it.

## Topics currently mixed into the class

- Setup orchestration: \`setup\`, \`setupCoderRemote\`
- Migrations: \`migrateLegacyAuthority\` (authority), \`migrateToSecretsStorage\`, \`migrateSessionTokenFile\`, \`migrateSessionAuthFromFiles\` (credentials)
- SSH config assembly: \`updateSSHConfig\`, \`writeRemoteSshConfig\`, \`buildProxyCommand\`, \`getSshConfigPath\`, \`getLogArgs\`, \`getLogDir\`
- Workspace lifecycle: \`lookupWorkspace\`, \`waitForWorkspaceReady\`, \`resolveAgent\`
- Auth/session: \`ensureLoggedInAndRetry\`, \`showSessionExpiredDialog\`, \`watchRemoteSessionAuth\`
- Binary management: \`resolveRemoteBinary\`, \`checkCompatibility\`
- Window/UI glue: \`createAgentMetadataStatusBar\`, \`watchSettings\`, \`registerLabelFormatter\`, \`closeRemote\`, \`reloadWindow\`

## Proposal

1. Extract migrations first, e.g. into \`src/remote/migrations.ts\`. They are self-contained, interact little with the rest of setup, and each has a deletion horizon; keeping them together makes them easy to find and eventually remove.
2. If that lands well, extract SSH config assembly next. It is the most test-heavy area and only needs the path resolver, settings, and logger.
3. Keep orchestration (\`setup\`/\`setupCoderRemote\`) in \`remote.ts\`.

Non-goals: no behavior changes and no new abstractions; move plain methods by topic and keep the telemetry span threading as is.

Filed by Claude Code for @EhabY.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start in src/remote/remote.ts by reading migrateLegacyAuthority, migrateToSecretsStorage, migrateSessionTokenFile, and migrateSessionAuthFromFiles, along with their callers in setup and setupCoderRemote. Extract these plain methods into src/remote/migrations.ts while preserving behavior, deletion horizons, and telemetry span threading; the migration flow should continue to work unchanged.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript
領域
devtools
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。