Share workspace inventory across windows - #226
Conversation
External KWT worktree changes and tmux session changes must appear without an app relaunch. Per-window discovery left stale rows and repeated the same host commands for every open scene. Use one application cache and an active-only cadence so every window consumes the same authoritative results. Keep direct mutation preflights, remote helper provisioning, tombstones, and freshness guards intact. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Later windows must see the same reconciled inventory as the window that performed a refresh or mutation. Raw partial results and cancelled loads could otherwise hide valid worktrees, stall discovery, or restore a removed row. Preserve failed-project rows in the shared cache, carry removal exclusions into authoritative publication, and let a new subscriber restart cancelled loads. Generated with Codex Co-authored-by: Codex <codex@openai.com>
|
Addressed all three medium findings in
Each path has a focused regression. The focused inventory suites, essential workflows, formatting, and app build pass. The full 1,975-test run had one unrelated tmux-recovery timing failure; all three cases in that test passed on immediate isolated rerun. |
roborev: Combined Review (
|
Concurrent window mutations could leave endpoint aliases or later subscribers with stale worktrees. One mutation publication could also satisfy another mutation's fence before the shared cache reconciled the endpoint. Keep removal identities in the shared cache until complete inventory confirms their absence. Reconsume mutation publications for every endpoint alias, and reserve fence satisfaction for a sole active endpoint mutation. Use the concurrency-aware wait for the Herdr recovery check that timed out in CI. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
A fence-end refresh could restore a worktree or project that a mutation had already removed when the host returned stale inventory. A quarantined removal could also consume a pre-mutation cache entry as fresh authority. Keep unresolved removal identities in the shared cache until complete inventory confirms their absence. Treat quarantined cache entries as stale so only a post-quarantine load can release suppression. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
A user refresh or session kill must not wait behind a result captured before the action. A window opened after all subscribers closed must also recheck the host instead of trusting an inactive cache. Publish known removals to the shared view immediately. Keep that filtered view when host reconciliation is delayed or fails. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Inventory work that began before Ghosthub became inactive can miss host changes made while the app is in the background. Replace that work when the app becomes active so the shared cache reflects the current host state. Cached tombstone filtering is not a successful host load. Preserve an existing KWT failure until a fresh load succeeds, while still hiding known removals. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Worktree removals from a legacy-empty project are now recorded under the project's normalized path instead of the empty identity, and the worktree removal release carries that path. Registration therefore releases only the registered project's tombstones instead of every legacy tombstone on the host. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
… pending A KWT request rechecks cancellation and generation after provisioning so an invalidated request does not run the loader. The store remembers the project path behind each worktree tombstone key and a registration releases every key recorded at the registered path, covering earlier repository identities. Scene-local worktree tombstones are removed; they only re-filtered inventory the store had already filtered. A provisional cache entry now counts as pending in refresh progress. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
…a registration A new subscriber now triggers a load whenever the cached entry is not fresh, including after a provisional publication. A project removal tombstone records the removed registration's path and fingerprint, so a repository registered again at another path or with a new fingerprint is no longer hidden as if it were the removed project. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
Path keys for worktree tombstones now carry an explicit marker instead of relying on a leading slash, so no repository identity or Windows path can be mistaken for one. Registration releases only tombstones recorded at the registered path, or repository-keyed ones with no recorded path, so the same repository registered elsewhere keeps its fence. The clearing logic is plain statements, which also fixes the release build's type-check timeout on the previous expression. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
Scenes re-register their subscriber on every snapshot change. Since a stale entry counts as needing an initial load, that re-registration retried failed or provisional hosts outside the cadence. Only a host or lane the subscriber did not have before triggers an initial load. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
A worktree belongs to exactly one registration, so its removal tombstone is now keyed by the project's path whenever the path is known. That replaces the single path recorded per repository key, which a later removal at another path overwrote. A completed project removal now also requires the removed path when both identities are present, so the same repository registered elsewhere stays. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A healthy record of the same repository at another path no longer restores a quarantined removal; the removal completes instead. A warned record still holds the quarantine only at the quarantined path. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
Host aliases resolving to one command host emitted one registration event each, and every event restarted the KWT load the previous one had started. The scene now announces once, and the store drops the satisfied fence for every host identity aliasing the affected hosts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
A quarantined project removal stays registered with the coordinator until inventory resolves it. The initial-load fence already ignored such scopes; fence satisfaction and the mutation-end reload guard now share that rule, so a parked quarantine no longer blocks another mutation's publication or its fence-end reload. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
Host Settings can register a project before its SSH host is saved. Without a matching scene inventory host, registration left the shared cache and removal tombstones untouched, keeping the project hidden. Let draft registrations clear the shared endpoint's tombstones and reload its inventory, including when no scene currently subscribes to that host. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
A removal can finish before the shared cache knows the project's registration fingerprint. Treating that missing fingerprint as a permanent wildcard hid projects registered again outside Ghosthub at the same path. Let an authoritative inventory record with a non-empty fingerprint retire the unknown tombstone. Provisional results still leave the removal in place. Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Worktrees and tmux sessions created or removed outside Ghosthub now appear in every window without relaunching the app.
Closes #180
Closes #184
Closes #186