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
I'll investigate how cron sessions are retrieved and filtered by project assignment.
- Assistant
Implementing the fix: include non-empty cron sessions in API responses and add client-side project-scoped visibility filtering.
- Assistant
Cron sessions are CLI-classified, so they were filtered out on the WebUI tab even with a project selected. I'll include project-matching sessions across source tabs when a project chip is active.
- Assistant
Cron sessions were being dropped before the sidebar could apply project filters. They’re now kept in the session payload and shown only when the matching project chip is selected.
Root cause
Cron/background sessions were stripped at the server (
_hide_from_default_sidebarand the/api/sessionsCLI merge), so the client never received them — even when the Cron Jobs project was selected. The original #1079 design assumed project-chip filtering, but #1143 hid cron rows entirely.Fix
Server (
api/models.py)_hide_from_default_sidebarnow hides only empty cron/background rows; non-empty ones stay in the payload.- Added
_sidebar_background_session_visible()for scoped list projections (MCP). - Added
_enrich_cron_session_project_ids()so cron rows always carry the profile-scoped Cron Jobsproject_id.
API (
api/routes.py)- Enriches cron
project_ids before returning/api/sessions.
Client (
static/sessions.js)_shouldShowBackgroundSessionInSidebar()hides cron rows in default, unassigned, and unrelated-project views.- Shows them when
_activeProjectmatches theirproject_id. - When a project chip is active, bypasses the WebUI/CLI source-tab split so cron rows aren’t hidden on the WebUI tab.
MCP (
mcp_server.py)list_sessionsuses the same background-session visibility rules and project enrichment.
Behavior
View Non-empty cron with project All (default) Hidden Unassigned Hidden Matching project Visible Other project Hidden Empty cron Hidden everywhere Tests added in
tests/test_cron_session_project_visibility.py; existing gateway sync tests updated to match the new contract.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →