[PR #14] [MERGED] Dev session persistence #16

Closed
opened 2026-09-04 00:49:42 +02:00 by Stone_Red · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/RedWizardsLab/EchoHub/pull/14
Author: @HueByte
Created: 2/21/2026
Status: Merged
Merged: 2/21/2026
Merged by: @HueByte

Base: devHead: dev_session_persistence


📝 Commits (1)

  • d4cf35e feat: implement session persistence with "Remember Me" functionality and logout support

📊 Changes

6 files changed (+211 additions, -22 deletions)

View changed files

📝 docs/changelog/v0.2.5.md (+10 -0)
📝 src/EchoHub.Client/AppOrchestrator.cs (+99 -5)
📝 src/EchoHub.Client/Config/ClientConfig.cs (+2 -1)
📝 src/EchoHub.Client/Services/ApiClient.cs (+16 -0)
📝 src/EchoHub.Client/UI/ConnectDialog.cs (+78 -16)
📝 src/EchoHub.Client/UI/MainWindow.cs (+6 -0)

📄 Description

"Remember Me" session persistence, ChannelService extraction, and status bar enhancements

Changes

  • Remember Me: Added "Remember me" checkbox to connect dialog that saves a 30-day refresh token, allowing password-free reconnect. Includes token rotation persistence, graceful expiry handling, [session] indicator on saved servers, and a new "Logout" menu item that revokes the token server-side and clears the saved session. Removed dead SavedServer.Token field that stored a 15-min access token but was never read back.
  • ChannelService extraction: Moved channel CRUD, validation, and membership logic from ChannelsController and ChatService into a dedicated IChannelService / ChannelService singleton. Controller is now a thin adapter with typed ChannelOperationResult error handling. IRC gateway uses IChannelService for topic/list queries.
  • Status bar: Added "EchoHub" branding (golden), color-coded connection state (green/red/yellow), and channel type indicator (public/private)
  • #general protection: Auto-recreation if missing, /leave prevention, connect-while-connected guard
  • Added FakeChannelService test helper; updated all IRC handler tests for new dependency

How to test

  • dotnet build — all projects compile with 0 errors
  • dotnet test — all 346 tests pass
  • Manual: connect with "Remember me" checked → disconnect → reconnect without password
  • Manual: "Logout" clears session → next connect requires password
  • Manual: expired/revoked token → "Session Expired" error, prompts for password
  • Manual: verify status bar renders with golden branding, colored connection state, channel type
  • Manual: verify controller endpoints return same responses after ChannelService extraction

Checklist

  • I ran tests locally (or explained why not)
  • I kept changes focused and easy to review
  • I updated docs where needed (README/docs)
  • I verified no secrets/keys are committed
  • If this touches files/uploads/auth, I considered security implications

🔄 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/RedWizardsLab/EchoHub/pull/14 **Author:** [@HueByte](https://github.com/HueByte) **Created:** 2/21/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@HueByte](https://github.com/HueByte) **Base:** `dev` ← **Head:** `dev_session_persistence` --- ### 📝 Commits (1) - [`d4cf35e`](https://github.com/RedWizardsLab/EchoHub/commit/d4cf35e04e830746f9ebec0f05c961c59114d1b7) feat: implement session persistence with "Remember Me" functionality and logout support ### 📊 Changes **6 files changed** (+211 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `docs/changelog/v0.2.5.md` (+10 -0) 📝 `src/EchoHub.Client/AppOrchestrator.cs` (+99 -5) 📝 `src/EchoHub.Client/Config/ClientConfig.cs` (+2 -1) 📝 `src/EchoHub.Client/Services/ApiClient.cs` (+16 -0) 📝 `src/EchoHub.Client/UI/ConnectDialog.cs` (+78 -16) 📝 `src/EchoHub.Client/UI/MainWindow.cs` (+6 -0) </details> ### 📄 Description ## "Remember Me" session persistence, ChannelService extraction, and status bar enhancements ## Changes - **Remember Me**: Added "Remember me" checkbox to connect dialog that saves a 30-day refresh token, allowing password-free reconnect. Includes token rotation persistence, graceful expiry handling, `[session]` indicator on saved servers, and a new "Logout" menu item that revokes the token server-side and clears the saved session. Removed dead `SavedServer.Token` field that stored a 15-min access token but was never read back. - **ChannelService extraction**: Moved channel CRUD, validation, and membership logic from `ChannelsController` and `ChatService` into a dedicated `IChannelService` / `ChannelService` singleton. Controller is now a thin adapter with typed `ChannelOperationResult` error handling. IRC gateway uses `IChannelService` for topic/list queries. - **Status bar**: Added "EchoHub" branding (golden), color-coded connection state (green/red/yellow), and channel type indicator (public/private) - **#general protection**: Auto-recreation if missing, `/leave` prevention, connect-while-connected guard - Added `FakeChannelService` test helper; updated all IRC handler tests for new dependency ## How to test - [x] `dotnet build` — all projects compile with 0 errors - [x] `dotnet test` — all 346 tests pass - [x] Manual: connect with "Remember me" checked → disconnect → reconnect without password - [x] Manual: "Logout" clears session → next connect requires password - [x] Manual: expired/revoked token → "Session Expired" error, prompts for password - [x] Manual: verify status bar renders with golden branding, colored connection state, channel type - [x] Manual: verify controller endpoints return same responses after ChannelService extraction ## Checklist - [x] I ran tests locally (or explained why not) - [x] I kept changes focused and easy to review - [x] I updated docs where needed (README/docs) - [x] I verified no secrets/keys are committed - [x] If this touches files/uploads/auth, I considered security implications --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Stone_Red added the pull-request label 2026-09-04 00:49:42 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RedWizardsLab/EchoHub#16