Fix transport review findings - #7129
Conversation
|
Warning Review limit reached
Next review available in: 12 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe client now displays remote roll and all completed-scry outcomes independently of animation processing. The server prioritizes queued outbound messages and routes zero-count debug-create responses through the connection sender. ChangesRemote event handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@client/src/game/dispatch.ts`:
- Around line 840-841: Update flashCompletedScry and its call site in the
dispatch flow to process every completed Scry event in events rather than only
the first match returned by find. Preserve the existing notification behavior
for each matching event, including repeated or simultaneous Scry actions in one
batch.
In `@crates/phase-server/src/main.rs`:
- Around line 3868-3869: Update the tokio::select! handling the ActionNoOp path
to use biased selection so the queued outbound response is drained before
reading another socket frame, and ensure all responses use the same serialized
writer. Add a wiring test covering zero-count debug-create followed by a
direct-response message, verifying wire order.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 48210804-a6be-4537-8e15-adc66fb4e401
📒 Files selected for processing (2)
client/src/game/dispatch.tscrates/phase-server/src/main.rs
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 `@client/src/game/diceContest.ts`:
- Around line 94-98: Update the completed-Scry notification flow around
flashScryOutcome so multiple outcomes from one event batch are queued and
displayed FIFO rather than replacing the active scryOutcome or resetting its
timer. Preserve event order, and add a regression test covering two completed
Scry events.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 793cea5e-9a19-4ee0-abcd-3001d0c0ede5
📒 Files selected for processing (2)
client/src/game/diceContest.tscrates/phase-server/src/main.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/phase-server/src/main.rs
| useUiStore.getState().flashScryOutcome({ | ||
| playerId: scry.data.player_id, | ||
| topCount: scry.data.scry_top_count, | ||
| bottomCount: scry.data.scry_bottom_count, | ||
| }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
fd -i -t f 'uiStore\.ts$' client | while IFS= read -r file; do
rg -n -A8 -B4 'flashScryOutcome|scryOutcomeTimer|scryOutcome' "$file"
doneRepository: phase-rs/phase
Length of output: 4287
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== candidate files =="
fd -i -t f 'diceContest\.ts$|uiStore\.ts$' client
echo
echo "== diceContest relevant section =="
file="$(fd -i -t f 'diceContest\.ts$' client | head -n 1)"
if [ -n "${file:-}" ]; then
wc -l "$file"
sed -n '70,115p' "$file" | cat -n
fi
echo
echo "== all scryOutcome flash usages =="
rg -n "flashScryOutcome|resetScryOutcome|scryOutcome" client --glob '!**/*.snap'
echo
echo "== package/test availability =="
git ls-files client | awk 'tolower($0) ~/test|\.test\./ || /scry/i' | sort -u | head -n 80Repository: phase-rs/phase
Length of output: 8359
Queue completed-scry outcomes instead of replacing the active notice.
When one event batch contains multiple completed Scry actions, this code calls flashScryOutcome for each action. The UI store has one scryOutcome, and each call replaces the previous payload and resets its timer. Therefore, only the last outcome remains visible.
Make the notification path FIFO, or add a batch API that displays every outcome in event order. Add a regression test with two completed Scry events.
🤖 Prompt for 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.
In `@client/src/game/diceContest.ts` around lines 94 - 98, Update the
completed-Scry notification flow around flashScryOutcome so multiple outcomes
from one event batch are queued and displayed FIFO rather than replacing the
active scryOutcome or resetting its timer. Preserve event order, and add a
regression test covering two completed Scry events.
Source: Path instructions
Follow-up to #7128 after it merged.
ActionNoOpacknowledgementsSummary by CodeRabbit