feat: add topic task-room detail#1049
Conversation
|
Warning Review limit reached
More reviews will be available in 5 minutes and 1 second. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughReplaces the generic ChangesTask-room detail view
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors the topic detail panel into a comprehensive 'Task Room' view, introducing new components, CSS styles, and state models to support grouped sessions, task references, and artifact/surface strips. Feedback on the changes includes addressing a potential reverse tabnabbing vulnerability by adding noopener to window.open, and optimizing the optional onSelectSession callback using conditional prop spreading to avoid unnecessary closures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| topSurface.openMode === 'direct' && | ||
| topSurface.target.startsWith('http') | ||
| ) { | ||
| window.open(topSurface.target, '_blank', 'noreferrer'); |
There was a problem hiding this comment.
Using window.open with _blank without noopener can expose the application to reverse tabnabbing vulnerabilities, where the newly opened window can access and manipulate the original window via window.opener. Please include noopener in the window features string.
| window.open(topSurface.target, '_blank', 'noreferrer'); | |
| window.open(topSurface.target, '_blank', 'noopener,noreferrer'); |
| <button | ||
| type="button" | ||
| className="topic-room-session__button" | ||
| title={`open exact session ${session.selectKey}`} | ||
| onClick={() => onSelectSession?.(session.selectKey)} | ||
| > |
There was a problem hiding this comment.
In accordance with the repository's general rules, optional function props should use the conditional prop spreading pattern to avoid creating unnecessary closures when the prop is not provided. This matches the pattern already established in SessionChildRow.
<button
type="button"
className="topic-room-session__button"
title={`open exact session ${session.selectKey}`}
{...(onSelectSession
? { onClick: () => onSelectSession(session.selectKey) }
: {})}
>
References
- When exactOptionalPropertyTypes is enabled in TypeScript, use conditional prop spreading (e.g., {...(prop ? { prop } : {})}) for optional props that do not accept explicit undefined. This pattern is also preferred for optional function props to avoid creating unnecessary closures when the prop is not provided.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/components/TopicSidebarShell.css`:
- Around line 500-506: The focus styles for the room controls in
TopicSidebarShell.css remove the native outline on .topic-room__primary,
.topic-room-ref-list a, and the session-button group while only using the hover
background, so keyboard focus is not distinct. Update the shared focus-visible
rules for those selectors to restore a clear, visible focus indicator (for
example, a dedicated outline/ring that differs from hover) while keeping hover
styling separate, and ensure the related session button styles in the same
stylesheet follow the same pattern.
In `@frontend/src/components/TopicSidebarShell.tsx`:
- Around line 1336-1337: The shell still uses the surfaces fetch to gate
rendering, so a slow surfaces request can block the topic list/task-room even
though error handling was already split out. Update TopicSidebarShell’s
loading/render gating around topicsQuery and surfacesQuery so the room can
render while surfacesQuery is pending, and keep surfaces-specific state isolated
to the strip/empty state logic rather than the top-level shell gate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 26b63b8d-828a-4355-b62c-b120344734c4
📒 Files selected for processing (5)
frontend/src/components/TopicSidebarShell.cssfrontend/src/components/TopicSidebarShell.tsxfrontend/src/lib/state/topic-nav.tstest/topic-nav.test.tstest/topic-sidebar-shell.test.ts
Fugu review — changes requestedExact head reviewed: Blockers
Bot triage
Evidence checked
Verdict: not approved until the two blockers above are fixed on a new PR head. |
Fugu review — approvedExact head reviewed: VerdictApproved. The remediation fixes the two prior blockers without expanding the PR scope. Findings
Evidence checked
Commands run
Bot feedback + learning
|
Closes #1044
Summary
Verification
PATH=/home/donovanyohan/.local/opt/node-v24.16.0-linux-x64/bin:$PATH rtk test npm test -- test/topic-nav.test.ts test/topic-sidebar-shell.test.ts— 2 files / 29 tests passedPATH=/home/donovanyohan/.local/opt/node-v24.16.0-linux-x64/bin:$PATH rtk npm run check— exit 0; existing repo lint warnings only, no errorsPATH=/home/donovanyohan/.local/opt/node-v24.16.0-linux-x64/bin:$PATH rtk npm run build— exit 0; existing Vite chunk/dynamic-import warnings onlynpm run devon127.0.0.1:5199, unlocked with local test PIN, verified topics sidebar renders with no console errors; topic writes were not seeded because this protected local hub denied missingcontext:write, so rich room states are covered by DOM testsNotes
Summary by CodeRabbit
New Features
Bug Fixes
Tests