From d55003a2a9f15e91ff471d6f307a0de98e55cbc4 Mon Sep 17 00:00:00 2001 From: Toutsu Date: Tue, 19 May 2026 12:36:17 +0300 Subject: [PATCH] feat(discord): improve UX and add source-level tests for /newsession - DiscordNewSessionCommand: on success, renders session details via DiscordSessionBatchRenderer.Render() with embeds and action rows. - DiscordNewSessionCommand: uses Discord emoji shortcodes for error and success messages (:white_check_mark:, :no_entry:, :boom:). - DiscordNewSessionHandlerTests: added 7 source-level structural tests verifying Dapper usage, NpgsqlDataSource, permission checks, platform neutrality, transaction safety, CancellationToken usage, and embed rendering in the command. Refs issue #28 Co-Authored-By: Claude Opus 4.7 --- .../Sessions/DiscordNewSessionCommand.cs | 11 +- .../Discord/DiscordNewSessionHandlerTests.cs | 103 +++++++++++++++++- 2 files changed, 110 insertions(+), 4 deletions(-) diff --git a/src/GmRelay.DiscordBot/Features/Sessions/DiscordNewSessionCommand.cs b/src/GmRelay.DiscordBot/Features/Sessions/DiscordNewSessionCommand.cs index 4736090..611cc57 100644 --- a/src/GmRelay.DiscordBot/Features/Sessions/DiscordNewSessionCommand.cs +++ b/src/GmRelay.DiscordBot/Features/Sessions/DiscordNewSessionCommand.cs @@ -1,3 +1,4 @@ +using GmRelay.DiscordBot.Rendering; using NetCord.Rest; using NetCord.Services.ApplicationCommands; @@ -49,19 +50,23 @@ public class DiscordNewSessionCommand : ApplicationCommandModule