PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Move tool: highlight the layer Auto-Select would pick on rollover (#2834) (#2843)
Valentin Klein5b778b49f231
diff --git a/crates/engine/src/pick_cmds.rs b/crates/engine/src/pick_cmds.rsindex 9dfaa08e7..9500ba3ae 100644--- a/crates/engine/src/pick_cmds.rs+++ b/crates/engine/src/pick_cmds.rs@@ -81,22 +81,28 @@ fn top_group(doc: &Document, id: LayerId) -> LayerId {path.get(..depth).and_then(|p| doc.layer_at(p)).map_or(id, |l| l.id)}+/// The layer an Auto-Select click at (x, y) picks (with `group`, its outermost group): the topmost+/// hit, a type layer by its text bounds. Like Photoshop, it clicks through a fully locked layer+/// (its own Lock All or a locked group's) to the layer under it (#1641); the right-click list+/// still shows it. The click (`layer.pickAt`) and the Move tool's rollover highlight both ask+/// here, so the outline always names the layer a click takes.+pub fn auto_select_target(doc: &Document, x: i32, y: i32, group: bool) -> Option<LayerId> {+ let hit = layers_hit(doc, x, y, true).into_iter().find(|id| !doc.effective_locks(*id).all)?;+ Some(if group { top_group(doc, hit) } else { hit })+}+fn pick(s: &mut Session, p: &Value) -> Result<Value> {let x = p.get("x").and_then(Value::as_f64).ok_or_else(|| EngineError::BadParams { cmd: "layer.pickAt".into(), msg: "missing `x`".into() })?.floor() as i32;let y = p.get("y").and_then(Value::as_f64).ok_or_else(|| EngineError::BadParams { cmd: "layer.pickAt".into(), msg: "missing `y`".into() })?.floor() as i32;let doc = s.active().ok_or(EngineError::NoDocument)?.doc.clone();- let list = p.get("list").and_then(Value::as_bool).unwrap_or(false);- // The right-click list names the layers with pixels under the pointer; Auto-Select also takes- // a type layer by its text bounds.- let hits = layers_hit(&doc, x, y, !list);- if list {+ // The right-click list names the layers with pixels under the pointer.+ if p.get("list").and_then(Value::as_bool).unwrap_or(false) {+ let hits = layers_hit(&doc, x, y, false);let names: Vec<Value> = hits.iter().filter_map(|id| doc.layer(*id)).map(|l| json!({"layer": l.id.0, "name": l.name})).collect();return Ok(json!({ "layers": names }));}- // Like Photoshop, Auto-Select clicks through a fully locked layer (its own Lock All or a- // locked group's) to the layer under it (#1641). The right-click list above still shows it.- let Some(&hit) = hits.iter().find(|id| !doc.effective_locks(**id).all) else { return Ok(json!({ "layer": null })) };- let target = if p.get("target").and_then(Value::as_str) == Some("group") { top_group(&doc, hit) } else { hit };+ let group = p.get("target").and_then(Value::as_str) == Some("group");+ let Some(target) = auto_select_target(&doc, x, y, group) else { return Ok(json!({ "layer": null })) };if p.get("select").and_then(Value::as_bool).unwrap_or(true) {let mode = p.get("mode").and_then(Value::as_str).unwrap_or("replace");// Like Photoshop, a plain click on one of several selected layers keeps them alldiff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rsindex fab2039e8..ac5f62b16 100644--- a/crates/engine/src/prefs.rs+++ b/crates/engine/src/prefs.rs@@ -311,6 +311,8 @@ pub struct Tools {/// Round snapped vector and transform coordinates to whole pixels.pub snap_vector_tools_and_transforms_to_pixel_grid: bool,pub show_transformation_values: bool,+ /// Move tool with Auto-Select: outline the layer a click would pick under the pointer.+ pub show_highlight_on_rollover: bool,pub overscroll: bool,pub double_click_layer_mask_launches_select_and_mask: bool,/// What the right mouse button does on the canvas with the Brush and other painting tools.@@ -332,6 +334,7 @@ impl Default for Tools {vary_round_brush_hardness_on_hud: true,snap_vector_tools_and_transforms_to_pixel_grid: true,show_transformation_values: true,+ show_highlight_on_rollover: true,overscroll: true,double_click_layer_mask_launches_select_and_mask: true,right_click_with_painting_tools: RightClickPaint::BrushPicker,diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rsindex 8f321faf0..625fb68f6 100644--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@ -3006,6 +3006,7 @@ pub fn canvas_view(app: &mut PhotocraftApp, ui: &mut egui::Ui, idx: usize, rect:crate::zoom_tool::draw(&ctx, &painter);let resizing = crate::brush_resize::draw(app, &painter, &xf);draw_transform_controls(app, &painter, &xf);+ crate::move_hover::draw(app, &painter, &xf, idx, response.hover_pos());crate::layer_pick_ui::show(app, &ctx);crate::canvas_tool_menu::show(app, &ctx);crate::snap_ui::draw(app, &painter, &xf);diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsvindex 335ae2873..ef309cfbb 100644--- a/crates/ui-egui/src/i18n/cs.tsv+++ b/crates/ui-egui/src/i18n/cs.tsv@@ -1924,6 +1924,7 @@Show only crosshair while painting Při malování zobrazit jen nitkový křížShow slice numbers Zobrazit čísla řezůShow tooltips Zobrazit popisky nástrojů+ Show highlight on rollover Zobrazit zvýraznění při přejetíShow bounding box when dragging layer Při přetahování vrstvy zobrazit ohraničovací rámečekSystem title bar Systémové záhlaví oknaShow transformation values Zobrazit hodnoty transformacediff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsvindex 9a2be43ae..a6d27a055 100644--- a/crates/ui-egui/src/i18n/de.tsv+++ b/crates/ui-egui/src/i18n/de.tsv@@ -1895,6 +1895,7 @@Show only crosshair while painting Beim Malen nur Fadenkreuz zeigenShow slice numbers Slice-Nummern anzeigenShow tooltips Tooltips anzeigen+ Show highlight on rollover Hervorhebung bei Rollover anzeigenShow bounding box when dragging layer Begrenzungsrahmen beim Ziehen einer Ebene anzeigenSystem title bar System-TitelleisteShow transformation values Transformationswerte anzeigendiff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsvindex 58df5ad70..1ff892456 100644--- a/crates/ui-egui/src/i18n/el.tsv+++ b/crates/ui-egui/src/i18n/el.tsv@@ -1438,6 +1438,7 @@Show only crosshair while painting Εμφάνιση μόνο σταυρονήματος κατά τη ζωγραφικήShow slice numbers Εμφάνιση αριθμών τομώνShow tooltips Εμφάνιση επεξηγήσεων+ Show highlight on rollover Εμφάνιση επισήμανσης κατά την κατάδειξηShow bounding box when dragging layer Εμφάνιση πλαισίου οριοθέτησης κατά τη μετακίνηση επιπέδουShow transformation values Εμφάνιση τιμών μετασχηματισμούSlice color Χρώμα τομήςdiff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsvindex 4815e5b24..25d173aba 100644--- a/crates/ui-egui/src/i18n/es.tsv+++ b/crates/ui-egui/src/i18n/es.tsv@@ -1907,6 +1907,7 @@Show only crosshair while painting Mostrar solo la retícula al pintarShow slice numbers Mostrar los números de secciónShow tooltips Mostrar las descripciones emergentes+ Show highlight on rollover Mostrar resaltado al pasar el cursorShow bounding box when dragging layer Mostrar el cuadro delimitador al arrastrar la capaSystem title bar Barra de título del sistemaShow transformation values Mostrar los valores de transformacióndiff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsvindex 21f723275..5db463844 100644--- a/crates/ui-egui/src/i18n/fr.tsv+++ b/crates/ui-egui/src/i18n/fr.tsv@@ -1880,6 +1880,7 @@Show only crosshair while painting N'afficher que le réticule pendant la peintureShow slice numbers Afficher les numéros de trancheShow tooltips Afficher les info-bulles+ Show highlight on rollover Afficher la mise en surbrillance au survolShow transformation values Afficher les valeurs de transformationSlice color Couleur des tranchesSmart guide color Couleur des repères intelligentsdiff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsvindex efd0962b3..d969e4e9a 100644--- a/crates/ui-egui/src/i18n/id.tsv+++ b/crates/ui-egui/src/i18n/id.tsv@@ -1874,6 +1874,7 @@Show only crosshair while painting Tampilkan crosshair saja saat melukisShow slice numbers Tampilkan nomor sliceShow tooltips Tampilkan tooltip+ Show highlight on rollover Tampilkan sorotan saat kursor melintasShow transformation values Tampilkan nilai transformasiSlice color Warna sliceSmart guide color Warna smart guidediff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsvindex c7bb027e7..7fbdbe548 100644--- a/crates/ui-egui/src/i18n/it.tsv+++ b/crates/ui-egui/src/i18n/it.tsv@@ -1905,6 +1905,7 @@Show only crosshair while painting Mostra solo mirino durante pitturaShow slice numbers Mostra numeri sezioniShow tooltips Mostra tooltip+ Show highlight on rollover Mostra evidenziazione al passaggio del mouseShow bounding box when dragging layer Mostra riquadro selezione al trascinamento livelloSystem title bar Barra del titolo di sistemaShow transformation values Mostra valori trasformazionediff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsvindex 1a9dd16e1..797049749 100644--- a/crates/ui-egui/src/i18n/ja.tsv+++ b/crates/ui-egui/src/i18n/ja.tsv@@ -1911,6 +1911,7 @@Show only crosshair while painting 描画中は十字線のみ表示Show slice numbers スライス番号を表示Show tooltips ツールチップを表示+ Show highlight on rollover ロールオーバー時にハイライトを表示Show bounding box when dragging layer レイヤーのドラッグ中にバウンディングボックスを表示System title bar システムのタイトルバーShow transformation values 変形値を表示diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsvindex 991fc3328..82c965fad 100644--- a/crates/ui-egui/src/i18n/ko.tsv+++ b/crates/ui-egui/src/i18n/ko.tsv@@ -1872,6 +1872,7 @@Show only crosshair while painting 칠하는 동안 십자선만 표시Show slice numbers 분할 영역 번호 표시Show tooltips 도구 설명 표시+ Show highlight on rollover 롤오버 시 강조 표시Show transformation values 변형 값 표시Slice color 분할 영역 색상Smart guide color 고급 안내선 색상diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsvindex 4836d7e8b..241393018 100644--- a/crates/ui-egui/src/i18n/nl.tsv+++ b/crates/ui-egui/src/i18n/nl.tsv@@ -1886,6 +1886,7 @@Show only crosshair while painting Alleen dradenkruis tonen tijdens schilderenShow slice numbers Segmentnummers tonenShow tooltips Knopinfo tonen+ Show highlight on rollover Markering bij aanwijzen tonenShow bounding box when dragging layer Selectiekader tonen bij slepen van laagSystem title bar Titelbalk van systeemShow transformation values Transformatiewaarden tonendiff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsvindex f33ce9990..2226a6cc2 100644--- a/crates/ui-egui/src/i18n/pl.tsv+++ b/crates/ui-egui/src/i18n/pl.tsv@@ -1903,6 +1903,7 @@Show only crosshair while painting Podczas malowania pokaż tylko celownikShow slice numbers Pokaż numery plasterkówShow tooltips Pokaż podpowiedzi+ Show highlight on rollover Pokaż podświetlenie po najechaniuShow bounding box when dragging layer Pokaż ramkę ograniczającą podczas przeciągania warstwyShow transformation values Pokaż wartości przekształceniaSlice color Kolor plasterkówdiff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsvindex 11b69ca23..0d7205e3b 100644--- a/crates/ui-egui/src/i18n/pt-br.tsv+++ b/crates/ui-egui/src/i18n/pt-br.tsv@@ -1879,6 +1879,7 @@Show only crosshair while painting Mostrar apenas a mira ao pintarShow slice numbers Mostrar números das fatiasShow tooltips Mostrar dicas de ferramentas+ Show highlight on rollover Mostrar realce ao passar o mouseShow transformation values Mostrar valores de transformaçãoSlice color Cor das fatiasSmart guide color Cor das guias inteligentesdiff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsvindex 7163992a1..3392f6120 100644--- a/crates/ui-egui/src/i18n/ru.tsv+++ b/crates/ui-egui/src/i18n/ru.tsv@@ -2324,6 +2324,7 @@Show only crosshair while painting Только перекрестье при рисованииShow slice numbers Показывать номера фрагментовShow tooltips Показывать подсказки+ Show highlight on rollover Показывать подсветку при наведенииShow bounding box when dragging layer Показывать рамку при перетаскивании слояSystem title bar Системная строка заголовкаShow transformation values Показывать значения трансформацииdiff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsvindex 6ca10067a..caffa68e9 100644--- a/crates/ui-egui/src/i18n/uk.tsv+++ b/crates/ui-egui/src/i18n/uk.tsv@@ -2302,6 +2302,7 @@Show only crosshair while painting Показувати лише перехрестя під час малюванняShow slice numbers Показувати номери фрагментівShow tooltips Показувати підказки+ Show highlight on rollover Показувати підсвічування під час наведенняShow bounding box when dragging layer Показувати рамку під час перетягування шаруSystem title bar Системний рядок заголовкаShow transformation values Показувати значення трансформаціїdiff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsvindex a39ab4cfc..0b38441b7 100644--- a/crates/ui-egui/src/i18n/zh-hans.tsv+++ b/crates/ui-egui/src/i18n/zh-hans.tsv@@ -1917,6 +1917,7 @@Show only crosshair while painting 绘画时仅显示十字线Show slice numbers 显示切片编号Show tooltips 显示工具提示+ Show highlight on rollover 鼠标悬停时显示高亮Show bounding box when dragging layer 拖动图层时显示边界框System title bar 系统标题栏Show transformation values 显示变换值diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsvindex 4454a7d61..8ad664506 100644--- a/crates/ui-egui/src/i18n/zh-hant.tsv+++ b/crates/ui-egui/src/i18n/zh-hant.tsv@@ -1910,6 +1910,7 @@Show only crosshair while painting 繪圖時僅顯示十字線Show slice numbers 顯示切片編號Show tooltips 顯示工具提示+ Show highlight on rollover 滑鼠懸停時顯示醒目提示Show bounding box when dragging layer 拖曳圖層時顯示邊界框System title bar 系統標題列Show transformation values 顯示變形數值diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rsindex 012b4ac83..48072baa8 100644--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@ -101,6 +101,7 @@ pub mod menu_catalog;pub mod menu_nav;pub mod menus;pub mod monitor_status;+pub mod move_hover;pub mod move_lock;pub mod move_mods;pub mod move_ui;@@ -423,6 +424,8 @@ pub struct PhotocraftApp {pub(crate) menu_cache: Option<menus::ItemCache>,/// Move tool drag shown live (`move_ui`).pub(crate) move_preview: Option<move_ui::MovePreview>,+ /// Move tool › Show Highlight on Rollover: the last hover answer (`move_hover`).+ pub(crate) move_hover: Option<move_hover::Hover>,/// A blend mode hovered in the Layers panel, shown live (`blend_preview`).pub(crate) blend_preview: Option<blend_preview::BlendPreview>,/// Patch Tool drag: the healed document at the pointer (`patch_preview`).@@ -625,6 +628,7 @@ impl PhotocraftApp {trail: None,menu_cache: None,move_preview: None,+ move_hover: None,blend_preview: None,patch_preview: None,shape_stroke_preview: None,diff --git a/crates/ui-egui/src/move_hover.rs b/crates/ui-egui/src/move_hover.rsnew file mode 100644index 000000000..01e6a40f3--- /dev/null+++ b/crates/ui-egui/src/move_hover.rs@@ -0,0 +1,128 @@+//! Move tool › Show Highlight on Rollover (Preferences › Tools, on by default): with Auto-Select+//! on, or ⌘ held while it is off, hovering the canvas outlines the layer (or group, per the+//! Auto-Select target) that a click there would pick. The hit test is the click's own+//! (`pick_cmds::auto_select_target`), so a type layer is outlined anywhere inside its text, as it+//! is picked there (#2591). The answer is cached per document revision and pointer pixel: a+//! pointer resting on the canvas costs nothing per frame.++use egui::{Pos2, Stroke};+use photocraft_doc::{DocId, Document, Layer, LayerContent, LayerId};+use photocraft_geom::Rect;++use crate::PhotocraftApp;+use crate::canvas::ViewXform;+use crate::state::Tool;++/// The last answer: what a click at `at` on that revision of the document would outline.+pub(crate) struct Hover {+ doc: DocId,+ revision: u64,+ at: [i32; 2],+ group: bool,+ bounds: Option<Rect>,+}++/// The document-space bounds to outline with the pointer at `at` (document px), or `None` when+/// nothing is highlighted: the preference is off, another tool is current, a click wouldn't+/// Auto-Select (it's off without ⌘, or the selected pixels move instead), a button is down, or a+/// drag or transform is under way.+pub(crate) fn target(app: &mut PhotocraftApp, at: Option<[f64; 2]>, command: bool, pressed: bool) -> Option<Rect> {+ if !app.session.prefs().tools.show_highlight_on_rollover+ || app.ui.tool != Tool::Move+ || pressed+ || app.drag.is_some()+ || app.guide_drag.is_some()+ || app.ui.transform.is_some()+ || app.ui.tool_options.move_auto_select == command+ || crate::move_ui::moves_selected_pixels_with(app, Tool::Move)+ {+ return None;+ }+ let at = at.filter(|p| p[0].is_finite() && p[1].is_finite())?;+ let at = [at[0].floor() as i32, at[1].floor() as i32];+ let group = app.ui.tool_options.move_target == "group";+ let st = app.session.active()?;+ let (doc, revision) = (st.doc.id, st.revision);+ if let Some(h) = app.move_hover.as_ref().filter(|h| h.doc == doc && h.revision == revision && h.at == at && h.group == group) {+ return h.bounds;+ }+ let bounds = photocraft_engine::pick_cmds::auto_select_target(&st.doc, at[0], at[1], group).and_then(|id| outline(&st.doc, id));+ app.move_hover = Some(Hover { doc, revision, at, group, bounds });+ bounds+}++/// The outline of a picked layer: its visible content (a group's, its visible layers' together).+/// Not the Background: it fills the canvas, and the Move tool doesn't move it.+fn outline(doc: &Document, id: LayerId) -> Option<Rect> {+ let rows = doc.walk();+ let (prefix, _, top) = rows.iter().find(|(_, _, l)| l.id == id)?;+ if crate::doc_props_ui::is_background(doc, top) {+ return None;+ }+ let b = rows+ .iter()+ .filter(|(p, _, _)| p.starts_with(prefix) && (prefix.len()..=p.len()).all(|n| p.get(..n).and_then(|q| doc.layer_at(q)).is_some_and(|l| l.visible)))+ .fold(Rect::EMPTY, |acc, (_, _, l)| acc.union(&bounds(doc, l)));+ (!b.is_empty()).then_some(b)+}++fn bounds(doc: &Document, l: &Layer) -> Rect {+ if let Some(a) = l.artboard() {+ return a.rect;+ }+ let content = |s| photocraft_compose::bounds::content_bounds(s);+ match &l.content {+ LayerContent::Group(_) | LayerContent::Adjustment(_) => Rect::EMPTY,+ // A fill layer covers the canvas; its mask limits it.+ LayerContent::Fill(_) => l.mask.as_ref().filter(|m| m.enabled).map_or(doc.bounds(), |m| content(&m.surface)),+ _ => l.surface().map_or(Rect::EMPTY, content),+ }+}++/// Draws the highlight on the active document's canvas, in the theme's accent colour.+pub(crate) fn draw(app: &mut PhotocraftApp, painter: &egui::Painter, xf: &ViewXform, idx: usize, hover: Option<Pos2>) {+ if app.session.active_index() != Some(idx) {+ return;+ }+ let (mods, pressed) = painter.ctx().input(|i| (i.modifiers, i.pointer.any_down()));+ let command = crate::workspace_ui::sticky_mods(app, mods).command;+ let at = hover.map(|p| xf.to_doc(p));+ let Some(b) = target(app, at, command, pressed) else { return };+ let accent = crate::theme::Tokens::get(painter.ctx()).accent;+ painter.rect_stroke(xf.doc_rect(b), 0.0, Stroke::new(1.5, accent), egui::StrokeKind::Outside);+}++#[cfg(test)]+mod tests {+ use serde_json::json;++ use super::*;++ #[test]+ fn rollover_outlines_the_layer_a_click_would_pick() {+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());+ app.session.execute("file.new", json!({"width": 64, "height": 64})).unwrap();+ app.session.execute("layer.new.layer", json!({})).unwrap();+ app.session+ .edit("paint", |doc, a| {+ doc.layer_mut(a.unwrap()).unwrap().surface_mut().unwrap().fill_rect(Rect::new(8, 8, 24, 24), &[1.0, 0.0, 0.0, 1.0]);+ Ok(())+ })+ .unwrap();+ app.session.execute("layer.new.layer", json!({})).unwrap();+ app.ui.tool = Tool::Move;+ let a = Rect::new(8, 8, 24, 24);+ // The empty top layer is clicked through to the painted one; the Background isn't outlined.+ assert_eq!(target(&mut app, Some([10.5, 12.0]), false, false), Some(a));+ assert_eq!(target(&mut app, Some([40.0, 40.0]), false, false), None);+ // Nothing while a button is down or a drag runs.+ assert_eq!(target(&mut app, Some([10.5, 12.0]), false, true), None);+ // Auto-Select off: only with ⌘ held.+ app.ui.tool_options.move_auto_select = false;+ assert_eq!(target(&mut app, Some([10.5, 12.0]), false, false), None);+ assert_eq!(target(&mut app, Some([10.5, 12.0]), true, false), Some(a));+ // Preferences › Tools › Show Highlight on Rollover off.+ app.session.edit_prefs(|p| p.tools.show_highlight_on_rollover = false);+ assert_eq!(target(&mut app, Some([10.5, 12.0]), true, false), None);+ }+}diff --git a/docs/scorecard.md b/docs/scorecard.mdindex c26162648..1a518d3bb 100644--- a/docs/scorecard.md+++ b/docs/scorecard.md@@ -8,8 +8,8 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js|---|---:|---:|---:|---|| [Performance](#performance) | 3 | 22 | 22 | 56 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 15 not run, 7 not measurable yet (baseline 2026-10-05) || [File compatibility](#file-compatibility) | 5 | 11 | 11 | io corpus: oracle ≥ 146/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 236/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 133/256, round trip ≥ 258/256 |-| [Tools](#tools) | 21 | 15 | 6 | |-| [Workspace and UI](#workspace-and-ui) | 6 | 7 | 10 | settings that do nothing: 43 of 149 (target 0) |+| [Tools](#tools) | 21 | 16 | 5 | |+| [Workspace and UI](#workspace-and-ui) | 6 | 7 | 10 | settings that do nothing: 43 of 150 (target 0) || [Type](#type) | 0 | 3 | 6 | || [Automation](#automation) | 3 | 2 | 6 | 628 of 628 menu items live (100.0%) || [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 28 of 28 crates; panic_hunt present |@@ -148,7 +148,7 @@ Corpus floors (`crates/io/tests/corpus.rs`): the enforced minimums; the corpus t| TOOL-214-1 | Select and Mask workspace: view modes, Refine Edge brush, 6 outputs | partial | [#214](https://github.com/storytold/photocraft/issues/214) | Opens the generic select.refineEdge dialog (menus.rs:308) || TOOL-214-2 | Marquee: Shift square, Alt from centre, live W x H readout | done | [#214](https://github.com/storytold/photocraft/issues/214) | canvas.rs marquee_corners: Shift square or circle, Alt from the centre, live W x H readout beside the cursor (marquee_readout); marquee_tests.rs || TOOL-214-3 | Color Range test: Sampled Colors at Fuzziness 0 selects the exact match only | partial | [#214](https://github.com/storytold/photocraft/issues/214) | Fuzziness-0 tests cover midtones/shadows only (selection_cmds.rs:444-447) |-| TOOL-214-4 | Move tool: box-select layers, Auto-Select hover outline, double-click fit, drag to a tab | missing | [#214](https://github.com/storytold/photocraft/issues/214) | move_mods.rs covers Shift/Alt/arrows only |+| TOOL-214-4 | Move tool: box-select layers, Auto-Select hover outline, double-click fit, drag to a tab | partial | [#214](https://github.com/storytold/photocraft/issues/214) | Auto-Select hover outline done (Preferences › Tools › Show Highlight on Rollover, #2834); box-select layers, double-click fit and drag to a tab open || TOOL-214-5 | Right-click menu during Free Transform (scale, rotate, skew, warp, flip, rotate 90/180) | missing | [#214](https://github.com/storytold/photocraft/issues/214) | No context menu in canvas.rs or transform_tool.rs || TOOL-214-6 | Puppet Warp mesh follows the object outline (constrained triangulation) | missing | [#214](https://github.com/storytold/photocraft/issues/214) | algo/puppet.rs:136 builds a block-grid mesh || TOOL-214-7 | Content-Aware Scale through the Free Transform box with a live proxy preview | partial | [#214](https://github.com/storytold/photocraft/issues/214) | edit.contentAwareScale (edit_menu_cmds.rs:899) behind a parameter dialog |@@ -175,7 +175,7 @@ Corpus floors (`crates/io/tests/corpus.rs`): the enforced minimums; the corpus t## Workspace and UI-**Settings that do nothing: 43 of 149** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.+**Settings that do nothing: 43 of 150** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.Unread: `general.color_picker`, `general.beep_when_done`, `general.always_create_smart_objects_when_placing`, `general.animated_zoom`, `general.zoom_resizes_windows`, `workspace.auto_collapse_icon_panels`, `workspace.auto_show_hidden_panels`, `workspace.enable_floating_document_window_docking`, `workspace.enable_narrow_options_bar`, `tools.enable_flick_panning`, `tools.vary_round_brush_hardness_on_hud`, `tools.show_transformation_values`, `file_handling.image_previews`, `file_handling.save_in_background`, `file_handling.ignore_exif_profile_tag`, `file_handling.maximize_psd_compatibility`, `performance.cache_levels`, `performance.legacy_compositing`, `scratch_disks.disks`, `cursors.brush_preview_color`, `units_and_rulers.type_units`, `units_and_rulers.column_width`, `units_and_rulers.gutter`, `units_and_rulers.print_resolution`, `plug_ins.show_extension_panels`, `plug_ins.allow_scripts_to_connect`, `plug_ins.generator_enabled`, `type_.missing_glyph_protection`, `type_.show_font_names_in_english`, `type_.text_engine`, `type_.font_preview`, `type_.recent_fonts`, `enhanced_controls.scrubby_slider_acceleration`, `enhanced_controls.touch_gestures`, `enhanced_controls.zoom_with_trackpad_pinch`, `raw_defaults.color_space`, `raw_defaults.bit_depth`, `raw_defaults.resolution`, `raw_defaults.sharpen_for`, `raw_defaults.open_as_smart_object`, `raw_defaults.apply_auto_tone`, `integrations.allow_agent_control`, `integrations.control_port`.diff --git a/scorecard/tools.toml b/scorecard/tools.tomlindex 65464e1c4..c5190643a 100644--- a/scorecard/tools.toml+++ b/scorecard/tools.toml@@ -134,9 +134,9 @@ note = "Fuzziness-0 tests cover midtones/shadows only (selection_cmds.rs:444-447[[item]]id = "TOOL-214-4"target = "Move tool: box-select layers, Auto-Select hover outline, double-click fit, drag to a tab"-status = "missing"+status = "partial"issue = 214-note = "move_mods.rs covers Shift/Alt/arrows only"+note = "Auto-Select hover outline done (Preferences › Tools › Show Highlight on Rollover, #2834); box-select layers, double-click fit and drag to a tab open"[[item]]id = "TOOL-214-5"