Skip to content

feat(admin): show experiment request log - #3387

Merged
markijbema merged 1 commit into
mainfrom
mark/experiment-request-log
May 21, 2026
Merged

markijbema merged 1 commit into
mainfrom
mark/experiment-request-log

Conversation

@markijbema

@markijbema markijbema commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds an admin Gateway tab for the last 100 model-experiment requests.
  • Joins experiment attribution rows to usage, experiment, variant, and variant-version metadata so admins can inspect routing and usage outcomes without reading prompt bodies.
  • Adds router coverage for the request-log query shape.

Verification

N/A

Visual Changes

CleanShot 2026-05-21 at 13 19 13@2x

Reviewer Notes

Comment thread apps/web/src/routers/admin/model-experiments-router.ts
@kilo-code-bot

kilo-code-bot Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

The listRequests endpoint returns a raw Postgres timestamp string (createdAt) without ISO normalization before it crosses the HTTP contract boundary, violating the repo's explicit timestamp serialization rule.

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/routers/admin/model-experiments-router.ts 296 createdAt is a raw timestamp(mode:'string') DB value returned directly in the tRPC HTTP body — not normalized to ISO 8601 as required by the repo timestamp serialization rule

SUGGESTION

File Line Issue
apps/web/src/app/admin/model-experiments/ModelExperimentRequestsContent.tsx 54 No isError branch — query failures render silently with no user feedback
Files Reviewed (4 files)
  • apps/web/src/routers/admin/model-experiments-router.ts — 1 warning
  • apps/web/src/app/admin/model-experiments/ModelExperimentRequestsContent.tsx — 1 suggestion
  • apps/web/src/app/admin/api/model-experiments/hooks.ts — no issues
  • apps/web/src/routers/admin/model-experiments-router.test.ts — no issues
  • apps/web/src/app/admin/gateway/page.tsx — no issues

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-4.6 · 852,061 tokens

Review guidance: REVIEW.md from base branch main

@markijbema
markijbema merged commit 2de36b0 into main May 21, 2026
17 checks passed
@markijbema
markijbema deleted the mark/experiment-request-log branch May 21, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants