[fix] Hide empty sessions from lists; connect overview Files to the agent drive - #5944
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR adds agent-only drive support, changes drive metadata rendering, and filters unstarted sessions from lists and the sidebar. Session lists fetch more pages when filtering removes all visible rows. ChangesAgent-only drive presentation
Started-session list filtering
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant DriveExplorer
participant useSessionDrive
participant AgentMount
DriveExplorer->>useSessionDrive: request agent-only drive data
useSessionDrive->>AgentMount: resolve root path
AgentMount-->>useSessionDrive: return agent files
useSessionDrive-->>DriveExplorer: render root-level files
sequenceDiagram
participant useSessionsList
participant sessionListPolicy
participant SessionStream
useSessionsList->>sessionListPolicy: filter loaded session rows
sessionListPolicy->>SessionStream: inspect session start fields
sessionListPolicy-->>useSessionsList: return started rows
useSessionsList->>sessionListPolicy: check hidden-row pagination
sessionListPolicy-->>useSessionsList: return top-up decision
Possibly related issues
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 |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 44a2cacb-cb4b-4b2c-bb20-08f916d07343
📒 Files selected for processing (11)
web/oss/src/components/Drives/DriveExplorer.tsxweb/oss/src/components/Drives/DriveHeader.tsxweb/oss/src/components/Drives/useSessionDrive.tsweb/oss/src/components/Sidebar/dynamic/sessionOptions.tsweb/oss/src/components/Sidebar/dynamic/sessionsSource.tsweb/oss/src/components/pages/overview/agent/AgentFilesCard.tsxweb/packages/agenta-sessions/src/state/index.tsweb/packages/agenta-sessions/src/state/sessionListPolicy.tsweb/packages/agenta-sessions/src/state/useSessionCardList.tsweb/packages/agenta-sessions/src/state/useSessionsList.tsweb/packages/agenta-sessions/tests/unit/sessionListPolicy.test.ts
💤 Files with no reviewable changes (1)
- web/oss/src/components/Drives/DriveExplorer.tsx
Railway Preview Environment
|
a16d7b6 to
57a092d
Compare
|
@coderabbitai review |
✅ Action performedReview 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: 45a16f6a-f8cd-4ec6-9bc4-e379eff2afdf
📒 Files selected for processing (3)
web/oss/src/components/Sidebar/dynamic/sessionOptions.test.tsweb/oss/src/components/Sidebar/dynamic/sessionOptions.tsweb/oss/src/components/Sidebar/dynamic/sessionsSource.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- web/oss/src/components/Sidebar/dynamic/sessionOptions.test.ts
57a092d to
f751ba0
Compare
Manual review — commit
|
|
Tip For best results, initiate chat on the files or code changes.
The fix correctly preserves 🐇 ✏️ Learnings added
You are interacting with an AI system. |
35bb6b8 to
3119b84
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
3119b84 to
ca3cb2e
Compare
…ew All to agent files
…nd keep agent-only path resolution correct
ca3cb2e to
b80d8af
Compare
Context
Two founder-reported bugs. First, the Sessions page, home cards, and the sidebar's session list were flooded with "Untitled session / No agent yet" rows: the backend's liveness heartbeat creates a session row on first touch even when no conversation ever lands, and bursts of SDK-shaped traffic produced dozens of them (28 of the first 30 rows in the founder's project). Second, on an agent's overview page, Files → "View All" always opened an empty folder even though the agent's files exist and show in the card.
Changes
Empty sessions. A shared list rule (
isStartedSessionin@agenta/sessions) shows a session only when a person could recognize it: it has a turn, a title, a message preview, or it is an automation. Pins and gated (waiting) rows are always kept. Applied at render level in the Sessions-page and card-list hooks; the reconciler and session creation are untouched. Because whole pages can consist of hidden rows, the list fetches the next page when everything it loaded was filtered. The sidebar additionally widens its single request window (20 → 100 rows) so empties cannot starve its seven recent slots, and filters by the same rule. Untitled-but-real conversations still show, by design.Overview Files. The drive resolver only knew how to resolve paths through a session's working-directory mount, and the overview has no session, so the file browser mounted nothing and rendered an empty tree. The drive now presents the agent's own mount at the root when it is the whole drive (
agentOnlymode), which also fixes the same empty browser in the playground config panel for sessions that have no working directory yet. The "N files" count chip next to the breadcrumb at root is removed (folder item counts and file sizes stay).Before: 28 placeholder rows above two real sessions; View All shows an empty folder.
After: only real sessions listed everywhere; View All lists and opens the agent's actual files.
Tests
sessionListPolicy.test.ts(hide beat-only rows, keep turn/title/preview/automation rows, order-preserving filtering, the three top-up decisions); package suite 45/45.What to QA