mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
feat/shortcut-sets
135
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
+40 |
3a77137121 |
.kys import: tool keys and sets saved on Windows (K3) (#5345)
* Raw: measure the Nikon D90 image area (4288x2848 at (10, 10)) Aligning the decoded D90 sensor plane with the camera's own JPEG puts the image at (10, 10) in the 4352x2868 sensor plane, giving the camera's 4288x2848 frame (10-pixel margins; the right border reads the camera's flat 255 from column 4310). Add the measured ImageArea so a D90 NEF opens on the camera's frame instead of the uncropped plane, and make a measured profile leave a file that carries its own colour calibration (a DNG) untouched. * Codecs: open Cineon (.cin) film frames read-only Cineon is the 10-bit logarithmic film-scan format DPX grew from. Read it from the same Kodak header family: the generic header (big-endian, orientation at 192, channel count at 193, the channel-1 bits/dimensions), one or three channels, three 10-bit samples packed into each 32-bit word on a word boundary. The 10-bit code values open as U16 (round(c x 65535 / 1023)); the file's log black/white points are a display choice and are not applied. A depth other than 10 bits or a channel count other than 1/3 is Unsupported; truncation errors rather than panicking. Read-only (no Cineon writer), so .cin joins the open filters and Cineon read closes part of #1049's G10 gap. * .kys import: tool keys and sets saved on Windows (K3) Photoshop's <tool> rows now import: each matches our tool by name (our tool names are Photoshop's) or by pc-id in sets PhotoCraft exported, and a letter other than the tool's own becomes its override, while its own letter keeps the tool cycling with the others (#5036). A set saved on Windows spells the primary modifier Ctrl where a Mac set writes Cmd and keeps Control for the Control key. A set with no Cmd or Opt anywhere but some Ctrl is read as a Windows set, its Ctrl as our Cmd: Ctrl+L is the Cmd+L default, not a Control-key override that would also mean Control on a Mac. The import reports `windows`. * Vector: bound flattening memory, keep over-budget dashes, cheaper edge build (#5195) (#5204) * Vector: bound flattening memory, keep over-budget dashes, cheaper edge build (#5195) - flatten: a path's flattened points are capped at 1 << 20; past it every curve keeps a proportional share of its pieces (at least one), so hostile handles from files (vmsk, SVG, effect outlines) cannot exhaust memory. fill_rasterizer flattens the whole path under one budget. - stroke: past the dash step budget (or below coordinate precision), dash_polyline keeps the dashes made so far and draws the rest solid instead of dropping the stroke. Open polylines are no longer copied. - raster: coordinates are clamped to +-1e15 and edges with a non-finite slope (vanishingly short) are skipped, so huge finite coordinates no longer produce NaN coverage. fill_rasterizer sorts edges once instead of after every component (stable sort, identical order). - Cleanups: dead miter `half`, dead loop-length check in trace_mask, shared mask render body, map_knots helper, shared straight-segment test. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Vector: bound stroke outline points (#5211) - stroke_polygons dashes all lines first, then counts round caps and joins. When their full-resolution tessellation would exceed 1 << 20 outline points, every round cap and join gets the same smaller segment count (down to 4 per circle, 1 per join; area-exact radius kept). Strokes under the budget are unchanged; no piece is dropped. - The dash step budget (100000) is now shared by all lines of a stroke instead of per polyline, so many subpaths cannot multiply the dash (and cap) count. Past it the rest is drawn solid, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * fix: limit Render Video timeline and GIF staging allocations (#5670) * fix(export): prompt for a Render Video output directory (#3365) (#3378) fix(export): prompt for a Render Video output directory (#3365) Also covers the same fix as #3390; thanks to its author. Co-authored-by: buivanvu94 <[email protected]> * fix(ui): avoid overflow when allocating layer style instance IDs (#4884) * fix(ui): avoid overflow when allocating layer style instance IDs * fix(ui): avoid panicking when layer style IDs overflow * fix(ui): format non-panicking layer style ID allocation * fix(doc): variable definitions follow layer id remapping on copy and load (#5023) * fix(doc): variable definitions follow layer id remapping on copy and load A duplicated document (image.duplicate, history.newDocument) or a .pcraft loaded with remapped ids assigned fresh layer ids but cloned VariableDef.layer unchanged, so datasets silently drove no layer (or, after remap, a colliding one). Remap variable targets through the same id map as layer comps and slices; a dangling target keeps a non-colliding placeholder. A merged-only duplicate drops the whole variable binding set, matching how it drops comps. Closes #4969 * style: cargo fmt duplicate_variables test --------- Co-authored-by: highperfocused <[email protected]> * fix(raw): reject truncated or oversized Deflate tiles in DNG import (#4977) (#5072) * fix(history): count fill caches and smart filter masks in undo memory (#4972) (#5075) * fix(ui): keep the close prompt up when a Save Document script edits the document after saving (#4953) (#5081) * fix(geom): clamp huge sizes in Rect::from_xywh instead of wrapping, and saturate TileCoord::rect (#5161) Co-authored-by: Saad Abdullah <[email protected]> * fix(algo): keep clipped warp bounds from overflowing (#5451) warp() computed the source-centre fallback as (x0 + x1) in i32 and the inverse-mapped tile footprint as `floor() as i32 - 3` / `ceil() as i32 + 3`. With a strongly skewed finite affine (for example Homography [1, 1e12, 0, 0, 1, 0, 0, 0, 1] on a 32x32 clip) the float-to-int cast saturates at i32::MIN/MAX and the following -3/+3 overflows, panicking in debug builds and wrapping in release. A source rect with coordinates near 1.5e9 would overflow the centre sum the same way. Widen the centre sum to f64 and use saturating_sub/saturating_add for the footprint, which is intersected with src_rect afterwards anyway. Add crates/algo/tests/warp_clipped.rs covering clipped-vs-full equivalence, huge scale allocation, the extreme-affine footprint, and the far-origin source centre. Refs #3446 * fix(linux): install the AppImage menu entry when AppImageLauncher skips it (#5551) AppImageLauncher exports DESKTOPINTEGRATION even after X-AppImage-Integrate=false makes it skip the AppImage. AppRun treated that variable as "already integrated" and wrote no .desktop file, so the menu stayed empty. Skip our entry only when another .desktop file's Exec already points at this AppImage. Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> * FITS: clamp 32-bit saves to 0..1 and warn, so they reopen as saved (#5627) (#5628) FITS: clamp 32-bit saves to 0..1 and warn, so they reopen as saved (#5627) Also covers the same fix as #5642; thanks to its author. Co-authored-by: nrq6993-a11y <[email protected]> * Properties / New Document: tiny sizes in physical units no longer resize the document (#5661) (#5662) The Width/Height fields in Properties > Document and in the New Document dialog clamped their shown value to at least 0.01 of the unit. A 1 x 1 px document at 300 ppi is 0.0033 in, so showing it in inches clamped it to 0.01 in, the field reported a change and the document became 3 x 3 px (two history steps, no user edit). The fields now accept down to 0; the pixel conversion afterwards already clamps to at least 1 px. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * fix(psd): write the layer block after a kept merged-transparency marker (#5673) A 16/32-bit document saved as PSD has its layers in a global Lr16/Lr32 block, which the writer put first among the global blocks. A Mtrn/Mt16/Mt32 marker kept from the opened file then followed it, and Photoshop refuses such a file (verified in Photoshop 2026 with psd-tools' transparentbg.psd re-saved both ways: Mt32 first opens, Lr32 first doesn't). The layer block now goes right after the last kept marker, as Photoshop orders them. Fixes #5068. Co-authored-by: Claude Opus 5.5 <[email protected]> * Options bar: Brush and Eraser size go to 5000 px in every theme (#5708) (#5709) Options bar: Brush and Eraser size go to 5000 px in every theme (#5708) Also covers the same fix as #5724; thanks to its author. Co-authored-by: nrq6993-a11y <[email protected]> * Smart Objects: Curves preview no longer zooms in on a reduced proxy (#5766) (#5779) Adjustments and filters on a smart object add a smart filter, so their live preview re-renders the smart object from its source through its placement. The preview runs on a proxy document scaled down by k (large documents), and proxy_document scaled the smart object's cache but left its transform (and perspective and filter mask) in full-size document coordinates. The re-render then came out k times too large on the proxy canvas, so the object looked zoomed in until OK committed the full-size result. proxy_document now scales the placement and the filter mask with the proxy. Co-authored-by: Claude Opus 5.5 <[email protected]> * Fix Nikon NEF lossy levels, packed decoding and metadata crops (#3238) Co-authored-by: optimalbytee <[email protected]> * Curves: apply to masks, alpha, and Quick Mask (#5335) (#5448) Curves: apply to masks, alpha, and Quick Mask (#5335) Also covers the same fix as #5578; thanks to its author. Co-authored-by: Zer0C00L01 <[email protected]> * perf(ui): bound carried selection outlines and stabilize clipping (#5699) Limit whole-selection transform traces to a padded one-million-cell grid while preserving normal viewport caching and thin boundary samples. Use double-precision intermediates for clipping long perspective lines. Add regressions for large/disconnected selections and viewport accuracy near the projective horizon. Preserve the full-resolution selection and the transform behavior already landed in #5337. Related: #5297, #3402. Co-authored-by: LabDennis <[email protected]> * fix(heif): a grid's ICC profile is inherited from its tiles (#5553) fix(heif): a grid's ICC profile is inherited from its tiles Also covers the same fix as #5591; thanks to its author. Co-authored-by: nrq6993-a11y <[email protected]> * fix(ui): expose toolbar column toggle in all themes (#3538) fix(ui): expose toolbar column toggle in all themes Also covers the same fix as #4680; thanks to its author. Co-authored-by: Marco Arnulfo <[email protected]> * Double-clicking the empty workspace shows File › Open (#5367) (#5429) Double-clicking the empty workspace shows File › Open (#5367) Also covers the same fix as #5461; thanks to its author. Co-authored-by: Nigel Ihza Firdausy <[email protected]> * fix(ui): a held arrow key keeps stepping the focused value field (#5474) (#5497) Holding Up/Down in a value field (Character panel tracking, size, …) stepped it a couple of times, then jumped focus to the field above. Each arrow step re-requested focus on the field that already had it. egui's request_focus resets the field's event filter, so on the next frame egui no longer knew the field takes vertical arrows. A key repeat landing on that frame was read as "move focus up". Single presses rarely hit that frame; held keys always do. Only request focus when the field lost it (after a typed sum gives it up to be worked out). Regression test feeds key repeats on consecutive frames with a field above and failed before the fix (focus moved after two steps). Fixes #5474 Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(ui): ⇧ marquee square keeps equal sides on the pixel grid (#5472) (#5506) The ⇧ square (and a 1:1 fixed ratio) is built in continuous document coordinates, and `marquee_px` then snapped each axis to the pixel grid on its own: floor the near edge, ceil the far one. A press between pixels, dragged 100.5 px, snapped x to 101 and y to 102, so the readout and the committed selection were off by one. `marquee_preview_px` now grows the shorter side to the longer one, away from the press point, so the square still covers every pixel the drag touched. Ants, readout and commit share this path. Fixes #5472 * fix(engine): validate bounded extended filter parameters (#5586) * Guide Layout: the disabled Rows field no longer turns Rows on (#5625) (#5626) The disabled Number field still drew a DragValue with range 1..=1000, which clamps the default rows 0 to 1 and reports a change; writing that back made the Rows checkbox's `positive` fallback turn on, so OK added guides at the top and bottom. Disabled number fields no longer write back. Kittest regression covers Rows and Columns. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Fix filter preview live during drag (#5549) * Filter dialogs: paint the preview computed mid-drag instead of waiting for the pointer to stop A preview that finished while the slider was still moving was thrown away before it could reach the canvas, because the worker result had to match the request on every field including the parameters. Every completion of a drag lands after the value has moved on, so none of them matched, the worker was handed the newest value instead, and that one went stale in turn. Nothing was ever painted while the pointer moved: the effect appeared only once the slider had been still for about a frame of preview time, which is what "I have to stop the slider and wait" looks like. The display gate a few lines below already had the opposite rule. It compared the document, revision, dialog, layer, channel target, command and proxy factor and deliberately left the parameters out, so that a slightly old frame stays on screen mid-drag. The publish gate disagreed with it and won, so the frame the display gate was written to keep never existed. Publish a successful result when the finished request matches the current one on everything except the parameters, and let the existing display gate decide whether to keep it. The two gates now share one predicate, FilterPreviewKey::same_target, so they cannot drift apart again. Errors keep the exact match. A value the pointer has already dragged past should not raise a notice, and a failure is not something to show stale. What this deliberately does not change: - A reopened dialog has a new id, a committed document a new revision, a different command or channel target a different key, so a result from another preview is still never painted. Covered by a_reopened_dialog_discards_the_previous_dialogs_finished_preview. - The freshly computed request is still what decides whether a new computation starts, so the worker still converges on the value the dialog actually holds. - One preview runs at a time and a stale one is still cancelled only once the values settle, so this adds no work to the worker; it only stops discarding completed work. - OK still recomputes at full resolution, so a frame shown mid-drag is never what gets written to the document. Test: a_preview_computed_mid_drag_reaches_the_canvas starts a blur at one radius, moves the slider before that preview lands, and requires the completed frame to reach the canvas while the slider is still on the new value. It fails on the old gate, timing out after 10 s with no frame published. * Filter dialogs: three guards on a mid-drag preview, after review The first version of this let any completed frame through that matched the dialog on everything but the parameters. Review found three ways that is wrong, and all three are now closed and pinned by a test. A stale result with nothing to show. Storing it replaces a good frame with an empty one, which the display gate paints as "draw nothing": the canvas blinks back to the unfiltered layer mid-drag. The exact request may still store an empty result, which is how a filter that no longer applies clears the canvas, so the guard belongs on the stale arm only. Splitting the match arm is what makes that separable; the earlier single arm forced a false choice between the two. A late frame replacing an exact one. Drag the slider away and straight back: the frame on screen is already exact for the dialog, and the in-flight frame for the value on the way out would have overwritten it, showing a blur the user has already undone. A stale result is now dropped when the stored preview is already exact. Errors were already scoped to the exact request and stay there: a value the pointer has dragged past should not raise a notice, and the value it comes to rest on will raise its own when it is recomputed. Also pinned by test, because both are easy to undo by accident: - The reopen test was not reaching the gate. discard_closed reclaims a closed dialog's job a frame earlier in the real app, and the test called it too, so the stale result never arrived and the test passed even with the dialog id removed from the comparison. It now drives the gate directly. Verified by mutation. - The mid-drag test asserted nothing about what the display gate does with the published frame, so re-adding params there passed. It now asserts the canvas actually returns something to draw, and it keeps polling until a frame for the dialog's current value lands, which is what pins fresh to an exact match. Tests are deterministic: the worker job is gated on a channel and signals when its result is already in the worker channel, so nothing sleeps and nothing races the 150 ms settle timer that cancels a job whose values stopped changing. Verified by mutating each guard and confirming a test catches it: publish gate back to exact-match ................. killed drop the is_some guard ........................... killed drop the already-exact guard .................... killed same_target ignores the dialog id ............... killed display gate compares params again .............. killed fresh relaxed to same_target .................... killed same_target ignores k ........................... killed k stays in the comparison on purpose. A 36 MP document previews at k=4, and preview_factor lowers k as a pixel-sized parameter approaches its minimum, so k does change under the slider. Relaxing it would paint a frame at a scale the preview policy exists to avoid, and would loosen the display gate further than upstream wrote it. The cost is a one-computation pause when the slider crosses a threshold on a large document; that test keeps the choice visible. * Filter dialogs: fix a race in the new tests that let CI pass them The four new tests signalled each other through a channel the worker sends from inside `compute`. But the worker only puts the result into the channel after `compute` returns: let result = compute(&work); let _ = tx.send(result); So a test that woke on the signal and called `ensure_filter_preview` immediately could reach `poll()` before that send. On a loaded CI runner it did: ubuntu failed `a_mid_drag_empty_result_leaves_the_preview_alone` with no frame published at all. The comment in the test claimed the result was already in the channel, which was the one thing it was not. The tests now drive the canvas until the state they need appears, which does not depend on the order of that send. They also check their invariant on every pass rather than only at the end: a wrongly published frame can be replaced by the next, correct one before the loop stops, which had already left the reopen, late-frame and empty-result tests unable to see their own mutation. Unchanged: the assertions, the production code, and the four mutations that broke each guard — re-verified, 7 of 7 still caught. Runs: 30 back-to-back runs of the four tests on 12 cores, no failure; the full crate twice, 2800 pass. --------- Co-authored-by: agent-346022 <[email protected]> * Fix #5414: Keep created paths visible and editable (#5424) * Paths: keep work and shape paths visible with any tool (#5414) * Tests: improve path overlay regression coverage * fix(ui): widen tool-options drag targets (#5135) Co-authored-by: haranishi <[email protected]> * fix(cms): write the product name as PhotoCraft in built-in profile descriptions (#5614) * style: rustfmt five files on main (fmt break from #5448, #5670, #5135) (#5873) Formatting only; cargo fmt --all -- --check passes again. * cargo fmt the extension lists Co-Authored-By: Claude Opus 5.5 <[email protected]> * Document layerFilter in the ui_set MCP schema (#5776) Co-authored-by: FredApps <[email protected]> * i18n(hu): align six rows with the catalog conventions (#5434) Three prompts used the formal verb form ("Adjon", "Válasszon", "kattintson"); the catalog addresses the user informally throughout. Two colour profile messages put an article before a placeholder ("A(z) „{name}”") and glued a suffix to one ("{mode}-profilja"). The correct form depends on the inserted value, so the placeholders now stand after a colon or in brackets. The Ask On Mismatch hint kept the English option name; it now names the Hungarian label of that option in Color Settings. * UI: centre text vertically in shared text fields (#5550) * UI: centre text vertically in shared text fields TextEdit draws its line at the top of its rect, and the theme's 24 pt interact height made the edit taller than the field's inside, so text in widgets::text_field sat a few pixels high (Preferences search, hex fields, name fields) while dropdowns and value fields were centred. Fill the box and centre the line in it. * Fixed failing test --------- Co-authored-by: Stevan Marjanović <[email protected]> * fix(ui): the Move tool keeps Photoshop's arrow pointer (#5814) The canvas cursor match mapped Tool::Move to CursorIcon::Move, the 4-way move cursor, while Photoshop shows its standard arrow pointer and marks the movable layer with the hover outline. Use CursorIcon::Default for the tool (#5646). * fix(pen): keep unfinished paths in their original document (#5460) * fix(pen): finish draft before creating a document * test(pen): keep open work path in its source document * Drag and drop: PhotoCraft comes to the front after a drop (#5687) (#5894) Files dropped from another app's window (a file manager) were imported, but the source window stayed in front of PhotoCraft. The frame that takes a drop now asks for focus, so PhotoCraft comes forward as Photoshop does. Co-authored-by: Claude Opus 5.5 <[email protected]> * Options bar: Show Transform Controls in every theme (#5740) (#5802) The Studio, Adwaita and Breeze themes' Move tool options bar had only Auto-Select and a hint, so Show Transform Controls could not be turned on there and a click on a layer never showed its box and handles. The toggle is now in every theme, as Auto-Select is (#1275). Co-authored-by: Claude Opus 5.5 <[email protected]> * Preserve Layers scroll per document (#5522) (#5540) * chore: reserve draft implementation for #5522 * fix(ui): retain each document's Layers scroll position (#5522) * Rulers: Alt-drag makes a guide of the other orientation (#5698) (#5885) As in Photoshop, dragging a guide out of the top ruler with Alt/Option held makes a vertical guide, and out of the left ruler a horizontal one; without Alt each ruler makes its own kind, as before. Co-authored-by: Claude Opus 5.5 <[email protected]> * Adjustment layers: a live preview is never coarser than the screen (#5764) (#5778) Dragging a Curves point (or any control) in the Properties panel of an adjustment layer previews through `canvas::ensure_proxy_preview`, which picked its downscale factor from the document size alone (`proxy::preview_factor`): any document over 5 MP was drawn from a 2-5x reduced copy at every zoom, so at 100 % the canvas turned blocky until the mouse was released. Cap the factor by the view's zoom with the rule the Image > Adjustments dialogs already use (`adjust_preview::proxy_factor`: the proxy stays at least at screen resolution) when the wgpu compositor can draw the full-size document. At 50 % and closer the drag now shows the full-size composite; zoomed out, the proxy still saves the work. Documents the GPU compositor doesn't cover keep the old proxy (the full size would be a CPU composite per change). Co-authored-by: Claude Opus 5.5 <[email protected]> * UI: unsaved-changes buttons show every key in one style (storytold/photocraft#5564) (#5603) German showed "Ja (Y)" next to "(N)ein". Keys now go inside the words only when every translated label starts with its key; otherwise all labels append it ("Ja (Y)", "Nein (N)", "Abbrechen (C)"). Co-authored-by: Cursor <[email protected]> * macOS: a bundled app keeps its own Dock icon (#5849) (#5879) The main window set a runtime PNG icon everywhere. On macOS that replaces the app bundle's PhotoCraft.icns in the Dock, so the system couldn't render it in its own style (Liquid Glass and its tinted and dark variants). The runtime icon is now skipped when running from an .app bundle; unbundled runs and the Windows and Linux builds still set it. Co-authored-by: Claude Opus 5.5 <[email protected]> * Title bar: dialogs no longer stop the window dragging on macOS (#5826) (#5860) The overlay that keeps the title strip's free gap draggable under a dialog's modal layer (#4913) only ran with the custom title bar. macOS keeps the OS traffic lights over the app's own title strip (custom_titlebar is false), so with the Embedded Profile Mismatch prompt or any dialog open the window could not be moved. The overlay now runs whenever the strip is drawn. Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(path): Shift locks a Direct Selection anchor drag to 45° (#5475) (#5498) Dragging selected anchors with the Direct Selection tool ignored Shift, so lengthening a slanted bar also nudged it vertically. As in Photoshop, Shift now locks the anchor move to multiples of 45° from the press, in the live preview and in the committed path.moveAnchors. It works whether Shift is held from the press or added during the drag; Shift at the press still toggles the anchor's selection as before. Reuses stroke_constraint::snap45 (the Gradient tool's Shift lock). Fixes #5475 Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> * Type: keep text selection highlight visible while Command/Ctrl is held (#5542) * Type: keep text selection highlight visible while Command/Ctrl is held * Type: match Photoshop 1px dark frame and handle styling for type transform * Merge main; keep the transform box and underline colours from the theme tokens The selection-highlight fix stands on its own; the hard-coded box and underline colours and the removed reference point were unrelated to it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: safvanedge <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * Filter dialogs: a Random button for seeds (#5710) (#5886) Clouds, Difference Clouds, Add Noise, Fibers and the other seeded filters exposed a seed number, but a new pattern meant typing a different one. A Random button beside every seed field now picks a fresh seed, which the live preview renders at once. "Random" gains its row in the zh-Hans, zh-Hant, ru, fr and id catalogs, which claim complete coverage. Co-authored-by: Claude Opus 5.5 <[email protected]> * Brushes: dragging a preset to the list's edge scrolls the list (#5741) (#5862) A preset, group or folder dragged in the Brushes panel or the Brush Preset picker couldn't reach rows out of view: the list didn't scroll while dragging, so the drag stopped at the last visible row. Holding the drag at the list's top or bottom edge (or past it) now scrolls it, with the same ramp as the Layers panel's row drags. Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(ui): smart filter adjustments open their own editor on double-click (#5812) An Image > Adjustments recorded on a smart object (Brightness/Contrast, Levels, Curves...) stores image.adjustments.<kind>. The Layers panel row called smart_ui::open_editor, which only knew filter_dialog and silently did nothing for those commands, so the filter could never be reopened. Route adjustments to adjust_dialog, seed it with the recorded params and let OK run layer.smartFilter.setParams (#5689). * Canvas: no scroll glide with Enable Animations off (#5721) (#5883) Interface > Enable Animations off already made scroll areas jump straight to their target, but the canvas still panned from egui's smoothed wheel delta, gliding for several frames after each notch. With the preference off a plain wheel scroll now moves the canvas by the whole notch in the frame it arrives and stops there. Co-authored-by: Claude Opus 5.5 <[email protected]> * Scaling around reference point no longer snaps center of image to reference point (#5510) Co-authored-by: Stevan Marjanović <[email protected]> * Type: a scaled type layer keeps its size when the Character fields show it (#5717) (#5718) egui's DragValue clamps an existing value to its range and reports a change, so showing a type layer scaled past 1296 pt (or below 0.1 pt) sent type.setStyle with the clamped size. Value fields now clamp only edits, never a value they merely show. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * fix(ui): restore previous tool when committing or canceling text edit (#5527) (#5528) * fix(ui): restore previous tool when committing or canceling text edit initiated via double-click * fix(ui): restore return tool only while on type and stay on type for layer thumbs - commit_with/cancel: restore return tool only while app.ui.tool.is_type() - edit_active: keep tool on Type when editing from layer thumbnail (matches Photoshop) - clear text_edit_return_tool when text_edit is dropped on lost text or stale transform - test tool switch mid-edit and edit_active remaining on Type --------- Co-authored-by: safvanedge <[email protected]> * File › Scripts › Browse: reject Photoshop ExtendScript (#5406) (#5435) * File › Scripts › Browse rejects Photoshop ExtendScript. The picker listed .js/.jsx files that parse_script cannot run. Filter to JSON/text/droplet scripts and return a clear error for .js/.jsx paths. * File › Scripts › Browse keeps Photoshop extensions in the picker. Review feedback on #5435: filtering .js/.jsx out of the picker hid the rejection error from UI users. List Photoshop's script types (as #2452 asked) alongside PhotoCraft's so selecting one shows the ExtendScript error instead of hiding the file. * Channels: load the targeted layer mask as selection (#5562) * Load the targeted layer mask from Channels footer * Fix Channels test setup after mask reveal * Type: Swap and Default Colors recolour the selected text (#5690) (#5808) The toolbar's Switch Colors and Default Colors buttons ran their commands without type_tool::foreground_changed, so characters highlighted in the type layer being edited kept their colour. As in Photoshop, they now take the new foreground, like picking a colour in the Color or Swatches panel. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Image Size, Canvas Size: points and picas follow the Point/Pica Size preference (#5756) (#5757) The dialogs converted points and picas at a fixed 72 pt/in, while the rulers, Info, layer properties and the shape dialog use Preferences > Units & Rulers > Point/Pica Size. With Traditional (72.27) a document showed different point sizes in the rulers and in Image Size. The dialog now stores the preference's points per inch when it opens (__ptPerIn, 72 when missing) and uses it for points, picas (points / 12) and typed units in the Width/Height fields. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Pen and Path Selection: Delete deletes the finished work path (#5702) (#5732) A finished work path is drawn whenever the Pen, Freeform Pen or Path Selection tool is active, and it is saved with the document, as in Photoshop. But once the path was finished, Delete/Backspace fell through to Edit > Clear (the pixels under it), so the only ways to remove it were the right-click Delete Path and the Paths panel, and it looked impossible to delete. With those tools, no path being drawn and the work path the one they edit (no shape layer or targeted vector mask in front of it), an unmodified Delete/Backspace now runs path.delete on the work path: one undoable Delete Path step. Direct Selection and the Curvature Pen are left alone, since Photoshop deletes their selected anchors, not the path. Co-authored-by: Claude Opus 5.5 <[email protected]> * Layer Style: drag on the image to move a drop or inner shadow (#5701) (#5893) As in Photoshop, with the Layer Style dialog on a Drop Shadow or Inner Shadow page, dragging on the image moves the shadow: its offset follows the pointer and is stored as the effect's angle and distance (whole degrees and pixels), moving the shared global light angle when the effect uses it. Space and the middle button still pan; colour pickers still sample. Co-authored-by: Claude Opus 5.5 <[email protected]> * Free Transform: shapes and paths stay on whole pixels (#5751) (#5841) * Free Transform: shapes and paths stay on whole pixels (#5751) With Snap Vector Tools and Transforms to Pixel Grid on, only the pointer was rounded, and only while a shape tool was active. Under the Move tool, or with a grab offset or a proportional scale, the box landed between pixels (a rectangle dragged to 540 px came out 539.6). An upright box on a shape layer or path now keeps whole-pixel edges whatever the tool. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Format (cargo fmt) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * Snapping: snap a drawn marquee, Object Selection box or shape by its edges while Space repositions it (#5748) * Move: Show Transform Controls frames every selected layer (#5917) As in Photoshop, with several layers selected (Shift-click with Auto-Select, or the Move marquee) Show Transform Controls draws one frame around all of them (the Background excluded) and outlines every selected shape layer. Before, the frame showed only the active layer, so the other selected layers had no feedback on the canvas. The frame joins the boxes Free Transform would open on each layer (transform_frame), and it hides while a corner radius widget is dragged. Free Transform works on one layer, so the shared frame has no handles and a press on it doesn't start Free Transform; a drag inside still moves every selected layer. Co-authored-by: Claude Opus 5.5 <[email protected]> * Warp: a thin layer stretched and bent keeps its curve on commit (#5793) (#5810) * Warp: a thin layer stretched and bent keeps its curve on commit (#5793) The mesh warp sized its triangle grid by the source rectangle only (one cell per 4 source px). A 3 px column scaled into a wide band and then warped got a single cell across, so the committed result was a straight, affine band while the preview showed the curve. The grid now also follows the destination length of the mapped rows and columns. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Warp: module doc describes the grid sized on both sides of the map (#5793) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * Dialogs: a close box in the title bar cancels like Cancel (#5496) (#5505) Dialogs drawn by the shared renderer had no close box: the only ways out were Cancel/OK or Esc. As in Photoshop on Windows, the title band now ends in a × (the icon button the floating panels close with) on Windows, Linux and the web, none on macOS. A click on it joins Esc in the single cancel path of `dialogs::show` (outcome = Cancel -> `cancel()`), so the live preview goes and nothing reaches the document or history. The × is left out of the title band's drag area, so a drag starting on it neither moves nor closes the dialog; the rest of the band still drags. Check Spelling (an untitled window) gets the same close box; it is Done, as every change there is already made. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * fix: commit type editing on Layers-panel selection (#5584) (#5612) * Info panel: show guide coordinates while dragging outside the canvas (#5728) (#5768) * Fix Info panel guide coordinates during ruler drags (storytold/photocraft#5728). Show the dragged guide position on one axis while the pointer is outside the canvas, matching Photoshop. Co-authored-by: Cursor <[email protected]> * Merge main; fill GuideDrag's new press field in the test; cargo fmt Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> * fix(ui): brush outline matches the stroke on Wayland at fractional scales (#5796) * fix(ui): brush outline matches the stroke on Wayland at fractional scales On Hyprland at 1.25 the brush outline was 1.25x too large and sat right of and below where the brush painted, by more the larger the brush. The engine places dabs exactly; the OS cursor bitmap was wrong. winit 0.30 sizes custom cursor bitmaps on Wayland with a wp_viewport destination whenever the scale isn't 1, and Hyprland (like Mutter before GNOME 48) ignores viewports on cursor surfaces: it shows the bitmap one pixel per logical pixel with the hotspot winit divided by the scale. A client can't tell which compositors do this, so on Wayland at any scale but 1 the brush outline and crosshairs are painted in-app, as on the web. Other platforms and Wayland at scale 1 keep the low-latency OS bitmap. Measured on Hyprland 0.56.2 at 1.25 (100 % zoom, 100 px brush): dab centre (288.5, 560.5), diameter 97 px; outline before (303, 574.5), ~130 px; after (288.5, 562), 107 px including its border. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Merge main; cargo fmt Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> * Raw: measure the Nikon D90 image area (4288x2848 at (10, 10)) (#4323) Aligning the decoded D90 sensor plane with the camera's own JPEG puts the image at (10, 10) in the 4352x2868 sensor plane, giving the camera's 4288x2848 frame (10-pixel margins; the right border reads the camera's flat 255 from column 4310). Add the measured ImageArea so a D90 NEF opens on the camera's frame instead of the uncropped plane, and make a measured profile leave a file that carries its own colour calibration (a DNG) untouched. Co-authored-by: Brandon Thomas <[email protected]> * Codecs: open Cineon (.cin) film frames read-only (#4691) * Raw: measure the Nikon D90 image area (4288x2848 at (10, 10)) Aligning the decoded D90 sensor plane with the camera's own JPEG puts the image at (10, 10) in the 4352x2868 sensor plane, giving the camera's 4288x2848 frame (10-pixel margins; the right border reads the camera's flat 255 from column 4310). Add the measured ImageArea so a D90 NEF opens on the camera's frame instead of the uncropped plane, and make a measured profile leave a file that carries its own colour calibration (a DNG) untouched. * Codecs: open Cineon (.cin) film frames read-only Cineon is the 10-bit logarithmic film-scan format DPX grew from. Read it from the same Kodak header family: the generic header (big-endian, orientation at 192, channel count at 193, the channel-1 bits/dimensions), one or three channels, three 10-bit samples packed into each 32-bit word on a word boundary. The 10-bit code values open as U16 (round(c x 65535 / 1023)); the file's log black/white points are a display choice and are not applied. A depth other than 10 bits or a channel count other than 1/3 is Unsupported; truncation errors rather than panicking. Read-only (no Cineon writer), so .cin joins the open filters and Cineon read closes part of #1049's G10 gap. * cargo fmt the extension lists Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Vikram Bhaskaran <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Valentin Klein <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Nigel Ihza Firdausy <[email protected]> Co-authored-by: buivanvu94 <[email protected]> Co-authored-by: mroxso <[email protected]> Co-authored-by: highperfocused <[email protected]> Co-authored-by: MarekSpodBiedry <[email protected]> Co-authored-by: Saad Abdullah <[email protected]> Co-authored-by: Saad Abdullah <[email protected]> Co-authored-by: Skyfuller <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> Co-authored-by: David Mann <[email protected]> Co-authored-by: nrq6993-a11y <[email protected]> Co-authored-by: FinnNk <[email protected]> Co-authored-by: Michael Higgins <[email protected]> Co-authored-by: optimalbytee <[email protected]> Co-authored-by: optimalbytee <[email protected]> Co-authored-by: Zer0C00L01 <[email protected]> Co-authored-by: Sir Clangington III. <[email protected]> Co-authored-by: LabDennis <[email protected]> Co-authored-by: Sidney Markowitz <[email protected]> Co-authored-by: Marco Arnulfo <[email protected]> Co-authored-by: Daktyl <[email protected]> Co-authored-by: Juan Antonio Redondo <[email protected]> Co-authored-by: Sabbir Ahmed <[email protected]> Co-authored-by: Jason Xiang <[email protected]> Co-authored-by: agent-346022 <[email protected]> Co-authored-by: agent-346022 <[email protected]> Co-authored-by: Ahmed0_0Mamdouh <[email protected]> Co-authored-by: Ikki Nishihara <[email protected]> Co-authored-by: haranishi <[email protected]> Co-authored-by: wwew <[email protected]> Co-authored-by: FredApps <[email protected]> Co-authored-by: FredApps <[email protected]> Co-authored-by: Bihacsy László <[email protected]> Co-authored-by: Stevan Marjanović <[email protected]> Co-authored-by: Stevan Marjanović <[email protected]> Co-authored-by: midasmatterhorn <[email protected]> Co-authored-by: safvanedge <[email protected]> Co-authored-by: safvanedge <[email protected]> Co-authored-by: Stevan Marjanović <[email protected]> Co-authored-by: envy-ai <[email protected]> Co-authored-by: WendelVolm <[email protected]> Co-authored-by: baz <[email protected]> Co-authored-by: Khawar Zamman Wani <[email protected]> |
||
|
|
c63c91a206 |
Keyboard shortcut sets: Set menu, New Set, Save, Delete, .kys Export and Summarize (K2)
Edit › Keyboard Shortcuts gets Photoshop's set management. A set is a saved copy of the bindings (Preferences.shortcutSets, the one in use in shortcutSet; "" is PhotoCraft Defaults), and the Set menu shows "(modified)" when the bindings differ from it. New Set…, Save and Delete wait for OK like the rest of the dialog. Export… writes the dialog's bindings as a .kys file (commands then tools, Photoshop's macOS key spelling), each row carrying our id as pc-id so PhotoCraft imports its own sets back exactly, whatever the label; Summarize… writes Photoshop's HTML list of every bound command by menu. edit.keyboardShortcuts takes useSet (before the call's edits), saveSet, deleteSet, sets and activeSet (after them), exportKys and summarize; every reply reports the sets, the set in use and whether it is modified. Bad names, keys or counts are errors that change nothing. |
||
|
|
cd046f4a70 |
Arrow-key nudges: a run of nudges is one History state, with Tools preferences (#2259) (#2764)
* Arrow-key nudges: a run of nudges is one History state, with Tools preferences (#2259) Tapping or holding an arrow key nudged the selected layers one pixel per History state, so one Undo took back one pixel. Nudges of the same thing that follow each other now share one `coalesce` key (the engine already folds edits with the same key into one step), so a run is one state and one Undo takes it back. - nudge_bundle.rs decides which run a nudge belongs to: the previous nudge was of the same thing (layers, selection outline), came within the pause, and left the document as it is now (no other edit, Undo/Redo, layer selection or save in between). - move_mods.rs runs layer.translate and select.transformSelection through it; Alt-nudges (a copy each) never join a run. Selected pixels float until dropped, which is one state already. - Free Transform keeps its own session history; its box nudges fold into one session step (transform_tool.rs). - Tools preferences: Bundle Arrow-Key Nudges (default on; off gives a state per press as before) and Nudge Bundle Pause (ms) (default 1000, 100..10000, hidden while bundling is off). Labels translated in all catalogues. The two #1428 tests that asserted a state per press for the selection outline now cover both settings. * Regenerate docs/scorecard.md after merging main --------- Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
4cc0518169 |
Menu bar from the keyboard: Alt / F10 focus, Alt+letter, underlined mnemonics (#4988) (#5091)
As Photoshop's menus on Windows: a tap on Alt (or F10) puts the keyboard on the in-window menu bar, with File lit; ← and → move along it, ↓, ↩ and Space open the lit menu with its first row lit, Esc or a click leave. Alt+letter opens the menu with that mnemonic, open or not, and in an open menu a letter runs the row with that mnemonic or opens its submenu. Mnemonics are assigned per menu level from the labels as shown (so translated), unique within the level: Photoshop's F E I L Y S T V W H for the top menus where the label has the letter, else the first unused letter, word starts first; only ASCII letters and digits, since those are the keys the keyboard reports. They are underlined while Alt is held, the bar is focused or the menu was opened from the keyboard; a menu opened with the mouse shows none until Alt, as on Windows. The underline is a layout job with the placeholder colour, so disabled rows stay dim; without underlines the text path is unchanged. The shortcuts defer to the focused bar as they do to an open menu, so E opens Edit instead of picking the Eraser and the arrows don't nudge the layer. Rows carry their mnemonic in the navigation state. macOS keeps the native menu bar, where this doesn't run. Tests: two unit tests (assignment, key letters) and seven harness tests (Alt focus and arrows, second Alt / Esc / click, Alt+letter and Enter, letters in an open menu, underline conditions, the layout job, and the whole app's shortcut deferral). Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
5cb5ab52fc |
Crop tool: Content-Aware fill of the area a rotated or extended crop uncovers (#3823) (#3827)
* Crop tool: Content-Aware fill of the area a rotated or extended crop uncovers (#3823) image.crop gains contentAware (bool, default false). After a turned crop or one that extends past the canvas, the area the original image doesn't cover is filled from its surroundings on the Background (else the active pixel layer), in the crop's one undo step. Each connected piece (corner, edge strip) gets its own Content-Aware sampling window and samples only covered pixels; the patch search is Edit > Fill > Content-Aware's (fill_cmds::content_aware_native, shared). A crop that uncovers nothing is unchanged; one with nothing to sample from fails and rolls back. Crop options bar: Fill: Background (Default) / Content-Aware Fill (ToolOptions crop_content_aware, ui.set cropFill). Generative Expand is not offered. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Crop: adapt to Document::background after main removed is_background Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Crop: translate Background (Default) for Hungarian and Turkish Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fix the merge with main: UI_SET_FIELDS length, Serbian Background (Default) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Merge main: UI_SET_FIELDS counts both new fields --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
28e58d20d9 |
fix(ui): snap distorted corners to visible guides (#3928)
Co-authored-by: zenjabba <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
7833a6cad4 |
Layers panel: filter-type dropdown with Kind, Name and Mode (#5048) (#5268)
The filter row's "Kind" was painted text. It is now a dropdown, as in
Photoshop: Kind keeps the five layer-kind toggles, Name lists layers whose
name contains the typed text (ignoring case), and Mode lists layers with
one blend mode (Pass Through included), filtering by Normal at first.
The criteria live in UiState (layer_filter_by, layer_filter_name,
layer_filter_mode; serde defaults, so saved settings still load) and are
drivable with ui.set {layerFilter: {by, kinds, name, mode}}, validated
before anything changes. ui-parity.md gets a partial row: Effect,
Attribute, Color, Smart Object, Selected and Artboard are still missing.
Co-authored-by: Brandon Thomas <[email protected]>
|
||
|
|
0eb008ce5d |
Actions: record layer selections by name and display the target (#2441)
* Record action layer selections by name and show their targets * Use document pixel format in grouped-layer regression * Document the named layer action UI with a synthetic capture |
||
|
|
7b08b56531 |
feat(engine): layer.list, a read-only listing of the layer tree (#5059) (#5148)
The layers were only in document.inspect, together with history, channels and much more, so agents looked for a layer.* command that didn't exist. layer.list returns the layers top-down with id, name, kind, visibility, bounds, selected and active; groups list their children, or with "flat": true every layer is one row with its depth and parent group. It takes the same optional "document" index as document.inspect, is not journaled and bad params are errors. |
||
|
|
56c5b355a4 |
feat(commands): find the Elliptical Marquee by 'ellipse' or 'marquee' (#5140)
* feat(commands): find the Elliptical Marquee by 'ellipse' or 'marquee' (#5060) The Elliptical and Single Row/Column Marquee are options of select.rect ("ellipse":true, "line"), but the command-list filters only looked at the id and the label ("Rectangular Selection"), so 'ellipse' and 'marquee' found nothing. Commands can now carry search keywords. command.list / engine.commands rows include them as "keywords", and the three filters (CLI commands --filter, the engine.commands RPC and the MCP command_list) share one matcher over id, label and keywords. select.rect gets the Photoshop marquee names as keywords. * Command list replies: document the optional keywords key The reply-shape test from #3684 pins the exact keys of each row; select.rect now also carries keywords, so the test and docs/control-protocol.md allow that one optional string. |
||
|
|
55ae9bc11b |
Docs: document the engine.commands reply shape (#3684) (#3750)
* Docs: document the engine.commands reply shape (#3684) engine.commands, the engine command command.list and the MCP tool command_list reply with a bare JSON array of command objects, which the docs never said. Document the shape (keys, types, an example element, how filter/enabled_only narrow it) in control-protocol.md and mcp.md, state it in the MCP tool description, and pin it with an rpc test so the docs cannot drift. The shape itself is unchanged, so existing agents and scripts keep working. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Command list docs/test: include main's disabledReason and needsDocument keys Main added `disabledReason` and `needsDocument` to every command list row (#3664), so the documented shape and the pinning test now list all eight keys. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> |
||
|
|
ef2905ea8e |
Control: list and answer the unsaved-changes prompt (#4920) (#4924)
When a document with unsaved changes was closed, reverted, or the app was
asked to quit, the Save / Don't Save / Cancel prompt showed in the window
but not in ui.inspect, and a control client had no way to answer it: the
app stayed open until someone clicked.
ui.inspect now lists the prompt among its dialogs with the id "discard":
the waiting command, the document it asks about, how many are left and
the choices. ui.dialog.confirm {"dialog": "discard", "choice":
"save"|"dontSave"|"cancel"} answers it through the same code as the
buttons (one document at a time when quitting), and ui.dialog.cancel
cancels it. The automation policy sees the parked command before a save
or don't-save answer runs it.
Fixes #4920
Co-authored-by: Claude Opus 5.5 <[email protected]>
|
||
|
|
ee8aca562b |
Engine: reject unknown params for layer.hideLayers/showLayers via an opt-in registry check (#4336) (#4364)
Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
465a663540 |
feat(ui): developer tile grid overlay (ui.set tileGrid) (#4217)
Draw the active layer's storage tiles over the canvas: a faint
TILE_SIZE grid over the document, every stored tile filled and
labelled tx,ty, tiles with identical pixels in one colour per group
and unique tiles in blue. It shows how sparse a layer is, which tiles
copy-on-write shares, and which ones .pcraft saves once.
It has no menu item and isn't a View > Show item. The control channel
and MCP turn it on with ui.set {"tileGrid": true}; ui.inspect reports
it as view.tile_grid, and View > Extras doesn't hide it.
Grouping hashes each distinct tile allocation once, in parallel (or
serially while jobs hold the pool, #1554), cached per document
revision and active layer. A 36 MP layer of all-different tiles groups
in 3.9 ms (8-bit) and 7.5 ms (16-bit) on 24 cores in release; the
ignored tile_grouping_36mp test reproduces this.
Also documents tileGrid in docs/control-protocol.md and
docs/development.md, and adds my contributors/people.toml entry.
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Brandon Thomas <[email protected]>
|
||
|
|
8145bea70f |
Control: a transport that gives up knows whether the command was dispatched (#3662) (#4256)
* Control: a timeout says whether the command ran (#3662) A request still queued when its deadline passes is dropped before dispatch, but it answered with the same text as the transport giving up on a command that may still apply. The two now read differently: "timeout: not run ... safe to re-send" and "timeout: no reply in 60s ... may still apply", both keeping the `timeout` prefix machines match on. * Control: a transport that gives up knows whether the command was dispatched (#3662) The transport and the UI thread share the reply deadline, and the transport's wait runs out first, so the UI thread's "not run" reply almost never reached a client. A request now carries a dispatch flag settled once between them: the UI thread claims it before running, the transport abandons it when it stops waiting. The transport then replies "not run" for a request that will never run, and "may still apply" only for one that was dispatched; a request given up on is never run. |
||
|
|
e627b01169 |
feat: resize Save for Web previews and custom palette editing for Gif export (#4129)
* feat: resize Save for Web previews and added palette editing for Gif/PNG8 * Save for Web: add Turkish and Hungarian rows for the preview navigation hint Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
90c42f5555 |
Map Place, Open, Image Size in percent, the Paint Bucket and Insert Conditional (#219) (#4470)
- image.imageSize takes percent (both sides; an explicit side wins).
- actions.conditional {if, then, else}: Photoshop's Insert Conditional as a step, 33 conditions
on the document (shape, mode, depth, selection, layers, alpha channels, unsaved) and the
active layer (kind, locks, visibility, masks, effects); a failing branch stops the caller.
- .atn events: placeEvent → file.placeEmbedded/placeLinked (path, scale), open → file.openAs,
imageSize in percent, fill from a point → paint.bucket (pixels), conditional. 105 → 108.
- Panel labels conditional steps as 'If cond → then / else'.
|
||
|
|
9862dfbb09 |
Actions panel: set folders, dialog toggle, Insert Stop (#219) (#4456)
* Actions panel: set folders, dialog toggle column, Insert Stop (#219) - Engine actions_edit_cmds: actions.insert (any command at a position; Insert Stop… uses it with actions.stopMessage), actions.dialog (the per-step dialog flag), actions.assignSet. Flag sets follow inserted steps; nothing edits during playback. - Panel: loose actions first, then each set as a collapsible folder row with its count (ui.actions.collapsedSets); dropping an action among another set's rows moves it there; Save Set… on a folder's context menu; a dialog toggle column next to the check marks; Insert Stop… in the panel menu with a small message/Allow Continue dialog. - Shell playback pauses on a dialog-toggled filter or adjustment step: the command's dialog opens seeded with the recorded values; OK runs the dialog's values and resumes from the next step, Cancel stops. Agents play headlessly. The play result reports paused: {step, id, dialog}. - Docs: control protocol, scorecard AUTO-219-2 done, gaps G11. * Translate the Actions panel's set, dialog-toggle and Insert Stop strings * Resume a paused action only after the dialog's background job lands A filter confirmed from a dialog runs as a background job in the desktop app; the resumed steps met a locked document and failed. Wait for the job first (test covers background jobs). |
||
|
|
bbe77354e0 |
Camera Raw on raw opens: Clarity, Texture and Dehaze in linear light, measured (#3815)
* Camera Raw: Whites, Blacks, Shadows and Highlights closer to Photoshop's Measured as a black box on Photoshop 25.4's Camera Raw Filter. Whites and Blacks are global curves of the grey level: the measured rows per slider value, Whites first, after Shadows and Highlights. The clipping directions adapt to the image's black and white points (Whites up to 2.7 times stronger on a dark image, Blacks at least 1.2). On ten public-domain photos the mean error against Photoshop drops from 4.2-36.8 to 0.9-8.9 levels of 255. Shadows and Highlights are a local Laplacian filter (Paris et al. 2011, fast form of Aubry et al. 2014) on the log luminance, the method Adobe credits for process version 2012. Shadows raises pixels darker than their surroundings by an amount set by their own and their surroundings' tone, so big edges keep no halo, and keeps the 99th percentile; Highlights pulls pixels brighter than their surroundings toward them and keeps the 1st. The strengths are fitted to the photos (mean error 2.8-9.4 levels, was 3.7-14.3); Photoshop's exact operator was not recovered. The tone stages decode light with the document's curve: filter.cameraRaw stores encodingGamma (1.8 for ProPhoto, where raws open). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Camera Raw Shadows/Highlights: no contour lines on smooth gradients Twelve reference values over a raw's whole range left more than a stop between them, and the remapping changes within half a stop: coefficients interpolated across that gap drew contour lines in out-of-focus areas (Shadows +100 on a Nikon D4 raw). References are now an eighth of a stop apart over the image's tones (the deepest 0.1 % share the lowest), on a copy at most 1600 px across whose change comes back to full size by a guided upsampling, so a 16-megapixel image takes about 2 s per slider and the preview matches the result. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Camera Raw on raw opens: Shadows/Highlights in linear light, D4 look and black point as Photoshop Measured black-box on 29 Nikon D4 NEFs opened through Camera Raw in Photoshop 25.4 (sliders at +-100 and +50, exposure +-1) against our own linear development of the same files. - Shadows and Highlights of the open-time dialog now act while developing, in linear light before the tone curve, as Camera Raw does for raw files (exposure -1 gives the same gains). The log2 gain is slider/100 * C(B - anchor): B is a guided-filter base of the log2 luminance on a copy 1232 px on its long side, the anchor is image-adaptive (Shadows: log2 power mean p=1.5 of the linear luminance; Highlights: mean log2 luminance). New module photocraft_raw::tone; the preview undoes the camera curve to show the same (photocraft_raw::retone). - The D4 profile copies Camera Raw's default rendering: look matrix folded into the ForwardMatrix, per-channel curve, and an adaptive black point (0.33 x the 0.1th percentile of the luminance, Sensor::black_point). Against Photoshop on the 29 frames (1/4 size, log2 Y): default rendering median difference 0.29 -> 0.04 stop; correlation of the slider's effect Shadows +100 0.96, -100 0.91, Highlights -100 0.87, +100 0.85 (the previous filter model: 0.68 and 0.55 on DSG_3464). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs: the open-time Camera Raw re-develop covers Shadows and Highlights Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Camera Raw raw-stage Shadows: keep shadow contrast as Photoshop does The user saw Photoshop's shadows sink deeper with more contrast. Measured on the 29 D4 NEFs: with Shadows +100 our shadow detail had 0.79 of Photoshop's local contrast and shadows sat 0.38 stop lighter. Two causes: - The black point now comes before the Shadows / Highlights gain, as in Camera Raw (lifting first let the lift wash out the black point's deep-shadow contrast). - The guided upsampling's epsilon goes from 0.01 to 1 stop^2: the change follows strong edges but stays smooth inside texture (with 0.01 it followed every detail and flattened it). Near strong edges the effect still matches Photoshop as well as elsewhere. Shadows +100: shadow detail 0.79 -> 0.91, shadow bias +0.38 -> +0.16 stop; effect correlation Shadows -100 0.906 -> 0.946, Highlights -100 0.870 -> 0.886, others unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Camera Raw on raw opens: Clarity, Texture and Dehaze in linear light, as Photoshop Measured black-box from Photoshop 25.4 opening 29 Nikon D4 NEFs through Camera Raw (descriptor keys Cl12, CrTx, Dhze; each at ±100 and +50, and +100 at exposure −1, 348 opens). All three act before the tone curve: the change at exposure −1 equals the one at 0 (correlation 0.98–0.99). - Clarity: log2 luminance split into bands between guided-filter bases (radii 2, 8, 32, 128 on the 1232 px work copy), each band scaled by a measured gain that follows its base's tone, plus a tone term; carried to full size with the Shadows / Highlights change. - Texture: Gaussian bands σ 0.5…16 on a half-size copy, each through its measured response (small detail raised more than strong edges, flat areas unchanged), guided-upsampled. - Dehaze: He, Sun and Tang's dark channel prior on linear ProPhoto (dark channel in Display P3, airlight from the brightest 0.1 % of it, guided-smoothed transmission), w 0.8 at +100; −100 a uniform veil. The black point stays the default rendering's. Against Photoshop, PhotoCraft's develop vs Photoshop's open on all 29 frames (median effect correlation, log2 luminance at 1/4 size, Texture at 1/2): Clarity +100 0.81, −100 0.85; Texture +100 0.85, −100 0.88; Dehaze +100 0.61 (0.78 in gamma 2.2: the crushed shadows differ), −100 0.96. Shadows / Highlights unchanged (0.964 / 0.886). The open-time Camera Raw dialog re-develops for them and its preview shows them (retone). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
3dd5fc1cdc |
automation: say why a command is disabled in engine.commands (#3740)
engine.commands, command.list and the MCP command_list tool now give each row a disabledReason (null when enabled, else the failed precondition) and needsDocument (true when the command is off because no document is open), so an agent can tell "open a document first" from "not runnable". enabled keeps its meaning. Both listings share one row builder in the engine. Fixes #3664 Co-authored-by: Fabio Lussi <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
89312de597 |
Answer a repeat auth with "already authenticated" (#3723)
A second `auth` frame on an authenticated TCP connection fell through to the method dispatcher and came back as an unknown method, in both the headless serve server and the desktop control server. A shared `security::repeat_auth_reply` now answers it with `already authenticated` (keeping the request id) and the connection keeps serving. Fixes #3668 Co-authored-by: Fabio Lussi <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
973e7776ea |
History panel: snapshots (camera button, snapshot rows) (#3545)
Part of #2966. The History panel's camera button takes a named snapshot of the document ("Snapshot N", not a history state). Snapshots are listed under the opening state with a thumbnail and scroll with the states; clicking one returns the document to it as one new, undoable state named after it. A double-click or right-click › Rename… renames it in place, and right-click › Delete removes it. Snapshots live for the session only, as in Photoshop. For agents: history.newSnapshot {name?, from?: fullDocument | mergedLayers | currentLayer}, history.selectSnapshot, renameSnapshot and deleteSnapshot, addressed by ids that are never reused, and doc.inspect reports snapshots. |
||
|
|
b14037083d |
Brush and Pencil: hold ~ to erase, and Clear mode (#3439) (#3465)
* Brush and Pencil: hold ~ to erase Fixes #3439. Holding ~ (the backtick key) with the Brush or Pencil makes the strokes started while it is held erase, with that tool's own brush, as in Photoshop; releasing it paints again and the tool never changes. The key is a Tools › Temporary binding (tools.temporary.erase), so it can be rebound or removed in Keyboard Shortcuts. * Brush and Pencil: Clear painting mode, used by ~ Photoshop's Clear joins the Brush's and Pencil's Mode menus, after Dissolve: chosen there, every stroke erases with that tool's brush until another mode is picked. Holding ~ now puts the stroke in Clear mode too, and the Mode menu shows Clear while the key is held. History names the tool rather than the Eraser. Agents get it as "mode": "clear" on paint.stroke and paint.pencil. * Keep the Smoothing doc comment on smoothing_field Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
538c5020b2 |
New Document: a real Recent category of recently created documents (#3131) (#3135)
File › New › Recent was a hard-coded pair of presets plus Clipboard. Each document created with the dialog now records its settings (size, resolution, mode, depth, background, display units) through the new document.recent.add command: newest first, equal entries collapsed, at most 20, persisted with the presets (a damaged entry is dropped on load, the rest kept). The Recent tab lists Clipboard, those documents, then the defaults they don't cover; a click restores every setting, a double-click creates, and the grid scrolls past three rows. document.recent.list exposes the list to agents; creation stays in file.new. Closes scorecard row UI-217-12. Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
9a9d23d258 |
Levels: black, gray and white point eyedroppers (#3116) (#3128)
* Curves: pencil mode, Smooth and Edit points (#3088) The Curves editor (Image > Adjustments dialog and the adjustment layer's Properties panel) gains Photoshop's "Edit points to modify the curve" and "Draw to modify the curve" buttons plus Smooth, with tooltips. A drawn curve is a 256-level map per channel, evaluated piecewise-linearly. - doc: Adjustment::Curves gains `pencil` (serde default), with curve_map / curve_map_outputs helpers. - compose: curve_map_lut / curve_lut_mode for drawn curves. - engine: curves params take `pencil` and `smooth`; channels accept 256-level maps; switching modes draws the spline into maps or fits up to 16 points to the drawing. Eyedroppers fit points first. - io: the PSD `curv` map flag (first byte, psd-tools `is_map`) was read as padding, so pencil curves from Photoshop were misparsed; they are now read and written as 256-byte maps, and smart-filter Curves use `Mpng`. - scorecard UI-217-15 note updated. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Properties: Curves adjustment layers get the black/gray/white eyedroppers (#3110) The Set Black/Neutral Gray/White Point pickers existed only in the Image > Adjustments > Curves dialog (#873). The Properties editor of a Curves adjustment layer now has them too (layer_picker.rs): with one armed, a click on the image runs one layer.setAdjustment with the new `eyedropper` param, which samples the image below the layer (the layer hidden, like its Properties histogram) at the Eyedropper's Sample Size, so a repeated click keeps the curve and the edit is one undoable, recordable step agents can send directly. Esc, another tool or another layer disarms it; ui.pointer and ui.inspect (`layerPicker`) cover it. Scorecard UI-217-15 is done. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Levels: black, gray and white point eyedroppers (#3116) Image > Adjustments > Levels and a Levels adjustment layer's Properties panel get Photoshop's Set Black/Neutral Gray/White Point eyedroppers. Black/white move each channel's input black/white to the sample, gray sets each channel's midtone gamma so the sample turns neutral at its luma (Grayscale: composite input, no gray). The engine takes the same `eyedropper` param as Curves on image.adjustments.levels, layer.newAdjustmentLayer.levels and layer.setAdjustment. On a smart object, image.adjustments.levels/curves with `eyedropper` now record the resolved adjustment as the smart filter instead of the raw sample, which re-rendered as an identity (#3127). Co-Authored-By: Claude Opus 5.5 <[email protected]> * Merge upstream/main: Curves in new compose/gpu HDR tests gets the pencil field (#3088) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
ee9c9ef159 |
Properties: Curves adjustment layers get the black/gray/white eyedroppers (#3110) (#3115)
* Curves: pencil mode, Smooth and Edit points (#3088) The Curves editor (Image > Adjustments dialog and the adjustment layer's Properties panel) gains Photoshop's "Edit points to modify the curve" and "Draw to modify the curve" buttons plus Smooth, with tooltips. A drawn curve is a 256-level map per channel, evaluated piecewise-linearly. - doc: Adjustment::Curves gains `pencil` (serde default), with curve_map / curve_map_outputs helpers. - compose: curve_map_lut / curve_lut_mode for drawn curves. - engine: curves params take `pencil` and `smooth`; channels accept 256-level maps; switching modes draws the spline into maps or fits up to 16 points to the drawing. Eyedroppers fit points first. - io: the PSD `curv` map flag (first byte, psd-tools `is_map`) was read as padding, so pencil curves from Photoshop were misparsed; they are now read and written as 256-byte maps, and smart-filter Curves use `Mpng`. - scorecard UI-217-15 note updated. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Properties: Curves adjustment layers get the black/gray/white eyedroppers (#3110) The Set Black/Neutral Gray/White Point pickers existed only in the Image > Adjustments > Curves dialog (#873). The Properties editor of a Curves adjustment layer now has them too (layer_picker.rs): with one armed, a click on the image runs one layer.setAdjustment with the new `eyedropper` param, which samples the image below the layer (the layer hidden, like its Properties histogram) at the Eyedropper's Sample Size, so a repeated click keeps the curve and the edit is one undoable, recordable step agents can send directly. Esc, another tool or another layer disarms it; ui.pointer and ui.inspect (`layerPicker`) cover it. Scorecard UI-217-15 is done. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Merge upstream/main: Curves in new compose/gpu HDR tests gets the pencil field (#3088) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
b0e555c60f |
automation: export layers, data sets and CSVs through the granted roots (#3216) (#3230)
* automation: doc.place reads a file through the read root (#2810) file.placeEmbedded takes an ambient path, so automation refuses it and an agent could not place a file into the open document at all. doc.place resolves the path beneath the read root the way doc.open does and hands the bytes it already read to the public file_cmds::place_bytes, so the existing cap-std rules stay the only path rules: no new scope logic, and the ambient command keeps its refusal. Trusted-local callers still run the command. * automation: export layers, data sets and CSVs through the roots (#3216) file.export.layersToFiles and file.export.dataSetsAsFiles take an ambient dir, file.import.variableDataSets an ambient path, so all three are refused in automation even for files inside the granted roots, and an agent could not export a single file or a data set at all. Both halves already existed: the engine writes bytes it has just encoded (save_doc is encode + write_file, and the data-set exporter encodes with photocraft_io::export before writing), and the automation side already holds a write capability — AuthorizedWorkspace::export_sequence creates the directory, refuses to overwrite, accepts only single-component names and removes every file it created when a step fails, which is what Render Video uses. So each command body moves behind the same sink callback render_video_with takes: the command keeps writing the bytes it is handed to its dir, the new methods write the very same bytes through the root, and the two implementations cannot drift. --------- Co-authored-by: switch87 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
886372812d |
automation: doc.place reads a file through the read root (#2810) (#3215)
file.placeEmbedded takes an ambient path, so automation refuses it and an agent could not place a file into the open document at all. doc.place resolves the path beneath the read root the way doc.open does and hands the bytes it already read to the public file_cmds::place_bytes, so the existing cap-std rules stay the only path rules: no new scope logic, and the ambient command keeps its refusal. Trusted-local callers still run the command. Co-authored-by: switch87 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
661ba806d1 |
Content-Aware Move: Transform On Drop (#3071) (#3095)
* Content-Aware Move: Transform On Drop (#3071) The Content-Aware Move tool gains Photoshop's Transform On Drop checkbox. With it on, the drop puts a transform box on the moved patch (the Free Transform box's handles, limited to move, scale and rotate); Enter, the check button or a double-click computes the content-aware blend with the transformed patch, Esc or the cancel button drops the whole move. The document is untouched until the commit, so the move stays one History step. Engine: paint.contentAwareMove takes scaleX / scaleY (%, 1..10000, negative flips) and rotate (degrees, clockwise) about the selection's centre before the offset, validated (Err, not a panic, for non-finite, out-of-range or off-canvas placements). The content and the selection's shape are resampled through the inverse map on float samples (any depth); the selection is transformed with the content. A plain move keeps the old, exact code path. UI: cam_transform.rs holds the box (UiState.cam_transform, view state); the option is remembered in ToolOptions and settable with ui.set camTransformOnDrop; ui.inspect reports camTransform. Scorecard TOOL-213-4 stays partial: no live preview of the blended result yet. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Tests: keep Transform On Drop cases in the Content-Aware Move test, not Patch (#3071) paint.patch takes no scaleX/scaleY/rotate, so those cases (which only paint.contentAwareMove rejects) failed patch_fails_gracefully. They are already covered by content_aware_move_fails_gracefully. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
cc772a03c1 |
fix(export): quick-export every selected layer as a separate PNG (#3462)
Enable Layers context-menu Quick Export as PNG for a multi-layer selection. Capture each selected source before showing one destination prompt and write separate numbered PNG siblings with sanitized layer names, without silently replacing existing sibling files. Add actual PNG encoding and cancellation regressions, preserve the captured selection when the dialog is open, and update context-menu enablement tests. Co-authored-by: kotulsky <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
7c2e8c3d95 |
fix(actions): fill the resizable panel with the step list (#3460)
Remove the 320-point list height cap and nested dock scrolling. Reserve space for the footer while filling the available panel height. Add a panel-height regression test and check recording autoscroll against the visible footer instead of a fixed coordinate. Co-authored-by: kotulsky <[email protected]> |
||
|
|
67747dfd02 |
Type: Warp on live type takes the warp styles and stays editable, no prompt (#3004) (#3008)
* Type: ask to rasterize before Warp on live type (#3004) Edit › Transform › Warp (the menu, or the warp toggle of an open transform box) on editable type opened Warp mode, let the user shape the mesh, then failed on commit with "Warp needs rasterized type". It now opens Photoshop's "This type layer must be rasterized before proceeding…" prompt, the one the pixel tools already use. OK applies an open transform box, rasterizes the type (its own history state) and opens Warp on the pixels; Cancel does nothing. The prompt's continuation is a menu command from an allow-list, run with the egui context right after the confirm (control channel, OK button) or on the next frame. Distort and Perspective stay greyed for type (#2701), Puppet Warp and Perspective Warp stay greyed for non-pixel layers, as in Photoshop. Scorecard TYPE-218-9 -> done. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Type: Warp on live type takes the warp styles, no rasterize prompt (#3004) Photoshop 2026 keeps Edit › Transform › Warp enabled on live type and asks nothing: the mesh can't be dragged, only the options bar's warp styles (Warp Text's) apply, and the type stays editable. The earlier version of this change asked to rasterize first; that is gone (and with it the prompt continuation, which nothing else used). Warp mode on a type layer now starts from the layer's own Warp Text style over the unwarped type, ignores mesh drags and splits (Split, Grid and the Custom style are greyed/hidden, the split menu items are greyed), and the commit runs edit.transform.warp, which on type sets the Warp Text: one history step, recordable, the layer stays Text. None takes a warp off. A box scaled or rotated before toggling Warp is applied first. Scorecard TYPE-218-9 note updated: Photoshop doesn't prompt for Warp; Distort and Perspective stay greyed (#2701). Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
b814fd5241 |
Zoom and Hand tools: right-click the canvas for the view menu (#3242) (#3255)
Right-clicking the image with the Zoom or Hand tool opens Zoom In, Zoom Out, Fit on Screen, Fill Screen, 100%, 200% and Print Size. Zoom In/Out step about the right-clicked point (or centre it with Zoom Clicked Point to Center); the other rows run their View menu command. Outside the image the pasteboard menu still wins. The canvas keeps the view a menu row sets instead of writing its frame copy back over it. Agents get the same menu through ui.pointer and ui.context.choose. Co-authored-by: lloyd <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
16bdcbd54e |
Window menu: list the open documents, the active one checked (#2991) (#3147)
Photoshop's Window menu ends with the open documents; PhotoCraft's had no list in either menu bar (#1264 got the tab overflow menu only). Window now ends with a separator and one row per document in tab order, labelled with its name and checked when active; choosing one brings it forward. The ids are window.document.<index>, so the rows also work over ui.menu.invoke. - In-window menu bar: the rows come from menus::menu_items, after Window's last item. Names are shown as they are, never translated. - macOS menu bar: the rows follow Bring All to Front, where a Mac app lists its windows. Opening or closing a document rebuilds only the Window menu: AppKit adds its own items there (window tiling, the window list), so muda can't insert rows by position, and the other menus stay as they are. Switching documents moves the check in place. The menu state hash now includes the documents' names, so a Save As rename shows up. Tested in a Tart guest with three generated files (.psd, .png, .tif) in both menu bars: on main neither lists them; with this change both do, and choosing a row switches the document and moves the check. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> |
||
|
|
30bd8a5598 |
Fix Shape Stroke controls, popup interactions and paint colours (#3019)
Co-authored-by: optimalbytee <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
6601bbc3e7 |
Layers: Pattern Fill dialog for new and edited pattern fill layers (#2908) (#2979)
* Layers: Pattern Fill dialog for new and edited pattern fill layers (#2908) Layer > New Fill Layer > Pattern... created the layer with default settings and no dialog, and double-clicking a Pattern Fill thumbnail only opened Properties, which has no pattern controls, so a pattern fill could not be adjusted after creation. Both now open Photoshop's Pattern Fill dialog: the pattern swatch picker, Snap to Origin, Angle, Scale and Link with Layer, previewed live on the canvas from a document snapshot. OK runs one engine command, so it is one History step; Cancel changes nothing (a new layer is not created). - engine: new `layer.fill.pattern.set` (pattern_fill_cmds) edits a Pattern Fill's pattern, scale, angle, link and phase in one undo step, validating every param; `preview` applies it or `layer.newFillLayer.pattern` to a copy of the document for the dialog. `new_fill_layer`'s edit is shared as `insert_fill_layer` so the preview is exactly what OK commits. - ui: pattern_fill_ui (dialog body, OK, canvas preview), routed from the menu item (no params) and Layer Content Options; explicit params still run the engine directly. Catalog entries for the new strings. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Pattern Fill test: pick the swatch picker's Patterns button (main added a Patterns dock tab) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
60339cf675 |
app.open: open directory .pcraft through the automation read root (#2490) (#2581)
* app.open: open directory .pcraft through the automation read root (#2490) The native on-disk format is a directory, but the automation read path serves regular files only, so agents could not open the files the app itself writes. The format crate's storage seam is now public (ByteSource + load_bytes_source); the workspace opens the .pcraft subdirectory through the held capability and loads through it. app.open tries the directory form for .pcraft paths and falls back to the bytes path for the single-file (zip) form; every other format is unchanged. * app.open .pcraft: review fixes (#2581) read_entry now bounds the read itself (the stat length is only a buffer hint) and both directory sources reject non-regular entries, so a crafted bundle with a FIFO entry can no longer block the open and stream unbounded. The desktop opener runs under the crash guard like its import sibling, the zip fallback is structural (Ok(None) instead of an error-message match), a directory-form document no longer arms a save-back target the file-only automation writer could never replace, and the open status is translated (Opened {name}, 16 locales). * read_entry: saturating max+1 so a usize::MAX budget can't overflow Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
3e3e580217 |
MCP bridge: reconnect before idle sockets die, retry reads, actionable timeouts (#2487) (#2507)
* MCP bridge: reconnect before idle sockets die, retry reads, actionable timeouts (#2487) The app closes idle control connections after 30s (IO_TIMEOUT) while the bridge kept one persistent connection, so the first call after a pause failed with "operation may have completed". The bridge now drops and reconnects before sending once the connection has been idle 25s, so a request is never written to a socket the app may have dropped. The default call timeout drops from 60s to 55s, strictly below the app's 60s reply deadline, so the bridge's own error — naming the method and the likely causes — is the one callers see instead of a race between the app's deadline reply and the caller's own cutoff. Idempotent read methods (ui.inspect and friends) get one automatic retry on a transport failure; edits keep #1007 semantics and are never resent. A timed-out call is never retried (it would only double the wait). * MCP bridge: caller-vouched read retries, per-failure wording, docs contract (#2487 review) The retry decision moves from a hand-maintained method list — most of whose entries were engine command ids that never travel as control-protocol methods, so they could never match — to the call sites that know a call is a read: call never resends (#1007), call_read retries once on a transport failure, and the MCP server opts its pure-read tools in. Failures are worded by what they prove: a connection that could never be established is "the request was not sent", not "may have completed"; a read timeout says a read may be retried safely instead of demanding a state inspection. The 55s client cap, the read-retry exception, and the idle reconnect are now documented in the control protocol and the security book. |
||
|
|
1d425ce8f9 |
Actions: check boxes switch single steps on and off (#2855) (#2866)
Photoshop's Actions panel has a check column: an unchecked step is skipped
by playback, Batch and droplets. PhotoCraft could reorder and delete single
steps but always ran every step.
- Action gains `disabled` (0-based step indices, omitted from actions.json
when empty), kept in step with actions.move and actions.delete.
- New command actions.toggle {action, step?, enabled?}: one step, or every
step like the action's own check; bad indices and types are errors.
- actions.play, the desktop playback path and the steps handed to Batch and
Create Droplet skip unchecked steps; actions.get reports `disabled`.
- Panel: a check box per step, dimmed label when off, "2/3 steps" count.
Part of #219 (AUTO-219-2).
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Brandon Thomas <[email protected]>
|
||
|
|
ac19db1046 |
TGA: targa options asks for 24 or 32 bits/pixel, same as in Photoshop (#2760)
Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
468b8f2792 |
Crop tool: New / Delete Crop Preset saves and removes user presets (#1919) (#2723)
* Crop tool: New / Delete Crop Preset saves and removes user presets (#1919) The Crop options-bar dropdown ends with New Crop Preset... and Delete Crop Preset..., as in Photoshop. A crop preset is a "crop" tool preset (tool.presets.*, persisted with the preferences), so it also shows in the Tool Presets panel. New saves W x H x Resolution (W, H, resolution and unit) or a ratio under a name made from the values; it is greyed out with nothing to save. Delete lists the saved crop presets for a multi-select; built-in size presets stay. The dropdown shows the preset the fields hold. Engine: tool preset names are checked (1-255 chars) and the store capped; saved tool presets load entry by entry so a damaged one is skipped; a multi-name delete is all or nothing. ui.dialog.open gains newCropPreset / deleteCropPreset. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Regenerate the scorecard after rebasing onto main Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
233237e9dc |
Reject bad params in the control channel's synthetic input methods (#2449) (#2656)
ui.pointer, ui.click/ui.move, ui.key and ui.screenshot read every value with as_f64/as_bool/as_str and fell back to a default on any other type, and an unknown button or event kind fell through to a left click or a move. A typo such as "button":"ritgh" ran a different action and still replied ok. Each method now validates its whole request before acting, like ui.set: unknown fields (top-level, under modifiers, or in an event), wrong JSON types, unknown button/kind/tool values (the error lists the accepted ones) and out-of-range pressure, tilt and rotation return an error that names the parameter, and nothing is queued or applied. Null fields still mean omitted, and valid calls behave as before. Co-authored-by: Fabio Lussi <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |
||
|
|
c25630b5fa |
app.save: encode on the save worker, not the UI thread (#2488) (#2517)
* app.save: encode on the save worker, not the UI thread (#2488) The automation save ran export+write inline inside the control drain, freezing the window and every queued control request while a large document encoded — and overrunning the 60s reply deadline. It now uses the same #2017 background path as File > Save when background jobs are on: the encode and the capability-scoped write run on a worker, the document is locked, and the control reply waits on the job (wait: false answers {job, pending} at once). Tests and the web keep the inline path. The save job's result now carries the path alongside the warnings, so waiting callers get the same {path, warnings} reply both ways. * app.save: never fire saveDocument hooks from automation saves; review fixes (#2488) Automation saves complete in the job tick, long after run_waiting lifted its synchronous event suppression, so the background branch fired the user's saveDocument script bindings and Image Assets — the exact hooks docs/control-protocol.md promises never run for automation. SaveJob now carries an automation flag and records through saved_automation, which skips document_saved on every path; the inline fallback records through it too, so both modes behave the same. A regression test installs a saveDocument binding and asserts it fires for an interactive save and not for app.save. The desktop's two save workers collapse into one save_through parameterized by the write step (drift between interactive and automation saves), the Saved status/notices are translated (Saved {name}, 16 locales), the pending reply carries warnings like file.save's, and the success payload is built at one site. |
||
|
|
77f50330c6 | UI.9: refresh shared panel integration against current main | ||
|
|
0c4016a4db |
feat(ui): hold Alt+Space to zoom out, as in Photoshop (#2877)
* feat(ui): Alt turns a held temporary Zoom In into Zoom Out Alt reverses the Zoom tool's direction, but a held Zoom In (Cmd+Space) ignored it: with Zoom Out unbound or rebound, Cmd+Alt+Space zoomed in. held_tool now reports Zoom Out whenever Zoom In is the held binding and Alt is down, unless Alt is part of the Zoom In key itself (a rebound Alt+Z still zooms in). The default keys don't change here. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(ui): hold Alt+Space to zoom out, as in Photoshop Photoshop zooms out with Alt+Space (Option+Space on the Mac), usually pressed as Space first, then Alt, then click. PhotoCraft's Zoom Out (hold) default was Cmd+Alt+Space only, so Space then Alt still panned. Zoom Out (hold) now defaults to Alt+Space. Holding Cmd+Alt+Space matches both Cmd+Space and Alt+Space equally; the previous commit's Alt rule resolves that to Zoom Out, so it keeps zooming out. Saved overrides are kept. Holding Space first also avoids the Mac's Spotlight shortcut and the Alt+Space window menu on many Linux desktops. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(contributors): credit FinnNk by GitHub profile name Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
37cb99eb1f |
Let dock tabs be dragged to reorder within their group (#2272) (#2774)
Dock tabs only sensed clicks, so a drag on a tab fell through to the
strip behind it and moved the whole group; there was no per-group tab
order to change.
DockLayout gains tabOrder (tab names per group, like hidden_tabs, so the
Pro/Studio Color/Swatches swap is safe). It is read leniently: unknown
groups, names and wrong types fall back to the default order instead of
dropping the saved layout. It is drawn through visible_tabs, while
dockTabs and the panel bodies keep using the original indices.
Tabs on the dock strips now sense drags: dragging one along its strip
shows an insertion line and drops it there, a plain click still selects,
and a tab dragged off the strip moves the group as the strip does.
Lock Workspace stops both. The order is part of ui.set {dock}, the
remembered panelLayout and saved workspaces.
Co-authored-by: Fabio Lussi <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
|
||
|
|
308c3369c0 |
Control: timeout errors name the likely causes (#2489) (#2497)
* Control: timeout text derives from the reply deadline (#2489 review) The server deadline and both timeout replies now share one constant: REPLY_DEADLINE drives the serve thread's clock and the text is built from it, so the message can never claim a number the server no longer uses. * Tests: drop the duplicate joined() helper left by #2782 and #2853 both landing Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Brandon Thomas <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
14dfa38581 |
Actions: double-click an action name to rename it (#2032) (#2769)
Photoshop renames an action in place when its name is double-clicked in the
Actions panel. PhotoCraft had no way to rename an action at all, so every
action kept its "Action N" default name.
- New engine command `actions.rename {"action": name|index, "name": str}`.
Empty, whitespace-only and duplicate names are rejected (the old name
stays). Nested `actions.play` steps that call the action by name, and
its function-key binding, follow the rename. Refused during playback.
- Actions panel: double-clicking the name opens an in-place field with the
name selected; Enter, Tab or clicking elsewhere commits through the
command, Esc cancels. Double-clicking elsewhere on the row still plays.
Co-authored-by: Claude Opus 5.5 <[email protected]>
|
||
|
|
99a3970399 | UI.9: preserve PhotoCraft controls in shared UI migration | ||
|
|
225ccc0db1 |
Crop tool: Photoshop's default mode turns the image behind an upright box; Use Classic Mode (P), Auto Center Preview (#1919) (#2545)
* Crop tool: Photoshop's default mode turns the image behind an upright box; Use Classic Mode (P), Auto Center Preview (#1919) The Crop tool's gear menu gets Use Classic Mode (P toggles it while the tool shows a box; off by default, as in Photoshop) and Auto Center Preview (on by default). In the default mode the box stays upright on screen: a drag outside it turns the image about the box's centre (Shift 15 deg steps, angle readout), a drag inside moves the image under the box, the arrow keys nudge the image, Straighten turns the image so the line is level, and with Auto Center Preview a drawn or resized box is re-centred in the canvas. Classic Mode is the previous behaviour. The crop model and the commit are shared: crop_rect + crop_angle and one image.crop {angle}. crop_mode.rs only drives the view: while a frame is edited the view's rotation is -crop_angle, pivoting so the box (or the pressed point) stays put, and the user's view (a Rotate View turn, its centre) is put back on commit, cancel, leaving the tool or switching to Classic Mode. The untouched default frame leaves an R turn alone. The options live in ToolOptions.crop_shield (classic_mode, auto_center_preview; ui.set cropShield). ui.pointer reads a default-mode drag's points in the view at its press, so an up where the last move was is idempotent. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Crop default mode: match Photoshop (view upright on tool pick, live Auto Center, image-turn readout, gear menu order) (#1919) Checked by hand against Photoshop in its default (non-classic) mode: - Picking the Crop tool turns a Rotate View (R) turn upright at once (about the view centre), and the view stays upright after Enter or Esc: the save/restore of the user's view is gone. Classic Mode still leaves the view alone (not checked against Photoshop). - The angle beside the pointer while the image turns is the image's turn, clockwise positive. - Auto Center Preview keeps a box being resized centred live: the handle follows the pointer, the box grows on both sides, and on the image the opposite edge (with Alt the centre) stays put. Computed from the press, so the view following the frame can't feed back into the drag. - Gear menu order as Photoshop's: Use Classic Mode (P), Show Cropped Area (H), Auto Center Preview, no separator; Classic Mode greys out the other two. Show Cropped Area then acts as on and H does nothing (the stored choice is kept). German: Classic-Modus verwenden, Automatische zentrierte Vorschau. - Crop preview past the canvas in a turned view: each band is drawn as its turned quad (the screen bounding box stretched band textures and spread the checkerboard). The white corners in the earlier offscreen snapshot were egui_kittest clamping the repeating checker texture; the real app shows the checkerboard in both modes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs: regenerate scorecard for the crop default-mode row (#1919) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Crop default mode: the canvas keeps the view the Crop tool moves; a move starts from a centred box (#1919) Tried by hand in the app: with Auto Center Preview on, a drag inside the box made the box wander instead of moving the image, and a handle drag didn't keep the box's centre in place (after a Space pan, too). Root cause: canvas_view works on a copy of the view for the frame and writes it back at the end, so every camera change the Crop tool made during the frame (the image moving with the pointer, the live-centred resize, Auto Center on release, the pivot while turning) was undone, while the frame itself moved in the document. Tests driving tool_event never saw it. - canvas_view notes the camera before the frame's input and, before writing its copy back, keeps a centre or rotation a tool changed meanwhile. - With Auto Center Preview a move inside an off-centre box (after a pan) centres the box first, then grabs the image point now under the pointer. - New tests/crop_default_mode.rs drives the full app UI with egui pointer and key events over several frames (offscreen wgpu): the box stays put while the image follows the pointer, and a resize after a Space pan keeps the box's centre fixed while the handle follows the pointer. Both failed before the fix. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Crop default mode: a moved or resized box stays where it is on screen (#1919) Checked in Photoshop: after a Space (Hand) pan the box isn't snapped back to the middle of the canvas. A drag inside moves only the image, the box staying wherever it is; a resize keeps the box's centre where it was at the press (also after a pan), and its release no longer pans the box to the middle. Auto Center Preview still centres a newly drawn box on release and X still re-centres. Classic Mode is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Crop tool: Classic Mode turns a Rotate View turn upright too (#1919) Checked in Photoshop: with Classic Mode on and the view turned with Rotate View (R), picking the Crop tool also turns the view upright, and the crop frame stays on the same image area. So the Crop tool now drives the camera in both modes: default mode keeps it at -crop_angle (the box upright), Classic Mode at 0 with the frame drawn with its own turn. Picking the tool pivots about the view centre; commit and cancel leave the view upright in both modes, and P switching modes never brings the R turn back. Auto Center Preview stays default-mode only. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Regenerate the scorecard; update the crop test's header Co-Authored-By: Claude Opus 5.5 <[email protected]> * Crop: snap a new box's corner inside the untouched default frame in both modes (#2549 with #2545) Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Brandon Thomas <[email protected]> |