Skip to content

fix(app): hide child sessions from sidebar root window#478

Merged
Astro-Han merged 2 commits intodevfrom
codex/fix-subagent-sidebar-duplicate
May 6, 2026
Merged

fix(app): hide child sessions from sidebar root window#478
Astro-Han merged 2 commits intodevfrom
codex/fix-subagent-sidebar-duplicate

Conversation

@Astro-Han
Copy link
Copy Markdown
Owner

@Astro-Han Astro-Han commented May 6, 2026

Summary

Filter child/subagent sessions out of the PawWork sidebar root session window. Current child sessions still appear under their parent session through the existing showChild path.

Why

When the active session is a subagent child session, buildPawworkSessionWindow was merging that active child into the top-level sidebar rows. The parent row also renders the current child below it, so the same subagent session title appeared twice.

Related Issue

No GitHub issue yet. Reported from v2026.5.5 sidebar behavior.

Human Review Status

Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.

Review Focus

Check that root sessions still stay visible when pinned or active, while child sessions from normal, pinned, or active inputs do not become top-level sidebar rows.

Risk Notes

Low. This changes only the sidebar window helper. It does not change session storage, subagent creation, titles, routing, or the child-row rendering path.

How To Verify

Focused layout tests: 45 passed
Command: bun test --preload ./happydom.ts src/pages/layout/helpers.test.ts src/pages/layout/pawwork-session-nav.test.ts src/pages/layout/pawwork-session-window.test.ts
App typecheck: passed
Command: bun run typecheck
Diff check: no whitespace errors
Command: git diff --check

Screenshots or Recordings

Not captured. The changed behavior is covered at the sidebar window data-helper level; Electron manual verification was not run.

Checklist

  • Human review status is stated above as pending, approved, or not required
  • I linked the related issue, or stated why there is no issue
  • This PR has type, primary area, and priority labels, or I requested maintainer labeling
  • I described the review focus and any meaningful risks
  • I listed the relevant verification steps and the key result for each
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope
  • I manually checked visible UI or copy changes when needed, with screenshots or recordings
  • I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes
  • I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant
  • I reviewed the final diff for unrelated changes and suspicious dependency changes
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English

@Astro-Han Astro-Han added bug Something isn't working P2 Medium priority app Application behavior and product flows ui Design system and user interface labels May 6, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@Astro-Han has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 35 minutes and 4 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a552cd2b-8085-419f-b741-092c390517c8

📥 Commits

Reviewing files that changed from the base of the PR and between b917193 and 746ce1c.

📒 Files selected for processing (3)
  • packages/app/src/pages/layout.tsx
  • packages/app/src/pages/layout/pawwork-session-window.test.ts
  • packages/app/src/pages/layout/pawwork-session-window.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-subagent-sidebar-duplicate

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 and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the session window logic to ensure that only root sessions (those without a parentID) are displayed in the top-level sidebar. It introduces a rootSessions helper function and updates buildPawworkSessionWindow to filter normal, pinned, and active sessions. Corresponding tests have been added to verify this behavior. The review feedback suggests improving the rootSessions helper with defensive checks to handle potentially null or undefined items in the session array.

Comment thread packages/app/src/pages/layout/pawwork-session-window.ts Outdated
@Astro-Han
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Astro-Han Astro-Han force-pushed the codex/fix-subagent-sidebar-duplicate branch from 9b19dfa to 07fc60d Compare May 6, 2026 14:52
@Astro-Han Astro-Han merged commit efa64e7 into dev May 6, 2026
22 checks passed
@Astro-Han Astro-Han deleted the codex/fix-subagent-sidebar-duplicate branch May 6, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application behavior and product flows bug Something isn't working P2 Medium priority ui Design system and user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant