Repository navigation
fix(linux): expose persisted windows in palette - #32
Merged
melonamin merged 1 commit intoSep 1, 2026
Merged
Conversation
MemberIT
marked this pull request as draft
August 28, 2026 10:54
MemberIT
marked this pull request as ready for review
August 28, 2026 11:13
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
The v0.24.0 parity audit identified GAP Б3: Linux had no explicit UI for reopening one persisted window. Rechecking the current
linux-portcode found a narrower but real gap:Palette.swiftalready iterates everyWindowLibrary.windowsentry and routes it throughopenWindow, so a closed persisted window can technically be reopened, but it is mislabeled as Switch to Window. The palette does not distinguish an already-open window from a persisted closed one, unlike upstream macOS's explicit Open Window: entries.This PR makes the state visible and aligns the Linux command palette with upstream semantics. Closed entries render as Open Window: and reopen through the existing lazy
openWindowpath; other live windows retain the Linux-only Switch to Window: convenience.Cause
The dynamic window loop used one unconditional title for every non-current
WindowLibrary.windowsentry:WindowLibrary.windowsis the complete persisted index, not only the loaded/open set. The action closure already calledopenWindow(target), which raises an attached window or lazily loads a closed store. The behavior therefore existed behind incorrect wording and had no unit or GTK smoke coverage to prevent the persisted-window entry from disappearing.Minimal reproduction
windows.json.Expected (upstream parity): Open Window: , and activating it reopens the same persisted window ID with its saved workspaces and sessions.
Actual before this PR: Switch to Window: . It happened to reopen the window because both states shared
openWindow, but the UI presented a closed persisted window as if it were already on screen.Change
Commit
fix(linux): expose persisted windows in palette:agterm-linux/Sources/AgtermLinux/Palette.swift— resolves each persisted entry's live state throughWindowLibrary.isOpenand builds an explicit Open/Switch row while retaining the existingopenWindowaction.agterm-linux/Sources/AgtermLinux/PalettePresentation.swift— centralizes the state-dependent window-row wording in the existing host-free palette presentation seam.agterm-linux/Tests/AgtermLinuxTests/PalettePresentationTests.swift— pins closed → Open Window and open → Switch to Window.agterm-linux/tests/atspi_smoke.py— creates and closes a named window, activates its Open Window palette row, and asserts that the same persisted ID becomes open again.README.md— documents reopening persisted windows from the command palette.Scope note
Command-palette presentation and coverage only. The persisted index format, open-set restoration at launch,
WindowLibrary, window/session data, close/delete semantics, GTK window creation, and control protocol are unchanged. No new abstraction or platform adapter is introduced; the implementation reusesWindowLibrary.isOpenandopenWindow.Keep-in-sync
Control API already covers the same capability through
window.listpluswindow.select <id>; this PR adds no new user action or mutable capability. The existing GUI row and control command both converge on the same window-open path.The keymap format and window/workspace/session/pane model are unchanged, so the bundled agent skill command catalog does not need an update.
README.mdis updated for the user-visible palette surface.CHANGELOG.mdis intentionally unchanged outside the release flow.Testing
swift:6.3.2-noble, with the workflow's complete GTK4/libadwaita/libepoxy, accessibility, Xvfb/software-GL, shell, Zig 0.16.0, and vendored-libghostty setup:swift test --filter persistedWindowTitleFollowsOpenState— 1 test / 1 suite passed.AgtermLinuxtarget and exercised the host-free palette presentation seam.python3 -m py_compile agterm-linux/tests/atspi_smoke.py— passed locally.git diff --check— passed locally.agtermCoretests plus core-boundary and Linux CLI drift checks.swift testinagterm-linux, Debug build, Release/WMO build, staged-payload validation, and the complete GTK AT-SPI smoke suite (including close → Open Window → same-ID reopen).mise x [email protected]reaches the pinned compiler but cannot compileCGtkbecause this workstation lackslibadwaita-1.pc/adwaita.h; Docker supplies those native dependencies and is the authoritative local result above.