Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Split commands.ts by topic

Aperta
#1,135 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript, vscode

Direzione di ricerca

Start with src/commands.ts and the existing topic-split tests, including commands.netcheck.test.ts and commands.openWorkspace.test.ts; compare their organization with the command handlers. Review src/command/ before moving or renaming it, and identify the shared plumbing named in the proposal. Done means topic modules match the test split, registration delegates to them, and behavior and telemetry span threading remain unchanged.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Improvement tech-debt vs-code

src/commands.ts is 1,820 lines. One Commands class holds every command palette command, plus the helpers behind them. Its tests are already split by topic (commands.netcheck.test.ts, commands.openWorkspace.test.ts, …), but the source isn't.

Topics currently mixed into the class

  • Auth and deployments: login, logout, switchDeployment, manageCredentials, askSignOutCli, welcome/logout messages
  • Diagnostics: speedTest, netcheck, pingWorkspace, supportBundle (+ path prompt and consent), exportTelemetry, viewLogs
  • SSH config: openSshConfig, pickSshConfigPath, connectedSshConfigPath, applyRecommendedSettings
  • Opening workspaces: open, openFromSidebar, openWorkspaceFromSidebar, openDevContainer, pickWorkspace, openWorkspace, toWorkspaceAuthority, recentlyOpened, reusableAuthority, multi-window notification
  • Workspace actions: createWorkspace, updateWorkspace, navigateToWorkspace, navigateToWorkspaceSettings, openWorkspaceInDashboard, openAppStatus

Proposal

  1. Move each topic into a src/commands/ module that matches the existing test split. The shared plumbing (resolveClientAndWorkspace, resolveCliEnv, requireExtensionBaseUrl) goes in one place they all import.
  2. Keep command registration thin, so each handler delegates to its topic module.
  3. Rename or merge src/command/ first, because command/ (process exec) next to commands/ (VS Code commands) is confusing. diagnosticFlow.ts fits cli/, and exec.ts is generic process execution.

Non-goals: no behavior changes and no new abstractions. Move methods by topic and keep telemetry span threading as is. Related: #769 (command test coverage), #1066 (same split for remote.ts).

Filed by Claude Code for @EhabY.

Lingua principale
TypeScript
Stelle
132
Fork
48
Merge medio
2g 15m
PR unite (30g)
17

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/vscode-coder

Tutte le issue di coder/vscode-coder

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.