From 717987c5cc324a6cbfbf9ae16bf3c94df013205b Mon Sep 17 00:00:00 2001 From: DaKheera47 Date: Thu, 15 Jan 2026 14:06:14 +0000 Subject: [PATCH] "rejected" isn't a thing. it's "skipped" --- README.md | 4 ++-- orchestrator/README.md | 2 +- orchestrator/src/client/api/client.ts | 4 ++-- .../src/client/components/JobCard.tsx | 12 +++++------ .../src/client/components/JobList.tsx | 20 +++++++++---------- .../src/client/components/JobTable.tsx | 12 +++++------ orchestrator/src/client/components/Stats.tsx | 2 +- .../src/client/components/StatusBadge.tsx | 4 ++-- .../src/client/pages/OrchestratorPage.tsx | 20 +++++++++---------- .../src/client/pages/SettingsPage.tsx | 2 +- orchestrator/src/server/api/routes.ts | 8 ++++---- orchestrator/src/server/db/migrate.ts | 2 +- orchestrator/src/server/db/schema.ts | 2 +- orchestrator/src/server/repositories/jobs.ts | 2 +- orchestrator/src/shared/types.ts | 2 +- 15 files changed, 49 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index b44c3f5..bb30a8b 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ job-ops/ - `jobs` - from crawl: `title`, `employer`, `jobUrl`, `applicationLink`, `deadline`, `salary`, `location`, `jobDescription`, `source` (gradcracker/indeed/linkedin/ukvisajobs), etc. - - enrichments: `status` (`discovered` -> `processing` -> `ready` -> `applied`/`rejected`), `suitabilityScore`, `suitabilityReason`, `tailoredSummary`, `pdfPath`, `notionPageId` + - enrichments: `status` (`discovered` -> `processing` -> `ready` -> `applied`/`skipped`), `suitabilityScore`, `suitabilityReason`, `tailoredSummary`, `pdfPath`, `notionPageId` - `pipeline_runs`: audit log of runs (`running`/`completed`/`failed`, counts, error) ## Running (Docker) @@ -148,7 +148,7 @@ Dev URLs: ## Key endpoints -- Jobs: `GET /api/jobs`, `POST /api/jobs/:id/process`, `POST /api/jobs/:id/apply`, `POST /api/jobs/:id/reject`, `POST /api/jobs/process-discovered` +- Jobs: `GET /api/jobs`, `POST /api/jobs/:id/process`, `POST /api/jobs/:id/apply`, `POST /api/jobs/:id/skip`, `POST /api/jobs/process-discovered` - Pipeline: `POST /api/pipeline/run`, `GET /api/pipeline/status`, `GET /api/pipeline/progress` (SSE) - Webhook: `POST /api/webhook/trigger` (optional auth via `WEBHOOK_SECRET`) - Ops: `DELETE /api/database` (wipes DB) diff --git a/orchestrator/README.md b/orchestrator/README.md index 104264e..12085b3 100644 --- a/orchestrator/README.md +++ b/orchestrator/README.md @@ -61,7 +61,7 @@ orchestrator/ | PATCH | `/api/jobs/:id` | Update job | | POST | `/api/jobs/:id/process` | Generate resume for job | | POST | `/api/jobs/:id/apply` | Mark as applied + sync to Notion | -| POST | `/api/jobs/:id/reject` | Mark as rejected | +| POST | `/api/jobs/:id/skip` | Mark as skipped | ### Pipeline diff --git a/orchestrator/src/client/api/client.ts b/orchestrator/src/client/api/client.ts index b21d72b..aa7264e 100644 --- a/orchestrator/src/client/api/client.ts +++ b/orchestrator/src/client/api/client.ts @@ -89,8 +89,8 @@ export async function markAsApplied(id: string): Promise { }); } -export async function rejectJob(id: string): Promise { - return fetchApi(`/jobs/${id}/reject`, { +export async function skipJob(id: string): Promise { + return fetchApi(`/jobs/${id}/skip`, { method: 'POST', }); } diff --git a/orchestrator/src/client/components/JobCard.tsx b/orchestrator/src/client/components/JobCard.tsx index c0768ee..0ac9a67 100644 --- a/orchestrator/src/client/components/JobCard.tsx +++ b/orchestrator/src/client/components/JobCard.tsx @@ -31,7 +31,7 @@ import { StatusBadge } from "./StatusBadge"; interface JobCardProps { job: Job; onApply: (id: string) => void | Promise; - onReject: (id: string) => void | Promise; + onSkip: (id: string) => void | Promise; onProcess: (id: string) => void | Promise; onEditDescription?: (id: string) => void; isProcessing: boolean; @@ -78,7 +78,7 @@ const safeFilenamePart = (value: string) => value.replace(/[^a-z0-9]/gi, "_"); export const JobCard: React.FC = ({ job, onApply, - onReject, + onSkip, onProcess, onEditDescription, isProcessing, @@ -95,7 +95,7 @@ export const JobCard: React.FC = ({ const hasPdf = !!job.pdfPath; const canApply = job.status === "ready"; const canProcess = ["discovered", "ready"].includes(job.status); - const canReject = ["discovered", "ready"].includes(job.status); + const canSkip = ["discovered", "ready"].includes(job.status); const jobLink = job.applicationLink || job.jobUrl; const pdfHref = `/pdfs/resume_${job.id}.pdf?v=${encodeURIComponent(job.updatedAt)}`; @@ -164,7 +164,7 @@ export const JobCard: React.FC = ({ - {(job.suitabilityReason || canApply || canReject || canProcess || hasPdf) && ( + {(job.suitabilityReason || canApply || canSkip || canProcess || hasPdf) && ( {job.suitabilityReason && (

@@ -246,8 +246,8 @@ export const JobCard: React.FC = ({ )} - {canReject && ( - diff --git a/orchestrator/src/client/components/JobList.tsx b/orchestrator/src/client/components/JobList.tsx index babfe19..179dbe5 100644 --- a/orchestrator/src/client/components/JobList.tsx +++ b/orchestrator/src/client/components/JobList.tsx @@ -39,7 +39,7 @@ import { TailoringEditor } from "./TailoringEditor"; interface JobListProps { jobs: Job[]; onApply: (id: string) => void | Promise; - onReject: (id: string) => void | Promise; + onSkip: (id: string) => void | Promise; onProcess: (id: string) => void | Promise; onUpdate: () => void | Promise; processingJobId: string | null; @@ -87,7 +87,7 @@ const statusRank: Record = { processing: 1, ready: 2, applied: 3, - rejected: 4, + skipped: 4, expired: 5, }; @@ -194,7 +194,7 @@ const stripHtml = (value: string) => value.replace(/<[^>]*>/g, " ").replace(/\s+ export const JobList: React.FC = ({ jobs, onApply, - onReject, + onSkip, onProcess, onUpdate, processingJobId, @@ -204,7 +204,7 @@ export const JobList: React.FC = ({ const [sourceFilter, setSourceFilter] = useState("all"); const [sort, setSort] = useState(DEFAULT_SORT); const [selectedJobIds, setSelectedJobIds] = useState>(() => new Set()); - const [batchAction, setBatchAction] = useState(null); + const [batchAction, setBatchAction] = useState(null); const [highlightedJobId, setHighlightedJobId] = useState(null); const [isHighlightVisible, setIsHighlightVisible] = useState(false); const [isEditingDescription, setIsEditingDescription] = useState(false); @@ -369,7 +369,7 @@ export const JobList: React.FC = ({ const selectedCount = selectedJobIds.size; - const runBatch = async (action: "process" | "reject" | "apply") => { + const runBatch = async (action: "process" | "skip" | "apply") => { if (selectedJobs.length === 0) return; const eligible = selectedJobs.filter((job) => { @@ -389,7 +389,7 @@ export const JobList: React.FC = ({ for (const job of eligible) { if (action === "process") await Promise.resolve(onProcess(job.id)); if (action === "apply") await Promise.resolve(onApply(job.id)); - if (action === "reject") await Promise.resolve(onReject(job.id)); + if (action === "skip") await Promise.resolve(onSkip(job.id)); } setSelectedJobIds(new Set()); @@ -440,7 +440,7 @@ export const JobList: React.FC = ({ = ({