Skip to content

fix(desktop): restore retained shared sessions - #4649

Merged
M4n5ter merged 1 commit into
mainfrom
fix/shared-session-mount-projection
Sep 4, 2026
Merged

fix(desktop): restore retained shared sessions#4649
M4n5ter merged 1 commit into
mainfrom
fix/shared-session-mount-projection

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

English
  • Persist the last authenticated shared-Session catalog projection with each retained Guest mount, so joined tasks are visible immediately after a cold Desktop restart while the Host reconnects.
  • Reconcile retained mounts from the authoritative Host catalog after authentication, and collapse duplicates only after the Host proves they refer to the same State Root and Session.
  • Keep retained-task status live and expose the actual selected Runtime Host stream path as WebRTC, QUIC, TCP, or member transit in both joined tasks and the Host list.
  • Preserve the normal scoped sessions:changed contract for Session-semantic updates while using mount invalidation only to trigger inventory refreshes.
  • Normalize Astryx's package-manager-specific generated header so the checked-in theme artifact is deterministic across local and CI installs.
中文
  • 在访客挂载中保存最近一次由 Host 认证过的共享会话信息。Desktop 冷启动后,即使 Host 仍在重连,已经加入的任务也会立即回到会话列表。
  • 连接恢复后,以 Host 返回的权威会话目录校准本地记录;只有 Host 已确认两个挂载属于同一个 State Root 和同一个 Session 时,才自动合并重复条目。
  • 让“已加入的共享任务”实时更新连接状态,并在这里和 Host 列表中直接显示当前业务连接实际选中的 WebRTC、QUIC、TCP 或成员转发路径。
  • 会话变化继续走原有的、按作用域隔离的 sessions:changed 语义;挂载变化只负责通知界面重新读取目录,避免出现第二套会话事件协议。
  • 统一 Astryx 生成文件里随包管理器变化的说明注释,避免本机和 CI 对同一份主题源码生成不同结果。

Verification

  • npm run check:tui-copy
  • node --test scripts/check-tui-copy.test.mjs
  • node --test scripts/biome-staged-check.test.mjs
  • npm run lint
  • npm run format:check
  • npm run astryx:surface-inventory
  • npm run astryx:surface-inventory:test
  • npm run build
  • npm run typecheck
  • npm run astryx:theme -- --check
  • Simulated npm, pnpm, Yarn, and Bun Astryx builder headers normalize to the same artifact
  • npx knip --workspace apps/desktop
  • npx knip --workspace packages/ui
  • npm run check:renderer-architecture -- --base origin/main
  • git diff --check origin/main...HEAD
  • npm test — all workspace tests passed
  • Focused shared-session, mount-projection, candidate, and shutdown coverage: 136 tests passed
  • Parallel correctness and simplification reviews converged with no confirmed findings on the substantive source snapshot.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex implemented the persistence, reconciliation, connection-path UI, and focused tests, then performed parallel correctness and simplification review cycles.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/L Under 1000 readable lines label Sep 3, 2026
@M4n5ter
M4n5ter force-pushed the fix/shared-session-mount-projection branch 4 times, most recently from ee4de0b to 0995336 Compare September 4, 2026 01:45
@M4n5ter
M4n5ter force-pushed the fix/shared-session-mount-projection branch from 0995336 to fbbc141 Compare September 4, 2026 01:51

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at exact head fbbc141be05b86a6b9ddfeef1e32f398afadba50 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.

@M4n5ter
M4n5ter merged commit c59f11d into main Sep 4, 2026
1 of 3 checks passed
@M4n5ter
M4n5ter deleted the fix/shared-session-mount-projection branch September 4, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/L Under 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants