[PR #1660] [MERGED] Send terminal notification on peer session expiry #17723

Closed
opened 2026-08-05 04:07:39 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1660
Author: @bcmmbaga
Created: 3/3/2024
Status: Merged
Merged: 3/8/2024
Merged by: @mlsmaycon

Base: mainHead: cli-notif-session-end


📝 Commits (8)

  • d87d245 Add method to check if peer login is expired
  • c580db5 Implement SessionWatcher
  • 8975771 Merge branch 'main' into cli-notif-session-end
  • cb86770 Add SessionWatcher to monitor and handle session expiry
  • 14c7fb0 Add context and mutex to SessionWatcher
  • 3a1903b Update SessionWatcher initialization with context
  • 7156da2 Refactor
  • 3c816c2 Send terminal notification if UI is not running

📊 Changes

3 files changed (+150 additions, -0 deletions)

View changed files

📝 client/internal/peer/status.go (+21 -0)
client/internal/session.go (+82 -0)
📝 client/server/server.go (+47 -0)

📄 Description

Describe your changes

Upon expiration of the user session in Linux and macOS, a notification will be sent via the active terminal. However, if the UI application is installed, the terminal notification will not be sent, as the UI application will handle the notification instead.

Screenshot 2024-03-04 at 19 58 58

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1660 **Author:** [@bcmmbaga](https://github.com/bcmmbaga) **Created:** 3/3/2024 **Status:** ✅ Merged **Merged:** 3/8/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `cli-notif-session-end` --- ### 📝 Commits (8) - [`d87d245`](https://github.com/netbirdio/netbird/commit/d87d2455eee800b3c604e2c944dc30b9a77db308) Add method to check if peer login is expired - [`c580db5`](https://github.com/netbirdio/netbird/commit/c580db5f09a5f3dd3007658c06d0646322a978d7) Implement SessionWatcher - [`8975771`](https://github.com/netbirdio/netbird/commit/897577191fa2194ff491065a5c94cbf243e9f140) Merge branch 'main' into cli-notif-session-end - [`cb86770`](https://github.com/netbirdio/netbird/commit/cb86770944405ade84bd178aaef311ae80871f52) Add SessionWatcher to monitor and handle session expiry - [`14c7fb0`](https://github.com/netbirdio/netbird/commit/14c7fb04791b11a9bff783545162c78e40736f9c) Add context and mutex to SessionWatcher - [`3a1903b`](https://github.com/netbirdio/netbird/commit/3a1903b51ce9b95b6a17f32ab758c4089a70604c) Update SessionWatcher initialization with context - [`7156da2`](https://github.com/netbirdio/netbird/commit/7156da2c9ddc40fa60ae5bb465518baaaa1ff8dd) Refactor - [`3c816c2`](https://github.com/netbirdio/netbird/commit/3c816c2b81735d21f3270895c47dd89a34cd7fed) Send terminal notification if UI is not running ### 📊 Changes **3 files changed** (+150 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/peer/status.go` (+21 -0) ➕ `client/internal/session.go` (+82 -0) 📝 `client/server/server.go` (+47 -0) </details> ### 📄 Description ## Describe your changes Upon expiration of the user session in Linux and macOS, a notification will be sent via the active terminal. However, if the UI application is installed, the terminal notification will not be sent, as the UI application will handle the notification instead. ![Screenshot 2024-03-04 at 19 58 58](https://github.com/netbirdio/netbird/assets/8535888/7a51ab45-e244-4c7c-89f3-718394fe87f8) ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 04:07:39 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#17723