Merge main into feat/indonesian-translates-every-status-and-error

This commit is contained in:
dotCooCoo
2026-11-18 02:03:08 -08:00
1225 changed files with 173355 additions and 13486 deletions
+40 -3
View File
@@ -83,6 +83,8 @@ The canvas is rasterized on the CPU (`vectorcraft-render`, vello_cpu); the GPU (
- `WGPU_VALIDATION_INDIRECT_CALL=1`: turns wgpu's check of indirect draw arguments back on. VectorCraft draws nothing indirectly and turns it off, since the compute shader it needs fails to compile on some drivers (#651).
- On Linux with Mesa, `MESA_VK_DEVICE_SELECT=10de:2f04!` (vendor:device as `vulkaninfo --summary` or `lspci -nn` show it) leaves only that GPU to Vulkan, and `DRI_PRIME=1` picks the other GPU.
- Help › About and the control channel's `ui.inspect` (`graphicsAdapter`) show the adapter in use, and the app logs it at startup.
- **How frames reach the display.** By default the window presents with `autovsync` and lets the display queue one frame. With `autovsync`, wgpu uses relaxed vsync (FifoRelaxed, which tears a frame that arrives late) where the driver offers it, else vsync (Fifo). For a launch, `--present-mode` (or `VECTORCRAFT_PRESENT_MODE`) sets the present mode to `fifo` (vsync), `autovsync` or `novsync` (wgpu uses Immediate, else Mailbox, else Fifo, whichever the driver offers), and `--frame-latency` (or `VECTORCRAFT_FRAME_LATENCY`) sets the frames the display may queue, `1` to `3`. A flag overrides its variable, and a value that is not one of these stops the app with a message. On Windows and Linux, a launch with either one set opens its files in a new window, as with `--new-instance`, instead of handing them to a running VectorCraft. At startup the log records what the app asks the window surface for, for example `requested window surface: autovsync, frame latency 2 (override)`. The driver chooses the mode that `autovsync` and `novsync` resolve to and may clamp the latency, and on macOS egui uses at least 2 frames while the window is being resized. The code is `apps/vectorcraft/src/presentation.rs`.
- **Preferences › Performance › Low-Latency Drawing** (`lowLatencyDrawing`, off by default) presents with `novsync` and is read when the app starts, so a change applies after a restart. The present mode comes from `--present-mode` first, then `VECTORCRAFT_PRESENT_MODE`, then this preference, then the default (`autovsync`); `--frame-latency` and `VECTORCRAFT_FRAME_LATENCY` still set the latency with it on. The log names where the mode came from: `requested window surface: novsync (preference), frame latency 1`. Whenever the window presents without vsync (`novsync`, from the preference or an override), frames start at most 240 times a second (about 4.17 ms apart); with vsync the display paces them and no cap applies.
## Logs
@@ -98,6 +100,8 @@ When the interface thread stays in one part of a frame for 3 s (VectorCraft's ow
|---|---|
| `VECTORCRAFT_CONTROL_PORT` | Same as `--control <port>`, which overrides it; a value that isn't a port from 1 to 65535 stops the app |
| `VECTORCRAFT_IN_WINDOW_MENUS` | Any value but empty or `0`: same as `--in-window-menus` (see [macOS: the menu bar](#macos-the-menu-bar)) |
| `VECTORCRAFT_PRESENT_MODE` | Same as `--present-mode`, which overrides it: `fifo`, `autovsync` or `novsync`; any other value stops the app (see [Desktop graphics processor](#desktop-graphics-processor)) |
| `VECTORCRAFT_FRAME_LATENCY` | Same as `--frame-latency`, which overrides it: `1` to `3` frames; any other value stops the app (see [Desktop graphics processor](#desktop-graphics-processor)) |
| `VECTORCRAFT_NO_PREFS` | No preferences read or written, no default Data Recovery folder and no log file, and no saved PDF presets or loaded ICC profiles kept (agents' test runs; also for `vectorcraft-cli`) |
| `VECTORCRAFT_CONFIG_DIR` | The folder for the preferences and the folders next to them (`PDF Presets`, `Color Profiles`, …), for the app and `vectorcraft-cli` (see `docs/control-protocol.md`) |
| `WGPU_POWER_PREF` | Graphics adapter: `low`, `high` or `none` (see [Desktop graphics processor](#desktop-graphics-processor)) |
@@ -108,7 +112,7 @@ When the interface thread stays in one part of a frame for 3 s (VectorCraft's ow
## macOS: the menu bar
On macOS the menus live in the system menu bar, not in the window's app bar (which keeps the brand mark, Home, the search icon and the workspace switcher next to the traffic lights, centred on the bar by `apps/vectorcraft/src/mac_window.rs`). `--in-window-menus` or `VECTORCRAFT_IN_WINDOW_MENUS=1` keeps them in the window, as on Windows, Linux and the web; so does a menu bar AppKit refuses to build (logged). `ui.inspect` says which with `nativeMenuBar`.
On macOS the menus live in the system menu bar, not in the window's app bar (which keeps the brand mark, Home, the search field and the workspace switcher next to the traffic lights, centred on the bar by `apps/vectorcraft/src/mac_window.rs`). `--in-window-menus` or `VECTORCRAFT_IN_WINDOW_MENUS=1` keeps them in the window, as on Windows, Linux and the web; so does a menu bar AppKit refuses to build (logged). `ui.inspect` says which with `nativeMenuBar`.
- **One menu model.** `crates/ui-egui/src/native_menu.rs` (platform-free, tested on every platform) builds the menu bar from the in-window menus (`menus::menu_tree`, each item through `menus::entry`, which the in-window menus draw too) and lays it out the Mac way: the VectorCraft menu holds About, Settings ▸ (one item per Preferences page, General… ⌘K), Language ▸, Appearance ▸ (UI brightness), Services, Hide VectorCraft ⌃⌘H (⌘H stays View › Hide Edges), Hide Others ⌥⌘H, Show All and Quit ⌘Q (the app's own `app.quit`, so unsaved documents are asked about); those leave Edit and Help. The in-window bar itself never shows the VectorCraft menu (it starts at File, as in Illustrator, on every platform): Language and Appearance have no in-window menu and are synthesized in `mac_layout`, and Quit is File › Exit in the window, relabelled to Quit in the App menu. Window starts with Minimize ⌃⌘M and Zoom and ends with Bring All to Front, and Help is the system's Help menu (its search field). A system key a command (or a user's shortcut) already has stays the command's, and the log says so.
- **The native side** is `apps/vectorcraft/src/mac_menu.rs`: muda (`=0.21.1`, default features off, macOS only, no `unsafe`) builds the `NSMenu`s. Labels, enabled and checked are updated in place when anything they show may have changed (a command ran, the document, its history or selection changed, a click or a key press); a change of structure (a recent file, the language, a shortcut) rebuilds the menus. While an interaction is open (for example a move, scale or shape drag, a dialog's preview or the font menu's preview), the app updates them for the document's changes only when the interaction begins and when it ends.
@@ -294,7 +298,11 @@ other `sv-*` locale resolve to it), Georgian (`ka`, complete; `ka-GE` and `ka_GE
control channel, MCP and tests read them) and are translated only where the status bar draws them
(`i18n::msg`). `@msg` catalog rows hold a whole message or a template such as
`Couldn't open {name}: {e}`; `{_1}`, `{_2}` … stand for the format string's `{}`, and the values in the
placeholders are translated in turn (the reason after `: {e}` is often a message too). A value that starts with
placeholders are translated in turn (the reason after `: {e}` is often a message too). A template needs text
between any two placeholders, since the catalog cannot tell where `{a}{b}` splits: make the message with the
side-by-side values joined into one (`unknown parameter `{key}``, where `key` is `marks.ofset`). The catalog
leaves out a row whose template has two placeholders in a row or no text; `i18n::tests` fails on such a row
and on such a message, and the untranslated report counts it as missing. A value that starts with
`{` is translated only when it has an exact row, so a JSON object stays as it is; a value that starts with `[` is
also matched against a template that starts with `[` and an index of digits, such as an effect's refusal
``[{j}] `{_1}`: {why}``, so its reason is translated while a JSON array stays as it is. A literal brace in a
@@ -494,7 +502,36 @@ to the source tab resumes a move (Alt copies). Escape or release outside the can
Changing the source revision or unexpectedly changing/closing the destination cancels a stale
transfer; focus loss, touch cancellation and multitouch cancel too. Moving tabs under a stationary
pointer does not activate further tabs until the pointer moves. The close icon does not activate a tab during a drag. Overflow-menu hover activation and
cross-window dragging remain outside this change.
dragging into a floating document window that is an OS window of its own remain outside this change.
Under Window › Arrange › Tile, a Selection move released over another document's pane copies the
artwork into that document through `edit.dropSelection`, with no tab hover first. The pane becomes
the current window, the grab point lands under the pointer in that pane's own zoom and rotation, and
the source move is rolled back, including when the pointer enters the pane and the button is released
in the same frame. A release over another view of the source document (Window › New Window) moves the
artwork there with `object.move`, and Alt copies it. While the artwork is held over a pane, the cursor
shows a copy or a move. A release over a pane's rulers or scroll bars, or after Escape, changes
neither document. A press in another pane with no artwork carried still only makes its document
current. Page 14 of [the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf)
describes documents arranged side by side, with items dragged from one document into another.
Evidence: the `canvas::panes` tests drive real pointer frames from the current pane into another
document's pane, back the other way, into another view, through a tab into a third document's pane,
and off a pane's art area.
The same release works for documents in floating windows (Window › Arrange › Float in Window) where
those windows are drawn inside the main window: on the web, on Wayland and with a control channel
attached. A Selection move released over the art area of another document's floating window copies
the artwork into that document, and one released over the pane the main window draws while the
current document floats copies it into the main window's document. A floating window that shows
another view of the source document takes a move, and Alt copies. The release is taken at the start
of the frame, before any canvas sees it, so a release in the first frame over a window still drops the
artwork. A release on a window's title bar, rulers or scroll bars, or after Escape, changes neither
document. A floating window that is an OS window of its own, the default on Windows, macOS and X11,
does not take the artwork: its pointer positions are in that window's points, not the main window's.
Evidence: the `doc_windows` tests drive real pointer frames from the main window's canvas into a
floating window (rotated and zoomed, and in the frame the pointer arrives), from a floating window
into the main window's pane, into a floating view of the same document, and onto a title bar and
after Escape, and check that no OS window's pane is noted.
The cited regressions assert the internal clipboard; they do not exercise the native
system-clipboard adapter. Tab activation resets the Selection tool through
`Session::set_active`; gesture regressions verify it is idle after switching, dropping