Skip to content

fix(web): omit visible project threads from Recents - #1279

Merged
iruriQ merged 1 commit into
BytePioneer-AI:mainfrom
TimYuhong:fix/web-recents-project-duplicates
Nov 27, 2026
Merged

iruriQ merged 1 commit into
BytePioneer-AI:mainfrom
TimYuhong:fix/web-recents-project-duplicates

Conversation

@TimYuhong

Copy link
Copy Markdown

Summary

Expanding a Workspace currently shows the same conversation under both the project and Recents. Exclude conversations already rendered in project sections before applying the Recents display limit, so the remaining recent conversations fill the list. Folding the project makes its conversations eligible for Recents again.

Related issues

N/A

UI Demo

Sanitized examples from CodexHost Web 0.28.0 on Windows.

Project expanded Project collapsed
Project conversation appears once in its expanded project Project conversation returns to Recents after the project is collapsed

Test plan

  • node --test apps/web-ui/packages/client/ui-workspace/test/sidebar-window.test.ts — 10 tests passed. The new case failed on the baseline and passed with the fix.
  • Isolated Web 0.28.0 with Chrome 158 — reproduced the duplicate on the baseline, then loaded the rebuilt workspace module and verified project expansion removes the duplicate, project collapse restores the recent row, and independent conversations remain visible.
  • The upstream changes since 0.28.0 do not change the three modified files.

Copilot AI balanced review requested due to automatic review settings November 27, 2026 01:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • 问题修复
    • Recents 列表不再重复显示已在 Project 中展示的会话,并会从其他会话中补足可见条目。
    • 隐藏条目数量现在基于排除重复会话后的列表计算。

Recents 窗口现在会排除已在 Project 中显示的会话,再筛选可见行并计算隐藏数量。新增测试覆盖排除会话和空排除集合两种情况。

Changes: Recents 会话排除

Layer / File(s) Summary
窗口过滤与调用
apps/web-ui/packages/client/ui-workspace/src/client/rows/sidebar-window.ts, apps/web-ui/packages/client/ui-workspace/src/client/rows/WorkspaceBrowser.tsx, apps/web-ui/packages/client/ui-workspace/test/sidebar-window.test.ts
sidebarWindow 新增可选的 excludedIds 参数,并按排除后的候选会话计算隐藏数量。WorkspaceBrowser 在渲染无工作区 ID 的组时传入已显示的 Project 会话 ID。测试验证排除会话及空排除集合时的行和隐藏数量。

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: bytepioneer-ai, sduhantao-maker

Merge Risk: Minimal · up to fd2e0

This change stops a conversation from appearing in both an expanded project and Recents. It is a small, localized UI change with tests for the exclusion and empty-set cases, and no merge-blocking risk is evident.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed 标题“fix(web): omit visible project threads from Recents”准确描述了主要变更:从 Recents 中排除已在 Project 区域显示的会话。变更摘要显示 sidebarWindow 新增 excludedIds 参数,且 SessionTree.renderGroup 传入已显示的工作区会话 ID,与标题一致。标题为英文,并使用常规 conve…
Description check Passed 描述说明了问题(同一会话同时出现在 Project 和 Recents)、修复方式(在应用 Recents 显示上限前排除已渲染的 Project 会话)、折叠 Project 后会话重新进入 Recents 的行为,并给出了测试计划和界面截图。描述与变更内容直接相关。
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

标题“fix(web): omit visible project threads from Recents”准确描述了主要变更:从 Recents 中排除已在 Project 区域显示的会话。变更摘要显示 sidebarWindow 新增 excludedIds 参数,且 SessionTree.renderGroup 传入已显示的工作区会话 ID,与标题一致。标题为英文,并使用常规 conventional commit 格式。

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 730cc03 and fd2e0c3.

Files selected for processing: 3

  • apps/web-ui/packages/client/ui-workspace/src/client/rows/WorkspaceBrowser.tsx
  • apps/web-ui/packages/client/ui-workspace/src/client/rows/sidebar-window.ts
  • apps/web-ui/packages/client/ui-workspace/test/sidebar-window.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Recent review details

Context from checks skipped due to timeout: 8

  • GitHub Check: CodeRabbit
  • GitHub Check: Vitest
  • GitHub Check: Check windows-latest
  • GitHub Check: Check ubuntu-22.04
  • GitHub Check: Web Host tests
  • GitHub Check: Check Linux ARM64
  • GitHub Check: Check macos-26
  • GitHub Check: Static checks
Additional context used

Code guidelines: 2

docs/product/standalone-web.md — auto-discovered
AGENTS.md — auto-discovered
Path-based instructions: 2

Applicability reference: AGENTS.md: # Repository Guidelines `npm start` / `npm start web` rebuild and relaunch the user's Desktop / Web and may restart the shared Host; `npm stop` stops all local codexhost services across worktrees.

CodeRabbit inference engine (docs/product/standalone-web.md)

Files:

  • apps/web-ui/packages/client/ui-workspace/src/client/rows/WorkspaceBrowser.tsx
  • apps/web-ui/packages/client/ui-workspace/src/client/rows/sidebar-window.ts
  • apps/web-ui/packages/client/ui-workspace/test/sidebar-window.test.ts
Source excerpt: Do not write browser, e2e, or component tests for Web pages (`apps/web-ui`); the user checks page changes directly.

CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/web-ui/packages/client/ui-workspace/src/client/rows/WorkspaceBrowser.tsx
  • apps/web-ui/packages/client/ui-workspace/src/client/rows/sidebar-window.ts
  • apps/web-ui/packages/client/ui-workspace/test/sidebar-window.test.ts

@iruriQ
iruriQ merged commit 4617896 into BytePioneer-AI:main Nov 27, 2026
6 of 8 checks passed
hhucz pushed a commit to hhucz/codex-host that referenced this pull request Nov 28, 2026
…cents

Restore the original intentional Recents behavior by reverting PR BytePioneer-AI#1279/BytePioneer-AI#1280 project-session exclusion so Recents once again lists all recent visible root sessions in the active host scope (including sessions belonging to expanded, collapsed, or windowed projects).

Also fix remote host scope bugs in Recents:
- Include ungrouped sessions belonging to the selected remote host (in "all" mode) instead of restricting ungrouped sessions to local only.
- Gate local catalog pagination (list.hasMore / list.loading) by hostScopeIncludesLocalSessions so remote-only views no longer show a ghost "Show more" button when there are no more remote rows.
- Gate projectless session creation (canStartProjectless) by hostScopeIncludesUngroupedLocal so remote-only and local-selected-workspace views do not expose a local-only compose button or render an empty Recents section.
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.

4 participants