Commit Graph
63 Commits
Author SHA1 Message Date
aiongg 9d422a18b1 Retry Windows sharing and lock violations, with a capped backoff
retry_rename also retries ERROR_SHARING_VIOLATION (32) and
ERROR_LOCK_VIOLATION (33), which a rename can report while a scanner
holds the file, and caps each pause at 200 ms.
2026-10-12 20:23:17 +02:00
aiongg 253fd775f0 Set the replaced file's permissions on the open temporary file
The original's permissions are applied to the temporary file before it
is flushed, and a failure fails the save instead of being ignored.
2026-10-12 20:23:17 +02:00
aiongg d78b352004 Refuse to replace a file the user cannot write (Unix)
A rename needs only a writable folder, so a read-only file would be
replaced where writing it in place would fail. Before staging, the
existing file is opened for writing without truncating; when that fails
the save fails with a read-only error.
2026-10-12 20:23:17 +02:00
aiongg 658ca37c8e Follow symbolic links without canonicalize
The target is found by reading links one hop at a time, resolving
relative links against the link's folder. A dangling link writes the
file it names and stays a link, and a loop of links is an error.
2026-10-12 20:23:17 +02:00
aiongg fb26a9f90f Report a missing folder instead of creating it
A save into a folder that does not exist fails with an error naming the
folder, so a save to an unmounted network share does not create a local
folder in its place.
2026-10-12 20:23:17 +02:00
aiongg 9e160690fc Never replace an existing file in write_new
write_new_with gives the staged file its name with a hard link on every
platform. Where hard links fail for any reason other than an existing
target (FAT/exFAT, some SMB and FUSE volumes), it copies the staged
content into a file opened with create_new. It shares the temporary-file
retry, error context and folder flush with the replace path, and its
errors only mention an original file when there is one.
2026-10-12 20:23:17 +02:00
aiongg 818c0c0753 Share one replace path between the byte and streaming writers
atomic_write, atomic_write_with and atomic_write_custom all run through
one internal function that takes the AtomicFs, the RenameRetry and a
writer callback, so fault injection also covers streaming writes.
AtomicFs creates and flushes the temporary file (create_new, sync)
instead of writing a byte slice.
2026-10-12 20:23:17 +02:00
Zach Shallbetter 8df3d87d8b Add craft-atomic: crash-safe atomic write and document replacement (refs #2, fixes #14) 2026-10-12 20:23:17 +02:00
skylar taylor-barrick 4a4ec8c1ca Merge pull request #21 from jmacek/quit-app-menu
craft-quit: macOS app menu whose Quit asks the app first
2026-10-12 12:22:49 -06:00
skylar taylor-barrick c68d145c9f docs: list craft-quit in the library catalog 2026-10-12 20:21:37 +02:00
skylar taylor-barrick 8e9e437e78 craft-quit: route menu Quit to the root viewport 2026-10-12 20:18:18 +02:00
Jake MacekandClaude Opus 5.5 f0ae2b3f13 craft-quit: return the app menu install error to the app
install_app_menu printed the error and carried on, so an app could not
tell that ⌘Q had fallen back to winit's Quit, which skips the prompt.
It now returns the error; the app decides whether it is fatal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:18:18 +02:00
Jake MacekandClaude Opus 5.5 673c14439b craft-quit: Quit menu id and handler for apps with their own menu
Apps that build their own muda app menu can't use install_app_menu: it
replaces the whole menu and sets muda's process-wide event handler.
QUIT_MENU_ID and on_menu_event(ctx, id) let them give their own Quit
item the id and route its event through the app's close handling.
Neither needs muda, so any muda version works. install_app_menu now
uses both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:18:18 +02:00
Jake MacekandClaude Opus 5.5 ebf3f552cd craft-quit: macOS app menu whose Quit asks the app first
winit's default app menu sends Quit (Cmd+Q) straight to
-[NSApplication terminate:] and winit doesn't implement
applicationShouldTerminate:, so a Craft app quits without its
unsaved-changes prompt. The new opt-in `menu` feature adds
`install_app_menu(ctx, app_name)`, which replaces that menu with a
muda-built copy whose Quit sends ViewportCommand::Close. The app's own
close handling then runs, as for the close button, and
on_close_request quits.

muda is a macOS-only, optional dependency; no unsafe code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:18:18 +02:00
skylar taylor-barrick f207cdd016 Merge pull request #5 from mjohnson7cd/macos-quit-terminate
Add craft-quit: quit macOS apps through NSApplication terminate:
2026-10-12 12:17:38 -06:00
skylar taylor-barrick bafeec6b7d Merge remote-tracking branch 'origin/main' into fix-quit5-20261012 2026-10-12 20:15:22 +02:00
skylar taylor-barrick c6a847b7d0 craft-quit: document logic-based close handling for hidden windows 2026-10-12 20:11:55 +02:00
skylar taylor-barrick 3c9702725d Merge pull request #26 from storytold/codex/craft-print-settings
Share printer settings and asynchronous print feedback
2026-10-12 08:25:02 -06:00
skylar taylor-barrick 5d41e29e46 Install software Vulkan for shared UI rendering tests 2026-10-12 02:41:42 +02:00
skylar taylor-barrick 4cae45dbe8 Handle texture deltas in print control tests 2026-10-12 02:37:47 +02:00
skylar taylor-barrick d27646a5f7 Preserve accessible print control labels and narrow layout 2026-10-12 02:34:53 +02:00
skylar taylor-barrick b700ae753f Add shared printer settings and asynchronous job feedback 2026-10-12 02:32:49 +02:00
skylar taylor-barrick 1aa81a773a Expose Windows printer duplex capability (#25)
Expose Windows printer duplex capability
2026-10-11 17:20:15 -06:00
skylar taylor-barrick d991bf6792 Report Windows driver duplex capability to print callers 2026-10-12 01:04:26 +02:00
Mara JohnsonandClaude Opus 5.5 9d6610afd1 craft-quit: document calling on_close_request last in the frame
eframe calls logic before ui, so on_close_request goes after all of the
app's own close handling, at the end of ui when the app handles closes
there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:47:11 -04:00
Mara JohnsonandClaude Opus 5.5 0549f672a3 Add craft-quit: quit macOS apps through NSApplication terminate:
Closing an eframe window on macOS can crash in AppKit's Touch Bar finder
after eframe drops the window while the run loop is still running (#3).
craft-quit routes a window close through -[NSApplication terminate:],
the path Cmd+Q already takes, so the process ends before another display
cycle runs.

- quit(): schedules terminate: on the main queue on macOS, no-op elsewhere
- on_close_request() (feature "egui"): cancels the root window's close
  and quits through the platform path instead

Also commits Cargo.lock and ignores .idea/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 18:47:11 -04:00
skylar taylor-barrick d26682a58a Launch the print spooler through system PowerShell (#23)
Launch the print spooler through system PowerShell
2026-10-11 14:10:44 -06:00
skylar taylor-barrick 32bcac12db Launch Windows PowerShell from its system path 2026-10-11 22:09:14 +02:00
skylar taylor-barrick 876cba3527 Extract craft-print spooler with native Windows CI (#8)
Share CUPS and Windows PDF submission between PdfCraft and DesignCraft, with explicit scaling and optional duplex overrides. Native Windows CI validates rendering, settings, paused-queue submission and cleanup.
2026-10-11 14:05:47 -06:00
skylar taylor-barrick bef3211753 Target the local computer explicitly when removing the test port 2026-10-11 22:03:37 +02:00
skylar taylor-barrick c7c01aff6d Use a removable local port name for the Windows queue test 2026-10-11 22:00:25 +02:00
skylar taylor-barrick da752825c7 Verify Windows queue cleanup without removing an absent output file 2026-10-11 21:56:44 +02:00
skylar taylor-barrick cf93331318 Use PrinterName to inspect and clean the Windows test queue 2026-10-11 21:53:59 +02:00
skylar taylor-barrick 379d99f817 Compare PowerShell geometry JSON as numeric values 2026-10-11 21:51:02 +02:00
skylar taylor-barrick c30d7d4e13 Avoid interactive FILE port prompts in the Windows queue test 2026-10-11 21:50:09 +02:00
skylar taylor-barrick c15c501567 Require Windows CI to exercise the paused print queue 2026-10-11 21:46:00 +02:00
skylar taylor-barrick b71ad7c8f1 Preserve queue duplex defaults and add explicit shrink-to-fit 2026-10-11 21:44:37 +02:00
skylar taylor-barrick 711b7934c9 Enable cross-platform craft-print CI and manual runs 2026-10-11 19:48:56 +02:00
skylar taylor-barrick c22bb1b0ce Require a paused temporary queue in native Windows print regression 2026-10-11 07:13:40 +02:00
skylar taylor-barrick 9e03fd49cc Bound Windows custom paper dimensions to DEVMODE capacity 2026-10-11 07:11:07 +02:00
skylar taylor-barrick e7e12f7d0f Document cross-platform print CI setup and pending native validation 2026-10-11 07:08:48 +02:00
skylar taylor-barrick eb99775517 Extract craft-print PDF spooler with Windows size and duplex fixes 2026-10-11 07:07:56 +02:00
skylar taylor-barrick af2b0918d2 Merge pull request #6 from skylartaylor/codex/ui-suite-integration-20261010
Add shared egui UI components and transactional panel docking
2026-10-10 18:38:14 -06:00
skylar taylor-barrick 5c874d51ee UI.8: shape dock action labels with logical accessibility 2026-10-10 14:08:31 -06:00
skylar taylor-barrick b1406e3e6a UI.8: cancel renderer-owned resize gestures on workspace replacement 2026-10-10 11:48:50 -06:00
skylar taylor-barrick 34b4adfcfb UI.8: clarify creative docking audit scope 2026-10-10 11:14:22 -06:00
skylar taylor-barrick 615f0638c7 UI.8: classify renderer-owned docking keyboard focus 2026-10-10 11:00:02 -06:00
skylar taylor-barrick 7bb9c865e6 UI.8: cancel floating group gestures on workspace replacement 2026-10-10 10:53:55 -06:00
skylar taylor-barrick f23c9f9c4a UI.8: preserve application docking chrome and group gestures 2026-10-10 10:47:52 -06:00
skylar taylor-barrick fc77f4cc7f UI.7: preserve split resizing beside panel scrollbars 2026-10-10 09:40:28 -06:00