Skip to content

Fix loading error before opening in a new tab - #487

Open
SharonStrats wants to merge 2 commits into
stagingfrom
fix/loading-tab
Open

SharonStrats wants to merge 2 commits into
stagingfrom
fix/loading-tab

Conversation

@SharonStrats

@SharonStrats SharonStrats commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

When a new tab opens, Mashlib can briefly begin rendering before authentication and the main-page environment are ready. During that short period, it may show:

an access-denied state;
a profile or default heading;
an incomplete layout;
then finally the correct resource once authentication and pane selection finish.
mainPageStarted is used by Mashlib’s layout/theme synchronization logic. Previously, setting it too early allowed layout and environment updates to run while the page was still only partially initialized.

The PR keeps the page in its not-yet-started state until initialization is actually complete. That prevents the temporary incorrect screen from being treated as the settled page state.

What it does not do
It does not make the underlying authentication request faster, and it does not eliminate legitimate 401 responses that can occur while authentication is being restored. Instead, it prevents those intermediate authentication/layout states from being displayed as the final UI.

Prompt: Investigate and fix the issue when opening in a new tab an
error and another screen appears first before settling in the correct state.

Co-authored-by: GPT-5.6 Luna <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The startup-race fix depends on unverified rendering-completion behavior in pinned solid-panes 5.1.3-0, requiring authenticated browser validation of initial navigation and load/layout timing.

No open issues 🎉

What changed in this PR

This PR addresses transient errors and incorrect screens when opening the data browser in a new tab by delaying startup-triggered refreshes until main-page initialization completes.

Changes:

  • Sets mainPageStarted only after initialization succeeds.
  • Returns the environment synchronization promise so its failures reach the initialization error handler.
  • Logs initialization failures instead of silently ignoring them.
File Description
src/​index.ts Adjusts startup readiness timing, chains environment synchronization, and adds initialization error logging.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

2 participants