ai-credits-breakdown: server keeps running and Running list keeps stale entries after closing a canvas

Aperta
#6,766 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, vscode
Ambito
backend

Direzione di ricerca

Start by reading ai-credits-breakdown's extension.mjs, especially the canvas close handler and its servers and stopServer logic; the issue does not identify a test file. Reproduce the three-canvas case and check whether closing one tab releases its port and removes its Running entry. Done means both happen for the closed instance while the other canvases keep running.

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

Descrizione

Summary

Each ai-credits-breakdown canvas instance starts its own local HTTP server. Closing a canvas tab does not stop that server, and the canvas stays listed under "Running".

Environment

  • VS Code 1.148.0, macOS (arm64)
  • ai-credits-breakdown from the github-awesome-copilot marketplace, installed under ~/.copilot/installed-plugins/awesome-copilot/ai-credits-breakdown

Steps to reproduce

  1. Open three AI Credits Breakdown canvases, each with a different instanceId.
  2. Confirm three listening ports on 127.0.0.1 owned by one extension-host process (lsof -nP -iTCP -sTCP:LISTEN). In my run these were 47820, 47821 and 47822 under PID 11804.
  3. Close one AI Credits Breakdown tab.
  4. Re-run the lsof check.

Expected

The closed instance's server stops (onClose calls stopServer), its port is released, and the Running list drops that entry.

Actual

  • All three ports are still listening after the close.
  • The Running list still shows three AI Credits Breakdown entries.
  • Killing the extension-host process removes all three entries from the Running list and frees the ports.

Notes

  • extension.mjs onClose removes the instance from servers and calls stopServer. The plugin logs nothing on close, so it is not confirmed whether onClose runs. Either the handler is not reached, or the host does not call it.
  • The servers return HTTP 403 to unauthenticated requests, so the ports can be identified without contacting the canvas.
Lingua principale
JavaScript
Stelle
41.8k
Fork
5.5k
Merge medio
1g 17h
PR unite (30g)
149

Preparare l'ambiente

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 github/awesome-copilot

Tutte le issue di github/awesome-copilot

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.