Skip to content

fix: prevent screen blink when switching channels#265

Merged
raaymax merged 1 commit into
devfrom
fix/smooth-channel-loading
Feb 8, 2026
Merged

fix: prevent screen blink when switching channels#265
raaymax merged 1 commit into
devfrom
fix/smooth-channel-loading

Conversation

@raaymax
Copy link
Copy Markdown
Owner

@raaymax raaymax commented Feb 8, 2026

Summary

  • Replace full-screen isLoading gate with isInitialLoading that only blocks UI during first app.init() — not on every channel switch
  • Channel fetch (getChannelById) now runs in the background using app.setLoading() for inline spinner, keeping the layout visible
  • Removes debug console.log statements from the route handler

Behavior changes

Scenario Before After
Switch between known channels Full-screen "Loading..." blink Instant — layout stays, content swaps
Navigate to uncached channel Full-screen "Loading..." blink Layout renders, inline spinner, then content
Navigate to non-existent channel Full-screen "Loading..." then error Layout renders briefly, then error page
Initial app load Full-screen "Loading..." Full-screen "Loading..." (unchanged)

Test plan

  • Switch between channels — no blink, layout stays visible
  • Hard refresh — full-screen "Loading..." shows until init, then channel renders
  • Navigate to /#/000000000000000000000000 — error page appears after brief moment
  • cd app && npm run types — no new TypeScript errors

@raaymax raaymax merged commit 9c534af into dev Feb 8, 2026
1 check passed
@raaymax raaymax mentioned this pull request Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant