Repository navigation
Add "My comments and replies" overview page - #1645
Draft
frankdekker with Copilot wants to merge 3 commits into
Draft
frankdekker with Copilot wants to merge 3 commits into
frankdekker with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: frankdekker <2179983+frankdekker@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add a show my comments and replies page
Add "My comments and replies" overview page
Oct 15, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1645 +/- ##
============================================
Coverage 100.00% 100.00%
- Complexity 3910 3929 +19
============================================
Files 685 688 +3
Lines 10895 11003 +108
============================================
+ Hits 10895 11003 +108 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Adds a page that lists the comments and replies placed by the logged-in user. It opens from a new chat icon (
bi-chat-left-text) in the header, placed between Notifications and Logout.The page is at
GET /app/comments(ROLE_USER):#focus:comment:ID/#focus:reply:ID).Query (
CommentRepository)UNION ALLof(type, id, create_timestamp, update_timestamp). DQL has noUNION.CommentReplyVisibilityExtension: a reply is included only if its parent comment is final or belongs to the user. The user's replies on other users' drafts are therefore hidden.id DESC, type ASC.%and_escaped viaescapeStringForLikeandESCAPE '!'.SELECT COUNT(*) FROM (<union>) AS items.Request, view models, template
UserCommentsRequestvalidates the query parameters:searchorder-by:create-timestamporupdate-timestamp; anything else returns 400.page: integer, minimum 1.UserCommentsViewModelProvidermaps each result to aUserCommentEntryViewModel(comment, ?reply).UserCommentsViewModelexposespageandlastPagedirectly, which is allpaginator.html.twigreads. The existingPaginatorViewModelneeds a DoctrinePaginator, which a union query cannot provide.app/comment/user_comments.html.twig. Draft and Resolved items get a badge.Behaviour worth reviewing
Tests
UserCommentFixturesinserts rows with raw DBAL.CommentTimestampSubscriberoverwrites timestamps on persist, so fixed timestamps are impossible through the ORM..env.testgainsAPP_HOSTNAME=localhostand aMERCURE_JWT_SECRETof at least 256 bits. Without them, any functional test rendering an authenticated page fails with a 500 from themercure()call inbase.html.twig: the JWT key is too short, and the empty host makespublic_urlunparsable.