aboutsummaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorTommaso Negri <me@tommasongr.com>2026-10-14 22:05:54 +0200
committerTommaso Negri <me@tommasongr.com>2026-10-14 22:05:54 +0200
commit8aacd1f753c7ef21a7e1173cc08c5b0a85a94c6b (patch)
treeb83da0e024345d052bd9c08cced0277ac8c283a6 /tasks
parentf802039757d5da01a2b7cb7d1b15c692f137d91f (diff)
downloadbar-8aacd1f753c7ef21a7e1173cc08c5b0a85a94c6b.tar.gz
bar-8aacd1f753c7ef21a7e1173cc08c5b0a85a94c6b.zip
fix block interaction capture warning
Diffstat (limited to 'tasks')
-rw-r--r--tasks/20261014-192419/TASK.md22
1 files changed, 21 insertions, 1 deletions
diff --git a/tasks/20261014-192419/TASK.md b/tasks/20261014-192419/TASK.md
index c909da9..50f9919 100644
--- a/tasks/20261014-192419/TASK.md
+++ b/tasks/20261014-192419/TASK.md
@@ -1,6 +1,6 @@
# Resolve BlockView capture warning and clarify monitor lifetime
-- STATUS: OPEN
+- STATUS: CLOSED
- PRIORITY: 190
- TAGS: review,quality,ui
@@ -13,3 +13,23 @@ Approach: Inspect the actual closure ownership chain and choose explicit, intent
Completion checks: A clean swift build/test has no warning from this capture. Click/scroll receives correct current hover data. Hide/show and any applied screen-rebuild patch do not accumulate monitors, duplicate command dispatch, or retain discarded views/windows. Manually verify lifecycle behavior before claiming leak prevention.
Design constraint: Follow README.md: keep source-based configuration, no dependencies or plugin framework, and use the smallest readable change that makes the existing behavior reliable. This is a suggestion for individual review, not a deadline. Findings were recorded on 2026-10-14; re-check the current code before implementing.
+
+## Implementation and validation
+
+Implemented explicit weak captures through a per-view BlockInteraction owner.
+Registration is idempotent; disappearance removes the monitor and clears hover,
+and an isolated deinitializer removes any remaining monitor when its owner is
+released. Rendering and hover use line positions, resolving CELL against current
+block output and rejecting positions removed by a refresh. This supplies the
+BlockView portion of task 20261014-191457 without changing Cell's public model.
+
+A clean swift test build passes the monitor registration/restart, weak owner and
+block lifetime, and refreshed/removed hover regression tests. No capture warning
+remains. The optional screen-hotplug patch is not applied (it targets the old
+Models/AppDelegate.swift path).
+
+Status remains OPEN pending manual UI verification: repeat hide/show, click and
+scroll after output refresh/shrink, check multiple windows and hover transitions,
+and discard/rebuild hosting windows while checking monitor dispatch and window
+release. Automated owner lifetime tests do not establish that SwiftUI releases
+hosting state in every UI lifecycle path; leak prevention is not claimed.