You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Empty state appears before file finishes loading #5706
When clicking a file to open it, the UI immediately shows "No open tabs. Create new file." After a delay, the file/tab loads. This is misleading because the file exists, and there is no loading feedback during the delay.
Steps to Reproduce
Open MarkText.
Click on a file in the sidebar.
See the error in the tab area.
Expected Behavior
Show a loading indicator (spinner/skeleton) while the file is loading. Only show the empty state when loading is complete and there are truly no open tabs.
Actual Behavior
The empty state "No open tabs. Create new file." is shown immediately. The file tab appears only after a delay, with no loading indicator.
Could you share a little more detail about the loading delay? Small Markdown files on a local disk would usually open quickly, so we'd like to understand what makes the delay noticeable in your case.
Approximately how large is the file, and how long does it take to open?
Is it stored directly on a local disk, or in a OneDrive/cloud-synced folder, network location, or external drive?
Does this also happen with a small, plain Markdown file, or only with particular files?
Does it happen only when no tabs are open, or also when another file is already open?
A short recording or a sample file, if you can share one, would help us reproduce it. The delay could be in reading the file or in preparing/rendering the editor; these details would help us investigate the cause as well as the empty-state behavior.
1. Symptom
When opening a Markdown file, the window first appears blank, then shows the "No open tabs. Create new file." page, and only after that does the file tab appear. The empty state is misleading because the file does exist, and there is no loading feedback during the delay.
2. File and storage environment
Happens with any Markdown file, including a nearly 0 KB plain text file.
Files are stored on a local D: drive, not OneDrive, a network location, or an external drive.
Ordinary Markdown files with no special content.
3. Manual timing (stopwatch)
6 KB file: window appears at ~1.9 s (blank), "No open tabs" appears at ~3.6 s, file appears within ~1 s after that.
23 KB file: window appears at ~2.5 s (blank), "No open tabs" appears at ~4.6 s, file appears within ~1 s after that.
Most of the delay is in the blank window phase (~1.7–2.1 s); the "No open tabs" page itself usually only shows for under 1 s.
4. Trigger pattern (key)
Happens right after the computer starts, and goes away after frequent use.
More likely with larger files / longer load times.
After a reboot: the issue appeared with a 6 KB file, but not with a 171-byte file.
At first I thought it was 100% reproducible, even after opening several files in a row; but the frequency gradually decreased, and eventually it stopped appearing. Now it only happens sometimes.
5. On "only when no tabs are open?"
I have not specifically compared opening a new file while another file is already open, but my impression is that the loading delay itself occurs in both cases; the empty state page only appears when there are no tabs.
6. My assessment
The delay is almost certainly not in reading the file itself — a nearly 0 KB local file also takes 1–2 seconds. It looks more like an issue in the phase from window initialization to tab rendering: the window / empty state is shown too early, before the tab is ready. The larger the gap (cold start, larger file), the more visible the "No open tabs" page is; when the gap is near zero (warm process, small file), it is not visible. It getting faster after frequent opens also matches a cold-start / cache-related behavior.
7. Suggestion
The empty state should only be shown after the "is a file currently loading" state is known, or a loading indicator (spinner/skeleton) should be shown during loading, instead of showing the empty state whenever there are no tabs.
Activity
Jocs commentedon Oct 14, 2026
Could you share a little more detail about the loading delay? Small Markdown files on a local disk would usually open quickly, so we'd like to understand what makes the delay noticeable in your case.
A short recording or a sample file, if you can share one, would help us reproduce it. The delay could be in reading the file or in preparing/rendering the editor; these details would help us investigate the cause as well as the empty-state behavior.
kykak commentedon Oct 14, 2026
Thanks for the reply. Here are the full reproduction details, with a screen recording:
Recording: https://github.com/user-attachments/assets/35e6649a-592e-45c7-8ae0-b97a9b076f5f
1. Symptom
When opening a Markdown file, the window first appears blank, then shows the "No open tabs. Create new file." page, and only after that does the file tab appear. The empty state is misleading because the file does exist, and there is no loading feedback during the delay.
2. File and storage environment
3. Manual timing (stopwatch)
4. Trigger pattern (key)
5. On "only when no tabs are open?"
I have not specifically compared opening a new file while another file is already open, but my impression is that the loading delay itself occurs in both cases; the empty state page only appears when there are no tabs.
6. My assessment
The delay is almost certainly not in reading the file itself — a nearly 0 KB local file also takes 1–2 seconds. It looks more like an issue in the phase from window initialization to tab rendering: the window / empty state is shown too early, before the tab is ready. The larger the gap (cold start, larger file), the more visible the "No open tabs" page is; when the gap is near zero (warm process, small file), it is not visible. It getting faster after frequent opens also matches a cold-start / cache-related behavior.
7. Suggestion
The empty state should only be shown after the "is a file currently loading" state is known, or a loading indicator (spinner/skeleton) should be shown during loading, instead of showing the empty state whenever there are no tabs.