Files
logseq/deps
scheinriese 50b3cdfbc9 fix: asset deletion lifecycle + PR-review cleanup
Asset deletion (three independent failures stacked):
- Unlink file on asset-block retract via the existing <unlink-asset
  helper at handler/assets.cljs (modules/outliner/pipeline.cljs:74-80).
  The block was commented out; deleted-assets was computed but never
  consumed, so files leaked indefinitely.
- Reactive existence check in image-icon-cp / avatar-image-cp via
  state/sub :db/latest-transacted-entity-uuids. model/sub-block can't
  drive this — worker/react.cljs:63-67 calls (d/entity db-after id),
  which returns nil for retracted entities, so [::block id] is never
  emitted in affected-keys and subscriptions never fire on deletion.
- Force-remount Avatar root via :key on asset-missing? toggle. Radix's
  Avatar primitive tracks image-loading status in context; once
  AvatarImage reported 'loaded', the status sticks even after the image
  unmounts, so AvatarFallback stays hidden.

PR-review cleanup (no behavior change):
- Strip 17+ [DEBUG ...] console statements across icon, block, views,
  two editor handlers, and assets.
- Close content.cljs preview gap: pass :preview-target-db-id +
  :property to icon-search so the block bullet observes hover preview
  consistently with every other surface.
- Scope-correct close-fallback-menu! — use dissoc-icon-preview-field!
  instead of unconditional state/set-state! nil.
- Delete dead code: heal-dangling-asset-icon (raced lazy hydrate),
  asset-uuid->entity, rgb-string->hex, name->hex (named + css),
  format-pairs.
- Hoist icon-grid-cols / custom-tab-cols magic numbers (9 sites).
- Search inputs: add :type "search" and :aria-label (both picker +
  asset-picker).
- Replace hardcoded #6B7280 with (colors/variable :gray :09).
- Reconcile recents-cap doc drift in storage.cljc + recents-lane
  docstring (cap lives in handler/icon-color/max-recents).
- Remove orphan-asset cleanup from outliner/core save-block-inner. Root
  cause (migration 65.27's :url ref-type) is fixed by 65.28/65.29; all
  asset writers are atomic (save-image-asset!, new-asset-block,
  build-new-asset), and the cleanup ran on every save with a silent-
  retract failure mode.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 16:28:06 +02:00
..
2026-03-13 13:20:49 +08:00
2026-03-17 00:07:33 +08:00
2026-03-11 14:49:12 +08:00
2026-03-13 20:45:58 +08:00