From 6a939257294655dd5c1b5ada323dfdc7dfc013f3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Feb 2026 12:19:35 +0000 Subject: fix(admin): show username in submissions and add testcase links to problems list Submissions list and detail pages now display the username alongside the user ID instead of showing only a numeric ID. The problems list page now includes a direct link to each problem's testcases for easier navigation. https://claude.ai/code/session_01JF5ZmGAQ4zNbhV5DM729Fw --- backend/admin/handler_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'backend/admin/handler_test.go') diff --git a/backend/admin/handler_test.go b/backend/admin/handler_test.go index 994c584..f340fef 100644 --- a/backend/admin/handler_test.go +++ b/backend/admin/handler_test.go @@ -1182,6 +1182,11 @@ func TestGetSubmissions_Success(t *testing.T) { }, }, nil }, + listUsersFunc: func(_ context.Context) ([]db.User, error) { + return []db.User{ + {UserID: 1, Username: "alice"}, + }, nil + }, } h := newTestHandler(q) @@ -1208,6 +1213,9 @@ func TestGetSubmissionDetail_Success(t *testing.T) { CreatedAt: pgtype.Timestamp{Valid: true}, }, nil }, + getUserByIDFunc: func(_ context.Context, userID int32) (db.User, error) { + return db.User{UserID: userID, Username: "alice"}, nil + }, getTestcaseResultsBySubmIDFunc: func(_ context.Context, _ int32) ([]db.TestcaseResult, error) { return []db.TestcaseResult{ { -- cgit v1.3.1