Commit Graph
7294 Commits
Author SHA1 Message Date
David MannandClaude Opus 5.5 0aee129aed Merge PR #7153: Smart Filters: double-clicking a Liquify filter reopens it in the Liquify workspace
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 20:18:15 +01:00
David MannandClaude Opus 5.5 03a0299bdb Merge PR #7795: Print: Scale to Fit Media fills the driver's printable area (#7782)
Conflicts with main's module moves resolved: driver_printable takes main's
spooler-held settings_for_layout (which already wraps the page query in
with_spooler) and drops the now unused settings/pg lines; take_turned_page and
its test move to dialogs/file_ui/print.rs and dialogs/file_ui/tests.rs;
crates/engine/src/cmd/print_cmds/tests.rs keeps main's version (the PR did
not change it in its own commit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 20:15:41 +01:00
9118e904df Integration: select the smart object before its filter editor opens (#7153)
A double-click on a filter row of a smart object that isn't the active
layer queued `layer.select` for the Layers panel to run after the rows
were drawn, but opened the filter's editor in the same pass. The editor
captures the document revision as its target, and the later select
raised it, so OK on the reopened Liquify filter (and on the generic
parameter form) was refused with "The document or Smart Filter changed"
and the Liquify strokes were lost. This happens when both clicks reach
one frame (a real mouse on a slow frame).

The double-click now selects the layer first, as the Layers panel runs
the select (committing an open type session), and drops the queued one.
Two Layers panel tests deliver both clicks in one pass; both failed
without this.

Co-authored-by: .CooCoo <1206598+dotCooCoo@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 20:12:12 +01:00
David Mann 355831f845 Merge PR #7621: Play .atn steps that switch to another open document
# Conflicts:
#	docs/gaps.md
2026-10-29 20:04:40 +01:00
David Mann 32d8f3f201 Merge PR #6647: feat(zoom): refine zoom field input handling, focus rules, and animation 2026-10-29 19:56:26 +01:00
4f8f1bc1ea Integration: typed zoom through the camera transition, menu keys, Enter after a kept click (#6647)
The typed zoom glided through a leftover log distance in egui temp data that only Fit/Fill and a
scrub cleared. Any other zoom right after Enter was multiplied by what was left: type 1600 at
100 %, Enter, then View > Actual Pixels ended at 87 %, not 100 %. The glide also never landed
exactly (1600 % ended at 16.000002, 6400 % past pixel_aligned's tolerance) and changed the field's
value by a few ulps each frame, which wiped text typed during the glide.

- set_from_field sets the zoom to the target and calls View::request_zoom_animation with
  General > Animated Zoom, as Zoom In/Out and Actual Pixels do: it glides with the preference on,
  jumps with it off, lands exactly, and any later zoom replaces it. The private glide, its DocId
  bookkeeping and field_percent go.
- A zoom field keeps the keyboard through a click on a menu title, so the menu's arrow and letter
  keys were dead (menu_nav/menu_keys treated it as typing in the menu). They work now, except in
  Help, whose Search field keeps its letters (#5996). A letter or Space the menu takes no longer
  also reaches the zoom field as text (an alert, or a digit typed into the zoom).
- Enter in the field within two frames of a click on the pasteboard, title bar or a menu was
  vetoed and the typed zoom lost; egui draws only those frames with the mouse still.
- The separator check's copy of the text restarts when the value changes under the focused field
  (ArrowUp, another zoom), so `1.5`, ArrowUp, End, `.` no longer alerts.
- Doc comments: the Esc/focus path drops only the text copy; no platform sets Services::alert.

Co-authored-by: sn-o-w <2406819+sn-o-w@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:54:02 +01:00
David Mann 669b8c974e Merge PR #6169: Preserve imported PSD font metadata during text edits 2026-10-29 19:46:11 +01:00
David MannandClaude Opus 5.5 7ac759c05b Merge remote-tracking branch 'fork/integration-batch-10' into HEAD
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:17:13 +01:00
David MannandClaude Opus 5.5 fefd90d576 Merge remote-tracking branch 'fork/integration-batch-10' into HEAD
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:16:12 +01:00
David Mann f18f0b8316 Merge PR #6985: Move tool: a huge layer isn't copied for every frame of a live drag (#6114, #6163) 2026-10-29 19:06:27 +01:00
10e0ddc785 Integration: the live-drag estimate counts shared tiles once, and the smart filter mask (#6985)
The estimate charged every tile a solid layer can reach at full size, but a solid fill stores
one tile shared by every covered position and Surface::translated shares it again at any
offset, so only the edge is written. A filled 12000 x 12000 16-bit layer was estimated at
about 1.1 GiB and lost the live drag it has on main. The estimate now mirrors translated:
one target per 2 x 2 block of source tiles, and a block inside the content with four stored
tiles is charged once per distinct set of tiles, capped by the tiles the content can reach.
It also counts a smart object's filter mask, which shift_smart shifts too.

New tests: a filled 12000 x 12000 16-bit layer stays live through the real drag path (fails
at the PR head); the filter mask is counted; content off the tile grid is capped by its
reach. A 36 MP 8-bit and a 24 MP 16-bit photo layer stay live through the drag path (pins
the common case; fails with the earlier x4 estimate).

Co-authored-by: Max Witt <131544883+SiFuMax09@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 19:03:44 +01:00
David MannandClaude Opus 5.5 528ecf842e Merge remote-tracking branch 'origin/main' into HEAD
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:44:24 +01:00
David Mann d7ca7a0cf3 Merge PR #8571: Edit embedded vectors with original-format save-back through VectorCraft 2026-10-29 18:15:47 +01:00
1acb1f464b Integration: SVG contents open and render as on main; AI originals for other editors (#8571)
- Smart-object contents (Replace Contents, Convert to Layers, Stack Mode,
  internal Edit Contents) refused any SVG whose canvas area times its
  node count passed 24 MP, e.g. a 1920x1080 layout with 12 shapes.
  decode_source now uses the bounded image parse with File > Open's
  layered import (import_svg_bounded_images). Convert to Layers' shape
  cache cap is 1 GiB in the document's format, the import's own budget,
  not 24 MP (four full-canvas shapes in a 4K document failed).
- The bounded resolver failed the whole drawing on an embedded image it
  can't read (an unknown MIME type, a corrupt PNG); it now leaves it out
  as usvg does, so such SVGs place and render again. Byte and decode
  overruns stay errors.
- resvg gives each embedded SVG image a scratch pixmap the size of its
  target and frees it after, so the scratch budget counts the deepest
  chain of nested SVG images, not every sibling: 12 SVG icons on a 2 MP
  canvas, or one at a 12 MP render, no longer fail.
- Main's shared nesting budget (#9397) now covers the bounded path too:
  511 + 511 levels across a drawing and its embedded SVG overflowed a
  1 MB stack.
- An AI working copy is regenerated through VectorCraft only when
  VectorCraft is the editor; Illustrator or another program gets the
  original bytes. VectorCraft is recognised by bundle id, a known
  install, or its name (vectorcraft[.exe], vectorcraft-<version> AppImage,
  ai.storyteller.vectorcraft).
- updateSvg refuses an AI/PDF/EPS source (updateVectorSource saves it
  back in its own format); the doc no longer calls updateSvg "existing".
- Edit Contents on contents already open in the internal editor switches
  to that document, as main does, instead of an error.
- Stack Mode on an SVG refuses up front when one float frame per layer
  would pass 1 GiB (the layered import no longer refuses for it).
- A stored display preview still fails on an embedded image it can't
  read (strict budget, its own import_svg_preview_with_work; external-
  editor saves and conversions leave the image out as placement does); skipped embedded SVGs still use up the XML byte
  budget; an image under an unknown MIME type or with no pixels is left
  out uncharged.
- Merge: the PSD import reads a preview's native source from the
  document's global blocks; main's owned open moves them out of the
  file, so every stored preview was dropped.
- Main's strict Clippy rules on the PR's app code (explicit import, a
  Unix-only test helper, one long opt-in test).

Co-authored-by: Mocky Digital <282319807+mockydevs@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:13:23 +01:00
aiongg c645d5fcc9 Merge pull request #8896 from wanikhawar/select-mask-workspace
Select and Mask: Photoshop's full-window workspace (#7069, #8148)
2026-10-29 12:15:14 -04:00
aiongg 2231233af9 Merge pull request #6590 from wanikhawar/fix/6501-multi-layer-free-transform
Free Transform moves every selected layer (#6501, #3384, #6096)
2026-10-29 12:14:01 -04:00
aiongg 3bcff338c5 Merge pull request #6421 from wanikhawar/save-for-web-webp
Save for Web: WebP, lossy at its Quality or lossless (part of #6391, #2415)
2026-10-29 12:12:47 -04:00
Khawar Zamman Wani 82096cff3a perf(retouch): avoid duplicate rasterization while drawing (#9532)
* perf(retouch): generate live dabs without unused coverage

* fix(ui): box live stroke variants after retouch state reduction
2026-10-29 12:12:33 -04:00
Khawar Zamman Wani 539f5bd58f perf(algo): row-parallel local_sharpen with fast-path protect_detail (#5426) (#9651)
* perf(algo): row-parallel local_sharpen with fast-path protect_detail (#5426)

Refs #5426. Follow-up to #5499.

Cause:
While #5499 parallelized local_blur and the per-dab mix in DabTool::Focus,
local_sharpen in crates/algo/src/retouch.rs remained single-threaded.
In addition, protect_detail redundantly evaluated coordinate clamping
and strided memory lookups across 8 neighbors inside the per-channel
inner loop for every pixel in the dab. On large brush sizes (e.g. 1000–2500 px),
strokes took seconds and stalled the application.

Change:
- Process local_sharpen window rows in parallel with Rayon across threads,
  with wasm32 serial fallback matching local_blur.
- Hoist protect_detail 3x3 neighborhood offset calculations outside the
  channel loop.
- Fast-path interior pixels (x > 0 && x + 1 < w && y > 0 && y + 1 < h)
  with direct stride offsets, skipping boundary clamping entirely for >99.9%
  of pixels in large brush dabs.
- Add retouch_sharpen_exact integration test verifying bit-for-bit parity
  against the frozen scalar implementation across layouts, edges, and channels.

* bench(engine): add bench_sharpen_tool example
2026-10-29 12:11:22 -04:00
Khawar Zamman Wani 6c6cfc243a perf(stack): cache bounded entropy terms across pixels (#9622)
* perf(stack): cache bounded entropy terms across pixels

* test(stack): iterate entropy terms directly for Clippy

* ci: rerun checks
2026-10-29 12:10:12 -04:00
David Mann afacb057f7 Merge origin/main into pr-8571-fixup
Conflicts: svg.rs (main's bufread inflate and shared render helper, kept
with the PR's bounded raster path), psd_import.rs (the PR's vector
preview moved into main's smart_content), menus/invoke.rs (the SVG
intercept moved into main's split invoke_unguarded), rendering.rs and
the ui-egui import lists (main's explicit imports), Cargo.lock, docs
status lines (unions).
2026-10-29 16:38:24 +01:00
Khawar Zamman Wani 66ac154d68 perf(algo): select median stack samples without full sorting (#9628) 2026-10-29 11:36:34 -04:00
Khawar Zamman Wani 6b2ad6b620 Reduce Noise: reuse guide statistics with bit-identical output (#9639)
* perf(algo): reuse Reduce Noise guide statistics

* fix(algo): use fixed-size chunks for guide statistics

* Reduce Noise: test that the caller routes the cleaned luma guide and both chroma planes

Review follow-up: compares reduce_noise's output (Lab, so planes pass through) with the
independent guided filters run in order.

* test(algo): assert bit-identical output in Reduce Noise routing test
2026-10-29 11:35:24 -04:00
Khawar Zamman Wani 991ef9907b fix(actions): allow no-op Arrange steps during playback (#8457) 2026-10-29 11:34:13 -04:00
David Mann 010ab858e7 Merge PR #7716: Add Pattern Fill option to Layer Panel Footer 2026-10-29 16:26:56 +01:00
David MannandClaude Opus 5.5 72a7caf04a Integration: path.addToSelection/subtractFromSelection name document paths, not files (#8015)
Their params doc mentions path.toSelection, so the automation filesystem-path
classifier test flagged them; they take a document path name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:14:58 +01:00
3968e24cf0 Integration: the empty-layer check honours the default pixel and video (#7716)
`is_empty_pixel_layer` took any layer without stored tiles for empty, so a
layer opaque only through its default pixel (as KRA imports it,
`Surface::with_default`) or a blank video layer became the Pattern Fill
(and the Stamp Visible target) instead of getting one above. It now
needs a transparent default pixel (alpha only: a mode or profile
conversion gives an empty layer's default pixel other colour bytes) and
no video.

Co-authored-by: Hodd <32705043+hodd1444@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 16:12:49 +01:00
David Mann 0e72c418da Merge remote-tracking branch 'origin/main' into pr-7716-fixup
# Conflicts:
#	crates/engine/src/cmd/pattern_cmds.rs
#	crates/ui-egui/src/panels.rs
2026-10-29 15:45:55 +01:00
David Mann cf66eea4c9 Merge PR #8015: Added advanced selections keyboard shortcuts 2026-10-29 15:45:22 +01:00
c53409b451 Integration: Ctrl+Shift/Alt+Enter take the path being drawn, as Ctrl+Enter (#8015)
The new keys went straight to the engine with the Paths-panel path name
injected in PhotocraftApp::run, skipping the route Ctrl+Enter takes
(vector_ui::path_to_selection). So a Pen path still being drawn was not
finished and used: Pen, three clicks, Ctrl+Shift+Enter combined the old
work path (or failed with "no work path") and left the Pen path open,
and the loaded path stayed selected. Both ids now go through the same
route with the mode forced to add/subtract, and the injection is gone.

Also removes crates/ui-egui/src/vector_cmds.rs, an uncompiled byte-for-
byte copy of the old engine file, and makes the add test check that both
areas end up selected.

Co-authored-by: mahefanante <42338306+mahefanante@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:31:26 +01:00
David Mann 56d1da1943 Merge origin/main into pr-8015-fixup
Main split crates/engine/src/vector_cmds.rs into cmd/vector_cmds.rs and
cmd/vector_cmds/paths.rs, moved the shortcuts tests into
input/shortcuts/tests.rs and PhotocraftApp::run into app/commands.rs.
The PR's change is ported as it is to the new places; its text-field
test now draws the field every frame, as main's egui drops the focus of
a field that isn't drawn.
2026-10-29 15:29:05 +01:00
David Mann 102b1df924 Merge PR #5403: fix(ui): default active tool on startup to Move tool (#5355) 2026-10-29 15:20:54 +01:00
ea48482f92 Integration: keep the ui.set and tool-memory tests meaningful with the Move default (#5403)
With Move as the default tool, `ui_set_rejects_unknown_fields_before_changing_anything`
asserted Move after the rejected `{"tool": "move", "dark": true}`, which is also the
starting tool, so a `ui.set` that applied `tool` before rejecting the call still passed.
The test now starts on Brush and asserts Brush.

`tool_memory::tests::selected_tool_and_non_default_options_roundtrip` (added on main
after this PR branched) used Move as its non-default tool; `persist` now writes no
`selectedTool` for it and the test failed. It uses Lasso instead.

No other test in photocraft-ui-egui or the photocraft app relied on the Brush default.

Co-authored-by: safvanedge <241307593+safvanedge@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 15:12:50 +01:00
David Mann c06f1e3da9 Merge remote-tracking branch 'origin/main' into pr-5403-fixup
# Conflicts:
#	crates/ui-egui/src/control.rs
#	crates/ui-egui/src/move_mods.rs
#	crates/ui-egui/src/prefs_ui.rs
2026-10-29 14:56:27 +01:00
David Mann c7e1bcd03c Merge PR #8623: fix(ui): add transform handles for multi-layer selection 2026-10-29 14:53:29 +01:00
472aeccffd Integration: a shared transform box keeps the held handle's cursor (#8623)
Main's handle_at (#5405) read only the one-layer preview's gesture, so with
several layers framed the corner being dragged lost its resize pointer once
the pointer left the handle (it showed the commit pointer instead). It now
reads the shared box's gesture too, through live_gesture.

Co-authored-by: ekedal <71788463+ekedal@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 14:51:25 +01:00
David MannandClaude Opus 5.5 7b72ce949e Merge origin/main into #8623's fix-up branch
Main split the files this PR changes: transform_tool.rs into tools/transform_tool/ (begin,
commit, drag_modes, draw, pointer, tests), canvas.rs into canvas/ (display, tool_input,
transform_controls, transform_controls_tests, snap_ui), and transform_cmds.rs into
cmd/transform_cmds.rs + tests.rs. The PR's changes are carried into the new modules as they
were. One adaptation: rotate_dir on main takes the live gesture (#5405), so the shared box's
gesture is passed through a new live_gesture helper instead of the PR's `rotating` bool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 14:37:31 +01:00
David Mann 403b6f1742 Merge PR #8311: Type: a paragraph box that can't hold its text draws a red + overflow port 2026-10-29 14:00:09 +01:00
a005704eda Integration: overflow mark is a + in the enlarged lower-right handle (#8311)
The reference application marks a paragraph box that can't hold its text
with a black "+" inside an enlarged lower-right handle; nothing is drawn
below the box. The PR drew a red disc 0-9 px below the box at a fixed
screen offset, so on a rotated layer it came loose from the box, a click
on it either grabbed the corner handle or ended the edit, and its hover
card popped up while dragging that same corner to enlarge the box.

Now the lower-right handle grows to 11 px and carries the black "+",
centred on the transformed corner, and the whole enlarged handle grabs
that corner, also in a rotated view. The disc, the hover card (state, its
tooltip row in every catalog), the GPU pixel test and its pollster
dev-dependency are gone; detection (`TextLayout::overflows`) and the
`typeBoxOverflow` inspect flag stay. docs/ui-parity.md: the overflow row
no longer claims box threading, the Guides row the PR duplicated is
removed, and the history has one row in date order.

Tests: `an_overflowing_box_shows_a_plus_in_its_enlarged_lower_right_handle`
(upright and rotated box; fails on the PR head with a 7 px handle) and
`the_whole_enlarged_overflow_handle_grabs_in_a_rotated_view`.

Co-authored-by: VladimirPozdnyakov <49595925+VladimirPozdnyakov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 13:57:27 +01:00
David Mann 93f8cfd47a Merge main into #8311 (type_tool split into tools/type_tool, control split into control/) 2026-10-29 13:30:46 +01:00
jonathanwxh-cell 37e511d5c1 Import engine result types after document session module split 2026-10-29 11:12:39 +08:00
jonathanwxh-cell df290aca5c Merge upstream main into PR #7621, preserving feature and current progress documentation 2026-10-29 11:05:44 +08:00
aiongg 5f9b439187 Merge pull request #10006 from davidmann4/i18n/arabic-combined
Arabic interface language, combined from the community catalogs (#10005)
2026-10-28 21:27:43 -04:00
SiFuMax09 ea5e7effed Move: estimate exactly what moved_target shifts (a group's contents, a mask-only drag leaves them); tighten the sparse test 2026-10-29 02:13:44 +01:00
SiFuMax09 c8ddb8289a Move: estimate the tiles a live drag frame writes by what the content can reach, honour mask-only drags; cargo fmt 2026-10-29 01:53:13 +01:00
SiFuMax09 fbee069f0e Merge branch 'main' of https://github.com/storytold/photocraft into fix/large-doc-move-crash
# Conflicts:
#	crates/ui-egui/src/move_ui.rs
2026-10-29 01:39:54 +01:00
David MannandClaude Opus 5.5 b23e90ac23 Files opened at launch report in the interface language
The command line's files open before the first frame, which is what
applies the interface language, so their status line and notices came
out in English in every language. open_paths now applies it first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 01:30:13 +01:00
David MannandClaude Opus 5.5 573bbbf157 i18n(ar): Hue is درجة اللون
The second questionnaire answer (Algeria). The earlier تدرج اللون read
as "colour gradient" beside Gradient تدرج. Hue, Hue/Saturation, Hue
Jitter and Hue Cube follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 01:30:13 +01:00
David MannandClaude Opus 5.5 8f80fb9790 Tests: Arabic preset-import results are translated
The plural pair is picked at run time, so the literal-key coverage
check can't see these rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 01:07:46 +01:00
David MannandClaude Opus 5.5 3fa06e0ac0 i18n(ar): brush, pattern and gradient preset-import results
The preset file import status (`preset_files_ui::open`) asks for
"Imported {n} brush/pattern/gradient from {file}" plurals; the Arabic
catalog only had the style one, so these results showed in English.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 00:21:19 +01:00