iris/dashboard: star top-level jobs and filter to starred#5007
iris/dashboard: star top-level jobs and filter to starred#5007ravwojdyla merged 5 commits intomainfrom
Conversation
Adds a star button to top-level jobs in the JobsTab, persisted in localStorage under iris.controller.starredJobs, plus a "Starred" toggle in the filter bar. Starred mode fetches each starred job via GetJobStatus (client-side sorted/filtered) so it is not affected by server pagination. URL-synced as ?starred=1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| starredError.value = null | ||
| try { | ||
| const results = await Promise.allSettled( | ||
| ids.map(id => controllerRpcCall<GetJobStatusResponse>('GetJobStatus', { jobId: id })), |
There was a problem hiding this comment.
Should we cap number of starred jobs somehow? I can imagine the server being mildly unhappy if every refresh of the page fires off 100 job status requests or something similar.
There was a problem hiding this comment.
good - point - let's limit to some safe/small number for now - say 10? If people use this and complain it's not enough - we can decide what to do then.
Helw150
left a comment
There was a problem hiding this comment.
Frontend code so mostly not worried - minor Q about whether we should be worried about the server load this induces if you have lots of starred jobs.
GetJobStatus now reports has_children so the dashboard can render the expand toggle when a starred job is viewed via the starred-only filter (ListJobs sets it, GetJobStatus didn't, so starred parents appeared leaf-only). Starring is also capped at 10 in the JobsTab: adding past the cap flashes a notice asking the user to unstar first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The GetJobStatus endpoint only started reporting has_children in this branch, so the dashboard would fail to show the expand toggle for starred top-level jobs when the controller hasn't been restarted yet. Show the toggle defensively at depth 0 in starred mode and auto-collapse if the subsequent ListJobs returns no children. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude seems like we could likely group the various starred* refs together and it would be a bit less sloppy, yes? Can you try to do that? |
|
Claude finished @rjpower's task in 8m 35s —— View job Task: Group starred* refs together
SummaryGrouped the scattered
The composable returns a Kept a thin
How I tested
|
Group the starred-jobs state (ids, showOnly, jobs, loading, error, limitNotice) and its helpers (toggle, fetch) behind a single reactive object returned by useStarredJobs(). Replaces seven ad-hoc refs plus four free-standing helpers in JobsTab.vue with `starred.*` accessors. Returned as reactive() so refs auto-unwrap in both script and template; watches use a getter (`() => starred.showOnly`). Co-authored-by: Russell Power <rjpower@users.noreply.github.com>
|
@claude that makes it harder to follow, let's undo the composable change, I just meant to group the refs in the JobsTab itself. The original code was better |
|
Claude finished @rjpower's task in 3m 30s —— View job Task: Undo the
SummaryReverted the composable extraction (commit Kept the earlier commits in the PR untouched ( How I tested
· branch: |
This reverts commit 64bceba.
|
@rjpower this is good to go? |

jobIds persisted inlocalStorageunderiris.controller.starredJobs1?starred=1GetJobStatusper starred id (viaPromise.allSettled) and sorts/filters client-sideListJobshas nojobId IN (...)filter, so starred jobs outside the current page would otherwise disappearhandleFilterClear/hasActiveFilternow include the starred toggleFootnotes
deliberately
localStorage(persists across sessions), unlike thesessionStorage-backed expanded-rows state. ↩