Repository navigation
feat(tui): add /close-others to keep only the current chat window - #41
Merged
Merged
Conversation
/close-others closes every chat window except the current one, at once,
and keeps window 0. It collects the numbers of the other chat windows
and runs them through closeWins, the code /close 2,3-5 uses, so it
behaves as /close with those numbers: a "window closed: <name>" notice
per window in window 0 in window order, one status ("closed <name>" or
"closed N windows: 1:#news, 3:@alice", cut after four), the current
window kept as window 1, nothing focused (no read receipt, no unread
count change), the last window dropped when it closed, the layout
saved once.
Three cases close nothing, change nothing and do not write the layout,
checked in this order: any argument is the error "/close-others takes
no argument; /close 2,3-5 closes the windows given"; window 0 is the
shared chat-window error "the server window has no chat; /win to a
chat first"; the current window alone says "no other chat window to
close" as information.
One spelling, no short form. /help lists it after /close, a start hint
names it, and Tab completes it; /close Tab now stops at the prefix the
two commands share and a second Tab lists both, as /clip does.
specs/ui.md (Windows with the decisions, the hint lists, the commands
table, short forms, Completion), docs/usage.md and todo/todo.md are
updated; session/2026-11-05-close-others.md records the TDD evidence.
All existing /close list and range tests pass unchanged.
t0d0r
added a commit
that referenced
this pull request
Nov 5, 2026
The Arch / Omarchy recipe builds v0.4.29: only pkgver and the tag tarball's sha256 (dba57ab5...abd99d, the same on two downloads) change; go.mod and go.sum are as in 0.4.28. It was built and tested in Docker on aarch64 and x86_64 (makepkg with check, namcap, pacman -Qkk, the desktop entry, lazygram 0.4.29), and the omarchy-pkgs validators pass against their master 525f91b. omacom/omarchy-pkgs#2022 moved to 0.4.29 with e818f58; PR.md names it. session/2026-11-05-release-0429.md records the release: v0.4.29 tagged on master 9b82ac4 (/close-others, #41), published by Release workflow run 42103409665, every asset checked against SHA256SUMS and its provenance verified online and offline, a tampered tarball refused, the latest installer URL installing v0.4.29 into a scratch prefix, and the Homebrew formula at 0.4.29 (tap a294169, built from source, brew test passed). todo/todo.md, specs/release.md and docs/arch-omarchy.md follow the version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
/close-otherscloses every chat window except the current one, at once. Window 0 always stays./close: it hands the numbers of the other chat windows tocloseWins, so it behaves as/closewith those numbers: awindow closed: <name>notice per window in window 0, in window order; one status (closed <name>, orclosed N windows: 1:#news, 3:@alice, cut after four); the layout saved once./close-others takes no argument; /close 2,3-5 closes the windows given;the server window has no chat; /win to a chat first(the shared chat-window error);no other chat window to close, as information, not an error./helplists it after/close; Tab completes it; a start hint names it./closeTab now stops at the prefix both commands share, and a second Tab lists both, as/clipdoes.specs/ui.md (Windows with Decision lines, hint lists, commands table, short forms, Completion), docs/usage.md and todo/todo.md describe it; session/2026-11-05-close-others.md records the RED/GREEN evidence.
Tests
/closelist and range test passes unchanged.make checkandgo test -race ./internal/tui/ ./internal/command/pass; all four cases checked in the demo.Security note
Local window layout only: no network call, no read receipt (closing focuses nothing), no new input parsing beyond refusing any argument.