Skip to content

fix(desktop): show owning-profile badge on cron job rows - #96554

Closed
SmelterLabs wants to merge 1 commit into
NousResearch:mainfrom
SmelterLabs:feat/cron-job-profile-badge
Closed

SmelterLabs wants to merge 1 commit into
NousResearch:mainfrom
SmelterLabs:feat/cron-job-profile-badge

Conversation

@SmelterLabs

Copy link
Copy Markdown

What does this PR do?

The backend already stamps every cron job with its owning profile
(web_server.py → _annotate_cron_job adds profile, profile_name,
hermes_home, is_default_profile to each job in the
/api/cron/jobs response, for both the aggregated profile=all fetch
and single-profile fetches). The desktop UI dropped the field: the
CronJob type never declared it, and neither the sidebar cron section
nor the full cron page rendered it.

In an aggregated (all-profiles) cron list, every job looked identical —
no way to tell which profile owns and fires it. This adds a small
owning-profile chip to each cron row, reusing the existing ProfileTag
component that session rows already wear, so the badge is visually
identical to the profile chips in the session list.

No backend or API changes — pure display.

Related Issue

No issue filed. Follow-on display gap from the profile-identity work
(see #94450, which this does not depend on — it only consumes data the
backend already ships).

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • apps/desktop/src/types/hermes.ts — added profile?: null | string
    to the CronJob interface (field already present in API payloads).
  • apps/desktop/src/app/chat/sidebar/cron-jobs-section.tsx —
    CronJobSidebarRow renders <ProfileTag profile={job.profile} />
    after the job label when the field is present.
  • apps/desktop/src/app/cron/index.tsx — CronJobListRow passes the
    same chip through PanelListRow's meta slot.

How to Test

  1. cd apps/desktop && npm run build && npx tsc --build tsconfig.json
    — typecheck clean.
  2. npx vitest run src/app/cron src/app/chat/profile-tag.test.tsx src/app/chat/sidebar/cron-jobs-section.test.tsx — all pass
    (35/35 on this branch).
  3. Manual: run with 2+ profiles that each have ≥1 cron job, open the
    sidebar in the aggregated (all-profiles) view — each row now shows
    its owner's chip. Same for the full cron page (Cmd/Ctrl-shift-C or
    the cron icon). Single-profile view is unaffected visually (chip
    shows the one owner, consistent with session rows).

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run the affected suites: tsc --build, eslint, and vitest run src/app/cron src/app/chat/profile-tag.test.tsx src/app/chat/sidebar/cron-jobs-section.test.tsx — all pass (35/35). Python tests/ untouched by this PR (display-only frontend change).
  • I've added tests for my changes — not added; the chip reuses the already-tested ProfileTag component and the touched rows are covered by the existing cron-jobs-section/cron suites.

The backend stamps every cron job with its owning profile
(web_server _annotate_cron_job), but the desktop UI dropped the field
so cross-profile (aggregated) cron lists gave no clue who owns a job.

Reuse the existing ProfileTag chip (already worn by session rows) on
cron rows in both the sidebar section and the full cron page. No
backend or API changes.
@alt-glitch alt-glitch added type/feature New feature or request comp/desktop Electron desktop app (apps/desktop/*) comp/cron Cron scheduler and job management area/profiles Multi-profile isolation, HERMES_HOME scoping P3 Low — cosmetic, nice to have labels Aug 27, 2026
@SmelterLabs

Copy link
Copy Markdown
Author

Closing this stale PR to keep the queue tidy. Happy to rebase and reopen if there is interest.

@SmelterLabs SmelterLabs closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/cron Cron scheduler and job management comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants