Repository navigation
feat(ui): show cache hits in request logs - #48322
Draft
tanishqbaweja wants to merge 1 commit into
Draft
tanishqbaweja wants to merge 1 commit into
tanishqbaweja wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This branch has not been deployed
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.
Request Logs now shows whether each request was served from the response cache. Grouped sessions show their cache hit count, so an admin can compare requests without opening every detail drawer
Details
TLDR
Problem this solves:
How it solves it:
Intentional product change: Request Logs gains a Cache Hit column beside Status. This adds one column to the horizontally scrollable table
The API already supplies cache flags, cache keys and session totals. The table omits them, while the details drawer interprets them. The shared helper preserves that interpretation, including misses logged as
Nonewith a cache key and disabled caching markedCache OFF. Session rows use the aggregate count rather than the representative request's flagUser Flow
Before, an admin must open request details to distinguish cached responses
http://127.0.0.1:41475/ui/?page=logsAfter, cache hits can be read directly from the same rows
http://127.0.0.1:41475/ui/?page=logsRelevant issues
Fixes #23743
Pre-Submission checklist
All three new table integration tests fail on unchanged main because the column is absent. Seven affected frontend test files pass after the change, 243 tests. They cover cache-flag casing, misses with a cache key, disabled caching, session totals, unavailable totals and the distinction from provider prompt caching
Two deliberate mutations verify the assertions. Ignoring the cache key produces three failing tests. Using the representative request instead of the session total produces one failing test. Restoring the intended code brings all 243 tests back to green
The production build, production TypeScript check, Prettier, full CI ESLint, lint budgets, knip and
git diff --checkpass. ESLint reports zero errors and 3349 existing warningsAll four required checks pass on
aa8cc11379b190c5b9260e73b684d8711dc362d5, unit tests, lint, smoke tests, cost-map guard. The coverage job also passes. No automated code review has been posted as of 2026-10-25 16:29 UTC, so that checklist item remains uncheckedThe separate OSV scan reports the same three advisories as the scheduled scan of unchanged main, two in
filelock3.32.7 and one in development dependency@azure/msal-node6.0.1. This PR changes no dependency or scanner files. Existing proposal #48302 addresses these findings separatelyScreenshots / Proof of Fix
Both dashboards use the same six requests from the real proxy and PostgreSQL, grouped into four table rows. Qwen3.5-0.8B runs locally through llama.cpp b11669. The six proxy requests produce three model generations and three response-cache hits. One request is made with caching disabled, two identical requests use separate sessions, and three identical requests share a session
The backend stays on unchanged main. Only the production dashboard export changes. No browser requests or upstream responses are mocked in these captures. Evidence and reproduction steps include the configs, requests, model checksum, browser driver, screenshots and recordings
Before (dddbaa8)
Desktop
Desktop recording
Phone
Phone recording
After (aa8cc11)
Desktop
Desktop recording
Phone
Phone recording
All 20 raw screenshots, four annotated screenshots and eight sampled frames from each of the four recordings were visually inspected. Both viewports pass the table values, details, hit filter and reset checks with no JavaScript exceptions or HTTP 5xx responses
Caveats
Low
Type
New Feature