Repository navigation
Conversation
Wire doctor scripts and changed-scope pre-push when gui/ changes; keep CI advisory via react-doctor.yml scanning gui/.
Resolve GUI diagnostics (a11y, dialogs, TanStack Query, etc.) and src performance/security findings so full-repo doctor scans report clean.
Derive poll data from React Query instead of mirroring into useState via effects, and sync editable slices with render-time state adjusts.
Use a controlled clock and a wider stale window so the replacement lock is not immediately re-staled and unlinked when same-bytes rewrites leave mtime unchanged.
|
Thanks for running React Doctor and collecting these improvements. For future contributions, please split tooling, query migrations, page-level UI changes, update integrity, and runtime adapter changes into separate semantic PRs; combining them makes correctness review and rollback difficult. We are preserving your authorship and rebuilding the retained work as a small stacked-PR series based on
|
|
The rebuild of this PR has landed on |
Port codex-router PR lidge-jun#140: a request the provider answered cannot have exceeded its context window, so the token estimate must never claim it did. estimateTokens gains an optional contextWindow cap. The request log caps the ESTIMATE field (attempt.inputTokenEstimate and the usage-fallback inputTokens) at the routed model's window while the combined inputTokens field keeps its max(reported, estimate) behavior; provider-reported positive counts are never reduced. Kiro auto and unknown adapters/models stay uncapped - a window is never invented. Window sources: KIRO_MODEL_CONTEXT_WINDOWS (src/providers/kiro-models.ts, mirroring adapters/kiro.ts kiroUpstreamContextWindow) and inferCursorContextWindow (src/adapters/cursor/discovery.ts), picked by route adapter in request-log.ts contextWindowForModel. Tests: extended tests/token-estimate.test.ts, added tests/request-log-estimate-cap.test.ts, updated the one request-log test that asserted an above-window estimate.
Port codex-router PR #140: a request the provider answered cannot have exceeded its context window, so the token estimate must never claim it did. estimateTokens gains an optional contextWindow cap. The request log caps the ESTIMATE field (attempt.inputTokenEstimate and the usage-fallback inputTokens) at the routed model's window while the combined inputTokens field keeps its max(reported, estimate) behavior; provider-reported positive counts are never reduced. Kiro auto and unknown adapters/models stay uncapped - a window is never invented. Window sources: KIRO_MODEL_CONTEXT_WINDOWS (src/providers/kiro-models.ts, mirroring adapters/kiro.ts kiroUpstreamContextWindow) and inferCursorContextWindow (src/adapters/cursor/discovery.ts), picked by route adapter in request-log.ts contextWindowForModel. Tests: extended tests/token-estimate.test.ts, added tests/request-log-estimate-cap.test.ts, updated the one request-log test that asserted an above-window estimate.
Port codex-router PR lidge-jun#140: a request the provider answered cannot have exceeded its context window, so the token estimate must never claim it did. estimateTokens gains an optional contextWindow cap. The request log caps the ESTIMATE field (attempt.inputTokenEstimate and the usage-fallback inputTokens) at the routed model's window while the combined inputTokens field keeps its max(reported, estimate) behavior; provider-reported positive counts are never reduced. Kiro auto and unknown adapters/models stay uncapped - a window is never invented. Window sources: KIRO_MODEL_CONTEXT_WINDOWS (src/providers/kiro-models.ts, mirroring adapters/kiro.ts kiroUpstreamContextWindow) and inferCursorContextWindow (src/adapters/cursor/discovery.ts), picked by route adapter in request-log.ts contextWindowForModel. Tests: extended tests/token-estimate.test.ts, added tests/request-log-estimate-cap.test.ts, updated the one request-log test that asserted an above-window estimate.
Summary
doctor/doctor:fullscripts, changed-scope pre-push whengui/changes, and advisory GitHub Action CI.src/(perf loops/clones, Zod 4 APIs, update integrity check, related cleanups).react-doctorscans (No issues found).Test plan
bun run typecheckbun test --isolate ./tests/cd gui && bun run doctor:full→ no issuesbun x react-doctor@latest --verbose --scope full→ no issues