fix(frontend): restore the sessions toolbar layout, dropping the filters rail - #5833
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe sessions page replaces the side filter rail with a top ChangesSession filter toolbar
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant SessionsPage
participant SessionFiltersBar
participant SessionFilterControls
participant SessionList
SessionsPage->>SessionFiltersBar: render toolbar
SessionFiltersBar->>SessionFilterControls: render search and status controls
SessionFilterControls->>SessionFiltersBar: return filter selections
SessionFiltersBar->>SessionList: apply session filters
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
|
@coderabbitai review |
…ers rail The filters rail put a second sidebar inside the sessions page. Return to the original toolbar design: one row above the list with search, the agent picker, the live/waiting status choice (as a Segmented with the waiting count in its label), the automation-runs mode switch and include-archived. All controls keep binding to the shared filter atoms in @agenta/sessions, so nothing changes in data or state; the rail's shell is deleted and the status control is resized for a toolbar row.
fe504c4 to
c1b7e45
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
Railway Preview Environment
Updated at 2026-08-09T20:47:35.510Z |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
web/oss/src/components/pages/sessions/components/SessionFiltersBar.tsx (1)
40-43: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winMemoize the
Selectoptions.This mapping creates a new object array whenever filter state rerenders the toolbar. Memoize the array with
agentsas its dependency before passing it toSelect.As per coding guidelines, “Memoize inline arrays containing objects or JSX when passing them as props to avoid unnecessary rerenders.”
Proposed refactor
+import {useMemo} from "react" + const SessionFiltersBar = ({waitingCount, hideAgentFilter}: Props) => { const {agentId, setAgentId} = useSessionFilters() const agents = useAtomValue(agentsWorkflowsAtom) + const agentOptions = useMemo( + () => + agents.map((agent) => ({ + value: agent.workflowId, + label: agent.name, + })), + [agents], + ) @@ - options={agents.map((agent) => ({ - value: agent.workflowId, - label: agent.name, - }))} + options={agentOptions}Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bd7ba4a6-f165-4bd9-a5bd-bfe97b3af7bd
📒 Files selected for processing (6)
web/oss/src/components/pages/sessions/SessionsPage.tsxweb/oss/src/components/pages/sessions/components/SessionFiltersBar.tsxweb/oss/src/components/pages/sessions/components/SessionFiltersRail.tsxweb/packages/agenta-sessions-ui/src/SessionListStates.tsxweb/packages/agenta-sessions-ui/src/controls/SessionFilterControls.tsxweb/packages/agenta-sessions-ui/src/index.ts
💤 Files with no reviewable changes (1)
- web/oss/src/components/pages/sessions/components/SessionFiltersRail.tsx
…op app's Ink bands down the content column: prod's filters bar occupies y 116–146, this build's 128–158, with the `Sessions` title identical at 68–87 on both. The whole 12px is `SessionFiltersBar`'s own `pt-3`. Not a dropped line — the page was rewritten in this lane (#5833) onto one shared filters shell for desktop and mobile, and the shared bar pads for the screens where it IS the header. This page's `PageLayout` already carries the title, so that padding is pure double-spacing here. The page cancels the horizontal half already (`!px-0`, with a comment saying why); `!pt-0` cancels the other half for exactly the same reason, and mobile keeps both. Re-measured after: 116–146 on both, light and dark. content-top 2.89% → 2.21%, content 0.98% → 0.75%. Left alone: the agent picker is 28px against prod's 26 — the kit SelectTrigger's default height vs antd `size="small"`. 2px, and changing it would change every surface including /m, where the taller target is deliberate.
What
The sessions page had grown a filters rail: a second sidebar inside the page, next to the app's own sidebar. This returns the page to the original toolbar design: one filter row above the session list.
This is a rewrite of the shell, not a git revert. All of the newer capabilities survive and keep binding to the same shared filter atoms in
@agenta/sessions:Select), hidden on the agent-scoped page as before.Code shape
SessionFiltersRailis deleted; a smallSessionFiltersBarreplaces it as the page-owned shell.SessionStatusListControl(a vertical nav list, only usable in a rail) becomesSessionStatusControl, sized for a toolbar row. No remaining consumers of the old export (grep-verified).Verification
@agenta/sessions.web/.