Skip to content

Refuse quitting with attached drives; neutral Canvas palette - #9

Merged
techartdev merged 4 commits into
mainfrom
claude/drive-close-guard-canvas-theme
Sep 11, 2026
Merged

techartdev merged 4 commits into
mainfrom
claude/drive-close-guard-canvas-theme

Conversation

@techartdev

Copy link
Copy Markdown
Owner

Two finished changes that had stayed uncommitted in the working tree, committed separately.

Refuse to quit with attached drives (9ce20ba)

  • Bug: quitting with a local drive attached hid the window, while ShellCanvas and the Drive Bridge kept running with the drive mounted. Tauri destroys the window after a JavaScript onCloseRequested callback unless it prevents the default, even when Rust has already refused the close.
  • Fix: the frontend now always prevents that automatic destroy and calls a new request_app_close command.
  • request_app_close refuses while drives are attached. Otherwise it marks the desktop as closing under the attachment lock, so an attachment waiting on that lock cannot start once the window is gone.
  • Windows: drive attachment also treats letters of remembered, disconnected network drives as reserved (WNetGetConnectionW). Mount cleanup still checks active mounts only.
  • Companion bridge changes: the matching Drive Bridge changes live in the separate bridge repository (feat/graceful-detach, its PR Prepare public release and SDK distribution #1).

Neutral Canvas palette (398631a)

  • The built-in Canvas theme moves to 1.1.0: neutral white and charcoal surfaces, blue accents, and a blue/indigo wallpaper in light and dark, replacing the green tint.
  • Dock icons use neutral chrome with distinct app colors. Custom themes keep their own palette.
  • The Canvas Study example theme and the preview terminal colors follow suit.

Verification

  • npm run verify passed locally on this change set, before the CHANGELOG/doc wording edits: 303 frontend tests, frontend build, Rust workspace tests, Rust formatting and all-target Clippy. npm run public:check passed again after those edits.
  • The drive close guard was confirmed by hand on Windows with an isolated profile: attach, refused detach and quit while busy, detach, then quit. The earlier native bridge suite also passed.
  • Browser screenshots of the launcher and App Manager in light and dark (preview build) confirm the new palette works with the generic and packaged app icons.
  • No hosted CI was triggered.

🤖 Generated with Claude Code

techartdev and others added 2 commits September 11, 2026 21:11
…tters

Tauri destroys the window after a JavaScript close-request callback unless
it prevents the default, even when Rust has rejected the close. Quitting
with a drive attached therefore hid the window while ShellCanvas and the
Drive Bridge kept running. The frontend now always prevents the automatic
destroy and asks request_app_close, which refuses while drives run and
marks the desktop as closing under the attachment lock, so a waiting
attachment cannot start after the window is gone.

On Windows, attachment also treats letters of remembered, disconnected
network drives as reserved (WNetGetConnectionW). Mount cleanup still checks
only active mounts, so such a letter is not mistaken for a live bridge.

The attach, blocked detach and quit, detach and quit checklist was
confirmed manually on Windows with an isolated profile.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Canvas 1.1.0 replaces the green-tinted surfaces with neutral white and
charcoal, blue accents and a blue/indigo wallpaper in both light and dark,
modelled on macOS and Windows 11 defaults. Its dock icons use neutral
chrome with distinct app colors; custom themes keep their own palette.
The exported Canvas Study example and the preview terminal follow suit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

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.

🟡 Changes recommended

Duplicate close requests can clear the shutdown guard and reintroduce the attachment race.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds safe quit handling for attached drives and refreshes the built-in Canvas theme with a neutral palette.

Changes:

  • Routes native close requests through a synchronized backend guard.
  • Reserves disconnected Windows network-drive letters.
  • Updates Canvas colors, icons, preview styling, tests, and documentation.
File summaries
File Description
src/App.tsx Routes close requests through the backend.
src-tauri/src/lib.rs Adds synchronized application closing.
src-tauri/src/drive_mappings.rs Blocks attachments during shutdown.
src-tauri/src/local_mounts.rs Detects reserved network-drive letters.
src-tauri/Cargo.toml Enables Windows networking APIs.
src/themes/theme.css Adds neutral Canvas icon styling.
src/themes/model.ts Updates the Canvas palette and version.
src/themes/model.test.ts Updates built-in theme expectations.
src/preview.ts Refreshes preview terminal colors.
examples/themes/canvas-study/shellcanvas.theme.json Updates the example palette.
docs/themes.md Documents the neutral theme.
docs/filesystem-integration-progress.md Records drive lifecycle verification.
CHANGELOG.md Announces both changes.
Review details
  • Files reviewed: 13/13 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src-tauri/src/lib.rs
Comment thread src-tauri/src/drive_mappings.rs Outdated
techartdev and others added 2 commits September 11, 2026 23:47
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@techartdev
techartdev merged commit 140fb7a into main Sep 11, 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.

2 participants