Repository navigation
Closed
Milestone
Description
Problem
The browser panel's Local servers list shows servers I don't need, and misses ones I do.
- Noise: each agent session starts its own Serena dashboard. On 2026-10-05 this machine had 23 Serena listeners (
127.0.0.1:24282–24304). Agents started them inside T3 sessions, so they count as T3-owned and pass the HTML probe, and they crowd the list. - Missing: a long-running user systemd service on a port outside the fixed list never appears. The concrete case is the Amine-Thermodynamics analyses preview:
cse-preview-Amine-Thermodynamics-daf39727.service, serving127.0.0.1:8770with working directory…/Engineering/Amine-Thermodynamics/analyses, inside the project root. It is the most useful server for that project, yet I had to add a dummy project script withpreviewUrljust to make it show up.
Current behaviour
apps/server/src/preview/PortScanner.ts (at 31a0fb3a42) probes only:
- T3-owned listeners, meaning terminal and process descendants;
COMMON_DEV_PORTS(3000, 3001, 3333, 4173, 4200, 4321, 5000, 5173–5175, 5500, 8000, 8080, 8081, 8888, 9000);- configured URLs, which come only from project scripts'
previewUrl(getConfiguredPreviewUrlsinapps/web/src/components/preview/previewEmptyStateLogic.ts).
There's no way to hide an entry, and no discovery of listeners outside these three sources.
Wanted
- Hide unwanted servers, persistently. Hide one entry from the list, plus a rule that covers a whole family, for example by process name (
serena) or by port range. Hidden entries are restorable from settings and don't come back on each scan. - Find project-relevant servers that T3 didn't start. The lsof output already gives each listener's process ID. Also consider loopback listeners whose process either runs in a user systemd unit (
/proc/<pid>/cgroup→…/app.slice/<unit>.service) or has a working directory (/proc/<pid>/cwd) inside a registered project's workspace root. These still pass through the existing bounded HTML probe and its cache. - Show why each server is listed, and rank by relevance. Label each entry with its source (T3-started, project directory, systemd unit name, common port, configured), and list the active project's servers first.
Acceptance examples (this machine)
- With a
serenahide rule, none of the 23 Serena dashboards appear. Removing the rule brings them back. - In the Amine-Thermodynamics project,
127.0.0.1:8770appears without any project script, labelled with its unitcse-preview-Amine-Thermodynamics-daf39727.service, ahead of unrelated servers. - Non-HTML listeners such as Zotero's local ports and Steam still don't appear. The HTML probe stays the gate.
Not requested
No scanning of non-loopback interfaces. No change to the probe timeout or cache rules. No killing or restarting services from the list.
Metadata
Metadata
Assignees
Labels
No labels
Activity
tannerpolley commentedon Oct 6, 2026
Queued 2026-10-05 in milestone 05 - Browser and preview. Work starts on the current fork (
sync/upstream-v2, v2.9.x), whosePortScanner.tsalready includes Batch 2c's preview fixes. This touches the server (discovery) and the interface (hide rules, labels), so it ships with a server restart.tannerpolley commentedon Oct 6, 2026
Merged into
sync/upstream-v2, ships in fork build v2.9.3 (staged; needs a server restart).localServerHideRules). The scanner applies them before probing, so hidden servers get no HTTP requests. Restore them in Settings.Not yet tried in a real client.
fix(web): show a project's local servers only in that project
fix(preview): attribute worktree servers to their project; agents edi…
fix(preview): map worktree servers to their main checkout instead of …
fix(web): a new thread's Local servers list is scoped to its project
tannerpolley commentedon Oct 14, 2026
Done and installed (v2.11.1, running since 2026-10-13 17:43):
serena(process), port3773(T3 itself) andsyncthing(process). Agents add or remove single rules against the current list, so rules set in Settings are never lost.