feat: redesign board UI, add real-time comments #39
Open
danielprokopowicz wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR redesigns key board UI components and introduces real-time card comments via the boards SignalR hub, while also changing board/card descriptions to be optional and adding persistence for card comments on the server.
Changes:
- UI refresh for swimlanes/lists/cards/board tiles and wiring to open the card modal via card click.
- Add card comment DTOs, server-side CardComment entity + migrations, and hub/client plumbing to broadcast
CommentAdded. - Make card (and partially board) descriptions nullable/optional across several API/domain contracts.
Reviewed changes
Copilot reviewed 42 out of 45 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/routes/(auth)/profile/+page.svelte | Removes section divider comments (no functional change). |
| web/src/routes/(auth)/boards/[id]/+page.svelte | Subscribes to comment-added events and passes onAddComment to the card modal. |
| web/src/lib/features/boards/types/boards.hub.ts | Makes UpdateCardRequest.description optional. |
| web/src/lib/features/boards/types/boards.api.ts | Adds CardCommentDto and adds comments to CardDto. |
| web/src/lib/features/boards/hub/boards.hub.ts | Adds addComment + onCommentAdded wrappers for the hub. |
| web/src/lib/features/boards/components/Swimlane.svelte | UI redesign + drag/drop handler adjustments (currently contains a broken move implementation). |
| web/src/lib/features/boards/components/List.svelte | UI redesign and safer drag/drop finalize logic. |
| web/src/lib/features/boards/components/CardModal.svelte | Adds comments panel + posting UI to the card modal. |
| web/src/lib/features/boards/components/Card.svelte | UI redesign and makes the entire card clickable to open the modal. |
| web/src/lib/features/boards/components/BoardCard.svelte | UI redesign for board tiles. |
| web/src/lib/features/boards/api/boards.api.ts | Adds REST addComment call (cards/{cardId}/comments). |
| server/src/Presentation/Presentation.csproj | Adds MediatR package reference. |
| server/src/Presentation/Hubs/Board/IBoardHubClient.cs | Adds CommentAdded callback and makes description fields nullable in payloads. |
| server/src/Presentation/Hubs/Board/Hub.cs | Adds URL parsing fallback for boardId and adds hub method AddComment. |
| server/src/Presentation/Endpoints/Cards/Update.cs | Makes update request description nullable. |
| server/src/Infrastructure/Persistence/Migrations/AppDbContextModelSnapshot.cs | Updates EF snapshot for nullable card description and new CardComments entity/nav. |
| server/src/Infrastructure/Persistence/Migrations/20260505193022_AddCardCommentsRelation.Designer.cs | Adds migration snapshot for comments relation (designer). |
| server/src/Infrastructure/Persistence/Migrations/20260505193022_AddCardCommentsRelation.cs | Adds migration stub (currently empty). |
| server/src/Infrastructure/Persistence/Migrations/20260505141557_AddCardComments.Designer.cs | Adds migration designer for CardComments table. |
| server/src/Infrastructure/Persistence/Migrations/20260505141557_AddCardComments.cs | Creates CardComments table and indexes. |
| server/src/Infrastructure/Persistence/Migrations/20260505113154_AddCardDescription.Designer.cs | Adds migration designer for nullable card description. |
| server/src/Infrastructure/Persistence/Migrations/20260505113154_AddCardDescription.cs | Alters cards.description to nullable with max length 2000. |
| server/src/Infrastructure/Persistence/Configurations/CardConfiguration.cs | Configures cards.description as optional with max length 2000. |
| server/src/Infrastructure/Persistence/AppDbContext.cs | Adds DbSet<CardComment> and configures CardComment↔User relationship/table mapping. |
| server/src/Infrastructure/Infrastructure.csproj | Adds EF Core Tools package reference. |
| server/src/Domain/Cards/CardEvents.cs | Makes card event descriptions nullable. |
| server/src/Domain/Cards/CardComment.cs | Introduces CardComment domain entity. |
| server/src/Domain/Cards/Card.cs | Makes description nullable and adds comment collection + AddComment. |
| server/src/Domain/Boards/BoardEvents.cs | Makes board event description nullable. |
| server/src/Domain/Boards/Board.cs | Makes description nullable and updates create/update signatures accordingly. |
| server/src/Application/Cards/Update/UpdateCardCommand.cs | Makes command description nullable. |
| server/src/Application/Cards/GetBySwimlaneId/GetCardsBySwimlaneIdResponse.cs | Makes DTO description nullable. |
| server/src/Application/Cards/GetByListId/GetCardsByListIdResponse.cs | Makes DTO description nullable. |
| server/src/Application/Cards/GetById/GetCardByIdResponse.cs | Makes DTO description nullable. |
| server/src/Application/Cards/GetByBoardId/GetCardsByBoardIdResponse.cs | Makes DTO description nullable. |
| server/src/Application/Cards/AppComment/CardCommentDto.cs | Adds comment DTO (currently unused/duplicative). |
| server/src/Application/Cards/AppComment/AddCardCommentHandler.cs | Adds handler to create/persist a new comment and return a comment DTO. |
| server/src/Application/Cards/AppComment/AddCardCommentCommand.cs | Adds command for adding a card comment. |
| server/src/Application/Boards/GetDetails/GetBoardDetailsResponse.cs | Makes board details description nullable. |
| server/src/Application/Boards/GetById/GetBoardByIdResponse.cs | Adds comments list to card DTO and makes descriptions nullable; adds nested CardCommentDto. |
| server/src/Application/Boards/GetById/GetBoardByIdHandler.cs | Projects card comments into the board-by-id response. |
| server/src/Application/Boards/Get/GetBoardsResponse.cs | Makes board list description nullable. |
| server/src/Application/Boards/Create/CreateBoardCommand.cs | Makes create-board description nullable. |
| server/src/Application/Abstractions/Persistence/IAppDbContext.cs | Adds DbSet<CardComment>. |
| server/Directory.Packages.props | Adds MediatR + EF Tools versions. |
Files not reviewed (3)
- server/src/Infrastructure/Persistence/Migrations/20260505113154_AddCardDescription.Designer.cs: Language not supported
- server/src/Infrastructure/Persistence/Migrations/20260505141557_AddCardComments.Designer.cs: Language not supported
- server/src/Infrastructure/Persistence/Migrations/20260505193022_AddCardCommentsRelation.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5328f34 to
cb147b9
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 40 out of 43 changed files in this pull request and generated 4 comments.
Files not reviewed (3)
- server/src/Infrastructure/Persistence/Migrations/20260505113154_AddCardDescription.Designer.cs: Language not supported
- server/src/Infrastructure/Persistence/Migrations/20260505141557_AddCardComments.Designer.cs: Language not supported
- server/src/Infrastructure/Persistence/Migrations/20260505193022_AddCardCommentsRelation.Designer.cs: Language not supported
Comments suppressed due to low confidence (4)
server/src/Presentation/Hubs/Board/Hub.cs:1
- The hub method never signals failures back to the caller (it just logs and returns), so
connection.invoke('AddComment', ...)will resolve successfully even when the comment wasn’t created. This will cause the web client to think the operation succeeded (and it won’t show an error) while noCommentAddedevent is broadcast. Return a result/DTO (or throw a HubException on failure) soinvokerejects/returns an error and the client can reliably display failure.
web/src/lib/features/boards/hub/boards.hub.ts:1 - New comment APIs are typed as
any(Response<any>andcomment: any), which defeats type-safety and makes it easy to accidentally push malformed data intocard.comments. Use the existingCardCommentDtotype from the web API types for both theaddCommentreturn value and theonCommentAddedcallback parameter (and prefer returning a typed DTO instead ofany).
web/src/lib/features/boards/components/Card.svelte:1 - This makes the whole card a pseudo-button (
divwithrole=\"button\") but only handles Enter, not Space (Space is expected for button-like controls). Also, the card contains another interactive element (<button ...>for the drag handle), which creates nested interactive controls and can confuse keyboard and screen-reader users. Prefer using a real<button type=\"button\">as the root (or make the drag handle non-button and rely onstopPropagationwith a non-interactive wrapper), and handle both Enter and Space consistently.
web/src/lib/features/boards/components/BoardCard.svelte:1 - The previous focus-visible ring styling appears to have been removed from the interactive element users tab to (the
<a>). This can make keyboard focus hard to see. Add a visible:focus-visiblestyle (e.g., ring/outline classes) on the anchor to preserve accessible keyboard navigation.
…ion and add auth check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.