Summary
GitPoller (src/main/git-poller.ts) and PrPoller (src/main/pr-poller.ts) are constructed, have their callbacks wired, and are torn down on quit — but nothing ever starts them, and if anything did, the renderer would discard their output. They look like a live feature but are dead code in two independent ways.
The real git/PR status the sidebar shows comes from the shell integration over the V1 pipe, not from these classes.
Dead in two ways
1. Never started. An exhaustive search for these identifiers across src/ returns only six hits — no .watch() / .startPolling() call site exists:
| src/main/index.ts:121-122 | constructed |
| src/main/index.ts:385, 397 | onUpdate(...) callbacks registered |
| src/main/index.ts:890-891 | unwatchAll() / stopAll() on quit |
2. Their output would be dropped anyway. Both callbacks emit METADATA_UPDATE with a hardcoded empty surfaceId (index.ts:390):
surfaceId: '', // will be mapped via cwd → workspace
That mapping was never implemented, and the renderer guards on it — src/renderer/App.tsx:504:
if (!cmd.surfaceId) return;
const ws = workspaceForSurface(cmd.surfaceId);
if (ws) handleSurfaceMetadata(cmd, ws, deps);
workspaceForSurface() also early-returns undefined for a falsy id (App.tsx:97). So even calling gitPoller.watch(cwd) today would update nothing.
The shell integration already does this job, correctly
It reports per-surface with a real id, which is exactly the piece the pollers are missing:
wmux-bash-integration.sh:33 — _wmux_report "report_git_branch $surface_id $branch $dirty"
wmux-powershell-integration.ps1:55 — report_git_branch $surfaceId $branch $dirty
wmux-powershell-integration.ps1:122 — report_pr $surfaceId ...
Notably PrPoller.pollIntervalMs = 45000 matches the PowerShell integration's PR poll interval exactly (wmux-powershell-integration.ps1:104 "PR polling background job (every 45 seconds)", :117 Start-Sleep -Seconds 45), which suggests PrPoller was the original main-process approach that the shell integration replaced — the cwd→surface mapping was the unfinished blocker.
Suggested fix
Remove both classes and their wiring (git-poller.ts, pr-poller.ts, and the imports/construction/callbacks/teardown in index.ts).
Reviving them instead would mean inventing the cwd→workspace mapping and would then double-report against the shell integration for every shell that already reports correctly. Deletion regresses nothing, because the code has never executed.
Happy to send a PR for the removal if you agree with the direction — or to wire them up instead if you'd rather keep a main-process fallback for shells without integration loaded.
Related observation (not part of this issue)
Only the PowerShell integration reports report_pr — bash and cmd report git branch/dirty but never PR (report_pr count: powershell 1, bash 0, cmd 0). So PR status never appears for bash/cmd users. Removing PrPoller doesn't cause that gap (the poller never ran), but it does make it permanent-by-omission rather than looking like it's handled. Worth a separate issue if you'd like PR status on bash — I'm happy to file one.
Environment
- wmux v0.26.0 (
120edd5)
- Platform-independent — not OS-specific. Both pollers are constructed unconditionally at module scope with no platform guard (the only
process.platform check nearby is index.ts:129, inside stripMotw(), unrelated), and the App.tsx:504 surfaceId guard has no platform branch. This is a static property of the source, verified by reading it rather than by running the app.
Summary
GitPoller(src/main/git-poller.ts) andPrPoller(src/main/pr-poller.ts) are constructed, have their callbacks wired, and are torn down on quit — but nothing ever starts them, and if anything did, the renderer would discard their output. They look like a live feature but are dead code in two independent ways.The real git/PR status the sidebar shows comes from the shell integration over the V1 pipe, not from these classes.
Dead in two ways
1. Never started. An exhaustive search for these identifiers across
src/returns only six hits — no.watch()/.startPolling()call site exists:|
src/main/index.ts:121-122| constructed ||
src/main/index.ts:385, 397|onUpdate(...)callbacks registered ||
src/main/index.ts:890-891|unwatchAll()/stopAll()on quit |2. Their output would be dropped anyway. Both callbacks emit
METADATA_UPDATEwith a hardcoded empty surfaceId (index.ts:390):That mapping was never implemented, and the renderer guards on it —
src/renderer/App.tsx:504:workspaceForSurface()also early-returnsundefinedfor a falsy id (App.tsx:97). So even callinggitPoller.watch(cwd)today would update nothing.The shell integration already does this job, correctly
It reports per-surface with a real id, which is exactly the piece the pollers are missing:
wmux-bash-integration.sh:33—_wmux_report "report_git_branch $surface_id $branch $dirty"wmux-powershell-integration.ps1:55—report_git_branch $surfaceId $branch $dirtywmux-powershell-integration.ps1:122—report_pr $surfaceId ...Notably
PrPoller.pollIntervalMs = 45000matches the PowerShell integration's PR poll interval exactly (wmux-powershell-integration.ps1:104"PR polling background job (every 45 seconds)",:117Start-Sleep -Seconds 45), which suggestsPrPollerwas the original main-process approach that the shell integration replaced — the cwd→surface mapping was the unfinished blocker.Suggested fix
Remove both classes and their wiring (
git-poller.ts,pr-poller.ts, and the imports/construction/callbacks/teardown inindex.ts).Reviving them instead would mean inventing the cwd→workspace mapping and would then double-report against the shell integration for every shell that already reports correctly. Deletion regresses nothing, because the code has never executed.
Happy to send a PR for the removal if you agree with the direction — or to wire them up instead if you'd rather keep a main-process fallback for shells without integration loaded.
Related observation (not part of this issue)
Only the PowerShell integration reports
report_pr— bash and cmd report git branch/dirty but never PR (report_prcount: powershell 1, bash 0, cmd 0). So PR status never appears for bash/cmd users. RemovingPrPollerdoesn't cause that gap (the poller never ran), but it does make it permanent-by-omission rather than looking like it's handled. Worth a separate issue if you'd like PR status on bash — I'm happy to file one.Environment
120edd5)process.platformcheck nearby isindex.ts:129, insidestripMotw(), unrelated), and theApp.tsx:504surfaceId guard has no platform branch. This is a static property of the source, verified by reading it rather than by running the app.