Commit Graph
12551 Commits
Author SHA1 Message Date
dotCooCoo fd4b036867 GPU: idle polls detect device loss and uploads recheck out-of-memory
poll_reads now runs the device validity check when no read is pending, so
device_status reports a destroyed device found by an idle poll. It polls
before checking whether reads are ready, so a read whose map completes in
the same poll returns its bytes. upload_buffer checks the device health
again after its validity probe and returns an out-of-memory error recorded
during that probe instead of a handle.
2026-11-29 10:53:49 -08:00
dotCooCoo 9254c39fc5 GPU: the device validity check polls before its probe
A poll callback can destroy a shared device, and wgpu delivers the loss
only on a later poll, so check_device_valid now polls first and then runs
its validation probe. The map-error fan-out test now makes every map
ready, so it exercises the fan-out rather than the pending-read check.
2026-11-29 10:30:56 -08:00
dotCooCoo bfd5000d90 GPU: pending reads check device validity between polls and wait slices
A destroyed shared device can defer its loss callback until the queue
drains, so poll_reads and the blocking wait in read_buffer now run the
device validity check while a read's map has not completed, and fail the
pending reads with GpuFault::DeviceLost. request_read also returns the
recorded work fault before a non-loss error from its validity probe, so
out of memory keeps its precedence.
2026-11-29 10:30:56 -08:00
BFlat 36634c0ee3 Merge pull request #2621 from dotCooCoo/feat/gpu-wgpu-device-from-craft-gpu-device
craft-gpu-wgpu: open the device through craft-gpu-device and read its loss from DeviceHealth
2026-11-30 01:24:00 +07:00
BFlat 6c7484457b Merge pull request #2923 from dotCooCoo/feat/craft-raster3d
craft-raster3d: CPU raster, shadow maps, resolve and encoding from EffectCraft
2026-11-30 01:10:15 +07:00
BFlat 77c6594f99 Merge pull request #1408 from dotCooCoo/feat/craft-testkit-temp
craft-testkit: add TempDir, a private test folder removed on drop
2026-11-30 01:10:10 +07:00
BFlat 3a2f42e69a Merge pull request #2147 from dotCooCoo/feat/craft-xtask-pins-one-commit
craft-xtask: check_commits keeps a git repository's packages on one commit
2026-11-30 01:10:04 +07:00
BFlat cab07f9818 Merge pull request #2724 from dotCooCoo/feat/keymap-global-hotkeys
keymap: global hotkeys run commands while another application has the keyboard
2026-11-30 01:09:38 +07:00
BFlat ab0bd0345e Merge pull request #1427 from dotCooCoo/chore/testkit-path-filters
ci: run Shared media, audio and video for changes under crates/testkit
2026-11-30 01:09:31 +07:00
BFlat 9c4aa32a46 Merge pull request #2145 from dotCooCoo/fix/ui-share-stale-answers
Share: an account-link answer for a sheet that moved on asks for nothing
2026-11-30 01:09:24 +07:00
BFlat 9e0df623b1 Merge pull request #2596 from dotCooCoo/feat/craft-menu-app-menu-labels
craft-menu: the minimal macOS app menu takes the app's translations
2026-11-30 01:09:18 +07:00
BFlat 5c35a30210 Merge pull request #2615 from dotCooCoo/fix/atomic-temp-name-bytes
atomic: test that temporary names keep long non-Latin names under the name limit
2026-11-30 01:09:11 +07:00
BFlat 708f402226 Merge pull request #2620 from dotCooCoo/feat/fonts-build-embedded-face-new
fonts-build: EmbeddedFace::new and with_index build a face without a struct literal
2026-11-30 01:09:05 +07:00
BFlat d1c3f85685 Merge pull request #2629 from dotCooCoo/feat/update-off-state
craft-update: an app can turn update checks off
2026-11-30 01:08:58 +07:00
BFlat d4c05c0e7c Merge pull request #3964 from dotCooCoo/fix/platform-test-handshakes
platform: the portal and dialog lifecycle tests wait on the worker's messages instead of on time
2026-11-30 01:08:52 +07:00
BFlat 4254d781d6 Merge pull request #3971 from dotCooCoo/fix/update-tests-no-wall-clock
craft-update: cancel and output-limit tests no longer depend on elapsed time
2026-11-30 01:08:45 +07:00
BFlat ddb3ab5872 Merge pull request #3991 from dotCooCoo/fix/metadata-xmp-work-counts
metadata: the XMP scan tests count work instead of timing
2026-11-30 01:08:38 +07:00
BFlat ec02b779d0 Merge pull request #3994 from dotCooCoo/fix/i18n-fold-search-count
i18n: the turned-down occurrence test counts search steps instead of timing
2026-11-30 01:08:32 +07:00
BFlat 4bad37346d Merge pull request #4036 from dotCooCoo/fix/mesh-ops-hit-t-doc
craft-mesh-ops: Hit::t is documented as the ray parameter for ray queries
2026-11-30 01:08:26 +07:00
BFlat 02f3272d39 Merge pull request #4074 from dotCooCoo/fix/mesh-ops-cylinder-rim
craft-mesh-ops: test that cylinder cap and side rim edges match
2026-11-30 01:08:19 +07:00
BFlat 72f7604112 Merge pull request #4272 from ruchirguitar/font-picker-indic-scripts
font-manager: Indic scripts in the font picker's script filter (#4213)
2026-11-30 00:54:24 +07:00
BFlat e67fa11c55 Merge pull request #4303 from dotCooCoo/fix/flyout-tear-off-one-pass
ui-panels: an open tool flyout with its tear-off bar runs each frame once
2026-11-30 00:50:19 +07:00
dotCooCoo 01aa7b1c03 GPU: a read stops before allocating when the device check records a new fault
request_read checks the recorded work fault again after its device check, so
an out-of-memory error that a callback records during that check stops the
read before it allocates a staging buffer. with_device documents that the
queue must be the one opened with the device.
2026-11-29 09:48:14 -08:00
BFlat 2cb5549763 Merge pull request #4295 from dotCooCoo/fix/ime-stale-after-queued-commits
ui-contract: a framework editor drops late IME commits queued before the app's reset completes
2026-11-30 00:40:16 +07:00
BFlat 5a70233f8b Merge pull request #4143 from dotCooCoo/fix/ui-perf-2-component-cost
ui-contract: a body given its room runs no second pass when its content's size changes
2026-11-30 00:40:10 +07:00
dotCooCoo 595c43790f GPU: errors on a destroyed shared device report DeviceLost before wgpu delivers the loss
- An allocation error, a failed read wait, an oversized upload and a bad read
  handle check the device and return GpuFault::DeviceLost when it was
  destroyed while wgpu still defers its device-lost callback.
- poll_reads checks the device before failing pending reads with a recorded
  error, and when a mapped read's error turns out to be a loss, every
  outstanding read fails with that loss in the same call.
2026-11-29 09:37:53 -08:00
BFlat 9d25d5498d Merge pull request #4208 from ruchirguitar/character-digits-row
text: Character panel Digits select for apps that draw digits in another script (#4122)
2026-11-30 00:29:58 +07:00
BFlat 69ef3a4b06 Merge pull request #4207 from ruchirguitar/feat/indic-scripts-hyphenation
proof: hyphenate Bengali, Assamese, Punjabi, Odia, Tamil, Telugu, Kannada and Malayalam between aksharas
2026-11-30 00:29:51 +07:00
dotCooCoo 3a6de154ed ui-panels: an open tool flyout with its tear-off bar runs each frame once
The tear-off bar measured its height from the rect of the rows beside
it. In the flyout's measuring run the rows have no rect yet, so the bar
measured at its grip's height there and at the rows' height in the real
run. The real run then found the bar's measure changed from the kept
one and asked for a second pass, and every other idle frame of an open
flyout ran twice.

The bar now measures at its width and its grip's height in both runs
and fills the row it stands in, which gives it the rows' height.
2026-11-29 09:26:52 -08:00
dotCooCoo 2015aee9b2 GPU: a loss found after an earlier GPU error is reported as DeviceLost, and GLES-only Windows builds keep OpenGL in craft-gpu-device
- upload_buffer and request_read check the device before returning a
  recorded error other than a loss, so a device destroyed while its loss
  callback is deferred reports GpuFault::DeviceLost. An out-of-memory error
  still takes precedence over a validation error on a valid device.
- craft_gpu_device::native_descriptor includes OpenGL on Windows when it is
  the only compiled native backend, and craft-gpu-wgpu uses that descriptor.
2026-11-29 09:22:22 -08:00
dotCooCoo 88d3c73a4f GPU: loss found while handling a GPU error is reported as DeviceLost, and GLES-only Windows builds keep OpenGL
- An allocation error whose handling finds the device lost returns
  GpuFault::DeviceLost instead of an allocation error, in upload_buffer and
  request_read.
- request_read checks the device after submitting its copy, so a copy that a
  destroyed device rejected does not become a pending read.
- On Windows, the context's instance includes OpenGL when it is the only
  compiled native backend.
- craft_gpu_device::native_instance returns OpenError::NoAdapter when no wgpu
  backend is compiled, instead of wgpu panicking.
- docs/gpu-backends.md says read_buffer waits for the read's own copy
  submission.
2026-11-29 09:03:27 -08:00
dotCooCoo 78032975c8 GPU: a read on a destroyed shared device fails before its copy is recorded
request_read checks the device for every read, not only empty ones, so a
nonempty read on a device destroyed while earlier work is pending returns
DeviceLost instead of a request for a copy that was never submitted.
2026-11-29 08:47:11 -08:00
dotCooCoo d21ea00d7c craft-raster3d: wrap the shadow depth fallback to rustfmt's width
The lint job's cargo fmt --check failed on crates/raster3d/src/shade.rs:388: the last push left the f64 fallback for a non-finite light-space depth on one line past max_width, so rustfmt wants each term on its own line. The expression and its evaluation order are unchanged.
2026-11-29 08:42:19 -08:00
dotCooCoo bd90321eb7 GPU: reads wait on their own copy, and an empty read or a build without a backend fails cleanly
- read_buffer waits on the copy submission of the read it was asked for
  instead of an empty submission, so it does not also wait for work other
  users of the shared queue submitted later.
- An empty read checks that the device is still valid before it queues its
  empty result, so a destroyed device fails the read with DeviceLost.
- When no wgpu backend is compiled for the target, the context uses the
  staging path and probe_caps reports no adapter, instead of wgpu panicking
  while creating the instance.
2026-11-29 08:42:05 -08:00
dotCooCoo 72adb86241 GPU: an upload fails on a destroyed shared device while earlier work is pending
wgpu 30.0.1 runs a destroyed device's lost callback only once its queue is
empty, and a device loss bypasses error scopes, so the single poll after the
upload could leave device_status() at Ok and register a handle for a buffer
that was never created.

upload_buffer now checks the device with a scoped zero-size buffer creation:
wgpu-core checks device validity before usage validation, so a valid device
reports a validation error into the scope and a destroyed one reports nothing.
The check does not wait for queue work or enter a backend fence wait. The loss
is recorded with DeviceHealth::confirm_device_lost, which sets device_lost()
while probe keeps polling until wgpu's own callback runs.
2026-11-29 08:30:41 -08:00
dotCooCoo b37bb4aa6d raster3d: validate opaque-range materials and falloff modes, widen shadow-map depths
- try_render returns BadMaterial for a visible transparent material in
  the opaque range (ShadowsOnlyOpaque stays for shadows-only ones), and
  BadLight for a falloff mode outside 0 to 2.
- Perspective shadow maps keep inverse-depth interpolation in f64 for
  subnormal reciprocals, so a caster at extreme depth stays in the map.
- Clipped caster UVs whose endpoint difference overflows are
  interpolated in f64.
- The fallback pass names its fragment type instead of allowing
  clippy::type_complexity.
2026-11-29 08:18:23 -08:00
dotCooCoo 3db3b68646 raster3d: keep depth, weights and shadow compares exact near f32 limits
- A corner on the near plane whose division by w rounds a few ulps past
  the depth range is moved back to 0 or 1, and a fragment's depth stays
  inside its corners' depth range, so a triangle at z 1 is drawn.
- Triangles projected on the wide path keep their 1/w ratios and
  perspective weights in f64, so a ratio below the f32 range no longer
  drops an on-edge pixel or skews its weights.
- Environment mip levels far apart mix in f64 instead of giving NaN.
- The perspective shadow compare falls back to f64 when focal * z
  overflows, keeps the bias and the slope correction apart from the
  stored depth, recomputes an overflowing light-space depth in f64, and
  treats a negative-infinity texel as occluding.
- Light directions, the view vector and the cube face of a point light
  are taken in f64 when the f32 difference of the positions overflows.
- The README describes depth as infinity where no opaque surface is
  drawn and notes that masked fragments in the transparent pass do not
  write depth; the crate docs say which checks each try_ function runs.
2026-11-29 08:10:08 -08:00
dotCooCoo adeef8086f ui-contract: a framework editor drops late IME commits queued before the app's reset completes
While a framework editor owns the IME and the fence waits for one of the
app's own reset requests, the input hook cleared the fence as soon as it
saw the completion, before the begin hook applied the queued events. A
late commit of the interrupted composition that arrived before the
completion in the same frame then reached the editor. The completion now
goes into the queue at its place, so the begin hook ends the fence there.
2026-11-29 07:55:38 -08:00
dotCooCoo b2397f1546 GPU: an upload to a destroyed shared device fails instead of returning a handle
A caller that passes its device to `from_opened` or `with_device` can
destroy it. wgpu records the loss only on a later poll, and the upload's
out-of-memory scopes do not catch it, so `upload_buffer` returned a
handle for a buffer that was never created. The upload now polls once
before it keeps the buffer and returns `GpuFault::DeviceLost` when the
device is gone.
2026-11-29 07:52:44 -08:00
aiongg 9949e08d6f Merge pull request #3438 from storytold/design-port/pr-input-focus
Input and focus fixes: wheel over text fields, Scroll Into View on list rows, click modifiers, shown-only chords, face names, right-click outside menus, mixed sliders
2026-11-29 10:52:12 -05:00
dotCooCoo 3726932961 GPU: a blocked read fails with the validation error when out of memory is also recorded
`wait_between_reads` checked `DeviceHealth::fault()`, which reports an
out-of-memory error ahead of a recorded validation error. With both
recorded, it skipped the early stop, submitted empty work, and failed the
read with "Out of Memory". It now uses `polling_fault()` for the check and
for the returned error, as `poll_reads` does. An out-of-memory error alone
still waits normally, and a loss is still left to `poll_reads`.

docs/gpu-backends.md no longer says that `adapter-probe` turns on wgpu's
default native backends: the workspace sets wgpu to
`default-features = false`, and native backends come only from the
`native-*` features.
2026-11-29 07:45:40 -08:00
Dylan M. Taylor 1f6c3a21f8 feat(nightly): add shared craft-nightly profile isolation crate (#4270)
* feat(nightly): add shared craft-nightly profile isolation crate

* fix(nightly): preserve startup isolation and document profile migration

* feat(craft): expose craft-nightly through facade crate

* fix(nightly): reject misplaced protocol flags and use zero-access Windows metadata query
2026-11-29 10:31:11 -05:00
David Mann bfd8fec34b Merge pull request #4276 from davidmann4/fix/eyedropper-ring-persist
color-ui: an Eyedropper built anew each pass keeps the held sampling ring (photocraft#17931)
2026-11-29 16:26:55 +01:00
aiongg 94bf0e02fc Merge pull request #3452 from storytold/lightcraft-pr/fw-runtime-fork
Runtime: fork a window's UI state into another context for headless capture
2026-11-29 10:14:34 -05:00
skylar taylor-barrickandFredApps 76416ccd31 Dock dividers move with the move that starts their drag (#3461)
* docking divider: a drag moves the divider with the move that starts it

The move that carries a press past slop arrives as PressPhase::DragStart with the pointer position, but divider::drag dropped it, so every container moved its divider a pass later. Drag::Start now carries its coordinate (Start(f32), mirrored for right-to-left like To) and Drag::coord gives the coordinate of either. SplitArea, DockColumn, StackSections, the iconic column's edge, SplitViews, the column bar and the margin handles begin their gesture as before and then apply the start's coordinate in the same pass.

Drag is public, so Start(f32) is an API change for code that matches Drag::Start.

Trial a_column_divider_follows_the_move_that_starts_its_drag_in_the_same_pass

* docs: regenerate contract-api.md

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-29 10:07:14 -05:00
Dylan M. Taylor d49ee8d237 Merge main and regenerate contract API after inspector changes 2026-11-29 10:07:01 -05:00
skylar taylor-barrick 8b78923296 Inspector and accessibility names (#3215)
* Inspector: name generic components by their type and list a text field's value

The component name dropped the path before the generic arguments, so Select<'_, String> was
recorded as `String>`. A text node's value, which AccessKit reads, now also shows in the
inspector's facts.

* Inspector: test generic component names and text field values

* Keep the components of a replayed memoized view in the enclosing inspected region

* SwatchPair: each well's access node is named by its own label, not the pair's

* rustfmt

* Inspector: clippy tidy-ups in the replay step and its trial

* Inspector: a text field's value is journaled like the other steps, so a replayed view keeps it; the pair trial checks each name is its well's radio button

* inspect: list a text value whichever order the node's facts arrive in

A text value noted before its node's facts in the same pass was dropped, as it
was only written on facts that already existed. The open region now keeps the
noted value per component and writes it on the facts when they arrive, so the
order no longer matters; a value the node states itself still wins. The steps
journal and replay as before.

The trial drives the record's calls in each order: text value before facts,
facts before text value, facts reported again, and a node's own value.

* Inspector trial: a null-rooted id and a let-else in place of expect, for next's lints

* Inspector trial: assert the region ran instead of panicking, for next's lints

* docs: regenerate contract-api.md

* contract-api: an entry's summary is its first sentence, not its first line

The generator showed the first line of each item's doc comment, so an entry whose doc comment wrapped
mid-sentence ended on a dangling word: the press latch's `release` stopped at "an earlier", `swallows` at
"true for the", and about a quarter of the file's entries were cut off the same way.

The summary now carries the wrapped lines to the end of the first sentence, stopping at a colon that
introduces a list, so every entry reads whole. Only the clipped tails change: each completed entry keeps
its text and gains the rest of the sentence from the item's own doc comment. docs/contract-api.md is
regenerated with it.

* contract-api.md: regenerated after the merge of main (the generator's own output, not a hand merge)

* contract-api: a summary stops at its first sentence's end inside a line

`doc_summary` only stopped at the end of a line, so a doc line that held two sentences (`... release or
cancel. A press that begins while nothing is latched is not swallowed.`) carried both, and the entry was
two sentences long.

`sentence_end` now finds the boundary inside the line: a full stop, question or exclamation mark that ends
the line, or that a space and a capital letter follow, and never a run of dots (`(LRI ... PDI)`) or one of
the short forms e.g., i.e., cf., vs., etc., approx. The summary stops there; a colon that introduces a list
below still ends it too.

docs/contract-api.md is regenerated with the rebuilt binary.

* memo keys: whether a region is open; contract-api: no Self:: link targets

A memoized view's key held the props, the `fn` and what the scope around it hands down, but not whether an
inspected region was open. A view that settled outside a region kept a run that recorded no inspection steps
(`runtime::inspect::run` notes one only while a region is open), so when a region later wrapped the unchanged
view it replayed that run and the region's record showed none of its components: the inspector listed nothing
for what the region showed.

Whether a region is open now feeds the key, one byte after the show address, so a view settled outside a
region runs in the pass that shows it inside one and records the region's steps; a run made inside a region is
not replayed outside one either. `contract::inspect_region` trials both directions and the region's recorded
components, and `record`'s doc says why. Without the key byte that trial fails.

`doc_summary` also drops the target of a link that names the item's own type (`Self::zoom_x`), which rustdoc
resolves in the source and this file has no page for: the entry keeps its reference text, as the file writes
every name it cannot link. docs/contract-api.md is regenerated with the rebuilt binary: 77 lines, the 82 link
targets and nothing else, and a second run leaves it byte-identical.

Focused trials pass: ui-contract's `contract::inspect_region` (new), `memo`, `derived` and `contract::fixes`,
ui-widgets' `memo` and `runtime::inspect` (the region's components through a replay included), and
craft-menu's `keytips`.

* docs: regenerate the contract catalog on current main
2026-11-29 10:04:40 -05:00
ruchirguitar a482a59510 proof: Malayalam's vertical-bar and circular viramas join no conjunct 2026-11-29 20:22:55 +05:30
David Mann 3fb7f93211 Merge pull request #4274 from davidmann4/perspective-crop-start-snap
Perspective Crop: a box drag starts on the document bounds the canvas snaps to (photocraft#11803)
2026-11-29 15:48:51 +01:00
David Mann 347f772c2e Merge pull request #4273 from davidmann4/fix/brush-picker-range-alert
Brush Preset picker: a Size or Hardness typed out of range reports the range alert
2026-11-29 15:48:40 +01:00