From 27eb6353030953e91a45b0104bd0567e53622090 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Wed, 16 Sep 2026 09:28:32 +0200 Subject: gui: row menu for trash or permanent delete; Apply frees the directory --- gui/internal/model/plan.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gui/internal/model/plan.go') diff --git a/gui/internal/model/plan.go b/gui/internal/model/plan.go index 7496347..4066eae 100644 --- a/gui/internal/model/plan.go +++ b/gui/internal/model/plan.go @@ -73,9 +73,10 @@ func Plan(ctx context.Context, sess *engine.Session, d *engine.Dir) (*PlanTab, e return t, nil } -// Close releases the directory's lock. The session outlives the tab, so -// closing one plan to open another keeps the run - and its claims - going. -// Closing twice is not an error. +// Close releases the directory's lock, which Apply also does once the plan +// is history. The session outlives the tab, so closing one plan to open +// another keeps the run - and its claims - going. Closing twice is not an +// error. func (t *PlanTab) Close() error { if t.lock == nil { return nil @@ -221,6 +222,9 @@ func (t *PlanTab) Apply(ctx context.Context) (*engine.ApplyResult, error) { // used is free again, while one it did use stays protected for the rest // of the run (spec §7.4). t.sess.FinishDirectory() + // An applied plan is history, so the directory is free again without + // closing the window (GUI design §3). + t.Close() if res != nil { t.record(res) } -- cgit v1.3