GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(mobile): stop spinning forever on failed asset previews by shubhxho · Pull Request #7683 · pingdotgg/t3code

Conversation

@shubhxho

@shubhxho shubhxho commented Aug 20, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Asset preview URLs returning null meant loading, disconnected, and error. The preview screens treated every null as Preparing and spun until you left.

The hook now distinguishes those states. Previews show a short failure and a retry. Favicons still stay quiet when they don't have a URL.

Fixes #7630


Note

Cursor Bugbot is generating a summary for commit 31b552b. Configure here.

Note

Fix mobile asset preview spinning forever on failed asset URLs

  • Adds AssetUrlState discriminated union and resolveAssetUrlState in assetUrlState.ts to map connection + request state into Loading/Disconnected/Failure/Success
  • Adds useAssetUrlState hook in assets.ts exposing status and retry; reimplements useAssetUrl on top of it for backward compatibility
  • Updates WorkspaceFileImagePreview, WorkspaceFileWebPreview, and FileContent to render WorkspaceFileAssetPreviewPlaceholder with contextual empty state and retry on non-success states; ThreadFilesRouteScreen header Refresh now triggers assetPreview.retry() and appends a revision query param for cache-busting
  • Adds tests covering resolveAssetUrlState across unrequested/loading/disconnected/failure/success/waiting cases in assetUrlState.test.ts
  • Behavioral Change: preview components now receive status: AssetUrlState + onRetry instead of a nullable URL string; callers passing the old props will not compile

Macroscope summarized 6af0d59.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shubhxho
fix(mobile): stop spinning forever on failed asset previews
31b552b
Null from the asset URL hook meant loading, disconnected, and error. Previews now show the failure and a retry instead of Preparing forever.

Fixes pingdotgg#7630
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 20, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bdef100d-f48f-41af-9065-234b4c4562fb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 20, 2026
cursor[bot]
cursor Bot reviewed Aug 20, 2026
View reviewed changes
Comment thread apps/mobile/src/state/assetUrlState.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Aug 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 6af0d59

Macroscope's review found this PR approvable — This bug fix adds proper error handling for mobile asset preview loading failures. Changes are self-contained to mobile preview UI, maintain backward compatibility, and include comprehensive unit tests for the new state resolution logic.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shubhxho
fix(mobile): show a spinner while retrying a failed asset preview
020efc6
macroscopeapp[bot]
macroscopeapp Bot reviewed Aug 20, 2026
View reviewed changes
Comment thread apps/mobile/src/state/assetUrlState.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Aug 20, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 020efc6. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/mobile/src/state/assetUrlState.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@shubhxho
fix(mobile): keep asset previews across refresh and disconnect
6af0d59
macroscopeapp[bot]
macroscopeapp Bot approved these changes Aug 20, 2026
View reviewed changes
@randroid88

randroid88 commented Aug 30, 2026

Copy link
Copy Markdown

Reporter of #7630 here — I reviewed this and ran it locally. Summary:

The fix is the right shape. The AssetUrlState machine (Loading/Disconnected/Failure/Success + retry) matches what the issue asked for, and both Cursor Bugbot findings are addressed in the final revision: Success is checked before waiting (background refresh no longer unmounts a live preview) and waiting before Failure (retry shows the spinner again). assetUrlState.test.ts and the mobile typecheck pass locally on this branch.

The failing CI check looks like an infra flake, not this PR — the job log shows it died ~30s in during toolchain install (vite+/rustup) with no test/lint/type failure anywhere; teardown follows immediately. A re-run should clear it.

The real blocker is bitrot against main. Two days after this was opened, #6433 landed a simpler useAssetUrlState in apps/mobile/src/state/assets.ts, and the file screen's menu has since been refactored into a fileMenuActions array — this branch now conflicts. I did the reconciliation locally to test it on today's main: keep this PR's richer hook as the single implementation, adapt ThreadFeed.tsx's ThreadMarkdownImage to destructure { status }, and move the retry() call into the menu-array's refresh action. That compiles clean with tests passing — happy to share the diff if useful.

Machine-verified on a Pixel 8 Pro dev client (rebased-onto-main build): the Success path delivers URLs into the preview components correctly. I was not able to cleanly capture the Disconnected UI on device due to test-rig issues on my side — not evidence against the PR, just honestly unverified.

Would love to see this rebased and landed; it fixes a real daily annoyance.

— verified with Claude Fable 5 via Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg

t3dotgg commented Sep 4, 2026

Copy link
Copy Markdown
Member

Note

🤖 GPT-6 Astra (preview) responding on behalf of Theo

This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened.

Closing as superseded by merged #9123. Main now distinguishes disconnected environments and failed asset URL requests, shows an error, and offers retry instead of an endless preview spinner. This covers the failure and retry flow proposed here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg t3dotgg closed this Sep 4, 2026
@shubhxho
shubhxho deleted the fix/mobile-asset-preview-errors branch November 10, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Mobile asset previews spin forever when asset URL creation or environment connection fails

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@shubhxho @randroid88 @t3dotgg
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.