mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-12 05:12:39 +00:00
* Fix Links panel stalls on network paths * Fix Links review findings * Fix Links worker gating and wasm build A link check blocked on another document's unreachable share no longer holds back the document now shown: after 200 ms a fresh worker takes over (at most four alive at once) and the stale result is dropped. relinked_asset used the native-only fingerprint_from, breaking the wasm build; it now uses fingerprint_of. The EPS relink and IDML link reach tests build Windows paths correctly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix Links worker repaint and graphic read retry Switching documents before the 200 ms takeover now schedules a repaint for it: a blocked worker never asks for one, so without other input the panel kept waiting. A failed graphic read is no longer cached as missing, so the next check reads again. The legacy EPS fixture clears its source fingerprint, as documents from before fingerprints have none, so the test no longer depends on running within two seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep touched links OK and poll Links within seconds Only a new size now marks a graphic Modified from its fingerprint. A file with the same size but a new time (saved again, copied, restored or checked out) is compared byte for byte, once per new time, and stays OK when unchanged. External changes are polled every two seconds instead of every five minutes. The next check waits at least as long as the last one took (up to five minutes), so a slow share stays idle half the time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Wake Links when a worker slot frees; translate check strings A worker thread asks for a repaint when it ends, so a document waiting at the four-worker limit gets a worker as soon as a superseded one returns from its blocked call, without other input. Rows from a check keep a weak reference to their document. The key names it by address, which a later document can't reuse while the allocation is kept. The Links panel's new strings ("Checking", "Checking links…", "Link status is unavailable.") use the UI's ellipsis and are translated in every interface language. The comments on Session::text_link_checks and on the byte comparison in links::status describe what they do now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Links: rows from the document, statuses from a check that can stop The panel lists links from the document on the UI thread (no file is looked at) and fills in the statuses a worker check last found, kept per document. An edit shows at once, and a check of an earlier edit still supplies statuses instead of being discarded. - A check of another document is told to stop and ends before its next file; only one blocked in a file system call is replaced, so blocked workers no longer hold their slots for a whole document. - Checks are timed on the worker, and what they remember passes to the worker that replaces them. - A fingerprint is kept only for a file whose time was settled when it was read, as for linked text. A file found unchanged by its bytes gets its current size and time stored with the document (remember_link_files), without marking a saved document as changed. - Asset::set_link keeps link and fingerprint together; copies made by Package and Copy Links To carry none. - The Session holds one LinkListChecks. Update Link lists files only when a linked story was edited in the layout. - The unused "Checking links..." caption is removed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>