Skip to content

Fix directory workspace opens and discover loose kwt sessions - #257

Merged
wesm merged 5 commits into
mainfrom
fix/kwt-session-fixes
Sep 18, 2026
Merged

wesm merged 5 commits into
mainfrom
fix/kwt-session-fixes

Conversation

@wesm

@wesm wesm commented Sep 17, 2026 •

Copy link
Copy Markdown
Member
  • Fix directory workspace opens in the Swift macOS app by omitting the worktree-only identity flags rejected by the pinned kwt helper. Closes Directory workspace never opens: bundled kwt rejects the lone --expected-session flag, sidebar spins on "Opening …" #252.
  • Show loose sessions from both the default and kwt tmux servers. Keep socket identity through selection and session actions, including when the servers have matching session names. Closes Sidebar TMUX SESSIONS reads the default tmux socket only; sessions on kwt's own socket have no row unless kwt registered them #256.
  • Follow kwt's canonical socket directory even when the shell sets TMUX_TMPDIR; retain the account's directory for default and other named servers.
  • If kwt discovery fails, refresh available default sessions, show a host warning, and retain cached kwt rows until discovery recovers. Default-session creation and reconnect remain usable.
  • Confirm the launched workspace client's identity before showing its terminal on both default and named sockets, so a registration change cannot open a different session behind the selected row.
  • Cover directory creation and reopening with the pinned helper, and use separate temporary socket roots for the tmux regression tests. Update the Guide to describe discovery and failure behavior.

Directory workspaces could remain at the loading screen because the pinned
helper rejects a lone --expected-session flag. Omit the worktree-only guards
for directory opens, while keeping the full identity checks for Git worktrees.

Discover loose sessions on both the default and kwt tmux servers. Preserve
the socket through selection and lifecycle actions so matching names remain
distinct and registered workspaces suppress only their own session rows.

Exercise directory creation and reopening with the pinned helper. Confine
its tmux subprocesses to the test server even when kwt clears TMUX_TMPDIR.

Fixes #252.
Fixes #256.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@roborev-ci

This comment has been minimized.

The Sequoia compatibility build fails because Xcode 26.0.1 cannot type-check
one expression that constructs both discovery queries. Give the socket list
and closure explicit types and join the queries separately, preserving the
commands and socket behavior.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 12:14 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 12:14 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 12:14 — with GitHub Actions Active
@roborev-ci

This comment has been minimized.

A custom TMUX_TMPDIR sent Ghosthub to a different kwt server than the pinned
helper. Clear that override for canonical kwt operations so discovery,
attachment, and session actions reach the same server. Keep the account's
socket directory for default and other named servers, including protected
endpoints that can use a legacy directory.

The regression uses separate canonical and custom test directories. Its tmux
shim confines commands that clear the override while preserving explicit
roots, so the test can distinguish the servers without reaching user sessions.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 13:46 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 13:46 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 13:47 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 13:48 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 13:48 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 13:48 — with GitHub Actions Active
@roborev-ci

This comment has been minimized.

An unreadable kwt server must not hide healthy default-server sessions or
block their reconnects. Publish the available rows with a host warning and
keep cached kwt rows until a complete refresh can confirm their state.
Preserve that distinction when another window joins the shared inventory.

Directory registration can change while kwt opens a workspace. Confirm the
launched client's identity against the selected endpoint on default sockets
as well as named sockets before showing the terminal or allowing reconnect.
A still-present session with the old name does not prove the client chose it.

Addresses the approved Medium findings in PR #257 review comments:
#257 (comment)
#257 (comment)

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 17:03 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 17:03 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 17:03 — with GitHub Actions Active
@roborev-ci

This comment has been minimized.

The socket-directory fix and partial discovery behavior belong to the Swift
app. Placing them inside the Windows/WSL contract implied the Rust port had
the same behavior. Give the Swift contract its own paragraph and identify
the app covered by the sessions Guide.

Addresses the approved documentation-scope finding from local RoboRev
job 4285 on 936fa70. Rust WSL behavior is unchanged.

Generated with Codex
Co-authored-by: Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 18:25 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 18:25 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 17, 2026 18:25 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 17, 2026

Copy link
Copy Markdown

roborev: Combined Review (f3724b5)

Verdict: No findings at or above medium severity.


Reviewers: 2 done | Synthesis: codex, 5s | Total: 18m18s

@wesm wesm self-assigned this Sep 17, 2026
@wesm
wesm merged commit 71cb5cb into main Sep 18, 2026
10 checks passed
@wesm
wesm deleted the fix/kwt-session-fixes branch September 18, 2026 00:28

This branch was successfully deployed

1 active deployment
sandbox-image-promotion-status — f3724b50 Deployed Sep 17, 2026 by wesm via Reconcile promotion authorization #1654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant