You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: the file explorer stops forgetting where you put it
Its floating window kept a rect and clamped that rect back into the terminal on every
render, so moving it never stuck: the geometry was session-only and every open reseeded it
to 70%-centered. Position and size persist now.
Which is only safe because the model changed underneath it. Clamp-and-write-back destroys
a position the first time the terminal shrinks — the clamp overwrites the stored value, and
growing the terminal again leaves the window where the small one forced it. That was
survivable while the geometry lived and died with a single open; persisting it would have
turned a transient annoyance into permanent loss. The window is now a corner plus an inset
plus a size, resolved fresh each frame by `tuilith::float`, which clamps for the frame it
draws and writes nothing back.
It also retires a latent panic. `resize_floating_to` and `resize_floating_step` computed
`bounds.x + bounds.width - floating_rect.x` on u16, which underflows for an origin outside
the viewport — safe only while `clamp_floating` was guaranteed to have run first, an
ordering convention between two functions in different files. There is no longer an origin
that can be outside the viewport, because the only way to obtain one is to resolve it
against the viewport it will be drawn in. That is the whole reason `float` went to tuilith
rather than staying here, and porting the explorer is what makes the claim real rather than
theoretical: two surfaces, one implementation, no convention to remember.
Six duplicated geometry methods became calls into the shared component, and the four
Alt+arrow arms collapsed into one delta lookup.
Three tests carry it: the position survives a shrink and a re-grow, re-opening restores the
geometry instead of reseeding, and resize/move are driven to their extremes against a 1x1
viewport without panicking. The tuilith side additionally implements the old
clamp-and-store model inline and requires it to FAIL the first of those, so the pair
distinguishes the designs rather than asserting the difference.