ISSUE DESCRIPTION Cron sessions do not appear under their assigned project Non-empty…
- User
ISSUE DESCRIPTION
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.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /hermes-webui, current file: none) bash-$
- Assistant
I’ll trace the session retrieval and project filtering paths, identify how cron/background sessions are classified, reproduce the filtering behavior with existing tests or a focused script, then make the smallest source change and run relevant validation. I will not modify repository tests.
- Assistant
The defect is split across both retrieval layers: server-side sidebar assembly drops all cron rows, while the client’s project filter has no background-session exception. I’ll preserve the existing default hiding for unassigned cron rows, allow project-assigned rows through the API, and make the client hide those rows only when no matching project is selected (including the default and unassigned views).
- Assistant
The focused gateway/sidebar/project tests now pass. The implementation keeps unassigned cron rows out of the normal API response, adds a project-scoped retrieval query when a project is selected, and ensures assigned cron rows are included regardless of the WebUI/CLI source tab; unrelated and unassigned project views still exclude them. I’ll perform a final diff review and a lightweight syntax/targeted validation.
- Assistant
Implemented the project-aware visibility fix for cron/background sessions.
Changes:
- Assigned cron sessions now survive backend sidebar filtering.
- Unassigned cron sessions remain hidden by default.
/api/sessionssupports project-scoped retrieval viaproject_id.- Selecting a project refreshes sessions using that project scope.
- Assigned cron sessions appear regardless of the active WebUI/CLI source tab.
- Default, unassigned, and unrelated-project views continue hiding them.
Validation:
71focused tests passed:tests/test_gateway_sync.pytests/test_session_discoverability_invariants.pytests/test_sidebar_first_turn_visibility.pytests/test_1079_cron_session_project.py
- Python compilation passed for modified backend files.
git diff --checkpassed.
Checklist:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.