Skip to content

Sidebar projects show zero chats when their sessions fall outside the first session page #259

Description

@kalvinnchau

Before filing

  • I searched open and closed issues for duplicates.
  • I reproduced this on the latest release.
  • This is one bug, not several bundled together.

Closest existing issue: none found (Linear: BOT-1688, BOT-959, BOT-1521)

What's broken

When a user has more sessions than one backend page (50), sidebar projects whose most recent chat falls outside the first page render as empty ("No chats yet"), even though the project has chats. The sidebar groups sessions into projects from only the sessions currently loaded in the store, and the background auto-loader stops at 60 sessions — so projects appear empty and stay that way.

Steps to reproduce

  1. Launch Berd
  2. Have more than ~60 sessions, with at least one project whose most recent chat is older than the 60 most recent sessions overall
  3. Look at that project in the sidebar

What you expected to happen

The project should show its chats regardless of how many other sessions exist.

What actually happened

The project shows zero chats. session/list returns 50/page, activity-desc, with no project filter (crates/goose/src/acp/server/list_sessions.rs:15). Startup loadSessions() fetches page 1 only (src/features/chat/stores/chatSessionStore.ts:780-796). The sidebar groups projects from the loaded slice (src/features/sessions/capabilities/SessionListCapability.tsx:265-313). The background auto-loader stops at MAX_AUTO_LOADED_GROUPED_CHATS = 60 (SessionListCapability.tsx:80-81,906-909), so with hundreds of sessions the project never hydrates. Goose-scheduler-generated sessions accelerate this by pushing real chats further down the feed.

How often does it happen?

Every time — reliably reproducible (for users with enough sessions)

Berd version

0.6.2

Operating system

macOS (Apple Silicon)

Model and provider

n/a

Relevant log output

no relevant log output

Screenshots, recordings, or other context

Reported by multiple users across versions (Linear BOT-1688 / BOT-959 / BOT-1521; Slack https://sq-block.slack.com/archives/C0B63ARP20K/p1788218186714219). Note: BOT-959's earlier fix (useProjectSessionHydration, squareup/goose-internal#580) is not present in this repo.

Durable fix: query sessions per project rather than grouping the global feed. That needs a project_id filter on session/list — a goose backend change (SessionListFilters currently lacks it, though the project_id column exists and is indexed) — tracked separately upstream. Once available, each expanded project issues session/list?projectId=X and renders that, making the sidebar immune to scheduler churn. The "View all chats" gating bug (#256) and search-coverage bug (#257) are related but independent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions