diff --git a/docs_v1.0/STUDIO_TEAM/Pause_Resume_Job_UI_Guide_2026-10-18.md b/docs_v1.0/STUDIO_TEAM/Pause_Resume_Job_UI_Guide_2026-10-18.md new file mode 100644 index 00000000..c722426f --- /dev/null +++ b/docs_v1.0/STUDIO_TEAM/Pause_Resume_Job_UI_Guide_2026-10-18.md @@ -0,0 +1,324 @@ +# Pause/Resume Job Feature - UI Implementation Guide + +**Date**: 2026-10-18 +**From**: Core Team +**To**: Studio Team +**Priority**: Medium + +--- + +## Overview + +The Core team has implemented a Pause/Resume feature for job management. This allows users to pause stuck jobs so the worker can process other pending jobs. + +--- + +## New API Endpoints + +### 1. POST `/api/v1/jobs/:uuid/pause` + +**Purpose**: Pause a job so the worker skips it during polling. + +**Request**: +```http +POST /api/v1/jobs/7a1523df54e2161a54e4577d1835acfd/pause +X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69 +``` + +**Response**: +```json +{ + "success": true, + "message": "Job 7a1523df54e2161a54e4577d1835acfd paused", + "uuid": "7a1523df54e2161a54e4577d1835acfd" +} +``` + +**Error Responses**: +- `404`: Job not found +- `400`: Cannot pause completed/failed job +- `500`: Internal server error + +--- + +### 2. POST `/api/v1/jobs/:uuid/resume` + +**Purpose**: Resume a paused job. + +**Request**: +```http +POST /api/v1/jobs/7a1523df54e2161a54e4577d1835acfd/resume +X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69 +``` + +**Response**: +```json +{ + "success": true, + "message": "Job 7a1523df54e2161a54e4577d1835acfd resumed", + "uuid": "7a1523df54e2161a54e4577d1835acfd" +} +``` + +--- + +### 3. GET `/api/v1/jobs/paused` + +**Purpose**: List all paused jobs. + +**Request**: +```http +GET /api/v1/jobs/paused +X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69 +``` + +**Response**: +```json +{ + "jobs": [ + { + "uuid": "7a1523df54e2161a54e4577d1835acfd", + "file_name": "Accusys-WD_FilmRiot_test.mp4", + "status": "paused", + "paused_at": "2026-10-18T12:00:00Z" + } + ], + "total": 1 +} +``` + +--- + +## UI Implementation Recommendations + +### 1. Job List Page - Pause/Resume Buttons + +**Add action buttons to each job card**: + +```vue + + + + + {{ job.file_name }} + {{ job.uuid.slice(0, 12) }}... + + {{ statusText(job.status) }} + + + + + + + βΈοΈ Pause + + + + + βΆοΈ Resume + + + + + ποΈ Unregister + + + + + + + + +``` + +--- + +### 2. Paused Jobs Management Page + +**Create a new page or tab for managing paused jobs**: + +```vue + + + + Paused Jobs ({{ pausedJobs.length }}) + + + No paused jobs + + + + + + File Name + UUID + Paused At + Actions + + + + + {{ job.file_name }} + {{ job.uuid.slice(0, 12) }}... + {{ formatDate(job.paused_at) }} + + + βΆοΈ Resume + + + ποΈ Unregister + + + + + + + + + +``` + +--- + +### 3. Navigation Update + +**Add a link to the Paused Jobs page in the navigation**: + +```vue + + + Jobs + + Paused + {{ pausedCount }} + + +``` + +--- + +## Files to Modify + +| File | Changes | +|------|---------| +| `src/api/jobs.ts` | Add pause/resume/listPaused methods | +| `src/components/JobCard.vue` | Add Pause/Resume buttons | +| `src/views/PausedJobsView.vue` | New component | +| `src/router/index.ts` | Add route for /jobs/paused | +| `src/stores/jobs.ts` | Add paused jobs state management | + +--- + +## State Flow + +``` +βββββββββββββββ POST /pause βββββββββββββββ +β Pending β ββββββββββββββββββββΆ β Paused β +β Running β β β +βββββββββββββββ ββββββββββββββββββββ βββββββββββββββ + POST /resume +``` + +--- + +## Priority + +| Feature | Priority | Effort | +|---------|----------|--------| +| Pause/Resume buttons | π΄ High | Low | +| Paused Jobs list | π‘ Medium | Medium | +| Navigation badge | π’ Low | Low | + +--- + +**Contact**: Core Team for API questions.
No paused jobs