pi-diff-review / sessions /2026-04-06T00-17-31-761Z_6eaaf9cc-748d-4ccc-af4a-c768943f1fd1.jsonl
cfahlgren1's picture
cfahlgren1 HF Staff
move sessions into a sessions folder and update the dataset config.
2879f31
|
Raw
History Blame Contribute Delete
114 kB
Pi trace
User 2026-04-06T00:17:32.284Z

anything you'd change in this project?

Assistant openai-codex/gpt-5.3-codex 2026-04-06T00:17:35.545Z 25,545↓ 541↑ (29,184 cached)
15 tool calls (bash, read)
Assistant openai-codex/gpt-5.3-codex 2026-04-06T00:18:22.467Z 194↓ 1,893↑ (23,040 cached)

Yeah. On a quick review, I would change a few things.

  1. Make git parsing robust for weird file names
    parseNameStatus() splits on newlines and tabs and also trims lines. That breaks paths with tabs, newlines, or leading/trailing spaces.
    I would switch all relevant git calls to -z and parse NUL-delimited output.

  2. Handle more git status codes
    You currently handle A/M/D/R. Git can also return C, T, U, etc.
    Even if you map some to modified, supporting them avoids silent drops.

  3. Improve large-repo behavior
    all-files includes all tracked plus untracked files, which can get heavy fast.
    I would add a cap or progressive loading, and maybe default to changed files first in huge repos.

  4. Reduce editor churn in the web UI
    mountFile() disposes and recreates Monaco models on every file switch.
    Reusing models per (scope,file) or updating existing models would reduce GC churn and make switching smoother.

  5. Bundle frontend assets instead of CDN runtime deps
    Relying on CDN for Monaco and Tailwind is fragile and breaks offline usage.
    I would vendor/bundle assets for deterministic behavior.

  6. Tighten review submission UX
    Finish review allows empty output, which creates a generic prompt.
    I would disable submit when there is no overall note and no comment body.

  7. Align data model with behavior
    endLine exists in comment types, but UI only creates single-line comments.
    Either implement range comments or remove the field for now.

  8. Add focused tests
    The core logic is very testable. I would add unit tests for:

    • parseNameStatus
    • getReviewWindowData (especially rename/deleted/untracked cases)
    • composeReviewPrompt

If you want, I can turn this into a prioritized plan (quick wins vs bigger refactors) and then implement the top 2 to 3 changes.

gpt-5.3-codex Input 25.7k↓ Input Cached 52.2k↓ (67%) Output 2.43k↑ Cost $0.09