Merge pull request #5911 from ruchirguitar/feat/5547-show-missing-links

Show missing-link markers on the canvas
This commit is contained in:
.CooCoo
2026-12-04 07:13:51 -08:00
committed by GitHub
22 changed files with 602 additions and 14 deletions
+1
View File
@@ -271,6 +271,7 @@ The full earlier record of what landed is kept in [docs/roadmap.md](docs/roadmap
| Date | Change | Summary |
|---|---|---|
| 2026-11-26 | minor | Show Missing Links in View and the Links panel marks missing linked images and placed documents on the canvas; the link watcher scans them in the background, so turning it on never waits on a file; transient overlays stay out of artwork, export and undo history; command API controls and lists markers (#5547). Scores and estimates unchanged. |
| 2026-11-20 | minor | Color conversion indexes global swatch bases and linked-paint lookups (#8804); scores, estimates and measured budgets unchanged. |
| 2026-11-22 | minor | Upcoming: the G11 item names what is left, the unit preference reverting to points (#864; SVG export units are fixed) and a Transform effect in a fill's or stroke's own effects (#885), instead of Shape Builder regions and Asset Export borders, which are fixed (#937, #983 / #1037); its estimate follows docs/roadmap.md and docs/gaps.md, 8–15 → 6–13 h, #8314. The Essentials readiness row's Shape Builder item names what its 4–8 h still covers (checking #937's fix on the reporter's file, still unconfirmed). Headline numbers unchanged. |
| 2026-11-15 | minor | Graphic Styles: built-in Neon & Glow graphic style library (Cyan Neon, Magenta Laser, Amber Tube, Electric Lime, Pulse Violet, Cobalt Phosphor); G5 estimate unchanged (3–13 h). |
+136
View File
@@ -40,6 +40,12 @@ use super::{CommandSpec, EngineError, Result, Session, bad, bool_or, cmd, has_do
pub fn specs() -> Vec<CommandSpec> {
vec![
cmd!(query "view.showMissingLinks", "Show Missing Links", ["View"], None,
"{on?: bool (default: toggle)} show non-printing red outlines and badges on missing linked images and placed documents in the active document; transient view state, no undo step; reads no files (the desktop app scans in the background, links.marked inspects now) → {on}",
has_doc, show_missing_links),
cmd!(query "links.marked", "Marked Missing Links", [], None,
"{} inspect missing links now; only visible image objects and placed documents are marked, and none when the toggle is off → {on, images: [{id, bounds: [x0, y0, x1, y1]}]}",
has_doc, marked),
cmd!(
query "links.check",
"Check Links",
@@ -518,6 +524,8 @@ fn refused(link: &LinkInfo, doc_path: Option<&str>) -> Option<craft_docpath::Ref
/// the content shown. Its bytes are read only when its size or modification time changed. An image
/// placed from a DCS file is modified when one of its plate files of their own changed.
fn probe(g: &Group, base: LinkBase) -> (Status, Option<Found>) {
#[cfg(test)]
probe_gate::hold(&g.link.path);
let Some(mut f) = locate(&g.link, base) else { return (Status::Missing, None) };
let l = &g.link;
if !g.plate_files.is_empty() && super::place::dcs::plate_files_changed(&g.plate_files, &f.path) {
@@ -536,6 +544,24 @@ fn probe(g: &Group, base: LinkBase) -> (Status, Option<Found>) {
(if same { Status::Ok } else { Status::Modified }, Some(f))
}
/// Whether [`probe`] would find group `g`'s file missing, without reading or hashing its content.
/// A changed file is opened to check it can be read, and nothing more: the canvas markers ask only
/// this, and with Update Links set to Manually a changed file keeps differing from its stored link,
/// so a full probe would read the whole file again on every look while the markers are on.
fn missing(g: &Group, base: LinkBase) -> bool {
#[cfg(test)]
probe_gate::hold(&g.link.path);
let Some(f) = locate(&g.link, base) else { return true };
let l = &g.link;
if !g.plate_files.is_empty() && super::place::dcs::plate_files_changed(&g.plate_files, &f.path) {
return false;
}
if l.size == Some(f.size) && l.modified.is_some() && l.modified == f.modified {
return false;
}
fileio::read_file_head(&f.path, 0).is_err()
}
/// Is image `key` of `d` showing its preview (its file not read)?
fn previewing(d: &Document, key: &str) -> bool {
d.images.get(key).is_none_or(ImageBlob::is_proxy)
@@ -2159,6 +2185,7 @@ fn update_where(s: &mut Session, ids: Option<Vec<NodeId>>, path: Option<&str>) -
editing_brush_art(d, |d| reads.into_iter().try_for_each(|(g, read)| install_read(d, &g.ids, read, None, Some(&g))))
})?;
}
clear_markers(s, &updated)?;
let mut out = json!({ "updated": updated, "missing": missing });
if !warnings.is_empty() {
out["warnings"] = json!(warnings);
@@ -2451,6 +2478,7 @@ fn relink(s: &mut Session, p: &Value) -> Result<Value> {
}
not_found.sort();
not_found.dedup();
clear_markers(s, &relinked)?;
let mut out = json!({ "relinked": relinked, "notFound": not_found });
if !warnings.is_empty() {
out["warnings"] = json!(warnings);
@@ -2630,6 +2658,56 @@ pub(crate) fn statuses(st: &crate::DocState) -> BTreeMap<NodeId, (Status, Option
out
}
/// Missing placed objects, using the same file resolution as the Links panel. Hidden ones are
/// included: [`crate::DocState::marked_missing_links`] leaves out what is hidden when it is drawn, so
/// artwork shown later is marked without another scan. Also used on the link watch worker, away
/// from the UI thread.
pub(crate) fn missing_markers(doc: &Document, base: LinkBase) -> Vec<NodeId> {
groups(doc, None).iter().filter(|g| !g.ids.is_empty() && missing(g, base)).flat_map(|g| g.ids.iter().copied()).collect()
}
fn show_missing_links(s: &mut Session, p: &Value) -> Result<Value> {
let st = s.doc_mut()?;
let on = super::switch_or(p, "on", !st.show_missing_links, "view.showMissingLinks")?;
// Never probes files here: a changed linked file is read in full to tell whether it still
// matches, which would hold up the caller (the desktop UI thread) on a large or slow file.
// Turning the overlay on leaves its markers unscanned; the link watch worker scans them
// at once ([`Session::missing_link_scan_due`]) and the canvas repaints from its result.
// `links.marked` stays the explicit, synchronous inspection. The web build has no worker
// and no files to read: its app marks them in place ([`Session::mark_missing_links_in_place`]).
if !on || !st.show_missing_links {
st.missing_link_markers = None;
}
st.show_missing_links = on;
Ok(json!({"on": on}))
}
fn marked(s: &mut Session, _: &Value) -> Result<Value> {
let st = s.doc_mut()?;
let ids = if st.show_missing_links { missing_markers(&st.doc, LinkBase::of(st)) } else { vec![] };
let images: Vec<Value> = ids
.iter()
.filter(|id| st.doc.is_visible(**id))
.filter_map(|id| {
let b = st.doc.node(*id)?.geometric_bounds()?;
Some(json!({"id": id.0, "bounds": [b.x0, b.y0, b.x1, b.y1]}))
})
.collect();
st.missing_link_markers = Some((st.doc.clone(), ids));
Ok(json!({"on": st.show_missing_links, "images": images}))
}
/// Successful repair clears its decoration even when the file's metadata is unchanged.
fn clear_markers(s: &mut Session, repaired: &[u64]) -> Result<()> {
if !repaired.is_empty()
&& let Some((_, ids)) = &mut s.doc_mut()?.missing_link_markers
{
let repaired: std::collections::HashSet<_> = repaired.iter().copied().collect();
ids.retain(|id| !repaired.contains(&id.0));
}
Ok(())
}
/// The format of the file image `im` of `d` shows: its link's extension, else its pixels' type.
fn format_label(d: &Document, im: &ImageObject) -> &'static str {
if im.link.is_some() && d.images.get(&im.key).is_some_and(ImageBlob::is_separated) {
@@ -3319,6 +3397,64 @@ fn placement_options(s: &mut Session, p: &Value) -> Result<Value> {
Ok(json!({ "ids": ids_json(&ids), "placement": placement_json(shown) }))
}
/// Test seam: hold the probe of one linked path until the test releases it, so a test can
/// tell whether a command returned before the probe finished, and on which thread it ran.
#[cfg(test)]
pub(crate) mod probe_gate {
use std::sync::{Arc, Condvar, Mutex, PoisonError};
use std::time::Duration;
/// A gated path: (open, entered on thread named, finished), and the condition signalling
/// each change.
#[derive(Default)]
pub struct Gate {
state: Mutex<(bool, Option<String>, bool)>,
changed: Condvar,
}
static GATES: Mutex<Vec<(String, Arc<Gate>)>> = Mutex::new(Vec::new());
impl Gate {
/// Gate probes of the link stored as `path` until [`Gate::open`].
pub fn close(path: &str) -> Arc<Gate> {
let g = Arc::new(Gate::default());
GATES.lock().unwrap_or_else(PoisonError::into_inner).push((path.to_string(), g.clone()));
g
}
pub fn open(&self) {
self.state.lock().unwrap_or_else(PoisonError::into_inner).0 = true;
self.changed.notify_all();
}
/// The name of the thread that entered the probe, waiting up to `limit` for one.
pub fn entered(&self, limit: Duration) -> Option<String> {
let s = self.state.lock().unwrap_or_else(PoisonError::into_inner);
let (s, _) = self.changed.wait_timeout_while(s, limit, |s| s.1.is_none()).unwrap_or_else(PoisonError::into_inner);
s.1.clone()
}
pub fn finished(&self) -> bool {
self.state.lock().unwrap_or_else(PoisonError::into_inner).2
}
}
/// Called at the start of every probe: blocks while `path` is gated and closed (at most
/// ten seconds, so a regression fails the test instead of hanging it).
pub(super) fn hold(path: &str) {
let gate = GATES.lock().unwrap_or_else(PoisonError::into_inner).iter().find(|(p, _)| p == path).map(|(_, g)| g.clone());
let Some(g) = gate else { return };
let mut s = g.state.lock().unwrap_or_else(PoisonError::into_inner);
s.1 = Some(std::thread::current().name().unwrap_or("").to_string());
g.changed.notify_all();
let (mut s, _) = g.changed.wait_timeout_while(s, Duration::from_secs(10), |s| !s.0).unwrap_or_else(PoisonError::into_inner);
s.2 = true;
g.changed.notify_all();
}
/// Stop gating `path`.
pub fn remove(path: &str) {
GATES.lock().unwrap_or_else(PoisonError::into_inner).retain(|(p, _)| p != path);
}
}
#[cfg(test)]
mod tests {
use std::sync::Arc;
+1
View File
@@ -750,6 +750,7 @@ pub const SWITCHING_LABELS: &[&str] = &[
"Lock Guides",
"Hide Slices",
"Show Print Tiling",
"Show Missing Links",
"Lock Grid",
"Edit Envelope",
"Edit Contents",
+30
View File
@@ -132,6 +132,10 @@ pub struct DocState {
pub spelling_ignored: std::collections::BTreeSet<String>,
/// View → Show Transparency Grid, per document (saved view state, not undoable).
pub transparency_grid: bool,
/// View → Show Missing Links: transient canvas decoration, never document artwork.
pub show_missing_links: bool,
/// Last worker scan, tied to the exact document snapshot it inspected.
pub missing_link_markers: Option<(Arc<Document>, Vec<NodeId>)>,
/// The format Save writes ([`cmd::fileio::SAVE_FORMATS`]): the one the document was opened
/// from or last saved as.
pub format: &'static str,
@@ -491,6 +495,30 @@ impl SameContent {
}
impl DocState {
/// Cached missing links still present and visible in the current art. Geometry-only edits
/// keep their markers moving with the objects; relinking or embedding drops them immediately.
pub fn marked_missing_links(&self) -> Vec<NodeId> {
if !self.show_missing_links {
return vec![];
}
let Some((before, ids)) = &self.missing_link_markers else { return vec![] };
fn link(n: &vectorcraft_doc::Node) -> Option<&vectorcraft_doc::LinkInfo> {
match &n.kind {
NodeKind::Image(im) => im.link.as_ref(),
NodeKind::PlacedDocument(p) => Some(&p.link),
_ => None,
}
}
ids.iter()
.copied()
.filter(|id| {
let old = before.node(*id).and_then(link);
let now = self.doc.node(*id).and_then(link);
now.is_some() && now == old && self.doc.is_visible(*id)
})
.collect()
}
pub fn new(mut doc: Document, path: Option<String>) -> Self {
let active_layer = doc.default_layer();
// Saved view state lives here while the document is open (saves write it back).
@@ -532,6 +560,8 @@ impl DocState {
mask_view: None,
spelling_ignored: Default::default(),
transparency_grid,
show_missing_links: false,
missing_link_markers: None,
format: "vectorcraft",
save_options: Default::default(),
save_artboards: vec![],
+65 -7
View File
@@ -27,9 +27,24 @@ use crate::{Result, Session};
/// A file's size and modification time (nanoseconds since 1970).
pub type Stamp = (u64, u128);
/// Stamps of a document's linked files taken on a worker thread: (document uid, [(file,
/// object ids, stamp)]), the condition the worker signals when it ends, and whether it has.
pub type LinkScan = Arc<(Mutex<Option<(u64, Vec<(String, Vec<u64>, Option<Stamp>)>)>>, Condvar, AtomicBool)>;
/// A document's linked-file scan, the condition the worker signals when it ends, and whether
/// it has. Includes missing-link marker ids when their view toggle is enabled.
pub type LinkScan = Arc<(Mutex<Option<LinkScanResult>>, Condvar, AtomicBool)>;
/// A worker's stamps and optional missing-link overlay scan of the same document snapshot.
pub struct LinkScanResult {
uid: u64,
stamps: Vec<(String, Vec<u64>, Option<Stamp>)>,
markers: Option<(Arc<vectorcraft_doc::Document>, Vec<vectorcraft_doc::NodeId>)>,
}
#[cfg(test)]
impl LinkScanResult {
/// A look's stamps of document `uid`'s linked files, with no missing-link scan.
pub(crate) fn stamps(uid: u64, stamps: Vec<(String, Vec<u64>, Option<Stamp>)>) -> Self {
Self { uid, stamps, markers: None }
}
}
/// Held by a look's worker: marks the look as ended and wakes [`Session::wait_link_scan`] when
/// dropped, whether the worker returned or unwound.
@@ -83,6 +98,29 @@ pub(crate) fn update_changed(s: &mut Session, _: &Value) -> Result<Value> {
}
impl Session {
/// Whether the active document shows missing links but has no marker scan yet (the overlay
/// was just turned on, or its first scan saw art that has since changed): the desktop app
/// then starts a look at once instead of waiting for the next periodic one.
pub fn missing_link_scan_due(&self) -> bool {
self.link_scan.is_none() && self.active().is_some_and(|st| st.show_missing_links && st.missing_link_markers.is_none())
}
/// Find the active document's missing links again, here and now, when it shows them and its art
/// changed since they were last found (or they never were); returns whether it did. This reads
/// linked files on the calling thread, so only the web app calls it: it has no files to read,
/// so every linked file is missing there, and no link watch worker to scan in the background.
/// Artwork restored or placed while the overlay is on is then marked too. The desktop app
/// scans on the worker instead ([`Session::start_link_scan`]).
pub fn mark_missing_links_in_place(&mut self) -> bool {
let Some(st) = self.active_mut() else { return false };
if !st.show_missing_links || st.missing_link_markers.as_ref().is_some_and(|(seen, _)| Arc::ptr_eq(seen, &st.doc)) {
return false;
}
let ids = crate::cmd::links::missing_markers(&st.doc, crate::cmd::links::LinkBase::of(st));
st.missing_link_markers = Some((st.doc.clone(), ids));
true
}
/// Start stamping the active document's linked files on a worker thread, unless a look is
/// still running, a script is running (or the build has no files to look at: the web app).
pub fn start_link_scan(&mut self) {
@@ -94,7 +132,14 @@ impl Session {
// A confined caller's roots, else what the caller that opened the document may read (the
// desktop frame is unconfined).
let opened_by = st.opened_by.clone();
let marker_doc = st.show_missing_links.then(|| st.doc.clone());
let links_from = st.links_from.clone();
if files.is_empty() {
// Nothing linked, so nothing missing: an empty scan, which also ends
// [`Session::missing_link_scan_due`] without starting a worker.
if let Some(st) = self.docs.iter_mut().find(|st| st.uid == uid) {
st.missing_link_markers = st.show_missing_links.then(|| (st.doc.clone(), vec![]));
}
return;
}
let slot: LinkScan = Arc::default();
@@ -103,12 +148,18 @@ impl Session {
let spawned = std::thread::Builder::new().name("link-watch".into()).spawn(move || {
// Marks the look as ended when the worker returns or unwinds.
let _ended = Ended(out.clone());
let stamps = scope.run(|| {
let (stamps, markers) = scope.run(|| {
crate::file_access::confine(crate::file_access::current().or(opened_by).as_ref(), || {
files.into_iter().map(|(p, ids)| (p.clone(), ids, stamp(&p, doc_path.as_deref()))).collect()
let stamps = files.into_iter().map(|(p, ids)| (p.clone(), ids, stamp(&p, doc_path.as_deref()))).collect();
let markers = marker_doc.map(|doc| {
let base = crate::cmd::links::LinkBase::of_files(doc_path.as_deref(), links_from.as_deref());
let ids = crate::cmd::links::missing_markers(&doc, base);
(doc, ids)
});
(stamps, markers)
})
});
*out.0.lock().unwrap_or_else(PoisonError::into_inner) = Some((uid, stamps));
*out.0.lock().unwrap_or_else(PoisonError::into_inner) = Some(LinkScanResult { uid, stamps, markers });
});
if spawned.is_ok() {
self.link_scan = Some(slot);
@@ -123,8 +174,15 @@ impl Session {
return None;
}
self.link_scan.take_if(|scan| ended_without_stamps(scan, |ended| ended.load(Ordering::SeqCst)));
let (uid, stamps) = self.link_scan.as_ref()?.0.lock().unwrap_or_else(PoisonError::into_inner).take()?;
let LinkScanResult { uid, stamps, markers } = self.link_scan.as_ref()?.0.lock().unwrap_or_else(PoisonError::into_inner).take()?;
self.link_scan = None;
if let Some(st) = self.docs.iter_mut().find(|st| st.uid == uid)
&& st.show_missing_links
&& let Some((doc, ids)) = markers
&& Arc::ptr_eq(&st.doc, &doc)
{
st.missing_link_markers = Some((doc, ids));
}
Some(self.apply_link_stamps(uid, stamps, false))
}
+1
View File
@@ -118,6 +118,7 @@ mod livecorners;
mod maskview;
pub(super) mod menucmds;
mod mesh_picks;
mod missing_links;
mod moved;
mod nativefile;
mod newart;
+2 -2
View File
@@ -152,7 +152,7 @@ fn a_look_that_stores_its_stamps_between_the_polls_reads_keeps_them() {
// The worker takes its turn after the slot is read and before the flag is, if the slot is free.
let ended = link_watch::ended_without_stamps(&scan, |flag| {
if let Ok(mut slot) = scan.0.try_lock() {
*slot = Some((uid, stamps.clone()));
*slot = Some(link_watch::LinkScanResult::stamps(uid, stamps.clone()));
flag.store(true, Ordering::SeqCst);
}
flag.load(Ordering::SeqCst)
@@ -163,7 +163,7 @@ fn a_look_that_stores_its_stamps_between_the_polls_reads_keeps_them() {
let scan = scan.clone();
move || {
let _ended = link_watch::Ended(scan.clone());
*scan.0.lock().unwrap() = Some((uid, stamps));
*scan.0.lock().unwrap() = Some(link_watch::LinkScanResult::stamps(uid, stamps));
}
});
worker.join().unwrap();
+221
View File
@@ -0,0 +1,221 @@
//! Canvas marker state and command API, independent of artwork and link update preferences.
use serde_json::json;
use crate::tests_links::{Folder, RED, place, png, session, write};
use crate::*;
fn marked(s: &mut Session) -> Vec<u64> {
s.execute("links.marked", &json!({})).unwrap()["images"].as_array().unwrap().iter().map(|r| r["id"].as_u64().unwrap()).collect()
}
#[test]
fn missing_link_toggle_is_transient_per_document_and_validated() {
let mut s = session();
let before = s.doc().unwrap().doc.clone();
let undo = s.doc().unwrap().history.undo.len();
assert!(marked(&mut s).is_empty());
assert_eq!(s.execute("view.showMissingLinks", &json!({"on": true})).unwrap(), json!({"on": true}));
for p in [json!({"on": "false"}), json!({"on": 1}), json!({"on": []})] {
assert!(s.execute("view.showMissingLinks", &p).is_err());
assert!(s.doc().unwrap().show_missing_links);
}
assert!(std::sync::Arc::ptr_eq(&before, &s.doc().unwrap().doc));
assert_eq!(s.doc().unwrap().history.undo.len(), undo);
assert!(!s.doc().unwrap().is_dirty());
s.execute("file.new", &json!({})).unwrap();
assert!(!s.doc().unwrap().show_missing_links);
s.execute("document.activate", &json!({"index": 0})).unwrap();
assert!(s.doc().unwrap().show_missing_links);
assert_eq!(s.execute("view.showMissingLinks", &json!({})).unwrap(), json!({"on": false}));
assert!(s.doc().unwrap().missing_link_markers.is_none());
}
#[test]
fn missing_link_markers_follow_files_relink_update_and_embed() {
let dir = Folder::new("marker-lifecycle");
let path = dir.file("art.png");
let replacement = dir.file("replacement.png");
let bytes = png(40, 40, RED);
write(&path, &bytes);
write(&replacement, &bytes);
let mut s = session();
let id = place(&mut s, &path);
s.execute("view.showMissingLinks", &json!({"on": true})).unwrap();
assert!(marked(&mut s).is_empty());
std::fs::remove_file(&path).unwrap();
assert_eq!(marked(&mut s), vec![id.0]);
let doc = s.doc().unwrap().doc.clone();
let selection = s.doc().unwrap().selection.clone();
let undo = s.doc().unwrap().history.undo.len();
let saved = vectorcraft_format::save_file(&doc);
let pixels = vectorcraft_render::Renderer::new().render_region(&doc, vectorcraft_geom::Rect::new(0.0, 0.0, 400.0, 300.0), 1.0, true).pixels;
s.execute("view.showMissingLinks", &json!({"on": false})).unwrap();
assert!(marked(&mut s).is_empty());
s.execute("view.showMissingLinks", &json!({"on": true})).unwrap();
assert_eq!(marked(&mut s), vec![id.0]);
let st = s.doc().unwrap();
assert_eq!(st.selection, selection);
assert_eq!(st.history.undo.len(), undo);
assert_eq!(vectorcraft_format::save_file(&st.doc), saved);
assert_eq!(
vectorcraft_render::Renderer::new().render_region(&st.doc, vectorcraft_geom::Rect::new(0.0, 0.0, 400.0, 300.0), 1.0, true).pixels,
pixels
);
s.execute("links.relink", &json!({"ids": [id.0], "path": replacement})).unwrap();
assert!(s.doc().unwrap().marked_missing_links().is_empty());
assert!(marked(&mut s).is_empty());
std::fs::remove_file(&replacement).unwrap();
assert_eq!(marked(&mut s), vec![id.0]);
write(&replacement, &bytes);
s.execute("links.update", &json!({"ids": [id.0]})).unwrap();
assert!(s.doc().unwrap().marked_missing_links().is_empty());
assert!(marked(&mut s).is_empty());
s.execute("links.embed", &json!({"ids": [id.0]})).unwrap();
std::fs::remove_file(&replacement).unwrap();
assert!(marked(&mut s).is_empty());
}
#[test]
fn missing_link_worker_refreshes_without_the_panel_and_ignores_old_art() {
for mode in ["automatically", "askWhenModified", "manually"] {
let dir = Folder::new(&format!("marker-watch-{mode}"));
let path = dir.file("art.png");
let bytes = png(20, 20, RED);
write(&path, &bytes);
let mut s = session();
s.prefs.update_links = mode.into();
let id = place(&mut s, &path);
s.execute("view.showMissingLinks", &json!({"on": true})).unwrap();
let undo = s.doc().unwrap().history.undo.len();
std::fs::remove_file(&path).unwrap();
s.start_link_scan();
s.wait_link_scan();
s.poll_link_scan().unwrap().unwrap();
assert_eq!(s.doc().unwrap().missing_link_markers.as_ref().unwrap().1, vec![id]);
write(&path, &bytes);
s.start_link_scan();
s.wait_link_scan();
s.poll_link_scan().unwrap().unwrap();
assert!(s.doc().unwrap().missing_link_markers.as_ref().unwrap().1.is_empty());
assert_eq!(s.doc().unwrap().history.undo.len(), undo);
std::fs::remove_file(&path).unwrap();
s.start_link_scan();
s.wait_link_scan();
let seen = s.doc().unwrap().missing_link_markers.as_ref().unwrap().0.clone();
s.execute("shape.rectangle", &json!({"x": 1, "y": 1, "width": 3, "height": 4})).unwrap();
s.poll_link_scan().unwrap().unwrap();
assert!(std::sync::Arc::ptr_eq(&seen, &s.doc().unwrap().missing_link_markers.as_ref().unwrap().0));
assert!(s.doc().unwrap().marked_missing_links().is_empty());
s.start_link_scan();
s.wait_link_scan();
// Switching the toggle off while a look is pending must not resurrect its markers.
s.execute("view.showMissingLinks", &json!({"on": false})).unwrap();
s.poll_link_scan().unwrap().unwrap();
assert!(s.doc().unwrap().missing_link_markers.is_none());
}
}
#[test]
fn turning_missing_links_on_returns_before_the_file_probe_and_scans_on_the_link_watcher() {
use crate::cmd::links::probe_gate::{self, Gate};
use std::time::Duration;
let dir = Folder::new("marker-toggle-nonblocking");
let path = dir.file("art.png");
write(&path, &png(20, 20, RED));
let mut s = session();
let id = place(&mut s, &path);
std::fs::remove_file(&path).unwrap();
let stored = crate::tests_links::image(&s, id).link.unwrap().path;
let gate = Gate::close(&stored);
// The toggle returns while the probe of the (slow) linked file is held closed.
assert_eq!(s.execute("view.showMissingLinks", &json!({"on": true})).unwrap(), json!({"on": true}));
assert!(!gate.finished(), "the toggle waited for the file probe");
assert_eq!(gate.entered(Duration::ZERO), None, "the toggle probed the file on the calling thread");
assert!(s.doc().unwrap().missing_link_markers.is_none());
assert!(s.doc().unwrap().marked_missing_links().is_empty());
// The desktop app starts the watcher's look at once, and the probe runs there.
assert!(s.missing_link_scan_due());
s.start_link_scan();
assert!(!s.missing_link_scan_due());
assert_eq!(gate.entered(Duration::from_secs(10)).as_deref(), Some("link-watch"));
assert!(s.poll_link_scan().is_none(), "the look ended before its probe was released");
gate.open();
s.wait_link_scan();
s.poll_link_scan().unwrap().unwrap();
probe_gate::remove(&stored);
assert_eq!(s.doc().unwrap().marked_missing_links(), vec![id]);
assert!(!s.missing_link_scan_due());
// Turning it on again while on keeps the markers; off clears them.
s.execute("view.showMissingLinks", &json!({"on": true})).unwrap();
assert_eq!(s.doc().unwrap().marked_missing_links(), vec![id]);
s.execute("view.showMissingLinks", &json!({"on": false})).unwrap();
assert!(!s.missing_link_scan_due());
}
#[test]
fn missing_link_scan_for_a_document_without_links_ends_without_a_worker() {
let mut s = session();
s.execute("view.showMissingLinks", &json!({"on": true})).unwrap();
assert!(s.missing_link_scan_due());
s.start_link_scan();
assert!(s.link_scan.is_none());
assert!(!s.missing_link_scan_due());
}
#[test]
fn missing_link_hidden_when_the_overlay_turns_on_is_marked_once_shown() {
let dir = Folder::new("marker-hidden-then-shown");
let path = dir.file("art.png");
write(&path, &png(20, 20, RED));
// Found by the desktop's link watch worker, and in place as the web app does.
for in_place in [false, true] {
let mut s = session();
let id = place(&mut s, &path);
std::fs::remove_file(&path).unwrap();
s.execute("object.hide", &json!({"ids": [id.0]})).unwrap();
s.execute("view.showMissingLinks", &json!({"on": true})).unwrap();
let mark = |s: &mut Session| {
if in_place {
s.mark_missing_links_in_place();
} else {
s.start_link_scan();
s.wait_link_scan();
s.poll_link_scan().unwrap().unwrap();
}
};
mark(&mut s);
assert!(s.doc().unwrap().marked_missing_links().is_empty(), "hidden art is not marked");
s.execute("object.showAll", &json!({})).unwrap();
assert_eq!(s.doc().unwrap().marked_missing_links(), vec![id], "shown art is marked without another scan");
if in_place {
// Artwork restored while the overlay is on is marked again.
s.execute("select.set", &json!({"ids": [id.0]})).unwrap();
s.execute("edit.clear", &json!({})).unwrap();
assert!(s.doc().unwrap().doc.node(id).is_none());
s.execute("edit.undo", &json!({})).unwrap();
assert!(s.mark_missing_links_in_place());
assert_eq!(s.doc().unwrap().marked_missing_links(), vec![id]);
assert!(!s.mark_missing_links_in_place(), "unchanged art is not looked at again");
}
write(&path, &png(20, 20, RED));
}
}
#[test]
fn missing_link_markers_include_placed_documents_and_exclude_hidden_art() {
let dir = Folder::new("marker-placed");
let path = dir.file("placed.vectorcraft");
write(&path, &vectorcraft_format::save_file(&vectorcraft_doc::Document::new(40.0, 20.0)));
let mut s = session();
let id = place(&mut s, &path);
assert!(matches!(s.doc().unwrap().doc.node(id).unwrap().kind, vectorcraft_doc::NodeKind::PlacedDocument(_)));
std::fs::remove_file(&path).unwrap();
s.execute("view.showMissingLinks", &json!({"on": true})).unwrap();
assert_eq!(marked(&mut s), vec![id.0]);
s.execute("object.move", &json!({"ids": [id.0], "dx": 15, "dy": 10})).unwrap();
assert_eq!(s.doc().unwrap().marked_missing_links(), vec![id]);
s.execute("object.hide", &json!({"ids": [id.0]})).unwrap();
assert!(s.doc().unwrap().marked_missing_links().is_empty());
assert!(marked(&mut s).is_empty());
}
+9
View File
@@ -27,7 +27,16 @@ fn headless_links_report_missing_files_and_relink() {
let r = run(&mut h, "document.open", json!({"path": file("doc.vectorcraft")}));
assert_eq!(r["missingLinks"][0]["ids"], json!([id]), "{r}");
assert_eq!(run(&mut h, "links.check", json!({}))["missing"], 1);
assert_eq!(run(&mut h, "links.marked", json!({})), json!({"on": false, "images": []}));
assert_eq!(run(&mut h, "view.showMissingLinks", json!({"on": true})), json!({"on": true}));
let markers = run(&mut h, "links.marked", json!({}));
assert_eq!(markers["images"][0]["id"], id);
assert_eq!(markers["images"][0]["bounds"].as_array().unwrap().len(), 4);
run(&mut h, "view.showMissingLinks", json!({"on": false}));
assert_eq!(run(&mut h, "links.marked", json!({}))["images"], json!([]));
run(&mut h, "view.showMissingLinks", json!({"on": true}));
let r = run(&mut h, "links.relink", json!({"ids": [id], "path": file("b.png")}));
assert_eq!(r["relinked"], json!([id]));
assert_eq!(run(&mut h, "links.check", json!({}))["links"][0]["status"], "ok");
assert_eq!(run(&mut h, "links.marked", json!({}))["images"], json!([]));
}
+6
View File
@@ -631,6 +631,12 @@ impl VectorcraftApp {
}
#[cfg(not(target_arch = "wasm32"))]
self.tick_link_updates(ctx, now);
// The web app has no link watch worker and no files to read: View › Show Missing Links
// marks again here whenever the art changed, so artwork shown or restored is marked too.
#[cfg(target_arch = "wasm32")]
if self.session.mark_missing_links_in_place() {
ctx.request_repaint();
}
crate::addons::select::link_status::refresh(self, now);
if !self.background.jobs.is_empty()
|| !self.opening.pending.is_empty()
+3 -1
View File
@@ -95,7 +95,9 @@ impl VectorcraftApp {
let last: f64 = ctx.data(|d| d.get_temp(last_key)).unwrap_or(f64::NEG_INFINITY);
// The active document as the last look saw it: its uid and revision.
let (seen_key, doc) = (egui::Id::unique("linkWatch.seen"), self.session.active().map(|d| (d.uid, d.revision)));
if now - last >= 2.0 || (focused && !was_focused) {
// View › Show Missing Links just turned on: its first scan runs on the worker now, and
// the canvas repaints from the result (the toggle itself never reads files).
if now - last >= 2.0 || (focused && !was_focused) || self.session.missing_link_scan_due() {
// Walking the document's links costs a pass over it: only when a look is due.
// `start_link_scan` starts none for a document without links, which then doesn't
// wake the app for looks of its own (any frame still looks once one is due).
+38
View File
@@ -66,6 +66,11 @@ const WAVE_MAX: usize = 4_000;
/// long story of unknown words costs one check's worth.
const MAX_UNDERLINED: usize = 1_000;
/// The radius of a missing link's badge and the size of its question mark, in screen points: the
/// same at every zoom.
const MISSING_BADGE_RADIUS: f32 = 7.0;
const MISSING_BADGE_TEXT: f32 = 11.0;
/// The marks Show Hidden Characters drew on each text object in the last pass
/// ([`crate::CanvasCache::hidden_chars`]). Each is kept with the node it was laid out from: an edited
/// object is a new `Arc` and is laid out again, and all type is laid out again when the fonts or the
@@ -158,6 +163,9 @@ pub(crate) struct Marks {
fade: Vec<[Pos2; 4]>,
bleed: Vec<BezPath>,
artboard_marks: Vec<BezPath>,
/// View › Show Missing Links: each visible missing linked image or placed document in view, as
/// its box on the screen and where its badge sits (the box's top left corner in the document).
pub(crate) missing: Vec<([Pos2; 4], Pos2)>,
}
/// Drops the hidden-character and spelling memos and the text nodes they hold.
@@ -194,6 +202,8 @@ pub(crate) fn marks_of(app: &mut VectorcraftApp, view: &CanvasView) -> Marks {
return m;
};
let key = (st.uid, st.revision);
// The link watcher's last scan: nothing here reads files.
m.missing = missing_links(st, view);
if fades && let Some(shown) = app.view() {
m.fade = artboards::fade_quads(view, &artboards::frames(app, st, shown, shown.outline));
}
@@ -310,6 +320,18 @@ fn text_nodes(layers: &[Arc<Node>]) -> Vec<Arc<Node>> {
out
}
/// The missing links [`DocState::marked_missing_links`] marks in view: each one's box on the screen
/// (following a turned view) and its badge's place.
fn missing_links(st: &DocState, view: &CanvasView) -> Vec<([Pos2; 4], Pos2)> {
st.marked_missing_links()
.into_iter()
.filter_map(|id| st.doc.node(id))
.filter(|n| in_view(n, view))
.filter_map(|n| n.geometric_bounds())
.map(|b| (view.quad(b), view.to_screen(Point::new(b.x0, b.y0))))
.collect()
}
/// Whether `n`'s box meets the part of the document the view shows (the box round the view's
/// corners, which a turned view makes larger than the canvas).
fn in_view(n: &Node, view: &CanvasView) -> bool {
@@ -549,6 +571,8 @@ pub(crate) struct ArtMarks<'a> {
arm_color: [u8; 3],
/// The print tiles.
tiles: &'a [Tile],
/// The missing links' boxes and badges.
missing: &'a [([Pos2; 4], Pos2)],
}
impl<'a> ArtMarks<'a> {
@@ -565,6 +589,7 @@ impl<'a> ArtMarks<'a> {
arms: &marks.arms,
arm_color: marks.arm_color,
tiles: &marks.tiles,
missing: &marks.missing,
}
.label(label)
}
@@ -625,6 +650,9 @@ impl Component for ArtMarks<'_> {
for tile in self.tiles {
paint_tile(&draw, tile);
}
for (quad, at) in self.missing {
paint_missing(&draw, quad, *at, style.bad);
}
}
fn finish(self, cx: Cx<'_, Self>) -> Response {
@@ -655,6 +683,16 @@ fn paint_tile(draw: &Draw<'_>, tile: &Tile) {
draw.doc(room, &DocText::new(&run));
}
/// One missing link: a thick outline round its box and, at the box's corner, a filled badge with a
/// question mark, so the mark doesn't rely on its colour alone.
fn paint_missing(draw: &Draw<'_>, quad: &[Pos2; 4], at: Pos2, color: StyleColor) {
draw.stroke(&PaintShape::Path(ring(quad.to_vec(), true)), StrokeWidth::Thick, color);
draw.fill(&PaintShape::Circle(at, MISSING_BADGE_RADIUS), color);
let run = [DocRun::new("?", FontRef::proportional(), MISSING_BADGE_TEXT, DataColor::new(Color32::WHITE))];
let room = egui::Rect::from_min_size(at - Vec2::new(MISSING_BADGE_TEXT * 0.3, MISSING_BADGE_TEXT * 0.7), Vec2::splat(MISSING_BADGE_TEXT * 1.4));
draw.doc(room, &DocText::new(&run));
}
/// A wavy line from `a` to `b` on screen, waves 4 pixels long and 1.5 high, down the page from the
/// line whichever way the type runs; empty for a segment under a pixel long or not finite.
pub(crate) fn wave(a: Pos2, b: Pos2) -> Vec<Pos2> {
+44
View File
@@ -492,3 +492,47 @@ fn auto_spell_check_is_a_toggle_of_the_canvas_lines() {
assert_eq!(segments(&mut app), 0, "off");
assert!(app.canvas.spelling.lines.is_empty(), "no node is kept");
}
/// A document with a placed document whose file is gone, View › Show Missing Links on and its markers
/// inspected → (app, the placed object).
fn missing_placed(name: &str) -> (VectorcraftApp, NodeId) {
let dir = std::env::temp_dir().join(format!("vectorcraft-marks-{name}-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("placed.vectorcraft");
std::fs::write(&path, vectorcraft_format::save_file(&vectorcraft_doc::Document::new(80.0, 40.0))).unwrap();
let mut app = app();
let r = app.session.execute("file.place", &json!({"path": path.to_string_lossy(), "at": [200, 150]})).unwrap();
let id = NodeId(r["ids"][0].as_u64().unwrap());
std::fs::remove_dir_all(&dir).unwrap();
app.run("view.showMissingLinks", json!({"on": true})).unwrap();
// The synchronous inspection stands in for the link watcher's scan.
app.run("links.marked", json!({})).unwrap();
(app, id)
}
/// A missing link is outlined round its box and badged at its corner in any view, turned or zoomed,
/// and nothing is marked once the toggle is off.
#[test]
fn missing_links_are_marked_round_their_box_in_any_view_until_turned_off() {
let (mut app, id) = missing_placed("follow");
let bounds = app.session.active().unwrap().doc.node(id).unwrap().geometric_bounds().unwrap();
for (zoom, rotation) in [(0.25, 0.0), (1.0, 37.0), (8.0, 90.0)] {
let view = CanvasView::new(view().rect, bounds.center(), zoom).rotation(rotation);
let m = marks_of(&mut app, &view);
assert_eq!(m.missing, vec![(view.quad(bounds), view.to_screen(Point::new(bounds.x0, bounds.y0)))], "zoom {zoom}, {rotation}°");
}
app.run("view.showMissingLinks", json!({"on": false})).unwrap();
assert!(marks_of(&mut app, &view()).missing.is_empty());
}
/// The menu item runs the engine's toggle, and its label follows it.
#[test]
fn the_missing_links_menu_item_uses_the_engine_toggle() {
let mut app = app();
assert_eq!(crate::menus::dynamic_label(&app, "view.showMissingLinks", ""), "Show Missing Links");
app.run("view.showMissingLinks", json!({"on": true})).unwrap();
assert!(app.session.active().unwrap().show_missing_links);
assert_eq!(crate::menus::dynamic_label(&app, "view.showMissingLinks", ""), "Hide Missing Links");
app.run("view.showMissingLinks", json!({"on": false})).unwrap();
assert!(!app.session.active().unwrap().show_missing_links);
}
+1
View File
@@ -30,6 +30,7 @@ pub const TOGGLES: &[&str] = &[
"view.rulers",
"view.boundingBox",
"view.transparencyGrid",
"view.showMissingLinks",
"view.guides",
"view.grid",
"view.slices.hide",
+5
View File
@@ -52,6 +52,9 @@ fn window_toggle_label(app: &VectorcraftApp, id: &str) -> Option<String> {
"view.transparencyGrid" => {
if app.session.active().is_some_and(|d| d.transparency_grid) { "Hide Transparency Grid" } else { "Show Transparency Grid" }.into()
}
"view.showMissingLinks" => {
if app.session.active().is_some_and(|d| d.show_missing_links) { "Hide Missing Links" } else { "Show Missing Links" }.into()
}
"view.guides" => if v.guides { "Hide Guides" } else { "Show Guides" }.into(),
"view.grid" => if v.grid { "Hide Grid" } else { "Show Grid" }.into(),
"view.guides.lock" => if app.session.guides_locked() { "Unlock Guides" } else { "Lock Guides" }.into(),
@@ -371,6 +374,8 @@ pub const DYNAMIC_LABELS: &[&str] = &[
"Show Bounding Box",
"Hide Transparency Grid",
"Show Transparency Grid",
"Show Missing Links",
"Hide Missing Links",
"Hide Guides",
"Show Guides",
"Hide Grid",
+1
View File
@@ -674,6 +674,7 @@ fn built_in_tree(english_names: bool, listed: &Listed) -> Vec<(&'static str, Vec
),
c("Hide Bounding Box", "view.boundingBox"),
c("Show Transparency Grid", "view.transparencyGrid"),
c("Show Missing Links", "view.showMissingLinks"),
c("Hide Text Threads", "view.textThreads"),
c("Hide Gradient Annotator", "view.gradientAnnotator"),
c("Hide Corner Widget", "view.cornerWidget"),
+7
View File
@@ -1073,6 +1073,12 @@ fn groups(app: &VectorcraftApp) -> [Vec<(CommandRef, CommandState)>; 6] {
let f = Facts::of(&cache.list, &selected);
let o = &app.ui.links.options;
let e = |id: &str, params: Value, a: Act, label: &str| entry(app, &f, id, params, a, label);
// View › Show Missing Links, also here: checked while the canvas marks them.
let marking = app.session.active().map(|st| st.show_missing_links);
let show_missing = (
CommandRef::with_params("view.showMissingLinks", json!({ "on": marking != Some(true) })),
CommandState::new().enabled(marking.is_some()).checked(marking == Some(true)).title(tl!("Show Missing Links")),
);
[
vec![
e("ui.relinkDialog", json!({ "ids": f.all() }), Act::Relink, "Relink…"),
@@ -1097,6 +1103,7 @@ fn groups(app: &VectorcraftApp) -> [Vec<(CommandRef, CommandState)>; 6] {
.chain([
option_entry("ui.links.linkInfo", Value::Null, o.info, "Show Link Info"),
option_entry("ui.links.dcs", Value::Null, o.dcs, "Show DCS Transparency Interactions"),
show_missing,
])
.collect(),
]
+1
View File
@@ -83,6 +83,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard
|---|---|---|
| 2026-12-02 | minor | G12: Retype panel font rows have an item context menu: a secondary click or Shift+F10 selects the row and offers Apply Font (what a click on the row does; off without live text selected), the panel menu's Small, Medium and Large sample sizes and Reset Retype Panel; the menu closes when the list or the document changes. Headless regressions: `panels::retype::tests`. Scores and estimates unchanged. |
| 2026-12-02 | minor | G12: SVG Interactivity event rows have an item menu: a right-click (or Shift+F10 on the focused row) picks that event and offers Remove Event (`svgInteractivity.removeEvent` for that row, one undo step), Clear Events (`svgInteractivity.clearEvents`, enabled like the panel menu row) and Link JavaScript Files… (`ui.javascriptFilesDialog`). Headless regressions: `panels::svg_interactivity::tests`. Scores and estimates unchanged. |
| 2026-11-26 | minor | Show Missing Links in View and the Links panel marks missing linked images and placed documents on the canvas; the link watcher scans them in the background, so turning it on never waits on a file; transient overlays stay out of artwork, export and undo history; command API controls and lists markers (#5547). Scores and estimates unchanged. |
| 2026-11-25 | minor | Document Info › Objects: total enclosed area (`pathArea` in pt²) for closed and compound paths (holes subtracted per fill rule; guides and open paths left out) and formatted Path Area in document units, beyond reference panel (#6965). Worked out only when the request covers Objects (`pathArea` null otherwise or with `pathArea: false`); the panel asks for it only while Objects or All Categories is shown. Tests: `info_gives_the_paths_total_area`, `info_works_out_the_path_area_only_for_the_objects_category`, `the_path_area_is_worked_out_only_while_objects_is_shown`, `format_area_formats_and_trims_cleanly`. Scores and estimates unchanged. |
| 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. |
| 2026-11-21 | minor | G12: Document Info › Selection Only (`ui.docInfo.selectionOnly`) counts objects in the selection through `document.info`; with no artwork selected it shows (No artwork selected) and artboards the Artboard tool has selected still show. Headless regressions: `panels::doc_info::tests::test_doc_info_counts_entire_document`, `test_doc_info_selection_only_toggles_and_filters_counts`, `test_doc_info_selection_only_keeps_selected_artboard`, `test_doc_info_panel_menu_toggles_state`. Scores and estimates unchanged. |
+22
View File
@@ -62,6 +62,28 @@ Effect ids from `effect.list` / `apply_effect` / `vectorcraft://effect/{id}` (fo
A release `vectorcraft-cli` on `PATH` can lag the checkout. Prefer `cargo install --path apps/vectorcraft-cli --locked` and put `$CARGO_HOME/bin` first in the MCP client's environment, or set the client's `command` to that binary's absolute path (#6460).
## Missing-link canvas markers
Use `run_command` with these engine commands (the `command_run` alias takes the same calls with `id` in place of `command`):
```json
{"command":"view.showMissingLinks","params":{"on":true}}
{"command":"links.marked","params":{}}
{"command":"view.showMissingLinks","params":{"on":false}}
```
`links.marked` refreshes file status and returns `{on, images: [{id, bounds: [x0, y0,
x1, y1]}]}` for visible missing linked images and placed documents in the active document.
When the toggle is off, `images` is empty; `links.list {show: "missing"}` still lists missing
links independently. Neither command changes selection or undo history. `view.showMissingLinks`
never reads linked files, so it returns at once even for a large or slow file; `links.marked` is
the explicit, synchronous inspection. The desktop canvas draws a red outline and badge, scans
files in the background as soon as the toggle turns on and then about every two seconds even
with the Links panel closed, and removes markers after repair. The toggle is per open
document and starts off on reopen. Markers are never saved as artwork, rendered into exports
or printing, or exposed as selectable objects. Headless mode exposes the same state and
queries; it has no canvas on which to draw decorations.
## Install and register
From the repository root, with Rust 1.95+ and the platform's source-build prerequisites installed:
+2 -1
View File
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -132,6 +132,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard
| Date | Change | Summary |
|---|---|---|
| 2026-11-26 | minor | Show Missing Links in View and the Links panel marks missing linked images and placed documents on the canvas; the link watcher scans them in the background, so turning it on never waits on a file; transient overlays stay out of artwork, export and undo history; command API controls and lists markers (#5547). Scores and estimates unchanged. |
| 2026-11-25 | minor | Document Info › Objects: total enclosed area (`pathArea` in pt²) for closed and compound paths (holes subtracted per fill rule; guides and open paths left out) and formatted Path Area in document units (#6965). Worked out only when the request covers Objects (`pathArea` null otherwise or with `pathArea: false`); the panel asks for it only while Objects or All Categories is shown. Tests: `info_gives_the_paths_total_area`, `info_works_out_the_path_area_only_for_the_objects_category`, `the_path_area_is_worked_out_only_while_objects_is_shown`, `format_area_formats_and_trims_cleanly`. Scores and estimates unchanged. |
| 2026-11-24 | minor | G12: History row context menus use shared Craft List and Menu controls after rebasing onto the panel migration. App-specific actions retain the chosen snapshot across pending edits and dismiss on document switches; keyboard context requests and focus restoration use the shared runtime. Regression cases retained (#8845); scores and estimates unchanged. |
| 2026-11-21 | minor | G12/M14: History row context menus retain the chosen snapshot while the menu is open and pending edits settle; jumps settle typing before counting undo/redo, and discarded states report that they are unavailable. Shift+F10 opens the focused row menu, Escape restores row focus, and switching documents dismisses the popup. History checklist, area and milestone evidence updated (#8845); scores and estimates unchanged. |
@@ -373,7 +374,7 @@ dominate; 3D, graphs and automation are specialist). They sum to 105. Feature de
| Print, colour management, separations, flattener | 3 | 80% | Production Preflight available; print preview fidelity remains | 2–4 | estimated |
| Automation (Actions, Variables, scripting, batch) | 3 | 80% | script DOM classes for layers, artboards and gradient stops, `#engine` (#1183), Batch option depth (scripting, #9019, Batch, #1938, and image and graph variables are done) | 8–14 | estimated; MCP `add_text` exposes existing vertical type; score and hours unchanged |
| UI chrome (panels, Properties, workspaces, preferences) | 6 | 80% | Document Info Selection Only (`ui.docInfo.selectionOnly`) counts the selection through `document.info`, and with no artwork selected it shows (No artwork selected) and artboards the Artboard tool has selected still show (`panels::doc_info::tests::test_doc_info_counts_entire_document`, `test_doc_info_selection_only_toggles_and_filters_counts`, `test_doc_info_selection_only_keeps_selected_artboard`, `test_doc_info_panel_menu_toggles_state`); Properties Quick Actions offer Ungroup for any selected group, Isolate Group only for one group, and Unite only for selections of at least two objects, each a non-guide path or a compound path (`panels::properties::tests::two_groups_offer_ungroup_without_isolate_group`, `one_group_offers_ungroup_and_isolate_group`, `several_paths_offer_group_clipping_mask_and_unite`); Asset Export item context menus implemented (G12); Properties per context, 2 Preferences options stored but unused (#394, audited 2026-10-30: Scratch Disks, legacy vector clipboard), context menus in the remaining panels that have none (History rows implemented, #8845), accessibility | 13–20 | estimated; floating panels in OS windows of their own on the desktop (#4135), score and hours unchanged; macOS save Format menu implemented (#866), score and hours unchanged; Eyedropper cursor and precise setting checked (#1269), OS visual QA unverified; the line under the Preferences fields describes each General, Selection & Anchor Display, Guides & Grid, Smart Guides, Slices, Hyphenation, Plug-ins & Scratch Disks, User Interface, Performance, File Handling, Clipboard Handling, Appearance of Black and Devices setting on hover and keyboard focus (#8199, #8223, #8248, #8264, #8360, #8376, #8402, #8429, #8453, #8475, #8483, #8498), score and hours unchanged; numeric-field focus and normal text drags regression-tested (#1326); a focus click released more than 1 pt from its press keeps the caret and a tap within 1 pt selects all (#6659); artboard navigation synchronizes the tool selection before destructive actions; status messages and readouts use stable responsive allocations sized for localized labels and ordinary coordinates (sample widths cached by language/unit/DPI; regression and contributor original-file evidence below; scores/hours unchanged); effect dialogs' colour fields show a swatch that opens the Color Picker (#5365), score and hours unchanged; icon-strip flyouts retain user sizes (#5713); floating tab groups collapse into the side icon rail and opened rail panels fold back into it (#5925, in part), scores and hours unchanged ; interim macOS cursor delivery (#2292), headless coverage only; native validation pending, score and hours unchanged; Swatches item context menus have focused regressions and rendered-layout evidence below; Character Styles and Paragraph Styles item context menus have focused regressions (panels::text_styles::tests::right_click_context_menu_*); scores and estimates unchanged; History row context menus have snapshot, pending-edit, typing and clear-history headless regressions (panels::history::tests, #8845); swatches dropped on New Swatch or Delete Swatch carry the selected swatches the find field or kind filter hides (#8620); scores and estimates unchanged; the Artboards panel's list fills the panel, so it resizes with the window (#6085), score and hours unchanged; Layers appearance marker uses a hollow diamond and tooltip separate from targeting and selected art (#8710), based on Hassan1305's #8757; focused Layers coverage, runtime validation pending; scores and hours unchanged; Tools toolbar Search entry and retained customization covered in `crates/ui-egui/src/toolbar/tests.rs` (#8758), scores and hours unchanged |
| Libraries, Links, Package | 2 | 82% | shared libraries, linked graphics, gradients and patterns as library items (no cloud by design) | 2–3 | estimated; #5804: private native-picked raster editor (scores unchanged) |
| Libraries, Links, Package | 2 | 82% | shared libraries, linked graphics, gradients and patterns as library items (no cloud by design) | 2–3 | estimated; #5804: private native-picked raster editor (scores unchanged); #5547: missing-link canvas outlines and badges, View/Links toggles and command API (score and hours unchanged) |
| Generative AI (Text to Vector, Generative Recolor, Shape Fill, Concept to Vector, Prompt to Edit, Rewrite Text) | 2 | 0% | a pluggable provider and the panels; needs an owner decision on models | 30–60 | measured (absent) |
| **Feature depth** | **105** | **~79%** | | **~250–420** | |
| Interaction-fidelity pass (every tool's modifiers, cursors, Properties per context) | | | [ui-parity.md](ui-parity.md) | 60–90 | estimated |
+4 -2
View File
@@ -114,6 +114,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard
| 2026-11-06 | minor | Drop Shadow, Outer Glow and Inner Glow: spinner arrows beside Opacity, the offsets, Blur and Darkness (#5367, #5368); scores and estimates unchanged |
| 2026-11-06 | minor | Rename (`ui.rename`, no default key) opens the Layers panel's name field on the selected layer, group or object's row, as double-clicking its name does; a key can be assigned in Keyboard Shortcuts (#5324, a VectorCraft addition); scores and estimates unchanged |
| 2026-11-06 | minor | Properties panel in Edit Artboards (Shift+O): a Transform section with the shared reference point, X, Y, W and H, the preset and orientation, and Move and Scale Artwork with Artboard, above the Artboards section with the name, Artboard Options and Fill (#5219); scores and estimates unchanged |
| 2026-11-26 | minor | Show Missing Links in View and the Links panel marks missing linked images and placed documents on the canvas; the link watcher scans them in the background, so turning it on never waits on a file; transient overlays stay out of artwork, export and undo history; command API controls and lists markers (#5547). Scores and estimates unchanged. |
| 2026-11-06 | minor | Shape tools: a press on the selection's centre point (Show Center) moves the selection, also where no art is painted, and a press in the rotate zone just outside a bounding-box corner turns it about the centre, both as the Selection tool's do (#5477); the Selection tool takes its centre point too, so an unfilled shape moves instead of starting a marquee; scores and estimates unchanged |
| 2026-11-06 | minor | Transform fields: one Tab moves from one numeric field to the next in the Transform panel, the Properties panel's Transform section and the Control bar — a field's scrub label was a second, invisible tab stop, and the W/H link between W and H is now made after the fields, so it stays a tab stop after them; scores and estimates unchanged |
| 2026-11-06 | minor | Scrubby labels: the Control bar's Stroke: and Opacity: and the Properties panel's Stroke, links to their panels, scrub the field after them as other labels do; a click still opens the panel (#4088); scores and estimates unchanged |
@@ -195,9 +196,9 @@ tools, never checked side by side) isn't captured row by row.
## Headless (RFC-0052)
**Headless ([RFC-0052](https://github.com/storytold/craft-contrib/blob/main/rfcs/0052-headless-reach.md)): 0 yes, 0 no (window 0, os 0, engine-gap 0), 0 partial, 366 unknown.**
**Headless ([RFC-0052](https://github.com/storytold/craft-contrib/blob/main/rfcs/0052-headless-reach.md)): 0 yes, 0 no (window 0, os 0, engine-gap 0), 0 partial, 368 unknown.**
Every parity table on this page has a Headless column: the Summary table (12 area rows, including the overall row) and the behaviour tables (353 rows). Every row is `unknown` until it is checked. A checked row may be marked `no (<reach>)` or `partial (<reach>)` by hand, where the reach is `window` (needs the desktop window, a dialog or the pointer), `os` (needs an OS or online service the engine doesn't wrap) or `engine-gap` (could be a command, isn't one yet). A `partial` row's notes say which part a headless client can do. `yes` only when the row cites a command id from the engine registry that `vectorcraft-cli` and the MCP server load (LightCraft's `cmd:<id>` check is the model). Some rows already cite command ids such as `toolbar.show`, `tool.select` and `guide.add`; those are not enough for `yes` until they are registry ids, and desktop-only ids (including the generated list in `crates/mcp/src/ui_catalog.rs`) do not count. Update the counts in this line when you mark rows.
Every parity table on this page has a Headless column: the Summary table (12 area rows, including the overall row) and the behaviour tables (356 rows). Every row is `unknown` until it is checked. A checked row may be marked `no (<reach>)` or `partial (<reach>)` by hand, where the reach is `window` (needs the desktop window, a dialog or the pointer), `os` (needs an OS or online service the engine doesn't wrap) or `engine-gap` (could be a command, isn't one yet). A `partial` row's notes say which part a headless client can do. `yes` only when the row cites a command id from the engine registry that `vectorcraft-cli` and the MCP server load (LightCraft's `cmd:<id>` check is the model). Some rows already cite command ids such as `toolbar.show`, `tool.select` and `guide.add`; those are not enough for `yes` until they are registry ids, and desktop-only ids (including the generated list in `crates/mcp/src/ui_catalog.rs`) do not count. Update the counts in this line when you mark rows.
## Pen, Curvature and anchor tools
@@ -620,6 +621,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
| Color Effects add-on (VectorCraft addition): live Exposure, Desaturate and Invert Colors in Effect › Color Effects and Object › Plug-ins › Color Effects; its panel picks a colour adjustment and its values and adds it as a live effect or applies it as a filter, into the colours, as one undo step; Select by Color Kind selects the objects that use spot colours, carry colour effects, or are RGB, CMYK or grayscale images; Vector Halftone draws an object as halftone dots live (the dots Object › Vector Halftone makes), which Expand Appearance and the exporters write as paths; Duotone prints each colour's tone with one to four inks (a tint of a spot tone's swatch, or the CMYK mix of several), live or as a filter, its dialog a row per tone and the picked tone's curve; Print Ink Fixes (a CMYK document's ink limit, white overprint removed, black overprint set) opens its options from the submenu and the panel's Inks | done | `addon.color.*`, `crates/ui-egui/src/addons/color.rs` and its tests; not a feature of the reference app, so it is not scored | unknown |
| Color Effects add-on (VectorCraft addition): Object › Plug-ins › Color Effects › Find Nearest Swatch… picks a Library (Document Swatches, a built-in library, or a library or colour book the user saved or loaded) and Fill and Stroke, lists each colour of the selection with its three closest swatches (chip, name, ΔE 2000), and Apply gives each colour its nearest swatch (global and spot swatches linked; a library's swatches added to the document first), one undo step | done | #4923; `addon.color.nearestSwatch`, `addon.color.applyNearestSwatch`, `crates/engine/src/cmd/addons/color/nearest.rs`, `crates/ui-egui/src/addons/color/nearest.rs` and their tests; not a feature of the reference app, so it is not scored | unknown |
| Color Effects add-on (VectorCraft addition): Object › Plug-ins › Color Effects › Randomize Fill Colors… picks Colors (Any Color, Tints of a Swatch or Grays), a Swatch among the document's global and spot swatches, Minimum and Maximum (%) and a Seed, with Preview, and gives each selected filled path and compound path, inside groups too, its own fill color at random, one undo step | done | `addon.color.randomFill`, `crates/engine/src/cmd/addons/color/random_fill.rs`, `crates/ui-egui/src/addons/color/random_fill.rs` and their tests; a VectorCraft addition, so it is not scored | unknown |
| Missing linked images and placed documents can show red canvas bounds and a badge; View and Links panel toggles share transient per-document state; command API can set and list markers | done | #5547; `cmd/links.rs`, `link_watch.rs`, `canvas/missing_links.rs`; focused engine/canvas/MCP regressions, headless visual check and full CI (including WebAssembly) pass | unknown |
| Selection Tools add-on (VectorCraft addition): Object › Plug-ins › Selection Tools › Select by Artboards… lists every artboard (number, name, width × height in the document's units), filters them by name, chooses several (click, Shift-click for a range, Cmd/Ctrl-click to toggle; Select All / None act on the rows shown; a count of those chosen), fits a row's artboard in the window on double-click and makes it active, and on OK selects the objects overlapping, fully inside or fully outside the chosen artboards (Overlapping is All on Active Artboard's test) | done | #5525, #5548, #5549; `addon.select.byArtboards`, `crates/engine/src/cmd/addons/select.rs`, `crates/ui-egui/src/addons/select.rs` and their tests; not a feature of the reference app | unknown |
| Selection Tools add-on (VectorCraft addition): Select Linked, Select Embedded, Select Missing and Select Modified in Object › Plug-ins › Selection Tools and the Links panel menu (off when no image has that status; Shift adds to the selection) select the images and placed documents with that link status, leaving out hidden, locked, template-layer and outside-isolation ones, which the status bar counts (e.g. "Selected 9 missing images; 3 more are hidden or locked"); Select by Link Status… lists them with name, status and format, searches by name, filters by status, picks with checkboxes and All / None, and selects with Zoom to Selection on by default | done | #5526; `addon.select.byLinkStatus`, `crates/engine/src/cmd/addons/select.rs`, `crates/ui-egui/src/addons/select/link_status.rs` and their tests; not a feature of the reference app | unknown |
| Style panels: a double-click on a user character style's row opens its Character Style Options, and on a paragraph style's row opens the same Paragraph Style Options as the panel menu, with General, Basic Paragraph Formats, Tabs, Composition, Hyphenation, Justification and East Asian Composition Settings; the Character Style Options dialog keeps a fixed width, its sections scrolling when the window is shorter so OK and Cancel stay on screen | done | `ui.charStyleOptions`, `ui.paraStyleOptions` (`paraStyle.edit`); `panels::text_styles::tests::double_clicking_a_character_style_row_opens_its_options`, `dialogs::char_style_options::tests::the_sections_scroll_in_a_window_shorter_than_the_general_list`, `dialogs::para_style_options::tests::every_section_draws_its_fields`, `dialogs::para_style_options::tests::tabs_section_edits_the_style_stops` | unknown |