fix(ui): unsplit skips redundant refresh after closing an ephemeral pane

unsplit() closed each doomed (ephemeral) pane via close() — which already
renders/persists/notifies — then repeated that trio, firing intermediate
persist/notify passes mid-operation. A 2-cell split fully collapses inside
close(), so bail there; only a 3+-cell split (or an empty doom list) still
needs the trailing exit + refresh. The all-conversation path is unchanged.

Also reword the cell-chip CSS comment so it names the reversible hide vs
destructive close glyphs, now that an ephemeral pane can show the close glyph
in split mode.
This commit is contained in:
Patrick Buckley
2026-07-07 22:03:56 -07:00
parent ace9e034f9
commit f56fa55929
2 changed files with 11 additions and 7 deletions
+6 -2
View File
@@ -636,8 +636,12 @@ export class PaneManager {
const p = this._panes.get(id);
return id !== keep && p && p.ephemeral;
});
for (const id of doomed) this.close(id); // collapses its cell, then destroys
if (this._layout) this._exitLayout(keep); // a close() may have already exited
// close() destroys the pane AND renders/persists/notifies; a 2-cell split
// fully collapses inside it, so bail before repeating that work. Only a
// 3+-cell split (or an empty doom list) still needs the exit + refresh here.
for (const id of doomed) this.close(id);
if (!this._layout) return;
this._exitLayout(keep);
this._renderTabs();
this._persist();
this._notifyActive();
+5 -5
View File
@@ -827,11 +827,11 @@
z-index: 13; /* above the ring overlay — a clean bar, not bar-plus-ring-line */
pointer-events: none;
}
/* per-pane — on every visible pane. Split mode: "hide this cell" (the TAB
stays — closeCell), but an ephemeral pane (the preview) closes outright;
single-pane: "close pane" (withheld from the unclosable Dashboard). The
destructive modes flip the glyph to ✕ and wear .cell-unsplit--close.
Shell chrome floating over pane content: elevated panel +
/* per-pane dismiss chip (.cell-unsplit) — on every visible pane. Split mode:
"" hides this cell (the TAB stays — closeCell), but an ephemeral pane (the
preview) shows "✕" and closes outright; single-pane: "✕" closes the pane
(withheld from the unclosable Dashboard). The destructive "✕" modes wear
.cell-unsplit--close. Shell chrome floating over pane content: elevated panel +
hairline so it reads as the shell's, not the conversation's; sits clear of
the 2px focus bar and the cell corner. */
.cell-unsplit {