Skip to content

tailscale: handle profile switches and bus updates reactively - #3427

Merged
bbedward merged 2 commits into
duxlabs-dev:masterfrom
MishowHD:fix/tailscale-switch-updates
Sep 14, 2026
Merged

bbedward merged 2 commits into
duxlabs-dev:masterfrom
MishowHD:fix/tailscale-switch-updates

Conversation

@MishowHD

Copy link
Copy Markdown
Contributor

Description

Fixes an issue where switching Tailscale accounts/profiles (tailscale switch) leaves the Control Center widget stuck at 0 online peers until a manual refresh.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

Checklist

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Claude review

Looks correct overall — the profile-switch fix is sound; two minor issues, neither blocking.

  • Test does not cover what it names; the connect-time dirty push makes it pass regardless, core/internal/server/tailscale/manager_test.go:441
  • Dead if connected guard, unreachable when false, core/internal/server/tailscale/client.go:36

Checked: watch loop reconnect/backoff and dirty-channel handling, debounce coalescing, Self.Online override, QML ccWidgetExpanded signal exists on PluginComponent and refresh() guards on available, isMine() null/self handling, no new user-facing strings, catalogs untouched. Note the removed notify filter means every bus notify (engine status, health, prefs) now schedules a Status RPC — bounded by the 150ms debounce, but worth a sanity check on idle cost if you see extra wakeups. Model: claude-opus-5.

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found. Both findings from my previous pass are addressed in 6521f72f.

Checked: the dead if connected guard is gone and state.Self.Online = true is unconditional inside the already-connected branch (Self is a value Peer, so the field write is fine). TestWatchLoop_NotifyWithoutStateOrNetMap now waits for the connect-time fetch to settle (statusCalls == 1) before sending the {Engine: ...} notify, so it genuinely fails if the State == nil && NetMap == nil filter is restored — the debounce no longer coalesces the two signals. Also re-checked: watch loop reconnect/backoff and the non-blocking dirty push, NotifyInitialPrefs mask addition, ccWidgetExpanded is a real PluginComponent signal so the handler is on the right object, refresh() guards on available, isMine() null/self handling, no user-facing strings added, catalogs and mocks untouched.

Still worth a sanity check (unchanged from last pass, not a blocker): dropping the notify filter means every bus notify — engine status, health, prefs — schedules a Status RPC, bounded only by the 150ms debounce. If you see extra idle wakeups, filtering on Prefs/State/NetMap instead of accepting everything would keep the profile-switch fix with less churn.

Model: claude-opus-5.

@bbedward
bbedward merged commit 218f7f7 into duxlabs-dev:master Sep 14, 2026
4 checks passed
bbedward pushed a commit that referenced this pull request Sep 15, 2026
* tailscale: handle profile switches and bus updates reactively

* tailscale: address review feedback on test coverage and dead code

(cherry picked from commit 218f7f7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants