Cron sessions do not appear under their assigned project Non-empty cron or background…
- User
Cron sessions do not appear under their assigned project
Non-empty cron or background sessions assigned to a project must be shown when that project is selected. They remain hidden in default, unassigned, empty, and unrelated-project views. The behavior must be consistent across supported session retrieval modes.
Interface
No new interfaces are introduced.
- Assistant
Investigating how cron/background sessions are filtered by project and why assigned ones aren't showing in the project view.
- Assistant
Implementing centralized sidebar-pool logic on the server and default-view filtering on the client so cron sessions appear only when their project is selected.
- Assistant
Creating tests and updating the gateway sync test.
- Assistant
Fixed: cron/background sessions assigned to a project were filtered out server-side before the client could show them in project-scoped views.
Cause
Cron sessions were always removed by
_hide_from_default_sidebar()inall_sessions()and in the/api/sessionsCLI merge, so they never reached_allSessions— even when the Cron Jobs (or another assigned) project chip was selected.Fix
-
api/models.py— Added shared visibility helpers:_background_session_in_sidebar_pool()— keeps non-empty, project-assigned cron rows in the session poolbackground_sidebar_session_visible()— applies project-scoped visibility rules for list retrieval modes- Updated
_hide_from_default_sidebar()to use them
-
static/sessions.js— Added and strip those rows from the default view (they still pass through when a specific project chip is active; already excludes them via ).
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.