Skip to content

fix: hide subagent threads from v2 lists#4502

Open
Yusuf007R wants to merge 2 commits into
pingdotgg:t3code/codex-turn-mappingfrom
Yusuf007R:codex/hide-subagents-sidebar-v2
Open

fix: hide subagent threads from v2 lists#4502
Yusuf007R wants to merge 2 commits into
pingdotgg:t3code/codex-turn-mappingfrom
Yusuf007R:codex/hide-subagents-sidebar-v2

Conversation

@Yusuf007R

@Yusuf007R Yusuf007R commented Jul 25, 2026

Copy link
Copy Markdown

Problem

When an agent calls delegate_task, the server creates a child thread shell and marks it with lineage.relationshipToParent === "subagent". The V2 Web and Mobile thread lists were not honoring that relationship, so the delegated child appeared as a separate top-level thread beside its parent.

That duplicate entry also leaked into list bookkeeping: subagents could affect active/settled/snoozed counts and, on Web, could reorder projects by activity even though the child row was hidden.

Fix

  • Filter subagent shells before Web Sidebar V2 and Mobile Thread List V2 partition, count, and snooze calculations.
  • Use the same visible-thread set for Web project activity sorting.
  • Keep root threads and user-created forks visible; only relationshipToParent === "subagent" is excluded.
  • Keep the delegated task accessible from its card inside the parent conversation.

Result

Before, the parent and delegated child were both shown as top-level threads. After, only the parent appears in the sidebar.

Before

Before: delegated child rendered as a top-level thread

After

After: only the parent thread is shown

Verification

  • 97 focused Web and Mobile list tests passed.
  • Final Web sidebar logic suite: 85 tests passed.
  • Web and Mobile typechecks passed.
  • Targeted formatting, lint, and diff checks passed.
  • Verified the delegated-child flow in an isolated Web environment.
  • Two independent review agents found no remaining issues.

Scope

Client-side behavior only; no protocol or persistence changes. This PR targets the branch from PR #2829.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9fdeec8b-4dcb-4591-8ab8-eaeddac43040

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 25, 2026

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 02bbf9f. Configure here.

Comment thread apps/web/src/components/SidebarV2.tsx
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 25, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This PR adds UI-level filtering to hide subagent threads from V2 list views. The change is simple (checking relationshipToParent === 'subagent'), well-tested, and builds on existing helper functions with no schema or security implications.

You can customize Macroscope's approvability policy. Learn more.

@macroscopeapp
macroscopeapp Bot dismissed their stale review July 25, 2026 06:51

Dismissing prior approval to re-evaluate 5da5f72

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant