feat: add cost and model to Code Review Processed Reviews screen#277
Open
kiloconnect[bot] wants to merge 1 commit intomainfrom
Open
feat: add cost and model to Code Review Processed Reviews screen#277kiloconnect[bot] wants to merge 1 commit intomainfrom
kiloconnect[bot] wants to merge 1 commit intomainfrom
Conversation
- Rename 'Code Review Jobs' to 'Processed Reviews' in the UI - Join listCodeReviews query with cliSessions for model and microdollar_usage for cost data - Display cost (formatted from microdollars) and model name on each review card - Update alert descriptions in both personal and org pages
| completed_at: cloud_agent_code_reviews.completed_at, | ||
| created_at: cloud_agent_code_reviews.created_at, | ||
| updated_at: cloud_agent_code_reviews.updated_at, | ||
| total_cost_microdollars: sql<number | null>`${costSubquery.total_cost}::bigint`, |
Contributor
Author
There was a problem hiding this comment.
WARNING: Potential bigint/string vs number mismatch for total_cost_microdollars
sum(microdollar_usage.cost) on Postgres often comes back as a string (and large values can exceed JS safe integer). Typing this as sql<number | null> can make the UI assume it is a number and can also hide precision/serialization pitfalls. Consider returning a string (or bigint) consistently and formatting/parsing at the edge (API/UI), or using a Drizzle mapping helper to coerce to a number safely.
Contributor
Author
Code Review SummaryStatus: 1 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (5 files)
|
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.
Summary
Add cost information and model used to the Code Reviewer "Processed Reviews" screen.
Changes
microdollar_usageviaproject_id = cli_session_idcliSessions.last_modelFiles Changed
src/lib/code-reviews/db/code-reviews.ts— ExtendedlistCodeReviewsquery with LEFT JOINs tocliSessionsand amicrodollar_usagecost subquery; addedCodeReviewWithCostAndModeltypesrc/lib/code-reviews/core/schemas.ts— UpdatedListCodeReviewsResponseto use the extended typesrc/components/code-reviews/CodeReviewJobsCard.tsx— Added cost/model display row, helper formatters, renamed titlesrc/app/(app)/code-reviews/ReviewAgentPageClient.tsx— Updated alert textsrc/app/(app)/organizations/[id]/code-reviews/ReviewAgentPageClient.tsx— Updated alert textBuilt for Brendan by Kilo for Slack