Skip to content

fix(comments): show loading state instead of blank comment drawer when opened from a tile#14494

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/blank-comment-drawer-feed
Jun 17, 2026
Merged

fix(comments): show loading state instead of blank comment drawer when opened from a tile#14494
dylanjeffers merged 1 commit into
mainfrom
fix/blank-comment-drawer-feed

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Problem

Pressing the comment button on a track tile in the feed opened a blank comment drawer. Opening the drawer from the track screen worked fine.

Root cause

CommentSectionProvider (packages/common/src/context/comments/commentsContext.tsx) fetches the full track via useTrack(entityId) and short-circuits with if (!track) return null until it loads.

  • On the track screen, the track is already in the tan-query [track, trackId] cache (the screen pre-fetches it), so the provider renders immediately.
  • From the feed, the track is not guaranteed to be in that cache when the global CommentDrawer mounts with the new entityId. While useTrack is fetching, the provider returns null, rendering nothing inside the bottom sheet → a blank drawer.

Fix

In the mobile CommentDrawer, fetch the track with useTrack(entityId) and render comment skeletons while it's loading, instead of relying on the provider (which renders nothing). Once the track resolves, the full CommentSectionProvider tree renders as before. This keeps the change mobile-scoped (where the blank was observed) and reuses the existing CommentSkeleton loading aesthetic.

Testing

  • eslint clean on the changed file
  • tsc --noEmit clean

🤖 Generated with Claude Code

… from a tile

When the comment drawer is opened from a lineup tile (e.g. the feed), the
full track may not yet be in the query cache. CommentSectionProvider returns
null until the track loads, which rendered an empty bottom sheet. Fetch the
track in CommentDrawer and show comment skeletons while it loads so the
drawer never appears blank.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d6951d8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers dylanjeffers merged commit 52f9ef0 into main Jun 17, 2026
3 checks passed
@dylanjeffers dylanjeffers deleted the fix/blank-comment-drawer-feed branch June 17, 2026 19:31
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.

1 participant