Commit Graph
195 Commits
Author SHA1 Message Date
aiongg 94ea495bdb Merge pull request #3020 from dotCooCoo/fix/windows-hard-link-write-target
Originals: on Windows a hard link to an original counts as that original
2026-10-27 13:46:50 -04:00
aiongg 3a3e49af53 fix(ui): dropdown menus grow back after a search with no matches (#3154)
* Use craft-ui's dropdown so menus grow back after shrinking

The album picker keeps its choices and search field in a fixed header and scrolls only
the list; combo_box and the print dialog's combos use craft_ui::ComboBox. egui::ComboBox
is now disallowed by clippy.

* chore(deps): craft-libs 60d60d48 (dropdown fixes)

* chore(deps): craft-libs 6af63481 (dropdown fixes)

* chore(deps): craft-libs 4d7b82f7 (dropdown fixes)

* chore(deps): craft-libs 92d392cf (#387 merged)
2026-10-27 10:27:42 -04:00
dotCooCoo 0c7640f7d3 Reject unavailable Windows file identities in strict comparisons
Return an error when either file index is zero. Keep the resolved-path fallback for lenient comparisons. Test both unknown-identity orderings and distinguish identity lookup failures from known-original refusals.

Merge main at 662df66f.
2026-10-26 20:28:34 -07:00
dotCooCoo 4826fff734 Originals: a Windows file index of 0 does not identify a file
same_file::is_same_file treats two files with the same volume serial
number and file index as one file, also when both report index 0. The
Windows comparison now reads both identities through winapi-util and
accepts a match only when both file indexes are nonzero; otherwise the
resolved paths are compared, as for a volume without file indexes.
2026-10-26 11:34:06 -07:00
dotCooCoo a97f19605c Originals: compare lengths before the Windows file identity
On ReFS two files can share the 64-bit file index that same_file
compares, so same_file now rejects files of different lengths before
it checks the volume serial number and file index.

The hard-link test skips with a recorded reason when the temporary
folder's volume has no hard links (FAT/exFAT, some shares), the same
errors publish_new treats as a volume without hard links.
2026-10-25 22:32:37 -07:00
aiongg 21a53cf61f Merge title-bar-movable (lightcraft#2930) into docking-adoption; every craft-libs crate at craft-libs main 1e6f127 2026-10-26 02:20:20 +00:00
aiongg 1952d4fd3c Merge upstream main into docking-adoption 2026-10-26 02:18:38 +00:00
aiongg 003779ce51 Merge upstream main into title-bar-movable; craft-window at craft-libs main 1e6f127 2026-10-26 02:18:22 +00:00
skylar taylor-barrick 387bed199f chore(deps): refresh safe dependency bumps (#2994) 2026-10-25 19:30:51 -04:00
dotCooCoo 7ebbb17a82 Originals: on Windows a hard link to an original counts as that original
safe_file::same_file compared length and canonical paths on every
platform other than Unix. On Windows canonicalize returns a hard link's
own path, so a hard link to a library original under another name was
not the same file, and pin_write_target accepted it as a screenshot
destination. For this reason the engine test
write_targets_pin_absent_paths_and_recheck_the_current_library failed
on Windows.

On Windows same_file now first compares the volume serial number and
file index through the same-file crate (already in Cargo.lock through
walkdir), then falls back to the resolved-path comparison. The catalog
crate takes same-file as a Windows-only dependency.
2026-10-25 15:55:21 -07:00
Dylan M. Taylor 522beb0c3e build: pin craft-update to craft-libs main (495e597) (#2990)
Picks up the startup prompt without the glyphs a font may lack (storytold/craft-libs#343, #344): the close mark is painted and the version pill is ASCII, so apps that panic on a missing glyph no longer take the prompt down.

Part of tracking issue storytold/craft-libs#319
2026-10-25 17:55:29 -04:00
Dylan M. Taylor 2833d8fc9a Merge pull request #2780 from storytold/security/raw
security/raw: bound hostile-memory paths in the raw decoders
2026-10-25 16:45:57 -04:00
Dylan M. Taylor d8ceb3a6af security/meta,merge,raw,tiff,denoise: bound memory sized by attacker-shaped inputs
XMP flattening, sparse-focus EXIF decode (plus the maker-note and TIFF value
budgets), lossy-DNG chunk staging, panorama stitch frames, the reference ONNX
executor's tensors and the denoise product reader all now reject or cap what a
malformed file can make them allocate: each result is checked before the
memory behind it is reserved, every regression carrying a test that fails
without its bound.
2026-10-25 15:42:19 -04:00
Dylan M. Taylor 2d3c7275b2 fix(updates): drop the manual window's custom id; pin craft-update to craft-libs main (db19c37) 2026-10-25 15:07:57 -04:00
Dylan M. Taylor 8e5a6fc2e7 refactor(updates): hold the install back while documents are unsaved 2026-10-25 14:53:33 -04:00
Dylan M. Taylor 2b9317519c feat: startup update prompt modal and direct self-updating
The update flow (check at start or on request, the startup prompt, the self-update worker) is craft-update's Updater; the app only supplies the suite, its close path and its status window. The check at start is opt-in for the desktop app, and the Windows update helper runs before argument parsing.

Ref: storytold/craft-libs#319
2026-10-25 14:22:14 -04:00
Dylan M. Taylor 1a3d9aff1e Merge pull request #2913 from storytold/codex/egui-037-lightcraft-20261023
Migrate LightCraft to egui 0.37 with current main preserved
2026-10-25 14:10:49 -04:00
aiongg 672baaea46 Merge lightcraft#2913 (egui 0.37) into docking-adoption; craft-ui and craft-docpath at craft-libs main a091680 2026-10-25 17:36:59 +00:00
aiongg c01d4c7074 Merge lightcraft#2913 (egui 0.37) into title-bar-movable; craft-window at craft-libs main a091680 2026-10-25 17:19:47 +00:00
aiongg 649e84b0ed Top bar: repin craft-window to craft-libs main 5bbe9f6 2026-10-25 16:25:27 +00:00
aiongg 1291d391d9 Docking: repin craft-ui and craft-docpath to craft-libs main 5bbe9f6 2026-10-25 16:25:25 +00:00
aiongg f52df54f13 Merge upstream main into title-bar-movable 2026-10-25 16:24:58 +00:00
aiongg fd26427cab Merge upstream main into docking-adoption 2026-10-25 16:24:58 +00:00
aiongg 901a115bf7 Top bar: repin craft-window to craft-libs main ea4c823 2026-10-25 13:53:10 +00:00
Brandon ThomasandClaude Opus 5.5 03c88c166c Release 0.14.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 09:26:32 -04:00
aiongg 19ab821477 Top bar: repin craft-window to craft-libs 4093ea4; the title bar is announced from empty_area's response 2026-10-25 12:41:42 +00:00
aiongg 577b6cfced Top bar: the title-bar drag uses craft-window's title_bar, and a panel over the bar keeps the window still on macOS 2026-10-25 12:35:44 +00:00
aiongg b477efd3da Docking: repin craft-ui and craft-docpath to craft-libs b6d35e2 2026-10-25 12:17:31 +00:00
aiongg 4e6c210a5f Docking: repin craft-ui and craft-docpath to craft-libs 4dc543c 2026-10-25 05:57:50 +00:00
aiongg e8588b925b Docking: repin craft-ui and craft-docpath to craft-libs 8a503cf 2026-10-25 03:59:13 +00:00
skylartaylor c057ccc23f Migrate LightCraft to egui 0.37 and reconcile dependency and font locks
Preserve current main, adapt frame/input and IME handling, and keep library
check results stable across layout passes. Include the matching Nix font lock
and reviewed attribution changes.
2026-10-25 02:54:42 +01:00
aiongg b2f6246314 Docking: repin craft-libs 6e7f285 (the docking follow-ups) 2026-10-24 22:29:00 +00:00
aiongg a70d7638a0 Docking: repin craft-libs 1774443; a dragged divider keeps its panel's width without app code
craft-ui and craft-docpath are pinned to craft-libs
17744430be327d0257496a6a31c8d38fe20a6756, where a divider drag keeps the
split's sizing mode. LightCraft no longer turns dragged ratios back into
side-panel widths.
2026-10-24 20:45:00 +00:00
aiongg 5ce171da23 Docking: the workspace, its commands and their parser come from craft-ui (craft-libs 16fb3d4)
craft-ui and craft-docpath are pinned to craft-libs 16fb3d46e1eaa0d455465e4e66a3ac7b17b55bd3.
The saved workspace is craft_ui::docking::Workspace<Panel>; settings written
before it had a version load as version 1. ui.dock params parse as the shared
DockCommand and apply through Workspace::apply_all. LightCraft keeps its
panels, permissions, default layout, photo-view checks, the fallback beside
the photo view for a panel with no recorded place, and its settings file.

The photo view takes side splits (accepts_splits on PROTECTED), so panels
still open and move beside it.

Tests: a version 1 workspace file loads and reopens its hidden panel; a drag
of a group by its bar moves both of its panels.
2026-10-24 19:23:08 +00:00
skylartaylor 50df646183 M0.37: port LightCraft UI, input and capture lifecycle to egui 0.37 2026-10-24 08:02:12 +02:00
francoisgn 7680e38add Merge upstream/main (0.13.0, incl. #2494 as merged) 2026-10-23 12:47:10 +03:00
Brandon ThomasandClaude Opus 5.5 23e181283c Release 0.13.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:06:09 -04:00
Brandon ThomasandClaude Opus 5.5 479a05a0be Release 0.12.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:39:28 -04:00
francoisgn 50cc4e293c Merge PR #1464: Bump quick-xml to 0.41 (RUSTSEC-2026-0194, RUSTSEC-2026-0195 2026-10-22 22:31:16 +03:00
francoisgn 5b4c0e79c2 Merge PR #1976: GUM-3201: Reduce guided-filter coefficient allocations 2026-10-22 22:31:15 +03:00
Dylan M. Taylor bfb23db2ca Use chrono instead of hand-rolled UTC conversion (#2457)
* Use chrono for UTC/calendar conversion instead of hand-rolled copies

Replaces the hand-rolled Howard Hinnant civil/days-from-civil copies and the
leap-year/days-in-month table with chrono as a workspace dependency:
- apps/lightcraft/src/logging.rs: timestamp (log line time)
- crates/catalog/src/dates.rs: civil + weekday
- crates/catalog/src/stacks.rs: iso_seconds (date -> seconds)
- crates/engine/src/cmd/face_recognize.rs: capture_secs (native only)
- crates/meta/src/datetime.rs: DateTime::unix_seconds and the valid() day check
Output formats and semantics are unchanged (pre-epoch clamp, day rollover that
normalize_iso relies on, leap-second tolerance, EXIF/XMP parsing). chrono uses
only std, so wasm stays safe. AGENTS.md/CLAUDE.md now say time goes through chrono.

Follow-up to storytold/cadcraft#1785

* Never panic on a clock outside chrono's range; keep 5-digit years unprefixed

chrono's From<SystemTime> unwraps, so a clock past year 262143 panicked
inside the logger. timestamp now uses the fallible DateTime::from_timestamp
and reads such a clock as the epoch, keeping the old pre-epoch clamp.

timestamp and catalog's civil write years past 9999 with {:04} like the old
{y:04} did, because %Y would add a '+'. Tests cover the out-of-range and
5-digit-year cases.

* Don't build an unrepresentable SystemTime in the far-future test

UNIX_EPOCH + Duration::from_secs(u64::MAX / 2) overflows Windows'
SystemTime and panicked before timestamp() ran, failing the Windows
test job. Build it with checked_add and only assert where it exists.

* time: preserve old out-of-range date conversion (no epoch fallback)

`DateTime::from_timestamp(...).unwrap_or_default()` silently reset any instant
past chrono's year range to 1970-01-01, changing output the old hand-rolled
Howard-Hinnant code converted exactly (e.g. 10_000_000_000_000 s was
318857-05-20 17:46:40, not the epoch). Restore the old conversion domain with a
cycle-based helper that routes the calendar through chrono (the calendar
repeats every 400 years = 146_097 days, so month/day/time come from chrono and
only the year is carried in i128, keeping every i64 exact).

- apps/lightcraft/src/logging.rs: `timestamp` via `utc_parts`; keep the
  pre-1970 epoch clamp; u64 secs past i64::MAX saturate, not epoch.
- crates/catalog/src/dates.rs: `civil` cycle-based (the callers stay inside
  0000-9999, but a far clock no longer resets to the epoch).

Pinned old outputs in tests:
  logging u64::MAX/2 s -> 292277026596-12-04T15:30:07.000Z (was epoch),
          10_000_000_000_000 s -> 318857-05-20T17:46:40.000Z
  civil 10_000_000_000_000 -> 318857-05-20T17:46:40,
        -10_000_000_000_000 -> -314918-08-13T06:13:20, i64 extremes

* Don't build a year-318857 SystemTime unchecked in the logging test

Windows' SystemTime only reaches about year 30828, so
UNIX_EPOCH + Duration::from_secs(10_000_000_000_000) panicked before
timestamp() ran and failed the Windows test job. Build it with
checked_add and assert where the platform can hold it. The year-10000
case fits everywhere and stays unconditional.

* Name the 400-year range extension as the one exception to the time rule

The rule said never to hand-roll calendar math, but the range fix
(shifting by whole 400-year Gregorian cycles so dates past chrono's year
range keep their old output) is cycle arithmetic, so the rule and the code
disagreed. The rule now names that exception: the library still computes
month, day and time, and only whole cycles are carried in the year.

* Say the library computes month and day; time-of-day is plain arithmetic

Narrows the range-extension wording: the date library computes the
calendar fields, and splitting seconds into hours, minutes and seconds
is ordinary arithmetic, which is what the code does.
2026-10-21 19:36:36 -04:00
Brandon ThomasandClaude Opus 5.5 79d916c149 Release 0.11.0
The web release now builds with craft-fonts too (web-craft-fonts), as VectorCraft's
does, so the published web app ships the Chinese and Japanese faces docs/releasing.md
promises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 14:05:43 -04:00
Brandon ThomasandClaude Opus 5.5 a2a41383c4 Release 0.10.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:19:04 -04:00
Ted Mao 67fa3dbb26 Merge branch 'main' into low-memory-guided-filter 2026-10-19 10:44:36 -07:00
Brandon Thomas 0a0cb19011 Merge PR #1893: JPEG XL: check dimensions during loading & bound tracked allocations (#1517) 2026-10-18 09:19:27 -04:00
Brandon ThomasandClaude Opus 5.5 4f0b110bcb Release 0.9.1: the release web build installs the wasm-bindgen CLI
Since the web zip moved from trunk to cargo xtask web (aeaf4154), packaging/web/package.sh needs the
wasm-bindgen CLI at Cargo.lock's version, and the shared release workflow installs only trunk, so
0.9.0's Web (wasm) job failed. In CI, install it first (as FilmCraft and EffectCraft do).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 23:16:37 -04:00
Brandon ThomasandClaude Opus 5.5 20ccedf56e Release 0.9.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:42:57 -04:00
skylar taylor-barrick 2b173f0bee Build: take craft-docpath from the merged craft-libs rev
craft-libs#169 is merged, so the fork pin is no longer needed. Pinned to
storytold/craft-libs 82a24b006eefa036b43c09a67fb9a3fbd17ffe63 (main after the merge) rather than the older 12281d07,
which predates resolve_absolute and the Windows colon refusal.
2026-10-17 12:03:10 -06:00
adrdsouzaandCodex 9c4fce176f Record CI-generated codecs test dependency lockfile
Co-authored-by: Codex <noreply@openai.com>
2026-10-17 20:50:59 +05:30
aiongg 62eb6627a6 Build: use craft-docpath from craft-libs 2026-10-17 02:21:02 +00:00