Repository navigation
fix: prevent resolved clarification render loops - #361
Conversation
Remove the orphaned render-state stabilization path, keep semantic row equality scoped to memoized rendering, and add a regression for volatile resolved clarification payloads. Refs: #360
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
WalkthroughThe session timeline no longer maintains structurally shared row state. It uses semantic row equality for memoized rendering. Tests cover resolved clarification payloads and remove obsolete stable-reference assertions. ChangesSession timeline rendering
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
| Filename | Overview |
|---|---|
| web/src/components/assistant-ui/session-row-equality.ts | Cleanly removes stateful structural sharing while preserving the existing per-row memo comparator. |
| web/src/components/assistant-ui/session-timeline.logic.ts | Updates the public timeline exports and documentation consistently, with no remaining repository importers of deleted symbols. |
| web/src/components/assistant-ui/tests/session-thread.test.tsx | Adds integration coverage that exercises volatile clarification payload identity through the production transcript rendering path. |
| web/src/components/assistant-ui/tests/session-timeline.logic.test.ts | Removes tests tied exclusively to the deleted structural-sharing state container while retaining derivation behavior coverage. |
Reviews (1): Last reviewed commit: "fix: prevent session timeline render loo..." | Re-trigger Greptile
Summary
Root cause
v0.3.0-beta.13stored derived timeline rows in local React state and calledsetStableRows()during render whenevercomputeStableSessionRows()returned a different state object. A resolveddata-compozy-eventclarification can expose a new structured payload identity on each read, so the comparison never converges. Every render scheduled another render until React stopped the loop with error #301.Current
mainhad already removed the render-phase setter incidentally in #354, but the stateful stabilization implementation, its implementation-detail tests, and stale documentation remained. That left the failure unguarded and made the unsafe mechanism easy to reintroduce.Changes
SessionThreadintegration case with a resolved clarification whose structured payload has deliberately unstable identity. The test asserts the receipt, answer, and following transcript message render without entering the thread error boundary.StableSessionRowsState,EMPTY_STABLE_SESSION_ROWS, andcomputeStableSessionRows; rename the remaining module tosession-row-equality.tsand keepsessionRowEqualonly as the memo comparator for row children.Compozy Impact Audit
compozy__*IDs, toolsets, descriptors, schemas, digests, risk flags, diagnostics, and capability gates; this is confined to the Web transcript renderer.workspace_idpropagation through CLI/HTTP/UDS/core/store/Web/SSE/cache/events are unchanged; the change only removes local derived render state.packages/sitedocumentation impact.config.tomlkey or settings attachment references the removed render-state implementation.Release Notes
🐛 Bug Fixes
QA
No scenario was added or reset because the production behavior on current
mainalready uses pure derivation; this PR locks that behavior with a regression and removes the obsolete state mechanism. The existing clarification round-trip remains owned bydocs/qa/scenarios/RT-session-clarification-roundtrip.md.Test plan
Too many re-renders,AssistantMessageTimeline, thread error boundary) and passes after restoring pure derivation.make gate: Web lint, typecheck, and full Web tests passed; fingerprint85ba1fc2414f13df5fad9c4b912ed65be3570202.make gate-full: delegated to CI by maintainer direction; the local run was intentionally interrupted rather than reported as passing.Closes #360
Summary by CodeRabbit