Repository navigation
Conversation
A first connect invents a stand-in Space for the server, named after the address it was reached by, because a window has to sit somewhere before the server can be asked anything. Once the server's tree describes its own Spaces, the stand-in's rows now move into its first one -- exactly where every later connect lands -- and the stand-in is dropped. Nothing publishes a stand-in ahead of the server's word any more, so no screen attached to a server ever shows a Space named after its own address.
A thread with no live workspace -- stale after a session-server handoff, blocked on a deleted project folder, never opened -- could not be deleted when it was the last one of a local project: the keep-one guard refused it, the local fallback that remote projects have was missing, and the refusal was silent. The guard now protects only live terminals, dead last threads take the same seeded-removal path remote projects have, the refusal toast says why, and killing a workspace's windows also clears the dead-session window a handoff may have parked under its name.
…debar Windows a server keeps in workspaces no ThinkTerm thread owns -- its own default, a CLI spawn, an older version's names -- were mirrored for the protocol and then refused a row, which left the server's working terminals invisible on every device attached to it. Each such workspace now gets a row in the Space's mux-domain project, named after the workspace; clicking it opens the mirror, and the overview previews its tabs. These rows stay this device's bookkeeping: nothing describes the server's own windows back to the server.
This branch has not been deployed
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.
Four bugs reported while connecting from one ThinkTerm to another over Connect, in three commits.
1. A first connect left a Space named after the server's own address on every screen attached to it
A first connect invents a stand-in Space for the server, named after the address it was reached by (
ensure_mux_domain_space), because a window has to sit somewhere before the server can be asked anything. Today that stand-in survives the first tree ingest (it isheld), is published ahead of the server's word (reconcile_ops_for_scope), and lands in the authoritative tree -- so the server's own GUI shows a new Space named after its own IP, while the connect's own thread never lands in the Spaces the server actually described, unlike every later connect.ingest_remote_tree_withnow takesretire_stand_infromnote_server_tree_arrived(the first tree after an invention): the stand-in's projects move into the tree's first Space, the stand-in is dropped, and windows parked on it rehome through the existingorphaned_window_spacesmachinery.reconcile_ops_for_scopeno longer publishes a domain's stand-in while it is still invented. An uninitialized (empty) tree keeps the designed seeding path: the mark is already cleared when seeding runs.2. Dead local threads could not be deleted, and the refusal was silent
A thread with no live workspace -- stale after a session-server handoff, blocked on a deleted project folder, never opened -- was refused by the keep-at-least-one guard (
delete_thread), and the local-project fallback that remote projects have (end_workspace_thread_record) was missing entirely, so the delete button did nothing at all.Noopbranch shows the archive-failure-style toast instead of a dead click.kill_workspace_windowsalso clears adead-session:<window>:<workspace>parked window, so deleting a stale thread takes its zombie with it.3. A server's plain-workspace windows were invisible on every attached client
Windows the server keeps in workspaces no ThinkTerm thread owns -- its own
default, a CLIspawn, an older version's names -- are mirrored for the protocol, then refused a GUI window (should_spawn_reconciled_gui_window) and refused a sidebar row (adopt_orphan_remote_thread_windowsskips unparsable workspace names), leaving the server's working terminals unreachable.is_server_plain_workspace: any name outside thethinkterm:/thinkterm-/dead-session:namespaces) now gets a row in the Space's mux-domain project, named after the workspace; clicking opens the mirror and the overview previews its tabs.reconcile_ops_for_scopeskips publishing a thread (or a project holding nothing else) whose materialized workspace is plain, so nothing describes the server's own windows back to the server.Tests
cargo test -p wezterm-gui --bin thinkterm-gui: 1551 passed, 0 failed (1552 with the previously-ignored one). New cases: stand-in retirement into the tree's first Space, stand-in never published before the tree arrives, plain-workspace predicate matrix, plain rows not published, dead/never-opened last local threads removed with a seeded default project, live last thread still refused.