Commit Graph

1539 Commits

Author SHA1 Message Date
Zoltán Papp
ff6aef5e2a feat(ui): GUI debug logging follows daemon log level + debug bundle
When the daemon is set to debug/trace, the GUI now automatically writes a
rotated gui-client.log in the user's config dir and the daemon's debug bundle
collects it. The UI learns the level both at startup (daemon already in debug)
and live, by piggybacking the existing SubscribeEvents stream: the daemon
publishes a marked log-level-changed SystemEvent (and a per-subscription
snapshot), which DaemonFeed routes to guilog.DebugLog instead of an OS toast.
The UI registers its log path via a new RegisterUILog RPC so the root daemon,
which can't resolve the user's config dir, knows where to find the file.

Manual --log-file (any value) disables the daemon-driven file logging.

Fix: client/ui SetLogLevel looked up proto.LogLevel_value with the lowercase
logrus name, which never matched the uppercase enum keys and silently fell back
to INFO — so trace/debug requests from the bundle flow had no effect.
2026-06-11 18:34:48 +02:00
Eduard Gert
96f0c7a165 Revert "keep right panel always mounted"
This reverts commit 9328558dbb.
2026-06-11 17:59:25 +02:00
Eduard Gert
3f66fafb8e treat old wiretrustee domain as cloud 2026-06-11 17:46:54 +02:00
Eduard Gert
a8462e3f9b make trace disabled default and add link to report bugs and issues 2026-06-11 16:21:20 +02:00
Eduard Gert
c6d5136953 Merge remote-tracking branch 'origin/ui-refactor' into ui-refactor 2026-06-11 15:39:34 +02:00
Zoltán Papp
b35ca9fde3 Revert "fix recenter?"
This reverts commit 0d950d46f3.
2026-06-11 15:07:28 +02:00
Zoltán Papp
0853cec437 fix(ui): tray exit-node toggle no longer disables other routes
The tray Selected an exit node with append=false, which the RouteSelector
treats as "drop the whole current selection" (default-on semantics), so
enabling an exit node also turned off every non-exit routed network the
user had on. Send append=true instead and let the daemon's SelectNetworks
handler deselect only the sibling exit nodes — matching the frontend's
toggleExitNode, which already used append=true.

Add a RouteSelector regression test covering the handler sequence.
2026-06-11 15:06:37 +02:00
Eduard Gert
9328558dbb keep right panel always mounted 2026-06-11 15:04:17 +02:00
Eduard Gert
13b4bf93b9 fix settings provider order 2026-06-11 14:34:20 +02:00
Eduard Gert
0d950d46f3 fix recenter? 2026-06-10 18:24:20 +02:00
Eduard Gert
4854e5d370 Merge remote-tracking branch 'origin/ui-refactor' into ui-refactor 2026-06-10 17:42:12 +02:00
Eduard Gert
cdcdd6a44f remove close animation from dialogs 2026-06-10 17:36:29 +02:00
Eduard Gert
7648aa7015 remove close animation from language picker 2026-06-10 16:58:52 +02:00
Eduard Gert
4b705d472c fix copy to clipboard for resources 2026-06-10 16:53:15 +02:00
Zoltán Papp
8a4e686098 [client] Fix tray notification crash on Linux
The Wails notifications service connects to the D-Bus session bus in its
ServiceStartup, which Wails runs synchronously inside app.Run. daemonFeed.Watch
was started before app.Run, so the first daemon SubscribeEvents message (which
replays the cached available-update state) fanned out to the tray's update-state
listener and fired an OS notification before that startup ran. The notifier's
*dbus.Conn was still nil, so SendNotification nil-dereferenced deep in godbus and
the panic was fatal to the whole process (observed on Linux Mint).

Move daemonFeed.Watch into the ApplicationStarted hook so it runs after the
service-startup loop, and route every notification send through a new
safeSendNotification helper that recovers from a panic and logs it, so a broken
or unavailable notification bus degrades to a skipped toast instead of crashing.
2026-06-10 16:49:12 +02:00
Eduard Gert
7eaea03bc9 hide password toggle for saved psk 2026-06-10 16:46:50 +02:00
Eduard Gert
eb788cad88 fix dynamic window height on linux 2026-06-10 16:37:07 +02:00
Zoltán Papp
439b85c584 [client] Forward frontend console logs through the standard logger
Use the shared logrus logger alias and carry the JS origin in a dedicated
"ui" log field instead of inlining a [ui ...] tag in the message, keeping
frontend logs distinct from the Go-caller source.
2026-06-10 16:06:26 +02:00
Eduard Gert
11281b681b fix unclassified errors 2026-06-10 09:54:48 +02:00
Zoltán Papp
6e9f4797e9 Merge branch 'main' into ui-refactor 2026-06-09 19:10:42 +02:00
Zoltán Papp
bbba18fc96 Merge remote-tracking branch 'origin/ui-refactor' into ui-refactor 2026-06-09 19:07:45 +02:00
Eduard Gert
d70b3a3fa4 update debug bundle text 2026-06-09 18:23:07 +02:00
Eduard Gert
dac2ca4088 fix dropdown animation 2026-06-09 18:08:47 +02:00
Eduard Gert
4e1e7f9518 add common languages 2026-06-09 18:04:59 +02:00
Eduard Gert
9049974f26 lint 2026-06-09 16:33:30 +02:00
Eduard Gert
f8e3ac6d92 refactor, lint, cleanup 2026-06-09 16:31:52 +02:00
Zoltán Papp
96d31c3a5a Align Linux UI packaging deps with Wails v3 GTK4 stack
The Wails v3 tray is a pure DBus StatusNotifierItem implementation and no
longer links libappindicator (a Fyne-era dependency). Drop the
libayatana-appindicator runtime and build deps, and move the rpm package
and dev-dependency docs onto the GTK4 / WebKitGTK 6.0 stack that the
default (non-gtk3) build actually links against.
2026-06-09 12:52:46 +02:00
Viktor Liu
d56859dc5d [client] Filter DNS fallback upstreams matching our server IP to prevent loops (#6183) 2026-06-09 12:26:03 +02:00
Eduard Gert
32be58cb24 add description to translations 2026-06-09 11:33:54 +02:00
Eduard Gert
aaa5dbb606 forward ui browser logs to go 2026-06-09 10:55:56 +02:00
Viktor Liu
106527182f [client] Snapshot iptables rule maps before persisting state (#6345) 2026-06-09 10:24:51 +02:00
Viktor Liu
8e1d5b78c2 [client] Preserve user deselect-all across management route sync (#6363) 2026-06-09 10:24:17 +02:00
Eduard Gert
727e6d3004 update position of not connected text 2026-06-08 18:13:37 +02:00
Eduard Gert
4a79c24792 Merge remote-tracking branch 'origin/ui-refactor' into ui-refactor 2026-06-08 18:09:29 +02:00
Eduard Gert
6b2ae1c34c update session expiration dialog texts, add monitor aware position 2026-06-08 18:09:22 +02:00
Zoltán Papp
43175e0730 Move no-op rationale into empty function bodies
Replace the doc comments above the empty no-op stubs (bindTrayClick,
startTrayTheme, noopSessionWatcher.Dismiss/Close) with short in-body
comments explaining why each is empty.
2026-06-08 17:34:18 +02:00
Zoltán Papp
b598274424 [client/ui] Refresh profile list on CLI profile select
SwitchProfile now publishes the same profile-list-changed event that
AddProfile/RemoveProfile already emit. The daemon emits no dedicated
profile RPC event, and the React ProfileContext only refreshes on
EventProfileChanged (unlike the tray, which also re-fetches on every
status-string transition via loadProfiles). So a CLI-driven
"netbird down; profile select X; netbird up" refreshed the tray (the
down/up status flips trigger loadProfiles) but left the React profile
dropdown stale, since the select path never surfaced an event.

Publishing the marked INFO/SYSTEM event from SwitchProfile closes that
gap: dispatchSystemEvent re-emits EventProfileChanged, which
ProfileContext.refresh already subscribes to. No proto change.
2026-06-08 17:26:54 +02:00
Zoltan Papp
6e23ed4da7 [client] Add error event publishing for rejected session deadlines (#6358)
* [client] Surface session deadline rejections via SystemEvent and add timer arm debug logs

When sessionwatch.Watcher.Update rejects a deadline (pre-epoch, too far
in the future, or past the clock-skew tolerance) it silently zeroes the
status recorder, leaving the UI with no "expires in" row and no
indication of why. Publish a SystemEvent_ERROR on the AUTHENTICATION
channel so the rejection appears in the UI event feed and the user
knows re-login may be required.

Also add Debugf log lines in armTimerLocked so that warning and
final-warning timer fire-times are visible in logs without having to
add instrumentation after the fact.

https://claude.ai/code/session_01Y3bQoNgcVjTD4zDTvv7a8u

* [client] Remove verbose arm-timer debug logs from sessionwatch

The per-arm Debugf lines added noise on every deadline update.
Rejection logging already happens at the call site in engine_authsession.go;
the watcher itself needs no extra instrumentation.

https://claude.ai/code/session_01Y3bQoNgcVjTD4zDTvv7a8u

* [client] Leave userMessage empty on deadline-rejected event; use metadata key

Daemon-layer PublishEvent userMessage strings are not localized — the UI
reads metadata keys and builds its own locale-aware copy (same pattern
as the session-warning events in event.go). Drop the hardcoded English
sentence from the deadline-rejected event and instead surface the
rejection reason via a new MetaSessionDeadlineRejected metadata key so
the UI can detect and localize it.

https://claude.ai/code/session_01Y3bQoNgcVjTD4zDTvv7a8u

* [client] Revert silent deadline-rejected event; restore userMessage

MetaSessionDeadlineRejected had no UI consumer: the tray only does
metadata-driven localisation for MetaSessionWarning events; all other
SystemEvents display userMessage directly (tray_events.go). Leaving
userMessage empty made the rejection invisible to the user.

Restore the English userMessage so the generic event path shows
something, and remove the unused MetaSessionDeadlineRejected constant.

https://claude.ai/code/session_01Y3bQoNgcVjTD4zDTvv7a8u

* [client] Localize session deadline rejected notification via metadata key

Follow the same pattern as session-warning events: the daemon emits an
empty userMessage and puts the signal in a typed metadata key
(MetaSessionDeadlineRejected); the UI tray detects the key and builds a
locale-aware OS notification from i18n strings.

Changes:
- sessionwatch/event.go: add MetaSessionDeadlineRejected constant
- engine_authsession.go: empty userMessage, use the new metadata key
- ui/authsession/warning.go: re-export MetaDeadlineRejected for UI consumers
- ui/tray_events.go: gate on isDeadlineRejected alongside isSessionWarning;
  new branch calls t.notify with localized title/body
- i18n locales (en/de/hu): add notify.sessionDeadlineRejected.{title,body}

https://claude.ai/code/session_01Y3bQoNgcVjTD4zDTvv7a8u

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-08 17:10:15 +02:00
Eduard Gert
b067544c8a update padding and text 2026-06-08 16:02:42 +02:00
Eduard Gert
10d84b758f add ipv6 2026-06-08 15:22:35 +02:00
Maycon Santos
60d2fa08b0 [client] Mask sensitive data in debug bundle creation (#6364)
* [client] Mask sensitive data in debug bundle creation

* Avoid nil reference in turn and use masked constant
2026-06-08 13:17:04 +02:00
Eduard Gert
0e4d0128b6 add custom error dialog 2026-06-08 12:44:33 +02:00
Zoltán Papp
21f1142355 Merge branch 'main' into ui-refactor
# Conflicts:
#	client/ui/debug.go
#	go.mod
#	go.sum
2026-06-05 17:50:18 +02:00
Eduard Gert
9ecc083139 update missing translations 2026-06-05 14:57:32 +02:00
Eduard Gert
efd874efac add cloud / selfhosted segment in profile creation 2026-06-05 14:38:00 +02:00
Eduard Gert
5877880789 replace native confirm dialog with modals in settings 2026-06-05 13:16:39 +02:00
Eduard Gert
4427aaa31f update advanced port margin, update settings bottom bar height 2026-06-05 12:29:18 +02:00
Zoltán Papp
0ce3fbf5af [client] Tolerate already-deleted peer on profile logout, clear stale email
logoutFromProfile failed hard when the management server returned NotFound
(peer already deleted from the dashboard), blocking both profile logout and
profile removal. Treat NotFound as success — the peer is already gone, so
deregistering it is already satisfied.

Also drop the user-side per-profile state file on logout. The account email is
sourced from <profile>.state.json (written by the CLI after SSO login), which
the root daemon can't reach, so logout left a stale email showing in the UI.
Connection.Logout now removes it from the UI process after a successful logout;
the next SSO login recreates it.
2026-06-05 12:05:41 +02:00
Zoltán Papp
3967864172 [client/ui] Center windows on show under minimal WMs (XEmbed tray)
On minimal window managers (fluxbox et al, the in-process XEmbed-tray
path) the WM neither centers small windows nor restores their position
across a hide -> show round-trip, so the main, Settings, and dialog
windows opened in the top-left corner instead of centered.

These windows are created Hidden, so Wails' Linux/GTK4 backend skips its
post-Show centering pass (gated on !Hidden) and InitialPosition has no
effect on an unrealized window. Re-center from Go after Show, gated on
the minimal-WM environment via a recenterOnShow predicate (set to
xembedTrayAvailable on Linux, nil on macOS/Windows where the WM handles
placement). centerWhenReady polls from a background goroutine until the
move actually lands -- Center() moves via raw X11, which no-ops while the
GdkSurface is still nil and GTK4 realizes it asynchronously after Show().

Also reorder xembed_host_linux.go so the static helpers (xembedTrayAvailable,
goMenuItemClicked) sit at the end, after the constructor and methods.
2026-06-05 11:42:03 +02:00
Eduard Gert
296d3f124b truncate dns in main screen 2026-06-05 09:55:50 +02:00