Skip to content

fix(web): keep reply playback hooks stable during chat hydration - #202

Merged
leoisadev1 merged 3 commits into
mainfrom
fix/group-reply-playback-hook-order
Sep 13, 2026
Merged

leoisadev1 merged 3 commits into
mainfrom
fix/group-reply-playback-hook-order

Conversation

@leoisadev1

Copy link
Copy Markdown
Member

Problem

Cold-loading a group chat could show “This view failed to load” with React error 310. The reply-playback hook ran after an early return, so hydration changed the hook order. Bot hydration and archive transitions had the same defect.

Fix

Call the existing playback hook before the missing/archived entity guards in both chat views. Preserve message filtering, playback context, and the existing disabled stored-reply controls. Add regression tests for hydration and reverse transitions.

Verification

  • All three new real-React regressions fail on the unchanged base and pass with the fix.
  • 16 focused tests pass, plus targeted lint, formatting, web typecheck, and production build.
  • Isolated browser verification reproduces the original group reload crash, then verifies cold group and bot reloads, bot/group navigation in both directions, message-menu open/close, and unchanged disabled read-aloud behavior.
  • Group checks pass at 1440px and 390px with no browser exceptions. This covers the shared web/desktop renderer; mobile uses a separate unconditional hook and is unchanged.
  • No provider calls or live user data were used.

Before and after screenshots are attached below.

Implemented and verified by gpt-6-astra in T3 Code through the Grok harness.

prg-hook-order-before

prg-hook-order-after-1440

prg-hook-order-after-390

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
akeru-bot-landing Skipped Skipped Sep 8, 2026 8:22pm UTC

Request Review

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 8, 2026
@greptile-apps

greptile-apps Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Greptile Summary

The roster landing components now preserve hook ordering while clearing reply-playback identity and messages whenever the selected bot, archived bot, or group is unavailable. Regression coverage exercises hydration and availability transitions.

Confidence Score: 5/5

Safe to merge.

No outstanding findings remain.

Reviews (2): Last reviewed commit: "fix(web): clear playback for unavailable..." | Re-trigger Greptile

@leoisadev1
leoisadev1 merged commit a17d584 into main Sep 13, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the fix/group-reply-playback-hook-order branch September 13, 2026 19:37
This was referenced Sep 13, 2026

This branch was previously deployed

1 inactive deployment
Preview — 945b23d9 Deployed Sep 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant