Skip to content

fix: focus the next session or show the splash when one closes#30

Merged
kylecarbs merged 1 commit into
mainfrom
fix/ui-no-session-focused
Jun 11, 2026
Merged

fix: focus the next session or show the splash when one closes#30
kylecarbs merged 1 commit into
mainfrom
fix/ui-no-session-focused

Conversation

@kylecarbs

Copy link
Copy Markdown
Member

Summary

Closing a session in boo ui could leave the viewport on a permanent no session focused pick a session on the left placard, even when there was nothing pickable. The session refresh already auto-attaches the most recently active free session when the focused one dies; the placard appeared whenever no free candidate existed, most commonly when running boo ui inside a boo session (the host is never an automatic candidate) and killing the last other session.

Changes:

  • When no free session can be auto-attached, the refresh now falls back to selecting (without attaching) the most recently active non-host session, the same fallback startup uses. A session held by another client therefore renders the existing attached elsewhere click the session to take it over hint instead of the placard.
  • When nothing is selectable at all (no sessions, or only this UI's host), the viewport renders the ghost splash, same as the no-sessions state.
  • The no session focused branch is deleted; focus moves to the next session automatically as before when one is free.

Automatic focus still never steals: switching to a held session would yank it from another terminal, so it is selected and explained, not attached.

Validation

  • zig build test-all --summary all: 126/126 (4 new tests).
  • zig build test-all -Doptimize=ReleaseSafe: 126/126.
  • New: killing the focused session attaches the next free one; killing the last free session selects a held one and shows the take-over hint; killing the only session brings back the splash; unit test that an unfocused viewport renders the splash, never the placard.

This PR was generated with Coder Agents on behalf of @kylecarbs.

When the focused session ended and nothing was free to attach, the ui
destroyed the dead view and parked on a 'no session focused' placard,
which was permanent when the only sessions left were held by other
clients or hosted this ui. Now the refresh falls back to selecting
(without attaching) the most recently active session, the same
fallback startup uses, so a held session gets the 'attached
elsewhere' hint instead. When nothing is selectable at all, the
viewport shows the splash, and the placard branch is gone.
@kylecarbs kylecarbs merged commit 50f3259 into main Jun 11, 2026
4 checks passed
@kylecarbs kylecarbs mentioned this pull request Jun 11, 2026
kylecarbs added a commit that referenced this pull request Jun 11, 2026
Empty-viewport focus fallback fix in boo ui (#30).
@kylecarbs kylecarbs deleted the fix/ui-no-session-focused branch June 11, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant