Skip to content

feat(navigation): group sessions by attention and running state - #214

Draft
YoungSx wants to merge 8 commits into
mainfrom
add-session-state-nav-mode
Draft

YoungSx wants to merge 8 commits into
mainfrom
add-session-state-nav-mode

Conversation

@YoungSx

@YoungSx YoungSx commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

功能与行为

新增侧栏按会话状态分组:待处理、进行中、其他会话;保留默认按项目分组,并持久化分组选择与展开偏好。分类依据各会话自己的运行、交互、错误及未读事实,支持后台会话更新。

已读回执要求当前回复实际显示于前台,使用内容快照、版本及连接身份避免误清后来到达的内容。会话换组保持语义选择与正文,键盘焦点所在行暂留原组,焦点离开后按最新状态归组。

包括终态未读分类修复:Completed / Cancelled 仍检查未读回复,有未读时进入待处理。

暂不合并 / Blocking dependency

本 PR 保持 Draft,当前不能合并。

  • Skia Desktop GUI gate 真实复现 Uno NavigationView 缺陷:选中会话跨组迁移后,旧祖先残留 IsChildSelected;折叠无关旧分组会错误夺取选择指示器,尽管 SelectedItem 仍指向原会话。
  • 上游问题:NavigationView retains selected ancestors after child reparenting unoplatform/uno#24508
  • 上游修复:fix: Refresh NavigationView ancestor selection unoplatform/uno#24509
  • 上游审查指出的外层回调重入问题已在 unoplatform/uno@415d7c7 修复并回复审查。新增根级与嵌套备用项回归测试;完整上游 SamplesApp 的 6 条 Skia/X11 用例连续两轮通过、无重试或跳过,两条新增用例在撤掉保护后均失败。当前仍等待审查者复核、上游官方 runtime/strict CI 和原生 WinUI 行为验证;审查状态尚未解除。
  • 修复尚未合并或进入正式依赖包。不得用应用层回写原生选择态、替换本地 DLL、跳过门禁来制造全绿。

解除阻塞条件:上游审查与必要验证完成、正式包包含修复;本仓库升级依赖后重新验证迁移、折叠、键盘与焦点路径,并确认当前提交所有适用 CI 检查通过。完整应用层深度 review 仍在进行,以上不构成合并批准。

已执行验证

在 oci-arm 原工作区、提交 ea81a78 上重新验证:

  • Desktop Debug 实际构建:0 warnings / 0 errors。
  • Presentation.Core:3863 passed、0 failed、0 skipped;测试项目编译存在警告。
  • 当前构建的 Skia/X11 GUI:ancestor assertion 失败;keyboard 与 focus-release 通过,复现上述真实缺陷。
  • 远端证据:/tmp/pr214-resume-baseline;测试日志:/tmp/pr214-resume-tests.log。

上游 PR 描述中的源码构建正反向对比仅是开发验证,不能代替本 PR 消费正式 NuGet 包后的验收。

上游验证说明及审查回复:unoplatform/uno#24509 (comment) 。上游完整构建已通过,但初始项目评估存在既有 MSB4011 重复导入警告;本地快速构建未运行严格分析器,不能替代官方 CI。

@vercel

vercel Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
salmonegg Ready Ready Preview Sep 23, 2026 3:47pm UTC

@YoungSx

YoungSx commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

已跟进上游进展:

  1. 微软 WinUI 仓库对应 issue 已创建:NavigationView: Moving selected item between groups leaves IsChildSelected=true on former ancestors microsoft/microsoft-ui-xaml#11927
  2. 已在上游 PR fix: Refresh NavigationView ancestor selection unoplatform/uno#24509 下回复 @MartinZikmund 与 @morning4coffe-dev 并附上 WinUI issue 链接,等待上游维护者进行独立复审与合并。

Project conversation turns, pending input, failures, and versioned unread content through the existing MVUX owners. Preserve native navigation focus while updating groups and observe visible transcript content for read receipts.

Add native GUI gates and regression coverage. Keep the feature PR draft until Uno #24509 and Uno.WindowsCommunityToolkit #242 ship in supported NuGet dependencies and the remaining platform gates pass.
Drain the source adapter before applying prompt completion, commit connection retirement before cancelling in-flight work, and cache native window activity on the UI thread.

Fix WinUI API references and native smoke dependencies. Keep unsupported Uno inline-image content readable through the existing fallback, and verify real browser activity without Playwright focus emulation.
Integrate session configuration and versioned work-state updates with the source-scoped runtime. Preserve foreground drafts while background work enters requires_action or idle, and keep visible-reply confirmation ahead of terminal state.
Resolve Mini Window activity before component initialization, qualify Uno capability metadata for trimming, and preserve cancellation in store tests. Replace unsafe path tokens with separators so generated safe paths cannot create traversal sequences.
…ion fixtures

Exercise status grouping, reload persistence, and project mode restoration through the actual WASM app. Model native UI serialization in the suggestion draft test and verify stale projections cannot overwrite the latest suggestion.
… race guard

**ConversationStatusPolicy**:
- Split failure checks: operation/turn failures first, then HasFailure
  (errored input requests). Prevents errored elicitation/AskUser from
  showing input icon instead of error icon.
- Explicit Cancelled → Other (was lumped with Completed).
- Comments clarify each gate's condition.

**TranscriptReadReceiptObserver**:
- Volatile.Read + Interlocked.CompareExchange on _pendingReport to
  guard against concurrent TryReportAsync calls racing to launch
  AcknowledgeAsync.

Closes deferred review items #1 (status classification) and #2
(read-receipt concurrency).
Cancelled turns were directly entering Other without checking HasUnread,
causing conversations with unread messages to skip NeedsAttention.

Now all terminal states (Completed/Cancelled) flow through the unread
check first, ensuring consistency with the documented spec:
'unread messages require attention even after turn completion'.
xunit.v3 4.0 raises xUnit1069 for [Timeout] tests that never reference
TestContext.Current.CancellationToken in their own body - the shared
AwaitPromptOperationTaskAsync helper's reference is invisible to the
analyzer and does not cancel the test's own outer await. Wrap the four
flagged awaits in WaitAsync(TestContext.Current.CancellationToken) so a
timeout terminates them promptly; the other Timeout tests already
reference the token directly.

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 929e6410 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant