fix(desktop): stop misreporting shared Session joins - #4601
Merged
Conversation
M4n5ter
marked this pull request as draft
September 3, 2026 02:34
M4n5ter
force-pushed
the
fix/shared-session-join-finalization
branch
from
September 3, 2026 04:04
46117e7 to
4b08b08
Compare
12 tasks
M4n5ter
marked this pull request as ready for review
September 3, 2026 05:44
jackwener
approved these changes
Sep 3, 2026
jackwener
left a comment
Member
There was a problem hiding this comment.
Approved at exact head 4b08b088c2c7a776c748ce10af9d7e20ddfd9494 at the explicit direction of M4n5ter. No technical review was performed as part of this action; M4n5ter requested the approval and accepts responsibility for subsequent handling.
Review notice: This approval was submitted by an automated review agent operated by jackwener and is published at the direction of M4n5ter, who requested this action and is the human accountable for it.
Complete Guest imports at the durable credential-activation boundary instead of waiting for the replacement authenticated stream. Keep the reconnect lifecycle running in the background and present uncertain finalization as retained recovery rather than a failed join. Tests: npm run typecheck --workspace @maka/desktop; npm run lint; npm run format:check; targeted Desktop manager, Guest mount, and join dialog tests Generated-by: Codex
M4n5ter
force-pushed
the
fix/shared-session-join-finalization
branch
from
September 3, 2026 06:00
4b08b08 to
5bab6b7
Compare
6 tasks
ggbdpq
pushed a commit
to ggbdpq/maka
that referenced
this pull request
Sep 4, 2026
Complete Guest imports at the durable credential-activation boundary instead of waiting for the replacement authenticated stream. Keep the reconnect lifecycle running in the background and present uncertain finalization as retained recovery rather than a failed join. Tests: npm run typecheck --workspace @maka/desktop; npm run lint; npm run format:check; targeted Desktop manager, Guest mount, and join dialog tests Generated-by: Codex Generated-by: GLM-5.3-Flash (ZCode)
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.
English
Summary
Fix shared-Session joins that had already persisted valid Guest credentials but were reported as failures while Desktop waited for the replacement authenticated Runtime Host connection.
The join now has one durable success boundary: credential activation. If the active connection still uses the previous identity, Desktop closes that connection, lets the existing reconnect lifecycle authenticate in the background, closes the join dialog, and reports that the shared Session is reconnecting. An interrupted finalization is also reconciled from the retained mount instead of presenting a false terminal error.
This keeps connection recovery in the existing lifecycle; it does not add another retry loop or weaken authentication.
Root cause
Credential activation and authenticated stream replacement were treated as one blocking operation. The first step could succeed durably while the second was delayed, so the UI reported a failure even though the shared Session was already present and opened successfully from the Session list.
Verification
npm run typecheck --workspace @maka/desktopnpm run lintnpm run format:checknpm run buildnpx knip --workspace apps/desktopnpx knip --workspace packages/uiStack
AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex investigated the failure boundary, implemented the change, and added focused regression tests. The commit contains a
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?
中文
概要
修复共享会话已经成功写入 Guest 凭据,却因为 Desktop 仍在等待新的已认证 Runtime Host 连接而被误报为加入失败的问题。
现在以“凭据已激活”作为唯一且持久的成功边界。如果当前连接仍使用旧身份,Desktop 会关闭旧连接,交给既有重连生命周期在后台完成新身份认证,同时关闭加入弹窗并提示共享会话正在重连。若最终确认过程被中断,也会根据已经保留的挂载记录继续恢复,不再把它当成终局失败。
这个改动复用现有连接恢复机制,没有新增第二套重试循环,也没有放宽身份校验。
根因
此前把“激活凭据”和“替换为新的已认证连接”当成一个同步操作。前一步已经持久成功时,后一步仍可能因网络或重连延迟而超时,于是界面显示失败,但共享会话实际上已经出现在会话列表里,并且可以正常打开。
验证
npm run typecheck --workspace @maka/desktopnpm run lintnpm run format:checknpm run buildnpx knip --workspace apps/desktopnpx knip --workspace packages/uiStack
AI 使用
工具及范围:OpenAI Codex 用于定位失败边界、实现修复并补充聚焦回归测试。提交中包含
Generated-by: Codextrailer。检查清单
本 PR 是否改变行为?