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
fix(remote): stat-first file creation, removes error toast on first use (#51)
On Remote SSH and WSL, Reader.loadEntryForDay, Reader.loadEntryForWeek,
and LoadNotes.loadNote called vscode.workspace.openTextDocument on a
missing file and relied on catching the rejection. VS Code surfaces an
error notification independently of the catch, and the catch itself
filtered errors by prefix-matching the message text — fragile and
inconsistent across the three call sites (the week handler only matched
"cannot open file:", leaving remote weeks broken).
Replace with stat-first via a dedicated fileExists(uri) helper that
wraps vscode.workspace.fs.stat and converts FileSystemError.FileNotFound
to false. Anything else (permission denied, transport unavailable)
propagates so VS Code can surface its own dialog.
While each method is rewritten, drop the new Promise((resolve, reject)
=> ...) wrapper and use native async/await. Scope limited to the three
touched methods; PLAN.md Phase 2.2 still owns the rest.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments