Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Type: right-click on committed text opens the type layer menu (#7324) (#7430)

Julienbbfeae98e4a4
diff --git a/crates/ui-egui/src/canvas_menu_tests.rs b/crates/ui-egui/src/canvas_menu_tests.rs
index f1bbbe8d0..839dc1f76 100644
--- a/crates/ui-egui/src/canvas_menu_tests.rs
+++ b/crates/ui-egui/src/canvas_menu_tests.rs
@@ -248,6 +248,22 @@ fn control_channel_opening_uses_the_same_dismissal_guard() {
}
}
+/// #7324: an agent's right-click on committed type opens the type layer menu, as on the canvas.
+#[test]
+fn control_channel_right_click_on_committed_type_opens_the_type_layer_menu() {
+ let mut h = harness(Tool::Type, false, 1.0);
+ h.state_mut().run("type.create", json!({"text": "Hello", "size": 72, "x": 100, "y": 180})).unwrap();
+ h.run_steps(3);
+ let at = fractional_point(&h, 1.0);
+ let before = document_state(&h);
+ control_tap(&mut h, at, Popup::Tool);
+ let menu = h.state().ui.canvas_tool_menu.clone().unwrap();
+ assert!(menu.type_layer && !menu.text);
+ assert!(h.state().ui.text_edit.is_none());
+ // The new type is already the active layer, so the menu selects nothing either.
+ assert!(document_state(&h) == before, "opening the menu changes nothing");
+}
+
#[test]
fn brush_picker_taps_preserve_pixels_selection_and_history_after_reopening() {
for tool in [Tool::Brush, Tool::Eraser, Tool::QuickSelection] {
diff --git a/crates/ui-egui/src/canvas_tool_menu.rs b/crates/ui-egui/src/canvas_tool_menu.rs
index a02859c5c..f7f9892d2 100644
--- a/crates/ui-egui/src/canvas_tool_menu.rs
+++ b/crates/ui-egui/src/canvas_tool_menu.rs
@@ -1,5 +1,6 @@
//! Canvas context menus for the selection tools, the Pen, the Zoom and Hand tools, an active Free
-//! Transform box, text being edited with a Type tool, the pasteboard (outside the image) and a guide.
+//! Transform box, text being edited with a Type tool, committed type under a Type tool, the
+//! pasteboard (outside the image) and a guide.
use egui::Context;
use photocraft_doc::LayerContent;
@@ -31,6 +32,9 @@ pub struct CanvasToolMenu {
/// Opened while a Type tool edits text: the text and type rows instead of the tool's actions.
#[serde(default)]
pub text: bool,
+ /// Opened with a Type tool over committed type (no edit running): the type layer rows.
+ #[serde(default)]
+ pub type_layer: bool,
/// Opened on a guide: the guide menu (`guide_select`) instead of the tool's actions.
#[serde(default)]
pub guide: bool,
@@ -137,6 +141,33 @@ pub const TYPE_EDIT_MENU: &[Row] = &[
Some(("Warp Text…", "type.warpText")),
];
+/// Right-click with a Type tool over type that isn't being edited (#7324): the type edit menu's
+/// layer rows. Its edit rows would act on the document instead of the text, and Faux Bold/Italic
+/// on characters being edited, so they are left out.
+pub const TYPE_LAYER_MENU: &[Row] = &[
+ Some(("Check Spelling…", "edit.checkSpelling")),
+ Some(("Find and Replace Text…", "edit.findAndReplaceText")),
+ None,
+ Some(("Rasterize Type", "type.rasterizeTypeLayer")),
+ Some(("Create Work Path", "type.createWorkPath")),
+ Some(("Convert to Shape", "type.convertToShape")),
+ None,
+ Some(("Horizontal", "type.orientation.horizontal")),
+ Some(("Vertical", "type.orientation.vertical")),
+ None,
+ Some(("None", "type.antiAlias.none")),
+ Some(("Sharp", "type.antiAlias.sharp")),
+ Some(("Crisp", "type.antiAlias.crisp")),
+ Some(("Strong", "type.antiAlias.strong")),
+ Some(("Smooth", "type.antiAlias.smooth")),
+ Some(("Windows LCD", "type.antiAlias.windowsLcd")),
+ Some(("Windows", "type.antiAlias.windows")),
+ None,
+ Some(("Convert to Paragraph Text", "type.convertToParagraphText")),
+ Some(("Convert to Point Text", "type.convertToPointText")),
+ Some(("Warp Text…", "type.warpText")),
+];
+
/// The type edit menu's Faux Bold and Faux Italic rows.
pub const FAUX_BOLD: &str = "type.fauxBold";
pub const FAUX_ITALIC: &str = "type.fauxItalic";
@@ -316,6 +347,8 @@ pub fn rows(menu: &CanvasToolMenu) -> &'static [Row] {
VIEW_MENU
} else if menu.text {
TYPE_EDIT_MENU
+ } else if menu.type_layer {
+ TYPE_LAYER_MENU
} else if path_menu(menu.tool) {
PEN_MENU
} else {
@@ -338,7 +371,7 @@ pub(crate) fn mode_checked(app: &PhotocraftApp, menu: &CanvasToolMenu, command:
if menu.pasteboard {
return pasteboard_choice(command) == Some(app.session.prefs().interface.canvas_color);
}
- if menu.text {
+ if menu.text || menu.type_layer {
return type_checked(app, command);
}
menu.transform
@@ -364,6 +397,32 @@ pub fn editing_text(app: &PhotocraftApp, tool: Tool) -> bool {
tool.is_type() && app.ui.text_edit.is_some()
}
+/// The committed type layer under document point `doc` when a right-click there with a Type tool
+/// opens the type layer menu (#7324). The Type Mask tools are left out: to them existing type is
+/// just pixels.
+pub fn type_layer_at(app: &mut PhotocraftApp, tool: Tool, doc: [f64; 2]) -> Option<photocraft_doc::LayerId> {
+ if !tool.is_type() || tool.is_type_mask() || app.ui.text_edit.is_some() || !doc.iter().all(|v| v.is_finite()) {
+ return None;
+ }
+ crate::type_tool::hit_layer(app, doc[0], doc[1])
+}
+
+/// Make the right-clicked type layer `id` the active layer, which the structural rows (Rasterize
+/// Type, Convert to Shape…) act on and the checks show. Inside a multiselection the selection stays,
+/// so the formatting rows still act on every selected type layer, as the Type menu's do; outside it
+/// the type replaces the selection, as a click with the Type tool does.
+fn target_type_layer(app: &mut PhotocraftApp, id: photocraft_doc::LayerId) -> bool {
+ let Some(st) = app.session.active() else { return false };
+ let selected = st.selected_layers();
+ if st.active_layer == Some(id) {
+ true
+ } else if selected.contains(&id) {
+ photocraft_engine::layer_multi_cmds::set_selection(&mut app.session, selected, Some(id), Some(id)).is_ok()
+ } else {
+ app.session.select_layer(id).is_ok()
+ }
+}
+
/// The misspelled word of the edited text under document point `doc`, with its suggestions.
fn spelling_at(app: &mut PhotocraftApp, doc: [f64; 2]) -> Option<Spelling> {
let layer = app.ui.text_edit.as_ref()?.layer;
@@ -424,6 +483,7 @@ pub fn open_transform(app: &mut PhotocraftApp, ctx: &Context, pos: [f32; 2]) ->
pasteboard: false,
anchor: None,
text: false,
+ type_layer: false,
guide: false,
spelling: None,
});
@@ -497,6 +557,7 @@ pub fn open_pasteboard(app: &mut PhotocraftApp, ctx: &Context, tool: Tool, pos:
pasteboard: true,
anchor: None,
text: false,
+ type_layer: false,
guide: false,
spelling: None,
});
@@ -525,6 +586,7 @@ pub fn open_guide(app: &mut PhotocraftApp, ctx: &Context, tool: Tool, mods: egui
pasteboard: false,
anchor: None,
text: false,
+ type_layer: false,
guide: true,
spelling: None,
});
@@ -578,6 +640,9 @@ pub fn entry_enabled(app: &PhotocraftApp, menu: &CanvasToolMenu, command: &str)
c => TYPE_EDIT_MENU.iter().flatten().any(|(_, id)| *id == c) && crate::menus::is_enabled(app, c),
};
}
+ if menu.type_layer {
+ return TYPE_LAYER_MENU.iter().flatten().any(|(_, id)| *id == command) && crate::menus::is_enabled(app, command);
+ }
if menu.transform || !path_menu(menu.tool) {
return crate::menus::is_enabled(app, command);
}
@@ -621,10 +686,15 @@ pub fn open(app: &mut PhotocraftApp, ctx: &Context, tool: Tool, pos: [f32; 2]) -
}
/// [`open`] for a right-click at document point `doc`: over a misspelled word of the text being
-/// edited, the menu starts with its spelling suggestions.
+/// edited, the menu starts with its spelling suggestions; over committed type with a Type tool, the
+/// type layer menu.
pub fn open_at(app: &mut PhotocraftApp, ctx: &Context, tool: Tool, pos: [f32; 2], doc: Option<[f64; 2]>) -> bool {
let text = editing_text(app, tool);
- if !(applies(tool) || text) || !pos.iter().all(|v| v.is_finite()) {
+ if !pos.iter().all(|v| v.is_finite()) {
+ return false;
+ }
+ let type_layer = !text && doc.and_then(|d| type_layer_at(app, tool, d)).is_some_and(|id| target_type_layer(app, id));
+ if !(applies(tool) || text || type_layer) {
return false;
}
app.ui.brush_picker = None;
@@ -633,8 +703,20 @@ pub fn open_at(app: &mut PhotocraftApp, ctx: &Context, tool: Tool, pos: [f32; 2]
let has_path = crate::vector_ui::active_path_name(app).is_some() || app.ui.pen.as_ref().is_some_and(|p| p.knots.len() >= 2);
let path_name = crate::vector_ui::active_path_name(app);
let spelling = if text { doc.and_then(|d| spelling_at(app, d)) } else { None };
- app.ui.canvas_tool_menu =
- Some(CanvasToolMenu { pos, tool, has_selection, has_path, path_name, transform: false, pasteboard: false, anchor: None, text, guide: false, spelling });
+ app.ui.canvas_tool_menu = Some(CanvasToolMenu {
+ pos,
+ tool,
+ has_selection,
+ has_path,
+ path_name,
+ transform: false,
+ pasteboard: false,
+ anchor: None,
+ text,
+ type_layer,
+ guide: false,
+ spelling,
+ });
crate::canvas_popup::mark_open(ctx, menu_id());
true
}
@@ -657,6 +739,7 @@ pub fn open_view(app: &mut PhotocraftApp, ctx: &Context, tool: Tool, pos: [f32;
pasteboard: false,
anchor: Some(doc),
text: false,
+ type_layer: false,
guide: false,
spelling: None,
});
@@ -703,7 +786,7 @@ pub fn choose(app: &mut PhotocraftApp, ctx: &Context, command: &str) {
choose_view(app, ctx, &menu, command)
} else if menu.text && is_spelling(&menu, command) {
choose_spelling(app, &menu, command)
- } else if menu.text {
+ } else if menu.text || menu.type_layer {
choose_type(app, ctx, command)
} else if path_menu(menu.tool) && !menu.transform {
choose_pen(app, ctx, &menu, command)
@@ -840,6 +923,7 @@ pub fn show(app: &mut PhotocraftApp, ctx: &Context) {
|| app.ui.tool != menu.tool
|| (menu.transform && app.ui.transform.is_none())
|| (menu.text && app.ui.text_edit.is_none())
+ || (menu.type_layer && app.ui.text_edit.is_some())
{
app.ui.canvas_tool_menu = None;
return;
@@ -1055,6 +1139,91 @@ mod tests {
assert!(app.ui.text_edit.is_none() && text_of(&app, id).is_none(), "the type layer is pixels now");
}
+ /// A committed type layer reading "Hello" over the middle of the canvas, no edit running.
+ fn committed_type(app: &mut PhotocraftApp) -> u64 {
+ app.ui.tool = Tool::Type;
+ let id = app.run("type.create", json!({"text": "Hello", "size": 14, "x": 1, "y": 22})).unwrap()["layer"].as_u64().unwrap();
+ assert!(app.ui.text_edit.is_none());
+ id
+ }
+
+ #[test]
+ fn right_click_on_committed_type_opens_the_type_layer_menu() {
+ use photocraft_doc::text::Orientation;
+ let mut app = app();
+ let id = committed_type(&mut app);
+ assert_eq!(crate::type_tool::hit_layer(&mut app, 16.0, 16.0).map(|l| l.0), Some(id), "the canvas centre is on the type");
+ let mut h = harness(app);
+ let center = h.state().last_canvas_rect.center();
+ right_click(&mut h, center, Modifiers::NONE);
+ let menu = h.state().ui.canvas_tool_menu.clone().expect("right-click on committed type opens a menu (#7324)");
+ assert!(menu.type_layer && !menu.text && !menu.pasteboard);
+ assert_eq!(rows(&menu), TYPE_LAYER_MENU);
+ assert!(h.state().ui.text_edit.is_none(), "the right-click doesn't start an edit");
+ h.run_steps(2);
+ assert!(h.state().ui.canvas_tool_menu.is_some(), "the menu stays open without an edit");
+ // An edit started some other way (here, as an agent's Type › Edit Text would) closes the
+ // menu, which has no text edit rows.
+ crate::menus::invoke(h.state_mut(), &Context::default(), "type.editText", json!({})).unwrap();
+ h.run_steps(2);
+ assert!(h.state().ui.canvas_tool_menu.is_none(), "an edit closes the type layer menu");
+ crate::type_tool::commit(h.state_mut());
+ right_click(&mut h, center, Modifiers::NONE);
+ let menu = h.state().ui.canvas_tool_menu.clone().expect("committed again, the menu opens again");
+ assert!(menu.type_layer && mode_checked(h.state(), &menu, "type.orientation.horizontal"));
+ choose(h.state_mut(), &Context::default(), "type.orientation.vertical");
+ assert_eq!(text_of(h.state(), id).unwrap().orientation, Orientation::Vertical);
+ }
+
+ #[test]
+ fn type_layer_menu_targets_the_type_under_the_pointer() {
+ let mut app = app();
+ let id = committed_type(&mut app);
+ app.run("layer.new.layer", json!({})).unwrap();
+ let ctx = Context::default();
+ let active = |app: &PhotocraftApp| app.session.active().unwrap().active_layer.map(|l| l.0);
+ assert_ne!(active(&app), Some(id));
+ // Away from the type, or with a Type Mask tool, nothing opens and nothing is selected.
+ assert!(!open_at(&mut app, &ctx, Tool::Type, [10.0, 10.0], Some([30.0, 2.0])));
+ assert!(!open_at(&mut app, &ctx, Tool::HorizontalTypeMask, [10.0, 10.0], Some([16.0, 16.0])));
+ assert!(!open_at(&mut app, &ctx, Tool::Type, [10.0, 10.0], Some([f64::NAN, 16.0])));
+ assert_ne!(active(&app), Some(id));
+ // Over the type: its layer becomes the target, and the menu has no text edit rows.
+ assert!(open_at(&mut app, &ctx, Tool::Type, [10.0, 10.0], Some([16.0, 16.0])));
+ assert_eq!(active(&app), Some(id));
+ let menu = app.ui.canvas_tool_menu.clone().unwrap();
+ for edit_row in ["edit.undo", "edit.cut", "edit.copy", "edit.paste", "select.all", FAUX_BOLD, FAUX_ITALIC] {
+ assert!(!available(&app, &menu, edit_row), "{edit_row} belongs to the edit menu only");
+ }
+ assert!(entry_enabled(&app, &menu, "type.convertToParagraphText") && !entry_enabled(&app, &menu, "type.convertToPointText"));
+ choose(&mut app, &ctx, "type.rasterizeTypeLayer");
+ assert!(text_of(&app, id).is_none(), "the type layer is pixels now");
+ assert!(app.ui.text_edit.is_none());
+ }
+
+ /// Two selected type layers: the one right-clicked becomes active, and the selection stays.
+ #[test]
+ fn type_layer_menu_in_a_multiselection_acts_on_the_clicked_type() {
+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());
+ app.run("file.new", json!({"width": 200, "height": 100})).unwrap();
+ app.ui.tool = Tool::Type;
+ let top = app.run("type.create", json!({"text": "Top", "size": 30, "x": 10, "y": 40})).unwrap()["layer"].as_u64().unwrap();
+ let bottom = app.run("type.create", json!({"text": "Low", "size": 30, "x": 10, "y": 90})).unwrap()["layer"].as_u64().unwrap();
+ app.run("layer.select", json!({"layer": bottom})).unwrap();
+ app.run("layer.select", json!({"layer": top, "mode": "add"})).unwrap();
+ let at = [25.0, 80.0];
+ assert_eq!(crate::type_tool::hit_layer(&mut app, at[0], at[1]).map(|l| l.0), Some(bottom));
+ assert_eq!(app.session.active().unwrap().active_layer.map(|l| l.0), Some(top));
+ let ctx = Context::default();
+ assert!(open_at(&mut app, &ctx, Tool::Type, [10.0, 10.0], Some(at)));
+ let st = app.session.active().unwrap();
+ assert_eq!(st.active_layer.map(|l| l.0), Some(bottom), "the clicked type is the target");
+ assert_eq!(st.selected_layers().len(), 2, "the multiselection stays");
+ choose(&mut app, &ctx, "type.rasterizeTypeLayer");
+ assert!(text_of(&app, bottom).is_none(), "the clicked type is rasterized");
+ assert!(text_of(&app, top).is_some(), "not the other selected type");
+ }
+
#[test]
fn type_edit_menu_lists_spelling_suggestions_for_the_word_under_the_pointer() {
let mut app = app();
diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rs
index 8cddc60b2..05540339a 100644
--- a/crates/ui-egui/src/control.rs
+++ b/crates/ui-egui/src/control.rs
@@ -1093,7 +1093,10 @@ fn dispatch(app: &mut PhotocraftApp, ctx: &egui::Context, req: &ControlRequest)
}
continue;
}
- if crate::canvas_tool_menu::applies(app.ui.tool) || crate::canvas_tool_menu::editing_text(app, app.ui.tool) {
+ if crate::canvas_tool_menu::applies(app.ui.tool)
+ || crate::canvas_tool_menu::editing_text(app, app.ui.tool)
+ || crate::canvas_tool_menu::type_layer_at(app, app.ui.tool, [x, y]).is_some()
+ {
if down {
crate::canvas_tool_menu::open_at(app, ctx, app.ui.tool, screen_point(app, x, y), Some([x, y]));
}
diff --git a/crates/ui-egui/src/transform_type_tests.rs b/crates/ui-egui/src/transform_type_tests.rs
index 0ed51de66..457c03c1c 100644
--- a/crates/ui-egui/src/transform_type_tests.rs
+++ b/crates/ui-egui/src/transform_type_tests.rs
@@ -52,6 +52,7 @@ fn type_layers_offer_free_transform_but_not_distort_or_perspective() {
pasteboard: false,
anchor: None,
text: false,
+ type_layer: false,
guide: false,
spelling: None,
};
diff --git a/crates/ui-egui/src/type_tool.rs b/crates/ui-egui/src/type_tool.rs
index 325e5122b..d07b8bb16 100644
--- a/crates/ui-egui/src/type_tool.rs
+++ b/crates/ui-egui/src/type_tool.rs
@@ -54,7 +54,7 @@ fn to_text(aff: &Affine, x: f64, y: f64) -> (f32, f32) {
/// Topmost shown type layer (it and every group around it visible, #4320) whose laid-out text
/// contains the document point.
-fn hit_layer(app: &mut PhotocraftApp, x: f64, y: f64) -> Option<LayerId> {
+pub(crate) fn hit_layer(app: &mut PhotocraftApp, x: f64, y: f64) -> Option<LayerId> {
let doc = app.session.active()?.doc.clone();
let slop = 6.0 / app.point_zoom().max(0.01);
// A Type Mask session's text is a hidden layer; it is still the text being edited.
diff --git a/docs/context-menu-parity.md b/docs/context-menu-parity.md
index 1e8abf9a6..53b6d99bd 100644
--- a/docs/context-menu-parity.md
+++ b/docs/context-menu-parity.md
@@ -1,6 +1,6 @@
# Context-menu parity contract
-> **Last reviewed:** 2026-10-13 · **Last updated:** 2026-10-15 · **Change:** minor (Path Selection canvas menu, #1056) · **Target:** Adobe Photoshop 2026
+> **Last reviewed:** 2026-10-18 · **Last updated:** 2026-10-18 · **Change:** minor (Type tool menu over committed type, #7324) · **Target:** Adobe Photoshop 2026
Status: implementation contract, updated 2026-10-09. Scope: canvas, document tabs, and panels. “Right-click” means a secondary pointer click; macOS Control-click should also open the same menu where the platform sends a context-menu gesture. Photoshop changes a context menu with the active tool, selection, and panel item. Adobe documents that principle but does not publish a complete current menu catalog. **Documented** means an Adobe source explicitly names the gesture or action. **Inferred** means a PhotoCraft design target or an item known from a main menu whose presence in a Photoshop context menu still needs a current-product capture. Do not present inferred rows as exact Photoshop menus. [Adobe: panels and menus](https://helpx.adobe.com/photoshop/using/panels-menus.html), [Adobe: shortcuts and context menus](https://helpx.adobe.com/sa_en/photoshop/using/customizing-keyboard-shortcuts.html).
@@ -27,7 +27,7 @@ The “PhotoCraft at branch point” column records behavior before this PR. Pic
| Ruler, Note, Count | Unit / measurement, note edit/delete, count-group operations **(inferred)** | No tool menu | P2 |
| Brush, Pencil, Eraser, Background Eraser, Spot Healing, Healing, Clone Stamp, History Brush, Blur, Sharpen, Smudge, Dodge, Burn, Sponge | Brush preset, size and hardness where applicable | Picker | P0; [Adobe Brush Settings](https://helpx.adobe.com/photoshop/desktop/apply-painting-techniques/brushes-presets/create-brush-set-painting-options.html). Alt+secondary-drag on Windows and Control+Option-drag on macOS adjust size/hardness ([Adobe cursor shortcuts](https://helpx.adobe.com/in/photoshop/desktop/get-started/settings-and-preferences/change-tool-pointers.html)) |
| Gradient, Paint Bucket | Gradient preset/type/mode or fill source/tolerance **(inferred context placement)** | No tool menu | P1 |
-| Type | In text: cut/copy/paste, spelling suggestions, text formatting; outside text: type-layer action **(inferred context placement)** | While editing text (canvas_tool_menu.rs `TYPE_EDIT_MENU`): Undo, Cut, Copy, Paste, Select All (on the text), Check Spelling…, Find and Replace Text…, Faux Bold/Italic (checked), Rasterize Type, Create Work Path, Convert to Shape, Horizontal/Vertical and the anti-alias modes (checked), Convert to Paragraph/Point Text, Warp Text…; Esc closes only the menu. Over a misspelled word the menu starts with up to 3 spelling suggestions (replace the word) and Add to Dictionary (#4370); Ignore / Ignore All and the non-editing type-layer menu remain open | P1; separate editing and nonediting states; [Adobe type editing](https://helpx.adobe.com/photoshop/desktop/text-typography/get-started-with-text/edit-text.html) |
+| Type | In text: cut/copy/paste, spelling suggestions, text formatting; outside text: type-layer action **(inferred context placement)** | While editing text (canvas_tool_menu.rs `TYPE_EDIT_MENU`): Undo, Cut, Copy, Paste, Select All (on the text), Check Spelling…, Find and Replace Text…, Faux Bold/Italic (checked), Rasterize Type, Create Work Path, Convert to Shape, Horizontal/Vertical and the anti-alias modes (checked), Convert to Paragraph/Point Text, Warp Text…; Esc closes only the menu. Over a misspelled word the menu starts with up to 3 spelling suggestions (replace the word) and Add to Dictionary (#4370). Over committed type (no edit running, `TYPE_LAYER_MENU`, #7324): the same rows without Undo, Cut, Copy, Paste, Select All and Faux Bold/Italic; the clicked type becomes the active layer first (a layer multiselection stays). The Type Mask tools get no menu. Ignore / Ignore All remain open | P1; editing and nonediting states are separate; [Adobe type editing](https://helpx.adobe.com/photoshop/desktop/text-typography/get-started-with-text/edit-text.html) |
| Hand, Zoom | Fit on Screen, 100%, 200%, Print Size; zoom step choices **(inferred context placement)** | View menu (#3242): Zoom In, Zoom Out, Fit on Screen, Fill Screen, 100%, 200%, Print Size. Zoom In/Out step about the right-clicked point (Preferences › Tools › Zoom Clicked Point to Center centres it). Outside the image the pasteboard menu still wins. | P1; view actions stay out of document history; row order still needs a dated Photoshop capture |
| Pen, Path Selection | Path/point actions, Make Selection, Fill/Stroke Path, Free Transform Path **(inferred context placement)** | Pen canvas right-click follows the user-provided 20-row Photoshop capture below. Paths rows offer Make Selection, Fill and Stroke. The Path Selection and Direct Selection tools open the same path menu for the selected path (#1056, 2026-10-15); node- and segment-specific rows remain open. | P1; distinguish node, segment, path, and blank canvas |
| Rectangle, Ellipse Shape, Triangle, Polygon, Line, Custom Shape | Shape/path operations, fill/stroke settings, transform **(inferred context placement)** | No tool menu | P2 |
@@ -100,6 +100,7 @@ Each slice needs pure model tests (including every item dispatching a known comm
| Date | Change | Summary |
|---|---|---|
+| 2026-10-18 | minor | Type tool menu over committed type (#7324) |
| 2026-10-13 | minor | Layer-mask thumbnail menu (#4575) |
| 2026-10-10 | trivial | Status line, revision history |
| 2026-10-09 | minor | Selection canvas reference and tool matrix updates |
diff --git a/docs/control-protocol.md b/docs/control-protocol.md
index 15334ac3a..c62e9046d 100644
--- a/docs/control-protocol.md
+++ b/docs/control-protocol.md
@@ -73,7 +73,7 @@ The transport is `apps/photocraft/src/control_server.rs`, and the handlers are i
- A pixel tool pressed on a type, shape, Smart Object or fill layer (e.g. through `ui.pointer`) opens the "Rasterize?" prompt instead of painting: a dialog with `__rasterize` (`type|shape|smartObject|fill`), `message`, `layer`, `tool` and `at`. `ui.dialog.confirm` runs the `layer.rasterize.*` command and then paints at `at` (two history states, `{"rasterized", "painted"}`); `ui.dialog.cancel` does nothing.
- Edit › Transform › Warp on editable type (`ui.menu.invoke {"id":"edit.transform.warp"}`, or the warp toggle of an open transform box) opens Warp mode with no prompt, as in Photoshop: the mesh can't be dragged or split, only the options bar's warp style, Bend, H and V apply, and the commit sets the layer's Warp Text in one step, so the type stays editable. Directly: `engine.execute {"command":"edit.transform.warp","params":{"style":"flag","bend":40}}` on a type layer. Distort and Perspective stay greyed for type.
- `ui.window.open {document?}` / `ui.window.close {window}`: extra document windows
-- `ui.pointer {events: [{kind: down|move|up, x, y, pressure?, tiltX?, tiltY?, rotation?}], tool?, modifiers?, button?}`: drive the active tool in document coordinates (pressure 0..1, tilt in degrees -90..90, barrel rotation 0..360: a simulated pen). Modifier flags (`shift`, `alt`, `command`, `ctrl`, `space`) go either at the top level or grouped under `modifiers`; when `modifiers` is present, top-level flags are ignored. `space: true` holds Space (the Crop frame, marquee, lasso or shape being drawn then moves instead of growing). With the Crop tool in its default mode (Use Classic Mode off) a drag inside the box moves the image and one outside turns it, the view panning and turning with it; a drag's `move`/`up` points are read as the view showed the document at its `down`, so an `up` where the last `move` was changes nothing more. `command: true` with a painting, retouching, eraser, gradient, eyedropper or other non-selection tool makes the gesture the Move tool's, as holding ⌘ (Ctrl off the Mac) does in the app: a drag moves the active layer (the selected pixels when there is a selection), with `alt: true` as well it duplicates the layer first, and a click picks the layer under the point; the tool is unchanged afterwards. The Hand, Rotate View, Zoom, Crop, Slice, Path Selection, Pen, shape, Type and selection tools keep `command` for themselves. `ctrl: true` with `alt: true` and a brush tool is the on-canvas brush resize instead (in the app, Ctrl+Alt-drag off the Mac). `button: "right"` (or `"secondary"`) is the right button: with the Move tool (or `command: true` with any tool) it opens the canvas layer menu (`layerMenu` in `ui.inspect` lists the layers there, topmost first; select one with `layer.select`); with Marquee, Lasso, Magic Wand, Object Selection, or Pen it opens a tool context menu (`canvasToolMenu` in `ui.inspect`, with ordered command ids, separators, and enabled states); with Zoom or Hand it opens the view menu there (Zoom In and Zoom Out step about the pressed point; `view.fillScreen` is its Fill Screen row); with a painting tool it opens the Brush Preset picker, or erases with Preferences › Tools › Right-click with painting tools = erase. The menus open at the screen position of the pressed document point. Use `ui.context.choose {id}` for enabled tool-context actions. The Pen menu is documented in `docs/context-menu-parity.md`. `button` is `left` (default), `right`, `secondary` or `middle`, and an event's `kind` is `down`, `move` (default) or `up`. With a Color Picker as the top dialog, `down` and `move` sample the image into its new colour instead (its eyedropper, like a click on the canvas) and the tool is not driven. A `down`/`up` at the same point with the Rectangle, Ellipse, Triangle or Polygon tool opens Create Rectangle / Ellipse / Triangle / Polygon (Photoshop's click-to-size dialog); set its `width` and `height` (document pixels), `fromCenter`, `radii` [tl, tr, br, bl] (Rectangle) or `sides` and `starRatio` (percent, Polygon) with `ui.dialog.set`, then `ui.dialog.confirm` runs `shape.create` at the clicked point.
+- `ui.pointer {events: [{kind: down|move|up, x, y, pressure?, tiltX?, tiltY?, rotation?}], tool?, modifiers?, button?}`: drive the active tool in document coordinates (pressure 0..1, tilt in degrees -90..90, barrel rotation 0..360: a simulated pen). Modifier flags (`shift`, `alt`, `command`, `ctrl`, `space`) go either at the top level or grouped under `modifiers`; when `modifiers` is present, top-level flags are ignored. `space: true` holds Space (the Crop frame, marquee, lasso or shape being drawn then moves instead of growing). With the Crop tool in its default mode (Use Classic Mode off) a drag inside the box moves the image and one outside turns it, the view panning and turning with it; a drag's `move`/`up` points are read as the view showed the document at its `down`, so an `up` where the last `move` was changes nothing more. `command: true` with a painting, retouching, eraser, gradient, eyedropper or other non-selection tool makes the gesture the Move tool's, as holding ⌘ (Ctrl off the Mac) does in the app: a drag moves the active layer (the selected pixels when there is a selection), with `alt: true` as well it duplicates the layer first, and a click picks the layer under the point; the tool is unchanged afterwards. The Hand, Rotate View, Zoom, Crop, Slice, Path Selection, Pen, shape, Type and selection tools keep `command` for themselves. `ctrl: true` with `alt: true` and a brush tool is the on-canvas brush resize instead (in the app, Ctrl+Alt-drag off the Mac). `button: "right"` (or `"secondary"`) is the right button: with the Move tool (or `command: true` with any tool) it opens the canvas layer menu (`layerMenu` in `ui.inspect` lists the layers there, topmost first; select one with `layer.select`); with Marquee, Lasso, Magic Wand, Object Selection, or Pen, or with a Type tool on text being edited or on committed type, it opens a tool context menu (`canvasToolMenu` in `ui.inspect`, with ordered command ids, separators, and enabled states); with Zoom or Hand it opens the view menu there (Zoom In and Zoom Out step about the pressed point; `view.fillScreen` is its Fill Screen row); with a painting tool it opens the Brush Preset picker, or erases with Preferences › Tools › Right-click with painting tools = erase. The menus open at the screen position of the pressed document point. Use `ui.context.choose {id}` for enabled tool-context actions. The Pen menu is documented in `docs/context-menu-parity.md`. `button` is `left` (default), `right`, `secondary` or `middle`, and an event's `kind` is `down`, `move` (default) or `up`. With a Color Picker as the top dialog, `down` and `move` sample the image into its new colour instead (its eyedropper, like a click on the canvas) and the tool is not driven. A `down`/`up` at the same point with the Rectangle, Ellipse, Triangle or Polygon tool opens Create Rectangle / Ellipse / Triangle / Polygon (Photoshop's click-to-size dialog); set its `width` and `height` (document pixels), `fromCenter`, `radii` [tl, tr, br, bl] (Rectangle) or `sides` and `starRatio` (percent, Polygon) with `ui.dialog.set`, then `ui.dialog.confirm` runs `shape.create` at the clicked point.
- Magnetic Lasso (`tool: "magneticLasso"`): a `down`/`up` pair is a click. The first sets the first fastening point (its modifiers set the selection mode); later clicks fasten a point, or close the border on the first point. `move` events trace the border with or without a button held, fastening points by themselves; with `alt: true` a click draws a straight segment and a drag a freehand one. `ui.inspect` shows the border in progress under `magnetic` (`path`, `anchors`, `live`, `mode`). `ui.key` Enter closes it along the edges, Backspace removes the last fastening point, Escape cancels. To select along edges in one call instead, use the `select.magneticLasso` command with rough points around the shape.
- Levels or Curves adjustment layer, Properties eyedropper armed (`layerPicker` in `ui.inspect`: `{layer, point, tool}`, set by the panel's Set Black/Neutral Gray/White Point buttons): a `down` sets that point from the image below the layer as one `layer.setAdjustment {"layer", "eyedropper": {"point", "at": [x, y], "size"}}` (send that command directly to skip the UI) and the tool is not driven; Esc, another tool or another layer disarms it.
- `ui.click {x, y, button?, count?}` / `ui.move {x, y}`: synthetic pointer input in screen points (`button`: `left` (default), `right` (or `secondary`) or `middle`). `count` (default 1, `2` for a double-click) is at most 256; a larger one is an error and queues nothing
diff --git a/docs/scorecard.md b/docs/scorecard.md
index 3b36e7c61..a02e8ed21 100644
--- a/docs/scorecard.md
+++ b/docs/scorecard.md
@@ -192,7 +192,7 @@ Unread: `general.color_picker`, `general.animated_zoom`, `general.zoom_resizes_w
| UI-217-5 | Panel groups can float (menu + drag out of the dock) and are restored at launch | missing | [#217](https://github.com/storytold/photocraft/issues/217) | No floating groups in dock.rs/panels.rs |
| UI-217-6 | Document tabs: overflow list, context menu (Close/Others/All/Reveal), drag to reorder | done | [#217](https://github.com/storytold/photocraft/issues/217) | canvas.rs: Close/Others/All menu with unsaved prompt; Reveal reuses file.revealInFinder (engine layer_menu_cmds::reveal); the » chevron (tab_strip) lists overflow; dragging a tab reorders via document.move |
| UI-217-7 | Command palette shows recently run commands on an empty query | done | [#217](https://github.com/storytold/photocraft/issues/217) | palette.rs: note_recent from menus::invoke keeps the last 8 commands (dedup, newest first); an empty query lists them via recent_hits; the_palette_records_and_replays_recent_commands_on_an_empty_query covers record -> empty query -> replay |
-| UI-217-8 | Tool-specific canvas right-click menu; right-click spelling suggestions in text fields | partial | [#217](https://github.com/storytold/photocraft/issues/217) | paint_mouse.rs brush picker and canvas_tool_menu.rs selection actions; text_field_menu.rs gives every text field its right-click Undo/Cut/Copy/Paste/Delete/Select All menu (#2921); other tools missing; the Type tool's edit menu starts with spelling suggestions and Add to Dictionary over a misspelled word (#4370); Ignore / Ignore All, suggestions in the non-editing type menu and in generic text fields are not there yet |
+| UI-217-8 | Tool-specific canvas right-click menu; right-click spelling suggestions in text fields | partial | [#217](https://github.com/storytold/photocraft/issues/217) | paint_mouse.rs brush picker and canvas_tool_menu.rs selection actions; text_field_menu.rs gives every text field its right-click Undo/Cut/Copy/Paste/Delete/Select All menu (#2921); other tools missing; the Type tool's edit menu starts with spelling suggestions and Add to Dictionary over a misspelled word (#4370); over committed type the Type tool opens the type layer menu (#7324); Ignore / Ignore All, suggestions in the non-editing type menu and in generic text fields are not there yet |
| UI-217-9 | UI scale presets 100/115/125/150/200 % through zoom_factor, remembered | done | [#217](https://github.com/storytold/photocraft/issues/217) | prefs::UiScale offers Auto plus 75 to 300 percent (13 presets, more than the five this row lists); prefs_ui.rs display_scale resolves it (Auto follows the system scale, fractional and unscaled 4K included, #1072/#1278) and sync_display_scale applies it with ctx.set_zoom_factor. It is a preference, so it is remembered. The zoom_factor assert in input_tests.rs is about canvas zoom not scaling the interface, not about this setting |
| UI-217-10 | Appearance: animation toggle, canvas pattern toggle per theme, start-screen recents | partial | [#217](https://github.com/storytold/photocraft/issues/217) | interface.enableAnimations (prefs_ui.rs sync_animations, #3273) zeroes egui animation_time and scroll animation in both styles; the Home screen lists recent files (canvas.rs home_recent, #2691); the canvas dot pattern toggle is interface.showCanvasDots (#2264, global rather than per theme); interface.showHomeRecentFiles hides the Home screen recents (#4382) |
| UI-217-11 | Soft dark and soft light themes with picker previews; outlined knobs in light themes | partial | [#217](https://github.com/storytold/photocraft/issues/217) | theme.rs ThemeKind has fourteen themes: the twelve earlier ones plus Soft Dark and Soft Light (low-contrast Studio-layout palettes, text at 4.5:1, selectable in Preferences with the existing theme-card previews, ui.set {theme}, Window > Theme); outlined knobs in the light themes are still missing |
diff --git a/scorecard/ui.toml b/scorecard/ui.toml
index 4ac0ce638..908efc6b3 100644
--- a/scorecard/ui.toml
+++ b/scorecard/ui.toml
@@ -59,7 +59,7 @@ id = "UI-217-8"
target = "Tool-specific canvas right-click menu; right-click spelling suggestions in text fields"
status = "partial"
issue = 217
-note = "paint_mouse.rs brush picker and canvas_tool_menu.rs selection actions; text_field_menu.rs gives every text field its right-click Undo/Cut/Copy/Paste/Delete/Select All menu (#2921); other tools missing; the Type tool's edit menu starts with spelling suggestions and Add to Dictionary over a misspelled word (#4370); Ignore / Ignore All, suggestions in the non-editing type menu and in generic text fields are not there yet"
+note = "paint_mouse.rs brush picker and canvas_tool_menu.rs selection actions; text_field_menu.rs gives every text field its right-click Undo/Cut/Copy/Paste/Delete/Select All menu (#2921); other tools missing; the Type tool's edit menu starts with spelling suggestions and Add to Dictionary over a misspelled word (#4370); over committed type the Type tool opens the type layer menu (#7324); Ignore / Ignore All, suggestions in the non-editing type menu and in generic text fields are not there yet"
[[item]]
id = "UI-217-9"