Problem
Every time I deny a plan with feedback and the agent sends a revised version, Plannotator opens a brand new browser tab. After a few iterations I have 5+ tabs and I have to close them all manually.
Proposed solution
Track active sessions and when a new plan iteration arrives for the same session, instead of starting a fresh server on a new port:
- Kill the old server, restart on the same port — the browser tab stays on the same URL and auto-refetches
/api/plan
- Or add a
/api/plan/refresh endpoint so the new invocation can push updated content to the running server
The openBrowser() call in packages/server/browser.ts should first check for an active session — if found, skip openBrowser() entirely and let the existing tab handle the refresh. The UI side in packages/editor/App.tsx would need an SSE listener or simple polling to detect when new plan content is available.
Fall back to current behavior (new tab) when no active session is found.
Problem
Every time I deny a plan with feedback and the agent sends a revised version, Plannotator opens a brand new browser tab. After a few iterations I have 5+ tabs and I have to close them all manually.
Proposed solution
Track active sessions and when a new plan iteration arrives for the same session, instead of starting a fresh server on a new port:
/api/plan/api/plan/refreshendpoint so the new invocation can push updated content to the running serverThe
openBrowser()call inpackages/server/browser.tsshould first check for an active session — if found, skipopenBrowser()entirely and let the existing tab handle the refresh. The UI side inpackages/editor/App.tsxwould need an SSE listener or simple polling to detect when new plan content is available.Fall back to current behavior (new tab) when no active session is found.