Skip to content

UI: open workbooks in separate native windows - #27

Open
srudraDev wants to merge 1 commit into
storytold:mainfrom
srudraDev:ui/multiple-workbook-windows
Open

srudraDev wants to merge 1 commit into
storytold:mainfrom
srudraDev:ui/multiple-workbook-windows

Conversation

@srudraDev

Copy link
Copy Markdown

Opening another workbook from an existing native GridCraft window now launches
it in a separate native window, preserving the current workbook.

  • Add a native open_in_new_window host service for desktop shells.
  • Validate workbook files before launching a new process so malformed or
    unreadable files report an error in the current UI.
  • Prevent duplicate windows for already-open workbooks, including equivalent
    relative, absolute, and canonical paths.
  • Preserve the initial blank-workbook replacement behavior.
  • Keep CLI, web, headless, and test behavior unchanged when no native window
    service is provided.
  • Surface native launch failures without modifying the current workbook.

Validation

  • cargo fmt --all
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p gridcraft-ui-egui
  • cargo check -p gridcraft
  • cargo check -p gridcraft-web --target wasm32-unknown-unknown
  • git diff --check

Copilot AI balanced review requested due to automatic review settings October 9, 2026 05:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@srudraDev
srudraDev force-pushed the ui/multiple-workbook-windows branch from d7a180a to 0312359 Compare October 11, 2026 00:33
@Zarvinx

Zarvinx commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Hey, nice work! I somehow missed this before starting #171, so we’ve ended up exploring two different approaches to the same problem. Sorry about the duplicate work.

I like how small and straightforward this implementation is. It gives each workbook a real native window by launching a separate GridCraft process.

In #171 I took the other route: multiple native egui windows coordinated inside one process. That adds more lifecycle work, but it means GridCraft can:

  • focus an existing workbook window from the selector
  • route Finder drops and Cmd+N/Cmd+O through one coordinator
  • focus the existing window when the same file is opened again
  • share preferences, theme and recent files between windows
  • stay running on macOS after the last workbook window closes

@devius devius mentioned this pull request Oct 15, 2026
2 of 3 tasks

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants