Repository navigation
fix(ui): skip publication options for removed workspaces - #205909
Merged
Merged
Conversation
- A session whose managed worktree was removed by cleanup has nothing to publish until the chat restore prompt brings it back. - The pane still read sessions.github.options on every page load; session-scoped members got FORBIDDEN "GitHub publication session lifecycle changed." (113 refusals on Team since 11-24). Co-authored-by: obviyus <[email protected]>
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Collaborator
Author
|
Landed as dfc7eb7. Bug: the chat pane read GitHub publication options for sessions whose managed worktree was removed, and session-scoped members got FORBIDDEN "GitHub publication session lifecycle changed." on every page load. Fix: the pane detaches publication until the restore prompt brings the workspace back to ready. Proof: red-on-base unit test, green CI, clean local review, Q/R/S E2E pass. |
vincentkoc
added a commit
that referenced
this pull request
Nov 26, 2026
* commit '399057400013dcfa1923db08be96c6bf46cf7079': fix: keep known speakers on meeting notes with missing labels (#205923) fix(codex): let saved conversations recover after a remote failure (#201621) fix: distinguish namesakes in Google Meet transcript exports (#205915) refactor: share Discord meeting transcript publication (#205921) test: trim workflow and runtime performance coverage (#205782) fix(android): settle startup before checking archive refresh (#205891) fix: Gateway retains completed reply runtimes after catalog reloads (#195479) fix: clear unused-export failures in dependency checks (#205905) refactor: share browser routing for meeting captions and cleanup (#205916) fix(ui): update Workshop file preview mode (#205872) refactor(android): decouple shared JSON values from node handlers (#202840) fix(ci): remove bot credit from release notes (#205914) fix: pause interrupted shell turns when their result is unknown (#205859) fix(ui): skip publication options for removed workspaces (#205909) fix: preserve indentation in document previews (#205834) improve(ci): avoid full fixture builds for volume checks (#205903) refactor(android): derive connection readiness from its owner (#202898)
vincentkoc
added a commit
that referenced
this pull request
Nov 26, 2026
…oid-chat-preview-grapheme-boundary * commit '0bea7ecb3029583dd49d83f760d4f40c9e1f543c': (129 commits) fix(android): settle startup before checking archive refresh (#205891) fix: Gateway retains completed reply runtimes after catalog reloads (#195479) fix: clear unused-export failures in dependency checks (#205905) refactor: share browser routing for meeting captions and cleanup (#205916) fix(ui): update Workshop file preview mode (#205872) refactor(android): decouple shared JSON values from node handlers (#202840) fix(ci): remove bot credit from release notes (#205914) fix: pause interrupted shell turns when their result is unknown (#205859) fix(ui): skip publication options for removed workspaces (#205909) fix: preserve indentation in document previews (#205834) improve(ci): avoid full fixture builds for volume checks (#205903) refactor(android): derive connection readiness from its owner (#202898) fix: preserve side chat text when dictating at the limit (#205710) improve(telegram): polling workers start faster and use half the memory (#190890) fix: keep speaker identities distinct in meeting notes (#205860) fix: wait for cancellation before releasing ACP test preparation (#205893) fix: bound workers retained after deleting sessions across agents (#197409) fix(memory): keep a child's memory audience after its parent resets (#205887) refactor(android): give installed skills one data owner (#202892) fix(cli): share process failure listeners across invocations (#205732) ...
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 27, 2026
…5909) ## Problem When cleanup removes a conversation's managed worktree, the chat replaces the composer with the "Restore workspace" prompt. The pane still attached the GitHub publication owner, so every page load requested `sessions.github.options` for that session. For session-scoped members (`operator.sessions.read` without `operator.read`), the Gateway qualifies the publication source; the session still points at a worktree whose registry record has `removedAt`, so `preparePublicationWorktreeRead` throws `GitHubPublicationSessionChangedError` (`src/gateway/github-publication-worktree-owner.ts:130`) and the handler returns FORBIDDEN "GitHub publication session lifecycle changed." The request can never succeed until the workspace is restored. Production (one Team Gateway, 2026-11-24 to 11-26): 114 of these refusals over 100 Control UI connections and 10 users. 93 came less than 2 s after connect (page load), usually two calls per load. The same users clicked "Restore workspace" within a minute of these refusals. ## Fix `synchronizeChatPanePublication` already detaches the publication owner when the pane cannot read options. A row whose `worktreeState` is not `ready` now takes the same detach path. When the restore brings the row back to `ready`, the pane attaches again and reads options as before. No Gateway change. ## User impact - Members no longer get a refused publication read behind the restore prompt. - Operators with `operator.read` no longer load publication options for a removed workspace. There is nothing to publish until the workspace is restored; the restore prompt is the only action. ## Evidence - `ui/src/pages/chat/chat-pane-publication.test.ts`: red on base (2 failed: `removed-snapshot`, `removed-fresh` attached the owner), green with the fix; the `ready` case attaches on both. - Root cause reproduced in a throwaway Gateway handler test (real `sessions.github.options` handler, registry record with `removedAt`): `operator.sessions.read` → FORBIDDEN from `github-publication-worktree-owner.ts:130` for concurrent and later calls; `operator.read` → success. - Also ran `ui/src/e2e/chat-worktree-restore.e2e.test.ts` and `ui/src/e2e/chat-github-publication.e2e.test.ts`: green. - Head E2E (isolated Gateway, real agent turn) on `6616476e897b`: Q (queued input refused visibly, refusal sentence in transcript), R (running turn finishes), S (stop cancels) all pass. - Local review on `6616476e897b`: complete, "patch is correct", no findings. Co-authored-by: Ayaan Zaidi <[email protected]>
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.
Problem
When cleanup removes a conversation's managed worktree, the chat replaces the composer with the "Restore workspace" prompt. The pane still attached the GitHub publication owner, so every page load requested
sessions.github.optionsfor that session.For session-scoped members (
operator.sessions.readwithoutoperator.read), the Gateway qualifies the publication source; the session still points at a worktree whose registry record hasremovedAt, sopreparePublicationWorktreeReadthrowsGitHubPublicationSessionChangedError(src/gateway/github-publication-worktree-owner.ts:130) and the handler returns FORBIDDEN "GitHub publication session lifecycle changed." The request can never succeed until the workspace is restored.Production (one Team Gateway, 2026-11-24 to 11-26): 114 of these refusals over 100 Control UI connections and 10 users. 93 came less than 2 s after connect (page load), usually two calls per load. The same users clicked "Restore workspace" within a minute of these refusals.
Fix
synchronizeChatPanePublicationalready detaches the publication owner when the pane cannot read options. A row whoseworktreeStateis notreadynow takes the same detach path. When the restore brings the row back toready, the pane attaches again and reads options as before. No Gateway change.User impact
operator.readno longer load publication options for a removed workspace. There is nothing to publish until the workspace is restored; the restore prompt is the only action.Evidence
ui/src/pages/chat/chat-pane-publication.test.ts: red on base (2 failed:removed-snapshot,removed-freshattached the owner), green with the fix; thereadycase attaches on both.sessions.github.optionshandler, registry record withremovedAt):operator.sessions.read→ FORBIDDEN fromgithub-publication-worktree-owner.ts:130for concurrent and later calls;operator.read→ success.ui/src/e2e/chat-worktree-restore.e2e.test.tsandui/src/e2e/chat-github-publication.e2e.test.ts: green.6616476e897b: Q (queued input refused visibly, refusal sentence in transcript), R (running turn finishes), S (stop cancels) all pass.6616476e897b: complete, "patch is correct", no findings.