Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Claude finished @leekahung's task in 2m 17s —— View job Code Review
Good round. All the previously flagged issues have been addressed. I committed one remaining fix and have one item left that requires a manual change. Committed Fix
def test_py_annotation_to_ts_union_without_none():
result = py_annotation_to_ts(OregonCity | UsaState)
assert result == "TOregonCity | TUsaState"Previously only Still Requires Manual Fix
|
|
Claude finished @leekahung's task in 3m 45s —— View job Code Review
This is a solid, well-structured PR. The codegen approach is clean, the CI drift check is good defensive infrastructure, and the type tightening across the frontend is a clear improvement. All previously flagged issues have been resolved. What's working well
Remaining Issues
|
|
@claude Can you add a section in the review about files changed for package/lockfiles vs code changes |
|
Claude finished @leekahung's task in 1m 11s —— View job Code Review
Changed Files BreakdownThe 24 changed files split cleanly into three categories: Package / Lockfile (1 file, not a code review concern)
Nothing to review here; this is expected housekeeping. Infrastructure / Config / Docs (4 files)
Code Changes (19 files)Backend (3 files)
Frontend — new files (4 files)
Frontend — updated files (11 files)
Previously Raised ItemsAll prior issues have been addressed. One remaining nit and one pre-existing debt item: Nit — Pre-existing debt — |
… based on schema.py and location.py; Tightened frontend types; Updated unit tests and files to import new types; Included helper function to help format city/state
…st; Updated Architecture.md
…t as suggested; Added type to CHUNK_MODELS; Have other return as null instead of OTHER; Updated unit tests
…usted unit test; Updated comment for Location class; Include comment for model_to_interface based on feedback suggestion
Co-authored-by: Ka Hung Lee <undefined@users.noreply.github.com>
fbde32d to
fbba60e
Compare
|
Claude finished @leekahung's task in 2m 45s —— View job Code Review
This PR is in good shape. All major issues from prior rounds have been resolved. Here's a fresh pass over the current state. Changed Files BreakdownPackage / Lockfile — not a code review concern
Infrastructure / Config / Docs (3 files)
Code Changes (20 files)Backend (3 files)
Frontend — new files (4 files)
Frontend — updated files (13 files)
What's Working Well
IssuesMinor —
|
|
Rebasing branch, deferring NPM fixes to PR #296 |
There was a problem hiding this comment.
@yangm2 @wittejm Just a note that Claude is projected to cost me $190/month on this repo for March at this rate. I'm happy to cover that but it has gone up by 5x or so recently and I just wanted to let you know that I probably can't afford another 5x. I wonder if we can switch to the $200/month subscription flat plan somehow.
Think we manually trigger Claude for review so we could limit the cost as opposed to running it each commit. We already have access to Claude using mentions |
|
Dang it didn't occur to me where the bill was going. @leekahung @yangm2 @lee-coates do y'all have a coding assistant subscription? I have Claude Code. It might be better practice anyway for reviews to be human-in-the-loop via the coding assistant. |
Yeah, I can look into getting a subscription on my end |
frontend/src/types/LocationTypes.ts
Outdated
| // This file is auto-generated by backend/scripts/generate_types.py. | ||
| // Do not edit manually — re-run `make generate-types`. | ||
|
|
||
| type TOregonCity = "portland" | "eugene"; | ||
|
|
||
| type TUsaState = "or" | "other"; | ||
|
|
||
| interface ILocation { | ||
| city: TOregonCity | null; | ||
| state: TUsaState | null; | ||
| } | ||
|
|
||
| export type { TOregonCity, TUsaState, ILocation }; |
There was a problem hiding this comment.
Please don't check-in generated code unless there's a really good reason (i.e. takes hours to generate). If you don't check it in, then you don't have to have a process to check for drift.
There was a problem hiding this comment.
I'll look into this
There was a problem hiding this comment.
I'll add the files under .gitignore and add instructions for generating types for the frontend
Just to clarify, we weren't automatically running it on each commit, it was on each |
Would be better to have this discussion on Discord where it's more visible. I just happened to peek at this PR and noticed this. |
…nore; Updated frontend npm script to include generate-types; Adjusted pr-check.yml to setup type generation
@KentShikama You should probably revoke the API key that you use for this repo. I see that there are hundreds of "unique" visitors cloning the repo in the last 2 weeks. If someone is exploiting the repo, then it will take some time to clean out of the git history. |
f9c38d4 to
c2927ea
Compare
|
@yangm2 The API key is a secret on this repo and I think you have to tag Claude on an issue/PR/workflow to trigger it. I think all usage is legitimate so far. |
What type of PR is this? (check all applicable)
Description
Follow up to PR #283, this PR adds a codegen script
generate_types.pyto generate frontend TypeScript types directly from backend Pydantic models and StrEnums so it wouldn't stray from the types set by the backend as suggested in Issue #259.It covers type definitions for API response chunks and locations used in the frontend. It also covers the naming convention set for the frontend,
Ifor interface andTfor type. To generate the frontend types, a new make command is added to the makefile in order to runmake generate-types.To update the types, we only need to add a new Chunk type to TResponseChunk via
|in schema.py or a location via|in location.py and re-runmake generate-types.Several types in the frontend are made tighter as opposed to generic strings, and a new helper function is created to simplify location formatting.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
To verify the codegen, you can remove the frontend types and run
make generate-typesfrom the backend directory. In the frontend run:npm run lint,npx tsc -p tsconfig.app.json --noEmit,npm run test -- --run(for testing the new import location for types)Added/updated tests?
Documentation
Architecture.mdhas been updated[optional] Are there any post deployment tasks we need to perform?