[codex] Keep long chronicle beats readable - #555
Conversation
|
Warning Review limit reached
More reviews will be available in 17 minutes and 56 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR refines chronicle auto-scroll targeting by introducing dedicated refs for latest and pending narration beats, rewriting the auto-follow effect to scroll conditionally based on pending state, updating the scroll handler to detect programmatic scrolling, and adjusting the accessibility label and rendering structure to support precise scroll targeting. ChangesChronicle Auto-Scroll Refinement
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
Current check classification: CI and CodeQL jobs failed before executing any steps (jobs have empty steps arrays and completed in 3-4s on head 87fe8df), matching the existing external runner/account-level failure lane. Local focused validation passed: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@viewer/openworlds/screen-table.jsx`:
- Around line 852-860: The wrapper currently assigns latestBeatRef using i ===
renderedLog.length - 1 which can point to a LogEntry that renders null
(sanitized-away narration); change this to compute the index of the last visible
beat and only attach latestBeatRef/data-worldos-testid to that index: derive
lastVisibleIndex = renderedLog.findLastIndex(entry => /* same visibility check
used by LogEntry: e.g. not a narration that sanitizes to empty or otherwise
would return null */) and then use i === lastVisibleIndex when setting ref and
data-worldos-testid so auto-follow targets the last actually rendered LogEntry;
mirror the exact sanitization/visibility logic used inside LogEntry to keep
behavior consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a0e0a561-0623-473d-b768-26967522d85b
📒 Files selected for processing (2)
viewer/openworlds/screen-table.jsxviewer/tests/test_openworlds_static.py
Summary
Root Cause
The Chronicle auto-follow logic treated "latest" as the bottom of the scroll region. That works for short beats, but a long provider response can be taller than the Chronicle viewport, so pinning to the bottom hides the first line of the new DM reply.
User Impact
A fresh player should now see the beginning of the newest DM narration after a move instead of resuming the story mid-paragraph. This is viewer-only: the engine remains the sole campaign-state writer, and the GUI still only reads state and submits /move intents.
Validation
Notes
Summary by CodeRabbit