Skip to content

[Fix] Older UI briefly appears after refreshing call details#210

Merged
khushalsonawat merged 2 commits intodevfrom
fix/old-call-detail-rendering-on-loading
May 5, 2026
Merged

[Fix] Older UI briefly appears after refreshing call details#210
khushalsonawat merged 2 commits intodevfrom
fix/old-call-detail-rendering-on-loading

Conversation

@cdileep23
Copy link
Copy Markdown
Contributor

@cdileep23 cdileep23 commented May 5, 2026

Summary

Problem: Reloading with the test detail drawer open flashed a 90vw skeleton, then collapsed to the 50vw voice drawer with real content.

Cause: Drawer visibility was URL-driven (?rowIndex=… persists across reload), but row data lived in a non-persisted Zustand store. On reload, the URL reopened the drawer immediately while data was still null — isVoiceCall evaluated false, so the wide 90vw skeleton rendered until the fetch completed and flipped the layout to 50vw.

Fix in TestDetailSideDrawer.jsx — four layers:

Gate open on store data, not URL — drawer only slides in once testDetailDrawerOpen is populated.
keepMounted={hasUrlRowIndex} — child stays mounted while drawer is hidden so its existing restore effect can fetch and populate the store.
Reorder the effect — setIsFetching(null) runs before setTestDetailDrawerOpen(data), eliminating the interim frame.
Child early-returns null when !data || isFetching === "initial" — defense-in-depth against async re-renders.
Result: drawer stays hidden, child silently restores the row, then drawer slides in directly at the correct width with real content. In-session cell clicks are unaffected.

Linked issues

TH-4345

Closes TH-4345

Type of change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📖 Documentation only
  • 🧹 Chore / refactor (no user-visible change)
  • 🚀 Performance improvement
  • 🧪 Test-only change

How was this tested?

Screenshots / recordings (if UI)

Checklist

  • My code follows the style guide
  • I've added tests that prove my fix is effective or that my feature works
  • make check-all / yarn check-all passes locally
  • I've updated the documentation where relevant
  • No hardcoded secrets, URLs, or PII
  • I've signed the CLA

@cdileep23 cdileep23 requested a review from khushalsonawat May 5, 2026 08:20
@cdileep23 cdileep23 self-assigned this May 5, 2026
@cdileep23 cdileep23 changed the base branch from main to dev May 5, 2026 08:21
@khushalsonawat khushalsonawat merged commit 722121f into dev May 5, 2026
12 checks passed
@khushalsonawat khushalsonawat deleted the fix/old-call-detail-rendering-on-loading branch May 5, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants