Commit Graph
258 Commits
Author SHA1 Message Date
Khawar Zamman Wani c616c77002 Speed up adjustment previews for unstyled clipped raster layers (#12356)
* Preview adjustments on clipped raster layers in isolation

* Measure clipped adjustment previews and fix test lint

* Match styled preview benchmark to canvas proxy eligibility

* Keep styled clipped previews off the UI thread

* Address preview benchmark reporting and regression coverage review

* Document benchmark reporting regressions

* Document benchmark setup and isolated fixture execution
2026-11-10 16:26:38 +01:00
David Mann 9b7a9aabe3 Merge pull request #11490 from Raghav2012Code/feat/crop-options-bar-details
Crop: Straighten gets its label and a spirit-level glyph (#10888)
2026-11-10 15:51:29 +01:00
Raghav Krishna 72ed4e8303 Crop: the Fill help keeps the crop's keys, and a cleared ratio side commits zero (#10888)
Three findings from the review of #11490.

- A cleared ratio field with blank_when_zero now parses as zero instead of falling into the arithmetic hold, so deleting a side unsets it rather than restoring the old value.
- The Fill help's info button remembers its rect, so Esc and Enter in the frame the help opens go to the help: the shortcut pass runs before the options bar draws, and Esc used to cancel the pending crop first.
- Hiding the options bar (F twice, or Home) closes the Fill help, so its flag no longer keeps Enter and Esc away from the crop underneath.

Tests in tests/it/crop_options_bar_chrome.rs; all three fail without the fixes.
2026-11-10 19:02:10 +05:30
Raghav Krishna 851423af56 Crop: follow the new Straighten label in the task-bar test and CI formatting (#10888) 2026-11-10 17:48:54 +05:30
Raghav Krishna 1de14304f1 Crop: reference tooltips, Fill help modal, live-only Cancel/Commit, blank ratio sides (#10888) 2026-11-10 17:47:31 +05:30
Raghav Krishna aa12046847 Crop: Straighten gets its label and a spirit-level glyph (#10888) 2026-11-10 17:47:27 +05:30
rmsff c7407f50e5 Reset Tool gives the Clone Stamp a 21 px soft tip at 25 % spacing
The Clone Stamp now starts, and comes back after Reset Tool and Reset All Tools, with the reference's 21 px soft round at 25 % spacing and no smoothing (#12601).
2026-11-10 14:29:38 +03:00
FredApps d06ad73271 Naming: use RAW Develop for PhotoCraft's raw-processing feature (#12403)
Related to #5310. Display labels only; command ids (filter.cameraRaw, edit.preferences.rawDefaults), preference keys, serialized settings, PSD/action/XMP Adobe Camera Raw identifiers and .atn step names are unchanged.

- Camera Raw / Camera Raw Filter / Camera Raw Defaults -> RAW Develop / RAW Develop Filter / RAW Defaults in menus, preferences, filter names, diagnostics and all 34 catalogs.
- Saved Photoshop actions keep the "Camera Raw Filter" step name, so .atn files round-trip byte for byte (test extended).
- "Camera Raw" stays a command-search keyword.
- Removes dormant Adobe/Photoshop-branded catalog rows; display-name guard tests.
2026-11-09 08:30:33 +01:00
Serikov Roman bbfa1758f6 fix(ui): Reset Tool gives the Healing Brush a 19 px hard tip at 25 % spacing (#12099) 2026-11-08 20:32:54 +03:00
Hector VillarrealandClaude Opus 5.5 fe210916f9 Check Size control is off after Reset All Tools (CodeRabbit review on crates/ui-egui/tests/it/background_eraser_reset_tip.rs:76)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:30:58 -06:00
Hector Villarreal fdbb79e46f Background Eraser: a 13 px hard tip at 25 % spacing after Reset Tool (#11911)
fresh_brush gives the Background Eraser the reference application's
reset tip, a 13 px hard round at 25 % spacing with Size control off, as
it gives the Brush its own (#11810). Reset Tool, Reset All Tools and the
tool's first use all start from it; other tools and strokes without a
brush keep their tips.
2026-11-07 19:50:53 -06:00
David Mann d921488bc3 Merge pull request #11700 from TrevorBrown-dev/fix/magnetic-lasso-fastening-spacing-11687
Magnetic Lasso: fastening points are spaced as the reference measures (#11687)
2026-11-08 00:10:54 +01:00
David Mann d438e97467 Merge pull request #10766 from yoriswind/codex/atn-menu-intent
Add five Classic Actions panel commands
2026-11-07 23:59:31 +01:00
David Mann 8b1e614e7b Merge pull request #11856 from RickiNano/fix/11810-brush-reset-default-tip
Reset Tool gives the Brush a 13 px soft tip (#11810)
2026-11-07 23:45:04 +01:00
David Mann c976762718 Merge pull request #5238 from bommerts/codex/live-mixer-brush-delay
Render live painting and canvas navigation in the input frame
2026-11-07 23:26:29 +01:00
89f5946829 Merge main into #5238: keep main's live Mixer Brush, port the same-frame paint order
Main gained its own live Mixer Brush in #3627 (engine `cmd/brush_cmds/mixer_live.rs`, the
release path in `canvas/gesture.rs`), so this merge takes main's side for the engine, paint,
docs and scorecard files and drops this PR's parallel `LiveMixer` API and its engine test.

What stays from #5238 is the paint order: while a live painting tool is selected (and no dialog
owns the canvas), the image is prepared after this frame's pointer and navigation input, so a
dab or a wheel pan/pinch zoom shows in the frame it happens instead of one frame later. Ported
onto main's split `canvas.rs`, with its tests in `canvas/live_frame_tests.rs` and
`tests/it/live_stroke_canvas.rs`, adjusted for main (the removed `interface.enableAnimations`
preference, the new wheel event `source`, and the Mixer release that commits its preview pixels).

Co-Authored-By: bommerts <44821497+bommerts@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 19:26:17 +01:00
yoriswind 99653a4626 fix(actions): preserve the Equalize dialog on recorded playback 2026-11-07 10:24:40 -08:00
Trevor BrownandClaude Fable 5.1 319ed9d7a9 Magnetic Lasso: the held spacing is in document pixels and the button-up spacing halves below 100% (#11687)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 12:48:11 -05:00
Trevor Brown f05af7ccbe Merge remote-tracking branch 'upstream/main' into fix/magnetic-lasso-fastening-spacing-11687 2026-11-07 09:48:38 -05:00
Trevor Brown 4ab37a673e Merge remote-tracking branch 'upstream/main' into feat/magnetic-lasso-shift-bracket-width-11688 2026-11-07 09:43:19 -05:00
Trevor BrownandClaude Fable 5.1 47d94e98ca Magnetic Lasso: a bare curly-bracket key is left alone; only the shifted one jumps to a limit (#11688)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 09:43:16 -05:00
Trevor BrownandClaude Fable 5.1 bee5c5695c Magnetic Lasso: the width limits also take the curly-bracket keys Shift+[ and Shift+] report (#11688)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 08:51:41 -05:00
David Mann 3c000ea238 Merge pull request #8307 from midasdf/jp/print-paper-sizes
Print: Japanese paper sizes (はがき・往復はがき・JIS B5/B4・L判)
2026-11-07 14:11:19 +01:00
David Mann 7f7badcdc4 Merge pull request #11692 from RickiNano/fix/magnetic-lasso-right-click-11689
Magnetic Lasso: a right-click while drawing opens no menu (#11689)
2026-11-07 11:57:00 +01:00
RickiNano 9d21d6c640 Reset All Tools gives each painting tool its own starting brush (#11810)
Reset All Tools cleared every tool's remembered brush, and a tool
without one takes the live brush when it is picked. With the Brush's
starting tip now differing from the other tools', that leaked: Reset All
from the Brush left the Pencil and Eraser on a 13 px soft tip, and from
another tool it left the Brush on a 20 px hard one. Reset All now gives
each painting tool other than the live one its own starting brush.

Also names the Brush tool's reset tip and updates tool_reset's docs.
2026-11-07 08:41:17 +01:00
RickiNano 4fa29f657d Reset Tool gives the Brush a 13 px soft tip (#11810)
Reset Tool and Reset All Tools gave the Brush tool the default 20 px
hard tip at 10 % spacing. The reference resets it to a 13 px soft round
(hardness 0 %, spacing 25 %). `fresh_brush` now takes the tool and
gives the Brush that tip; the other painting tools and
`BrushSettings::default()` keep today's tip.
2026-11-07 08:25:49 +01:00
David Mann 927c63d394 Merge pull request #11022 from Hamza0101/fix/crop-overlay-and-fill-defaults
Crop: Always Show Overlay by default, Fill resets on another open document, and an untouched frame shows only itself (#10894, #10930)
2026-11-07 01:11:21 +01:00
yoriswind 3f37e56a86 Merge landed main into the Actions review fix 2026-11-06 13:55:27 -08:00
David Mann 6b0f7762e1 Merge pull request #11671 from davidmann4/integration-batch-20
Integration batch 20: 7 i18n PRs (Thai, Hebrew, Urdu, Tamil, Azerbaijani, Romanian, Korean)
2026-11-06 22:49:42 +01:00
RickiNano 9d16699d45 Magnetic Lasso right-click: an ⌥-drag's freehand segment keeps its menu (#11689)
The issue leaves a right-click during an ⌥-drag unmeasured, so it keeps
today's behaviour. `magnetic_drawing` held that menu back too; it now
skips a freehand segment.
2026-11-06 22:21:45 +01:00
David MannandClaude Opus 5.5 46d6307cba Crop task bar: Done fits the cropped document
The bar draws inside the canvas pass, whose write-back of its own camera
dropped the fit that commit_crop asks for, so Done kept the old zoom. The
stored view now wins when the bar changed it, as a view menu row's does.
done_fits_the_cropped_document starts at 50 % and fails without the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:17:51 +01:00
RickiNano 8519977bc1 Magnetic Lasso: a border on another document holds back no menu (#11689)
The right-click check asked only whether a border existed. Over the
control channel no frame runs between events, so a border left on one
document stayed in place after a switch and kept the selection menu
from opening on the next. The check, now magnetic_lasso_ui::drawing,
also asks that the border belongs to the document in front, the same
test frame() uses to drop a stale border. The canvas, the control
channel and frame() share it.

agent_right_click_on_another_document_still_opens_the_selection_menu
fails without this change. The context-menu parity doc records the
behaviour.
2026-11-06 21:06:45 +01:00
Trevor BrownandClaude Fable 5.1 9499e2fd37 Magnetic Lasso: tests for the fastening-point spacing (#11687)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 14:49:29 -05:00
Trevor BrownandClaude Fable 5.1 c9ac0d5e73 Magnetic Lasso: tests for Shift+[ and Shift+] width limits (#11688)
Shift+[ must set Width to 1 px and Shift+] to 256 px, with and without a border being drawn; plain [ and ] still step by 1 within 1-256.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 14:49:28 -05:00
RickiNano 14a27b360f Magnetic Lasso: a right-click while drawing opens no menu (#11689)
With a Magnetic Lasso border in progress, a right-click on the canvas
opened the selection tools' menu over the live border, in the window and
over the control channel. As in Photoshop, it now opens nothing and the
border stays live: Enter or Esc still close or cancel it. With no border
in progress the menu opens as before. Cmd/Ctrl+right-click (the layer
list) is unchanged, since it was not measured.

Tests in crates/ui-egui/tests/it/magnetic_lasso_right_click.rs drive
both paths; the two "while drawing" tests fail without the fix.
2026-11-06 20:18:16 +01:00
David MannandClaude Opus 5.5 e078c560ec Address CodeRabbit review: task bar tile, inspect and ui.set merge
- Draw the Crop task bar only on the active document's tile: a click into
  another tile activates its document mid-pass, and the tile drawn after it
  put the new frame's bar on itself for that frame.
- ui.inspect reports the bar hidden (and no rect) as soon as it can't show,
  not only after the next draw.
- ui.set merges panels.task_bar field by field: {"at": [x, y]} keeps a pin,
  {"pinned": true} keeps a dragged place; unknown nested fields are refused.
- Tests for each (each fails with its fix reverted), plus the task bar's
  preset dropdown picking 1 : 1 in sync with the options bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:41:21 +01:00
David MannandClaude Opus 5.5 da7690e937 Camera Raw localization test: allow tofu only for Tamil until craft-fonts ships it
The pinned central font manifest has no Tamil face (storytold/craft-fonts#63 adds one) and the
Linux runner has none installed, so the strict missing-glyph policy panicked on the Tamil
labels. Tamil keeps every label and state check; a guard fails once the manifest ships Taml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:27:10 +01:00
yoriswind 5f480238d0 Reconcile five Classic Actions commands with current main 2026-11-06 09:29:48 -08:00
David Mann 7919429708 Merge remote-tracking branch 'origin/main' into feat/crop-task-bar-10890 2026-11-06 17:50:28 +01:00
David MannandClaude Opus 5.5 c7b5373ba8 Crop: Contextual Task Bar under the crop frame, as a reusable task-bar widget (#10890)
The Crop tool gets the reference application's contextual task bar: a small floating
bar centred 11 pt under the crop frame with a grip, the preset dropdown (the options
bar's own, so both stay in sync), Straighten, a ⋯ menu (Hide bar, Reset bar position,
Pin bar position) and, while a crop is pending, Cancel and Done. It follows the frame,
stays inside the canvas, and stays put once dragged or pinned. Window › Contextual Task
Bar (after Tools, as in the reference) shows and hides it.

The bar itself is a reusable widget (widgets/task_bar.rs): position rule, grip, ⋯ menu
and the hide/pin/place state in Panels (kept with the panel layout across restarts,
read by ui.inspect › taskBar, set by ui.set {panels}). A context supplies only its
controls and where ⋯ goes; the Crop contents are tools/crop_task_bar.rs. Generative
Expand stays out until #41.

Also: Lucide pin and rotate-ccw icons, six new strings in all 27 catalogues, parity
661/661 (FLOOR raised), control-protocol docs. Three tests about the options bar's
Ratio dropdown now hide the task bar, which shows the same dropdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:50:20 +01:00
David Mann 8df0c8ba54 Merge origin/main into fix/crop-overlay-and-fill-defaults
# Conflicts:
#	crates/ui-egui/src/tools/crop_ui.rs
2026-11-06 16:25:10 +01:00
yoriswind 145747962a Keep Actions control playback headless and preserve ATN imports 2026-11-05 22:14:49 -08:00
yoriswind 994443c310 Preserve Actions menu ownership controls 2026-11-05 18:23:19 -08:00
yoriswind 84c41c5f10 Limit Actions panel changes to the five reviewed commands 2026-11-05 17:13:15 -08:00
David Mann dabf3bab97 Merge commit '9bef3b2dc8b84c1b6cefc8ce0dc2b01d089cd9e8' into HEAD
# Conflicts:
#	docs/scorecard.md
2026-11-06 01:54:36 +01:00
David Mann 0f15223e18 Merge pull request #7739 from davidmann4/fix/crop-swap-button-turns-frame
Crop: the options-bar swap button turns the frame instead of shrinking it (#7738)
2026-11-06 01:07:36 +01:00
midasdf eafaf5cc5d Merge remote-tracking branch 'origin/main' into jp/print-paper-sizes
# Conflicts:
#	docs/target-app-parity.md
2026-11-06 08:51:40 +09:00
6326117c53 Web build: big operations that won't fit fail with an error instead of trapping, and a trap says so (#10129)
* Raster: ask the allocator whether a big operation fits; PSD save reserves its whole output

New photocraft_raster::headroom: ensure(need) tries to reserve the need plus a margin and frees it
at once (web only; native always passes), below(bytes) tells whether less than that can be
allocated, and simulate_available fakes the answer for tests and diagnostics.

PsdFile::to_bytes reserved only the pixel data, so embedded smart-object data and other tagged
blocks grew the output by doubling, which on the web is one unrecoverable huge realloc. It now
reserves the exact encoded length.

* Big operations that won't fit in memory fail with an error instead of trapping

Place, Image Size, a smart-object re-render and Save now ask the allocator whether their estimated
need can be allocated before they start (photocraft_engine::memory_gate, estimates per operation,
photocraft_io::estimate_export_bytes for saves). A refusal changes nothing and says what the
operation needed and what to do (save, Edit > Purge > All, close documents).

A standing notice warns when less than 512 MiB can be allocated, with hysteresis, so the user can
save before anything traps. Notices can now be sticky, which keeps them past the auto-hide delay.

* Web build: a trap says so instead of freezing the page, and ?free-mb simulates low memory

index.html holds a hidden, static 'PhotoCraft stopped' message with a Reload link. web.rs reveals
it when the module traps (the window error event, or an unhandled rejection from a spawned
future), tells running out of memory from an internal error by the panic message a chained panic
hook kept, and skips the Leave site prompt once stopped. ?free-mb=N makes the memory gates and the
low-memory warning see only N MiB, for checking them in a browser.

* Docs: web build memory handling in the gaps list and the parity assessment

* Engine: use is_multiple_of in the megabyte formatter

* Cargo.lock: the web shell depends on photocraft-raster

* Web boot page: carry the stopped message too, as the test that keeps the two pages equal requires

* Save check counts one copy of the document, and runs once per save

The encoded file's buffer is reserved fallibly, so a save it doesn't fit
in fails with an error instead of trapping; counting it as well refused
saves that would have fitted. On the background-save path the check ran
in write_document and again in start_save, which other callers reach
directly; it now runs only in start_save there.

* Review fixes: warning check allocates nothing, PSD merged image counted, automation saves checked

The low-memory warning's periodic check reads the size of linear memory
instead of reserving a block: wasm memory never shrinks, so a trial every
few seconds raised the high-water mark by up to 768 MiB for nothing. The
operation checks keep their trial reservation.

PSD and PSB saves always build a canvas-sized merged image (a placeholder
without maximum compatibility) and hold it raw and encoded; the save
estimate now counts it. The synchronous automation save checks memory
before encoding, as File > Save does, and its test asserts the memory
error.

The trap listeners go in before the app is built, so a trap while
building it shows the stopped message too, and a memory access out of
bounds reads as unexpected rather than as running out of memory.

* Cover layered PSD preflight limitation

* Fix layered PSD test iteration

* Docs: layered PSD preflight limitation in the gaps list

* Web OOM gate: gate direct exports, truthful advice for unbounded PSD sources (#10024)

* Web OOM gate: estimate layered PSDs per layer instead of refusing every real PSD

The PSD check admitted a file only when its color-mode data, image
resources and layer section were all empty. Every Photoshop file has
image resources (at least the resolution), so on the web nearly every
real PSD was refused for Place, PSD smart objects could not render,
and Image Size was refused for documents holding one, whatever the
free memory (u64::MAX never fits).

The color-mode data and image resources hold no pixels, so they are
now only skipped. A layered file reads its layer count from the layer
info (signed, absolute value) and adds a canvas-sized surface and mask
per layer to the flat estimate. Files that are not 8-bit RGB or
grayscale, keep their layers in a Layr tagged block, or whose sections
can't be read stay unbounded and refused, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Web stopped page: match trap messages ignoring case

Safari reports the allocation-failure abort as "Unreachable code
should not be executed" and Firefox says "out of memory", which the
case-sensitive matching missed: the trap was not recognised, or was
shown as an unexpected stop instead of running out of memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Export estimate: count the merged image OpenRaster writes

The ORA writer keeps the layers but also flattens the document for
mergedimage.png, a 16 B/px composite of the canvas, which the
estimate left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 22:04:59 +01:00
Hamza 20d13e5205 Crop: a drawn, moved or resized frame has changed when the gesture changed it
From review: release compared the frame with where it started, so a click on a handle of the untouched frame counted as a change (a Resize that resized nothing), and an Alt-drag from the centre that drew the same frame again counted as none. It now asks whether the gesture changed the frame at some point (drag_moved, including the release's own position); turns and image moves keep their checks.
2026-11-05 16:28:16 +05:00
Hamza 91fec0df9c Merge remote-tracking branch 'origin/main' into fix/crop-overlay-and-fill-defaults
main added the turning grid and draws the guides for the visible part of the frame (current_guides_for_frame). Kept from both: the canvas calls main's guides with this PR's frame look, and this PR's FrameLook functions sit beside main's visible_frame and turn_grid. The overlay still waits for the crop's first change, except while a turn or a straighten line is in progress, whose guides show from the start as main's tests expect.
2026-11-05 16:12:28 +05:00