fix(desktop): scope the cron jobs list to the active profile - #67615
Merged
Conversation
Salvaged from #42654 by @digitalbase (earliest report of the leak, June 9): the desktop sidebar and cron overlay showed EVERY profile's jobs because GET /api/cron/jobs defaults to profile=all and the desktop never sent the param — profileScoped() (landed in #67493) routes the backend process but adds no endpoint filter on local pools. - hermes.ts: getCronJobs(profile?) appends ?profile= when given; omitting the arg keeps the legacy unfiltered path. profileScoped() still rides along for process routing. - use-session-list-actions.ts: sidebar cron refresh passes the sidebar's profile scope (concrete profile → own jobs; ALL_PROFILES → 'all'). - app/cron/index.tsx: the cron overlay's refresh uses the same scope so the overlay and sidebar (shared $cronJobs atom) always agree. - Tests: list ?profile= contract in hermes-cron-scope.test.ts; sidebar scoping in use-session-list-actions.test.tsx. Reworked onto current main per the sweeper review: threaded through the existing profileScoped()/list-param seams instead of the original PR's pre-refactor call sites (DesktopController has since delegated to use-session-list-actions).
This was referenced Jul 19, 2026
Collaborator
This was referenced Jul 19, 2026
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The desktop sidebar and cron overlay now show only the active profile's cron jobs — previously every profile's jobs leaked into the list because
GET /api/cron/jobsdefaults toprofile=alland the desktop never sent the param (profileScoped(), landed in #67493, routes the backend process but adds no endpoint filter on local pools).Salvage of #42654 by @digitalbase — the earliest report of this leak (June 9) — reworked onto current main per the sweeper review: threaded through the existing
profileScoped()/ list-param seams instead of the original PR's pre-refactor call sites (DesktopController has since delegated its cron refresh touse-session-list-actions). Authorship preserved.Changes
apps/desktop/src/hermes.ts:getCronJobs(profile?)appends?profile=when given; omitting the arg keeps the legacy unfiltered path.apps/desktop/src/app/session/hooks/use-session-list-actions.ts: the sidebar's cron refresh passes the sidebar's profile scope (concrete profile → its own jobs; ALL_PROFILES →'all'unified view).apps/desktop/src/app/cron/index.tsx: the cron overlay's refresh uses the same scope, so overlay and sidebar (shared$cronJobsatom) always agree.?profile=list contract inhermes-cron-scope.test.ts; sidebar scoping (concrete + all) inuse-session-list-actions.test.tsx.contributors/emails/gijs@digitalbase.eu: contributor mapping.Partially addresses the cron half of #52401 (cross-profile UI leak).
Validation
npx vitest run— cron scope contract, session-list actions, cron model testsInfographic