Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughChangesModels read lifecycle
Usage log bounds
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Ingwannu
left a comment
There was a problem hiding this comment.
The Models-tab cancellation fix looks sound, but the 130-character persistence bound is not safe as written.
The PR description assumes provider and model segments are each limited to 64 characters. The current config/model admission path does not enforce those limits: provider names are syntax-validated without a 64-character maximum, and configured or upstream model IDs can be longer. Truncating requestedModel in normalizeUsageEntry can therefore turn a valid selector into a different identity, breaking the exact-match rollups that the comment says this field must preserve (and potentially colliding two long selectors).
Please either bind this persistence limit to a shared model-selector admission contract that is enforced before routing, or persist a bounded collision-resistant representation and update every exact-match consumer to use the same representation. Add a regression with two valid selectors that share the first 130 characters and prove they remain distinguishable. The two hosted workflows are authorized, but this exact head should not be approved yet.
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. Automatic ready-for-review conversion failed; please mark the pull request ready manually if it is still a draft. Hygiene✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 56 / 80이 PR은 서로 다른 두 군데의 “너무 일찍 끊거나, 너무 길게 남기는” 버그를 고칩니다. 첫째, Models 화면에서 탭을 바꿀 때 picker 정리 코드가 라인 - 메인테이너의 판단이 필요한 지점 동작-only GUI 수정에 스크린샷 게이트를 어떻게 적용할지(면제 vs 최소 캡처), 그리고 너의 추천 앱서버 읽기 취소 분리와 이 댓글은 grok-bot이 작성했습니다 |
f7fbe3b to
695da9c
Compare
|
@Ingwannu Reworked the persistence bound per your review. What changed
Why this option over an admission contract Regression coverage
Local: |
Selectors are not length-bound at admission, so persist over-long values as a bounded prefix + sha256 digest of the full selector and encode the request-history requested_model filter input identically. Two selectors sharing the bounded prefix stay distinguishable instead of colliding on a truncated prefix.
695da9c to
e3d0f9b
Compare
|
Consolidated into #5556 as a single related-function aggregate. Source head: Both unique GUI-lifecycle and persistent-selector commits match carried 5563577 and c8a9d1a by stable patch IDs; the two dev merges have no additional remerge-resolution delta. The full-selector digest and matching history filter are retained, as is the independently owned Models status read. Models tests passed 22/22; actual-component headless DOM and screenshot evidence is linked in #5556. The 1,500-row/15-page pagination fixture now writes identical normalized rows once, preserving every assertion and its five-second bound; the previously failing case and related append/filter cases passed 4/4. Full final suite, hosted CI and required review remain pending. Closing this duplicate standalone review entry as part of the requested consolidation after verifying coverage. This is not a merge or release claim; remaining integration checks and reviews are tracked on the replacement. Original branches are retained. |
Summary
Models picker cleanup no longer cancels the in-flight app-server status read when switching tabs.
cancelAppServerReadwas called from the picker effect cleanup, which runs wheneverapiBaseorcatalogActivechanges; the status read is owned by its own effect and must survive tab switches.normalizeUsageEntrynow persistsrequestedModelin a bounded, collision-resistant form: selectors up to 130 chars persist verbatim, and longer selectors persist as a bounded prefix plus a short SHA-256 digest of the full selector. Model selectors are not length-bound at admission (configured and discovered model ids can far exceed 130 chars), so a plain truncation could merge two distinct selectors that share the prefix; the digest keeps them distinguishable. The one exact-match consumer — the request-historyrequested_model = ?filter — encodes lookup input through the same exported function, and the encoding is idempotent so rows re-normalized on read are unchanged.resolvedModelis intentionally left unbounded: it is a server-resolved catalog value, not client-supplied input likerequestedModel, so it does not share the same abuse path.Verification
bun test tests/usage/usage-log.test.ts tests/usage/request-history-index.test.ts— 65 pass / 0 fail (includes the new shared-prefix regression tests).cd gui && bun test tests/models-status-toast.test.tsx— 22 pass / 0 fail (includes the new tab-switch regression test).bun x tsc --noEmitclean;cd gui && bun x tsc -bclean.Checklist
Summary by CodeRabbit
Bug Fixes
Tests
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
UI evidence