[feat] Agents keep the project sidebar (flat agent navigation) - #5945
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe sidebar now supports explicit route matching, dynamic child tooltips, agent-aware navigation, and shared session limits. Sidebar view resolution uses early agent state and preserves the workflow view while agent status is unresolved. ChangesSidebar navigation behavior
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Layout
participant AgentState
participant ViewRegistry
participant Sidebar
Layout->>AgentState: read early agent state
Layout->>ViewRegistry: resolve view with state and current view
ViewRegistry-->>Layout: return sidebar view
Layout->>Sidebar: render resolved navigation
Sidebar->>Sidebar: match configured route links
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
Railway Preview Environment
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 7deeed94-95bd-4fac-8ac0-2acf2b7bedbc
📒 Files selected for processing (11)
web/oss/src/components/Layout/Layout.tsxweb/oss/src/components/Sidebar/dynamic/registry.tsweb/oss/src/components/Sidebar/dynamic/types.tsweb/oss/src/components/Sidebar/dynamic/useSidebarDynamicChildren.test.tsweb/oss/src/components/Sidebar/dynamic/useSidebarDynamicChildren.tsweb/oss/src/components/Sidebar/engine/SidebarMenu.tsxweb/oss/src/components/Sidebar/engine/SidebarShell.tsxweb/oss/src/components/Sidebar/engine/types.tsweb/oss/src/components/Sidebar/hooks/useSidebarConfig/index.tsxweb/oss/src/components/Sidebar/scopes/viewRegistry.test.tsweb/oss/src/components/Sidebar/scopes/viewRegistry.ts
57a092d to
f751ba0
Compare
b3b0ee1 to
194a28d
Compare
194a28d to
a530da5
Compare
Manual review of record — #5945 (agents keep the project sidebar / flat navigation)Posting this on the record because CodeRabbit's automated review is skipped on this PR: its base is a feature branch ( Verdict: sound. One issue found and fixed; no blocking findings remaining. Fixed
Checked and correctThe empty- const matchLinks = item.matchLinks ?? (item.link ? [item.link] : [])so the empty array survives and the opt-out works. Sessions correctly do not fight the Agents row for the highlight — right, since every session of an agent shares one The tooltip data is real. Rail-swap flash handling is deliberate and coherent. Holding the workflow rail while One accepted trade worth stating explicitlyOn a cold load straight into a classic (non-agent) app URL, The code's comment justifies the prefix with "Only agents reach Verification
|
|
Tip For best results, initiate chat on the files or code changes.
The render-to-commit correction in The cold-load Agents highlight is documented as an accepted transient. The stated test, type-check, lint, and formatting validation supports the non-blocking verdict. 🐇 ✏️ Learnings added
You are interacting with an AI system. |
35bb6b8 to
3119b84
Compare
a530da5 to
523886e
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
3119b84 to
ca3cb2e
Compare
523886e to
22a4a5e
Compare
|
🤖 The AI agent says: Addressed both review findings in
Validation: 14 focused sidebar tests pass. The OSS TypeScript check, targeted ESLint, Prettier, and |
ca3cb2e to
b80d8af
Compare
88a13ef to
d43972c
Compare
d43972c to
3916fda
Compare
Context
Opening an agent used to swap the whole sidebar into an agent-context rail (Back, Overview, Playground, Sessions, Registry, Evaluations, Observability). Mahmoud redesigned this: agents are first-class rows in the project sidebar, and entering one should not take over navigation. Classic prompt apps keep the contextual rail unchanged.
Changes
For agents only: clicking an agent keeps the project sidebar and opens that agent's overview; clicking a session keeps the sidebar and opens the playground on that session; Registry, Evaluations, and per-app Observability entries are removed for agents in every mode (the pages stay URL-reachable; only navigation is removed). The project rail is reordered to Home → Prompts → Agents → Sessions, the Agents entry reads as selected across an agent's routes, and while an app's agent-ness is still loading, the sidebar holds its current rail instead of flashing the wrong one (unit-tested guard). The sidebar's session rows also gain quality-of-life changes that share these files: the visible cap rises from 7 to 14 (constant exported and test-pinned on the parent branch) and hovering a session shows the owning agent's name.
Classic prompt apps behave exactly as before: they still swap to the contextual rail with all entries.
Tests / notes
What to QA