[codex] Fold completed turn work in chat history#2962
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
refactor: remove cloudflare settings from RelayConfigurationShape and related tests test: clean up tests by removing cloudflare settings from configuration feat: implement ManagedEndpointDnsClient for DNS operations with Cloudflare refactor: simplify ManagedEndpointProvider by removing HTTP client dependencies fix: update ManagedEndpointProvider to use new DNS client for CNAME record management chore: adjust Api to use new DNS binding and remove deprecated cloudflare settings refactor: streamline ManagedEndpointZone creation by removing unnecessary token generation
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🚀 Expo continuous deployment is ready!
|
There was a problem hiding this comment.
🟡 Medium
Line 1633 in 1184961
In the thread.reverted case, latestTurn is rebuilt from latestCheckpoint but is never upserted into the turns array. This leaves the entry for latestCheckpoint.turnId with stale values (different state, requestedAt, startedAt, completedAt) while thread.latestTurn has fresh values. Consider using upsertThreadTurn(thread.turns, latestTurn) to maintain consistency with other event handlers.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/web/src/store.ts around line 1633:
In the `thread.reverted` case, `latestTurn` is rebuilt from `latestCheckpoint` but is never upserted into the `turns` array. This leaves the entry for `latestCheckpoint.turnId` with stale values (different `state`, `requestedAt`, `startedAt`, `completedAt`) while `thread.latestTurn` has fresh values. Consider using `upsertThreadTurn(thread.turns, latestTurn)` to maintain consistency with other event handlers.
Evidence trail:
apps/web/src/store.ts lines 1606-1656 (thread.reverted case) — latestTurn built at 1641-1653, turns filtered at 1639, no upsertThreadTurn call. Compare with lines 1384, 1482, 1516, 1601 where upsertThreadTurn IS called. upsertThreadTurn defined at lines 890-901.
Stack
codex/relay-managed-tunnels-auth-infra, which is under review in feat(relay): Add managed relay tunnels and APN service #2837.Summary
commentaryandfinal_answerphases through runtime ingestion, projection events, and persisted thread messagesWorked for ...row while keeping the final assistant status visible; retain legacy fallbacks for providers without explicit phase metadata and keep non-completed turns expandedVerification
vp checkpasses with 9 existing warnings in unrelated filesgit diff --checkpnpm --filter t3 typecheckpnpm --filter @t3tools/web typecheckpnpm --filter @t3tools/client-runtime typecheckpnpm --filter @t3tools/contracts typecheckpnpm --filter t3 test(134files passed,1skipped;1124tests passed,4skipped)98files,1020tests)24files,177tests)10files,148tests)Known repository blocker
vp run typecheckstill fails outside this diff:packages/sharedreports missing test-helper exports fromvite-plus/test, andeffect-codex-app-server#typecheckexits137. This branch does not modify either package.Visual verification
Browser is not available: iab), so the fold interaction was verified through timeline component logic tests rather than a localhost visual pass.Note
Fold completed turns in chat history and introduce T3 Cloud relay infrastructure
turn-foldrow showing elapsed time; users can toggle details by clicking the row's chevron button, implemented inMessagesTimeline.logic.tsandMessagesTimeline.tsx.assistantPhasefield (commentary|final_answer) is propagated through contracts, projector, reducer, and store to correctly identify the terminal assistant message per turn and drive fold boundaries.turnsarray is now tracked on thread state end-to-end (contracts → server projector → client-runtime reducer → web store), enabling turn-level history reconciliation.infra/relay/.ServerSecretStore, anddpop-access-tokensession method.CloudAuthProvider), web (viaManagedRelayAuthProvider), and desktop (viaDesktopCloudAuthIPC bridge and encrypted token store).use-remote-environment-registrymodule is refactored to use Effect for connection lifecycle and supports relay-managed DPoP connections.ServerSecretStorewrite on every authenticated request.📊 Macroscope summarized 1184961. 20 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.