2.2 KiB
Task 6: Jobs Page Redesign — Report
Changes Made
templates/jobs.html — Complete rewrite from table layout to responsive card grid.
- Page heading changed from "All Jobs" to "Processing Jobs"
- Card grid layout with responsive columns: 1 col (mobile), 2 col (640px+), 3 col (1024px+)
- Each job card contains:
- Thumbnail image from
/preview/thumb/<job_id>with SVG placeholder fallback on error - Status badge (top-right corner) using
.badge-*classes: success (COMPLETED), info (RUNNING), warning (PENDING), error (FAILED), neutral (CANCELLED) - Truncated job ID (12 chars + ellipsis) with copy-to-clipboard button (green checkmark feedback)
- Video filename extracted from
job.video_path - Thin 4px progress bar with model count and percentage
- Relative timestamp (e.g. "2 minutes ago") with auto-update every 60s
- "View Details" link to
/status/<job_id>
- Thumbnail image from
- Empty state with film-strip SVG icon, "No jobs yet" heading, and "Upload a video" CTA button
- Scoped
<style>block with design system tokens (no new CSS instyle.css) - Inline
<script>for relative time formatting and clipboard copy functionality
Verification
- Template loads without Jinja2 errors
- Flask
/jobsendpoint returns 200 OK - Empty state renders correctly (no jobs by default)
- All required elements present in rendered HTML: page header, grid, card structure, thumbnails, badges, copy button, progress bars, relative times, empty state, CTA button
Commit
b1170f4 — feat(ui): jobs page — card grid with badges and thumbnails
Review Fixes (3 findings)
-
Non-semantic card container — Changed
<div class="card job-card">→<article class="card job-card">(and closing tag) for better screen reader navigation. -
onclickon copy button — Removed inlineonclick="copyJobId(this, '{{ job.job_id }}')"attribute; addeddata-job-id="{{ job.job_id }}"for identification; moved copy logic toaddEventListener('click', ...)in the<script>block usingdocument.querySelectorAll('.copy-btn'). -
Gradient on progress bar — Replaced
linear-gradient(90deg, var(--color-primary-500), var(--color-primary-400))with solidvar(--color-primary-500)to match flat design system.