Part of #5622. On a Wayland session winit 0.30 receives no input from a
pen, so the app opens its window through XWayland when a pen is attached
(#4967). When it did not, the log said nothing, and a report could not
tell a pen that was not found from a session with no X display.
- On a Wayland session the log now says why the window opens on Wayland:
no pen in /proc/bus/input/devices, the device list could not be read,
VECTORCRAFT_NATIVE_WAYLAND is set, or there is no X display (DISPLAY is
unset, as in the Flatpak, which has --socket=fallback-x11). The
pen-found line names the pen, and the missing-libraries warning no
longer says Linux Display Server is X11 when a pen chose XWayland.
- Under X11 the tablet reader logs the pens the X server lists (for
example XWayland's "xwayland-tablet stylus:16"), again when that list
changes, and the first event from each pen.
- docs/development.md lists the new log lines, the Flatpak override that
gives it an X display, and that GDK_BACKEND=x11 does not move the
window to XWayland.
Part of #2654. On Linux and the BSDs, when no graphics adapter could
show the window (no wgpu backend started, or the restarts left no
adapter), the app ended. It now starts once more with
LIBGL_ALWAYS_SOFTWARE=1 and VECTORCRAFT_GPU_SOFTWARE=1 and says in the
status bar that it draws on the CPU. When that start also fails, or on
Windows and macOS, or with WGPU_BACKEND, WGPU_ADAPTER_NAME or
LIBGL_ALWAYS_SOFTWARE set, the error names the backends the driver
needs.
wgpu draws with Vulkan, OpenGL 3.3 or OpenGL ES 3.0. Intel's Ironlake
graphics (8086:0046) has OpenGL 2.1 alone, so the window's surface
failed with "Failed to create surface for any enabled backend: {}"
before any adapter was listed, and gpu::finish restarted only without
an adapter that had been picked.
Replayed over the last 300 merges to main, only-weak would have failed
3 merges on 4 hits, and all 4 were tests where an is_ok or is_some check
is the behavior under test (a lease or start file that can be taken
again, a never-panic property test, a label found by a search with the
row's position in its predicate). Of the 39 only-weak hits in the whole
workspace, most are the same kinds: registry and label lookups,
still-imports and never-panic tests.
only-weak now lists its hits without failing, like all-unguarded. The
check fails on self-compare, ignore-without-reason and sleep. With this
change the replay fails 0 of 272 merges that change Rust files.
- The module docs and docs/development.md name the four rules that fail
the check, and describe `only-weak` and `self-compare` by what they
match (`len() > 0`, `assert_ne!`).
- The changed-lines diff passes `--inter-hunk-context=0`, so a clone's
`diff.interHunkContext` cannot mark unchanged lines between two edits.
- Single-letter workflow variables count as set.
- Test names with non-ASCII letters are read whole.
- An allow in a block comment needs a reason before `*/`.
- `all-unguarded` uses only a binding still in scope at the assertion,
treats a `const` declared with different values as unknown, and drops
a counted local once its collection may shrink or be replaced.
- `only-weak` ignores `unwrap_err`, `expect_err` and `panic!` in failure
messages.
- `self-compare` leaves out operands that call a method returning the
next value each time (`next`, `pop_front`, `recv` and others).
- An `ignore-without-reason` span reaches the attribute's `]`, so a
change to a reason on the next line counts.
Replayed over the last 300 merges of main, all-unguarded failed good
pull requests on collections that cannot be empty. It now leaves out:
- plain locals bound to an array type of a positive length, to a
non-empty array literal or vec![...], or to a literal range followed
only by methods that keep an item (map, iter, rev, collect into a
known collection ...); counts may be consts of the file
- locals filled by a push or insert on every pass of a loop over such a
source
- fields and const or static items the file declares only as arrays of
a positive length
- collections compared with a non-empty literal through such methods,
directly or through a local built from them, and assertions on a
local bound to a count or length
- .windows(k) and .chunks_exact(k) when the collection has k items
Later code that may remove items or replace the collection cancels the
exemption.
Only only-weak, self-compare, ignore-without-reason and sleep fail the
check now. The other rules list their hits on changed lines without
failing. On the same 300 merges, 1 would fail (an only-weak test), and
the 3 all-unguarded hits are tests an empty result passes. On main at
07037afda8, all-unguarded lists 392 hits instead of 433.
`cargo xtask test-lint` reads the Rust files changed since a base and
fails on tests that a wrong result can pass: `.all()` with no length or
emptiness check, only is_ok/is_some/non-empty checks, `assert_eq!(x, x)`,
a process test that checks only the exit status, no assertion and no
asserting helper, a silent early return on a value from the code under
test, `#[ignore]` without a reason, an environment variable that no CI
leg sets, `thread::sleep` in test code, and test code that reads Rust
source outside the listed source audits.
Only hits on changed lines, or in a test with a changed line for the
rules about a whole test, fail it; older hits in the same files are
counted. The base is --base or TEST_LINT_BASE, the first parent of the
checked-out commit in CI (a shallow checkout fetches it), else the merge
base with upstream/main or origin/main. `// test-lint: allow <rule>
<reason>` exempts a line. `--all` lists every hit by crate and rule and
does not fail. `cargo xtask ci` runs it after cursors, so it runs in the
checks shard.
Desktop builds call `Embed::tab_face()`, which embeds the Noto Sans
Condensed SemiBold row of the checkout's `fonts/latin-manifest.txt` with
the `tab` role. craft-ui draws semibold document tab titles in it, scaled
to the semibold face's x-height. The document font list leaves that face
out. Web builds and builds without the face draw tab titles in the
semibold face.
The craft-libs crates point at storytold/craft-libs#3545's head until it
merges.
VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.
About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.
Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
Bulgarian joins COMPLETE_MESSAGES. bg.tsv gets 987 new message rows
(982 @msg, 5 @msgplural) for the keys the other complete-message
languages translate, plus the liquify and variable context rows the
list tests read.
Nine existing Bulgarian @msg rows began with a space, so those status
messages were shown with a leading space. They are fixed, and the new
test message_translations_keep_their_english_edges checks every
catalog for a translation that adds whitespace at either end.
Docs: docs/localization-parity.md, docs/target-app-parity.md and
docs/development.md list Bulgarian with the other complete-message
languages.
* Adopt the shared AGENTS.md (RFC-0072) and test rules (RFC-0071)
* Drop a restated rule from This repository
* Remove the cleanroom xtask command, which does not exist
* AGENTS.md: correct the repository facts
The desktop app's platform modules allow unsafe; list them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
With Window › Arrange › Float in Window, a Selection move released over
the art area of another document's floating window copies the artwork
into that document with edit.dropSelection, as a release over a tiled
pane does. The window becomes the current one, and the grab point lands
under the pointer in that window's own zoom and rotation. While the
current document floats, a release over the pane the main window draws
copies the artwork into the main window's document. A floating window
with 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, and the source move is rolled back first. A release on a
window's title bar, rulers or scroll bars, or after Escape, changes
neither document. This covers floating windows drawn inside the main
window (the web, Wayland and a control channel). A floating window that
is an OS window of its own does not take the artwork yet.
Docs: development.md, target-app-parity.md, gaps.md, roadmap.md,
ui-parity.md.
Preferences › Performance › Low-Latency Drawing (lowLatencyDrawing, off by
default) is read when the app starts and asks for wgpu's AutoNoVsync. The
present mode comes from --present-mode, then VECTORCRAFT_PRESENT_MODE, then
the preference, then the default; with the preference off and no override
the window surface is unchanged. The startup log names "(preference)" or
"(override)" after the mode.
Whenever the window presents without vsync, from the preference or an
override, main-window frames start at most 240 times a second (about
4.17 ms apart). The wait comes before egui reads the frame's input, and
the frame's time moves on by it. With vsync the display paces the frames
and no cap applies.
The checkbox shows on the desktop with the note that it applies the next
time VectorCraft starts. A value that is not a boolean is an error.
Fixes#6013
The magnifier at the right of the app bar becomes a field showing the
magnifier, "Search commands" and the Help › Search Commands… shortcut,
or no shortcut when it is cleared or too long to fit. A click on it, or
Enter or Space with the keyboard focus on it, toggles the command
palette as the shortcut does, and the palette's popup holds the text
field. While a dialog is open the field and the icon do nothing, as the
shortcut does; the icon used to open the palette over a dialog. Screen
readers name the field "Search commands" with the shortcut, and its
tooltip stays "Search commands and tools".
As the bar narrows, the community button goes first, then Explore
tutorials, then the field becomes the 28-point icon, then the workspace
switcher narrows to 64 points, then the icon goes. Safe Mode's label
keeps its room first. The order is the same as before, with the field's
collapse to the icon as a new step after Explore tutorials goes.
Under Window › Arrange › Tile, a Selection move dragged from the current
pane and released over another document's pane copies the artwork into
that document with edit.dropSelection, with no tab hover first. The pane
becomes the current window, and the grab point lands under the pointer in
that pane's own zoom and rotation. A release over another view of the
source document moves the artwork with object.move, and Alt copies it.
The source move is rolled back before the canvas sees the release, also
when the pointer enters the pane and the button goes up in one frame.
Artwork carried to a document through its tab can also be released in a
third document's pane. A release over a pane's rulers or scroll bars, or
after Escape, changes neither document, and a press in another pane with
no artwork carried still only makes its document current. Dragging into a
floating document window and the tab overflow menu are not covered.
Docs: development.md, target-app-parity.md, gaps.md, roadmap.md,
ui-parity.md.
--present-mode (fifo, autovsync or novsync) and --frame-latency (1 to 3),
or VECTORCRAFT_PRESENT_MODE and VECTORCRAFT_FRAME_LATENCY, change the
window surface for one launch. A flag overrides its variable, and a value
outside these stops the app with a message. The log records the surface
the app requests at startup. On Windows and Linux, a launch that sets
either one opens its files in a new window, as --new-instance does.
Without them the window keeps autovsync with one frame queued.
A message part that starts with `[` was translated only through an exact
catalog row, so an effect refusal such as ``[0] `fx`: nothing selected``
inside `plug-in output: objects[0].effects: …` or an importer's
`can't open …` did not use the refusal's template. Inside
`plug-in output: …` its reason stayed in English in Catalan, Greek,
Spanish, Finnish, Russian, Vietnamese, Georgian and Danish.
- A part that starts with `[` now also matches a template that starts
with `[` and an index of ASCII digits (``[{j}] `{_1}`: {why}``), and
its values are translated in turn. A JSON array such as
``["] `x`: b"]`` fits the template's text but not its index, and stays
as it is. A part that starts with `{` is still translated only through
an exact row.
- Georgian and Danish get the refusal's row, which they lacked.
Docs: docs/development.md, docs/target-app-parity.md.
Indonesian joins COMPLETE_MESSAGES, and id.tsv gains 645 @msg rows
and 2 @msgplural rows for status-bar and error messages the message
tests check. Indonesian has one plural form, so each @msgplural row
gives one translation. The messages that Danish also leaves
untranslated still show in English.
The localization docs list Indonesian with the complete-message
languages and give the catalog's new counts.
Where the clipboard goes through the compositor's core Wayland protocol
(the Flatpak on GNOME), Paste now reads the text/uri-list a file manager
offers, else GNOME Files' x-special/gnome-copied-files, and pastes the
first file that is art before the clipboard's other types, as on the
other platforms. The list is read on the read worker and the files on
the paste's background thread. Only file: URIs with no host or
localhost are taken (RFC 8089), percent escapes decoded once (RFC
3986); other URIs are skipped, and a list of more than 1,024 URIs, a
limit of VectorCraft's own, names no file. The Paste menu item is
enabled when a file list is offered.
The Danish catalog had 1,033 `@msg` rows and 47 `@msgplural` rows, and
Danish was not in COMPLETE_MESSAGES, so with the interface in Danish
script errors, plug-in manifest and permission errors, parameter
schema errors, 3D effect refusals, file-reader errors and data-set
messages showed in English.
- da.tsv gains the 602 `@msg` rows and the one `@msgplural` row that
the German, Czech, Spanish and French catalogs have and Danish
lacked. The `@msg` rows are one block with a header comment on
their conventions. Backticked names, command ids, double-quoted
values and bare true, false and null stay as the English writes
them.
- da joins COMPLETE_MESSAGES, so the message tests that iterate the
list check Danish too, and the untranslated report lists Danish's
missing messages. It lists the same set for Danish as for Czech,
Spanish and French.
- The registry comment, docs/development.md, the Danish row and
introduction of docs/localization-parity.md, and the interface
languages line of docs/target-app-parity.md list Danish among the
languages that translate messages.
Quitting can wait up to 27 s for the clipboard handles to let go before
eframe closes the windows. winit cannot hide a native Wayland window, so
the main window stayed on screen for that wait, and the X11 windows of
floating panels and documents were not hidden at all.
- A native Wayland main window is unmapped by attaching no buffer to its
surface. The window and its connection stay open for the Wayland
clipboard. An X11 main window, XWayland included, is hidden as before.
- On Linux the X11 windows of floating panels and documents are recorded
as eframe creates and drops them (viewport hooks), and quitting unmaps
them through a second X11 connection before the wait.
- The new module apps/vectorcraft/src/quit_windows.rs replaces
app::hide_before_teardown, with tests of which windows are hidden or
unmapped. portal_save's Wayland surface helper is shared with it.
The development guide and the progress doc now name all 23 languages in
COMPLETE_MESSAGES: Hindi was missing from the first, and Georgian, Hindi,
Turkish and Catalan from the second. The localization summary adds
Bosnian to the languages marked full that are not in the list.
The catalog cannot match a template with two placeholders in a row, so it
dropped those rows, and the messages showed in English where no other
row matched them. The messages now join such values into one before
they are made, so a catalog row for each one is kept, and the English
text is unchanged:
- An unknown key inside an options object names the key with the objects
it is in (`marks.ofset`) as one value, and its suggestion too.
- A PDF or print setting outside its range names the range with its unit
(`0.05–2 pt`) as one value.
- The raster effect resolution warning names the object's id and name as
one value.
- The desktop app's graphics processor fallback status and the status
after a print job is sent are separate whole messages with and without
their hint or spooler note.
Every catalog gets rows for these messages, and the Hindi and Swedish
range rows that the catalog dropped are replaced.
New tests fail when a message or a bundled catalog row has two
placeholders in a row or no text, and the untranslated report counts a
row the catalog drops as missing instead of translated.
docs/control-protocol.md said the window has no OS decorations on
Windows and Linux. On Linux and the BSDs the app bar is the title bar by
default only on a Wayland session without server-side decorations, such
as GNOME, in a window not opened through XWayland; elsewhere the desktop
draws the frame unless VectorCraft Title Bar on Every Desktop or
VECTORCRAFT_TITLEBAR=app turns the app frame on. The paragraph now says
so.
docs/development.md said the custom title bar is the Linux default. It
now says where the app bar is the default title bar. The comment on
CUSTOM_TITLEBAR in apps/vectorcraft/src/titlebar.rs made the same
Windows and Linux claim and now names Windows only.
The untranslated report missed messages that reach the status bar:
- MESSAGE_CRATES now includes effects, color, render, three-d and pathops,
whose errors the engine and the effects pass on (SVG filters, swatch
libraries, raster sizes and encoders, 3D solids, path operations).
- The scan reads the messages a .map_err closure returns, from each if
branch, match arm and the last expression of a block, the messages of
a handler that .map_err(name) names (a closure bound with let, or a
function), and the message given to a variant of an enum whose name
ends in Fail (CompileFail::Syntax). The steps of a script result's
path ([{i}]{place}, .{k}{place}) are not messages.
- The report and the VECTORCRAFT_I18N_DUMP_MESSAGES dump include the
phrases a parameter schema's error builds at run time (SCHEMA_PHRASES).
Missing translations stay report-only. On main at 0b29b2b1f6 the report
lists 126 more messages, missing in all 23 languages that translate
every message: 43,084 missing rows before, 45,983 after.