mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-04 17:16:06 +02:00
7.3 KiB
7.3 KiB
v0.2.5 - Session Persistence, Auto-Updates, Audio & Transparent Theme
Features
Audio Message Support
- New
Audiomessage type — uploaded audio files (.mp3,.wav,.ogg,.flac,.aac,.m4a,.wma) are automatically detected and categorized - TUI client renders audio messages with
♪ [Audio: filename] (Enter to play)indicator - Press Enter on an audio message to open the Audio Player dialog with animated wave visualization, play/pause/stop controls, and volume slider
- Per-type upload limits: 10 MB images, 10 MB audio, 100 MB generic files (with Kestrel request size configured to match)
AudioPlaybackServiceenhanced with pause/resume, volume control, and playback-finished events- Fixed: wrapped audio/file messages now remain clickable on all lines (attachment metadata propagated through word-wrap)
- IRC gateway formats audio messages as
♪ [Audio: filename] url - Server detects audio files by extension via
FileValidationHelper.IsAudioFile()
File Downloads
- Press Enter on a file message in the TUI client to download and open it with the system default application
ApiClient.DownloadFileAsync()streams file downloads from the server- File and audio messages in the chat list now show colored indicators with interaction hints
File Cleanup Service
FileCleanupService(BackgroundService) periodically removes old uploaded files- Configurable via
Storage:CleanupIntervalHours(default 1h) andStorage:RetentionDays(default 30d)
Data Migration Service
DataMigrationServiceruns at startup to handle schema/data evolution- Ensures
#generalchannel and pre-existing channels are marked public - Migrates legacy ANSI escape codes in image messages to printable color tags (
{F:RRGGBB},{B:RRGGBB},{X}) - Migrates legacy single-object
EmbedJsonto array format - Promotes usernames listed in
Server:Adminsconfig to Admin role
True Transparent Background
- Transparent theme now uses the terminal's native background instead of solid black
- Powered by
Color.Transparent(alpha=0) which emits ANSICSI 49m(default background) instead of explicit RGB - Terminal transparency, acrylic, wallpaper effects now show through the TUI
- Dialogs retain solid
DarkGraybackground for readability - Uses local Terminal.Gui fork (submodule) with transparent color support pending upstream merge (gui-cs/Terminal.Gui#4234)
Enhanced Status Bar
- Status bar now shows EchoHub branding at the start
- Connection state is color-coded: green (Connected), red (Disconnected), yellow (transitional states like Connecting, Reconnecting, Authenticating)
- Current channel shows its type:
#channel - publicor#channel - private
Remember Me (Session Persistence)
- "Remember me" checkbox in the connect dialog — saves a 30-day refresh token so users can reconnect without entering their password
- Saved servers with active sessions show
[session]indicator in the connect dialog and saved servers list - Token-based login: selecting a saved server with a session lets you click Login with an empty password
- Graceful expiry handling: if the saved session is expired or revoked, shows an error and prompts for password
- Refresh token rotation: rotated tokens are automatically persisted to config so the session stays valid across refreshes
- New "Logout" menu item (Server menu): revokes the refresh token server-side and clears the saved session
- Removed dead
SavedServer.Tokenfield (stored 15-min access token that was never read back)
Automatic Update Checking
UpdateCheckerrewritten to use the AlwaysUpToDate library for self-updating- Polls the EchoHub version manifest hourly (active only in
RELEASEbuilds) UpdateConfirmDialogshows current vs. available version with Update/Cancel buttonsUpdateProgressDialogdisplays real-time download progress bar- Errors are logged via Serilog instead of being silently swallowed
Windows Installer
- New Inno Setup script (
installer/Installer.iss) to build a Windows installer - Auto-reads product version from the built EXE
- User-level install by default (no admin required), with admin override option
- Creates desktop and quick-launch shortcuts (optional)
- Supports English and German languages
Application Icons
- New
hue_iconbranding assets (ICO, PNG, SVG) inassets/ - Application icon set on both Client and Server projects
#general Channel Protection
#generalchannel is now auto-recreated if somehow missing (both inGetChannelsendpoint andJoinChannelflow)- Users cannot
/leavethe #general channel (client-side guard) - Connecting while already connected now prompts to disconnect first instead of silently leaking the previous connection
Fixes
IRC Gateway
- Fixed: IRC JOIN history replay showed encrypted gibberish —
IrcCommandHandler.HandleJoinAsyncnow decrypts channel history before formatting for IRC clients (history was encrypted for SignalR transport but sent raw to IRC) - Fixed:
JoinedChannelsrace condition —IrcClientConnection.JoinedChannelsreplaced with thread-safe methods (JoinChannel,LeaveChannel,IsInChannel,GetJoinedChannels) using lock synchronization; prevents crashes when broadcaster threads read while the command handler writes - Fixed:
RequireRegisteredfire-and-forget — converted from syncbooltoasync Task<bool>(RequireRegisteredAsync) so the error reply is properly awaited before the handler returns
ChannelService Extraction
- Extracted channel management logic from
ChannelsControllerandChatServiceinto a dedicatedIChannelService/ChannelService ChannelsControlleris now a thin adapter — delegates CRUD operations toIChannelServiceand mapsChannelErrorto HTTP status codesChatService.JoinChannelAsyncdelegates channel validation + membership toIChannelService.EnsureChannelMembershipAsync()- New
ChannelOperationResultresult type withChannelErrorenum for typed error handling across service boundaries - IRC gateway uses
IChannelServicefor topic queries and channel listing (instead ofIChatService)
EchoHub Branding
- Status bar "EchoHub" text now uses golden color (218, 165, 32)
Infrastructure
- Audio MIME types in
FilesController(mp3, wav, ogg, flac, aac, m4a, wma) - CI workflows updated to handle Terminal.Gui submodule
nuget.configworkaround (rm -fstep) - Root
nuget.configadded for package source management - Terminal.Gui formatting excluded from CI format checks
- Recursive submodule fetching enabled in CI workflows
Server:Adminsconfig array inappsettings.example.jsonfor designating admin usernamesStorage:CleanupIntervalHoursandStorage:RetentionDaysadded toappsettings.example.jsonFakeChannelServicetest helper added for IRC unit tests- Test suites: ChatLine, CommandHandler, DataMigrationService, FileValidationHelper, ImageToAsciiService, IrcMessageFormatter, JwtTokenService, LinkEmbedService
- IRC abstraction layer test suite: IrcMessage parsing, IrcMessageFormatter, IrcClientConnection, IrcCommandHandler, IrcBroadcaster
- Test helpers:
TestDuplexStream,TestIrcConnectionFactory,FakeChatService,FakeChannelService,FakeEncryptionServicefor IRC unit testing without network I/O - 346 total tests