jobs #9
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_slides#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
sort based on id (time)
also have selection, so we can delete all or some records
when I go in the log of a job (click on it)
when I open the job open a new tab
then I can't exit this page the 'X'. this should be exit me back to overview of jobs, by closing the open tab
Implementation Spec — Issue #9: Jobs UX Improvements
Objective
Four targeted UX improvements to the Jobs tab:
Current State
loadJobs()indashboard.jscallsrpc('jobs.list')→ server iterates twoHashMaps in non-deterministic order → no sort appliedviewJobLogs()which creates a full-screen overlay injected into the DOM. The "X" close button removes a CSS class that has no effect — the overlay never closes (root bug)jobs.deleteRPC method exists todayFiles to Modify
crates/hero_slides_server/src/rpc.rsjobs.deleteRPC handlercrates/hero_slides_server/openrpc.jsonjobs.deletemethodcrates/hero_slides_ui/templates/index.htmlcrates/hero_slides_ui/static/js/dashboard.jscrates/hero_slides_ui/static/css/dashboard.cssImplementation Plan
Step 1 — Server: add
jobs.deleteRPCFile:
rpc.rshandle_jobs_delete(keys: Vec<String>)— removes matching entries fromstate.agent_jobsandstate.gen_jobs"jobs.delete"in the method dispatch{ "deleted": N }Step 2 — API spec: document
jobs.deleteFile:
openrpc.jsonjobs.listwithkeys: string[]param and{ deleted: integer }resultStep 3 — Template: update Jobs tab markup
File:
index.html<input type="checkbox" id="jobs-select-all">as first<th>in jobs table headerid="btn-delete-selected") in toolbarcolspanon empty-state row from 6 → 7Step 4 — JS: sort + checkbox + bulk delete + new-tab + close-tab
File:
dashboard.jsjobs.sort((a,b) => b.job_id - a.job_id)after fetchingstopPropagationon click)toggleSelectAllJobs(cb)— checks/unchecks all rowsdeleteSelectedJobs()— collects keys, callsrpc('jobs.delete', {keys}), refreshesviewJobLogsbody:window.open('#job/<id>/<type>/<key>', '_blank')case 'job':inapplyCurrentRoute()→ decode params, callrenderJobLogPagerenderJobLogPage(jobId, type, key)— hides normal chrome, renders full-page log with "Close Tab" button →window.close()job-log-overlayDOM creation codeStep 5 — CSS: job log page styles
File:
dashboard.css.job-log-page,.job-log-topbar,.job-log-preclasses for the standalone log tabAcceptance Criteria
window.close()successfullyNotes
#job/…) in the existing SPAwindow.close()works because the tab is opened viawindow.open()from scriptjobs.deleteremoves in-memory tracking records only; the underlying hero_proc job is not affected/— encode withencodeURIComponentand reassemble in the route parserTest Results
Breakdown by crate
Notes
test_generate_single_slide_ai(requires AI/network, skipped intentionally)Implementation Complete
All four UX improvements from issue #9 have been implemented.
Changes Made
crates/hero_slides_server/src/rpc.rshandle_jobs_deleteasync handler — acceptskeys: Vec<String>, removes matching records fromagent_jobsandgen_jobsstate maps, returns{ "deleted": N }"jobs.delete"in the method dispatchcrates/hero_slides_server/openrpc.jsonjobs.deletemethod withkeys: string[]param and{ deleted: integer }result schemacrates/hero_slides_ui/templates/index.html#jobs-select-all) as first column in jobs table header#btn-delete-selected, hidden by default) in jobs toolbarcrates/hero_slides_ui/static/js/dashboard.jsjobs.sort((a, b) => b.job_id - a.job_id)— newest job at topstopPropagationso row-click still worksupdateJobsDeleteButton()— shows/hides Delete Selected button and counttoggleSelectAllJobs(cb)— checks/unchecks all rowsdeleteSelectedJobs()— callsrpc('jobs.delete', { keys }), refreshes listviewJobLogs()— replaced overlay creation withwindow.open('#job/...', '_blank')applyCurrentRoute()— addedcase 'job':to handle hash-based job log routesrenderJobLogPage(jobId, type, key)— full-page log view with "Close Tab" →window.close()job-log-overlayDOM codecrates/hero_slides_ui/static/css/dashboard.cssbody.job-log-page,.job-log-topbar,.job-log-title,.job-log-prestyles for the standalone job log tabTest Results
Implementation committed:
6c90ea2Browse:
6c90ea2All changes verified present in codebase (rpc.js.delete handler, JS sort/checkboxes/tabs/close, CSS styles, HTML template).