From f8c78031a06cffcd71c561415cbc49a3a4bb7381 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Thu, 16 Apr 2026 06:33:57 -0700 Subject: [PATCH] =?UTF-8?q?fix(demo):=20smoke-test=20fixes=20=E2=80=94=20c?= =?UTF-8?q?ard=20reset,=20toast=20error=20type,=20apply=20hint,=20text=20c?= =?UTF-8?q?ontrast?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - JobCardStack: expose resetCard() to restore card after a blocked action - JobReviewView: call resetCard() when approve/reject returns false; prevents card going blank after demo guard blocks the action - useApi: add 'demo-blocked' to ApiError union; return truthy error from the 403 interceptor so store callers bail early (no optimistic UI update) - ApplyView: add HintChip to desktop split-pane layout (was mobile-only) - HintChip: fix text color — --app-primary-light is near-white in light theme, causing invisible text; switch to --color-text for cross-theme contrast - vite.config.ts: support VITE_API_TARGET env var for dev proxy override - migrations/006: add date_posted, hired_feedback columns and references_ table (columns existed in live DB but were missing from migration history) - DemoBanner: commit component and test (were untracked) --- migrations/006_missing_columns.sql | 22 ++++++ web/src/components/DemoBanner.vue | 79 +++++++++++++++++++ web/src/components/HintChip.vue | 2 +- web/src/components/JobCardStack.vue | 18 ++++- .../components/__tests__/DemoBanner.test.ts | 22 ++++++ web/src/composables/useApi.ts | 5 +- web/src/views/ApplyView.vue | 5 ++ web/src/views/JobReviewView.vue | 6 +- web/vite.config.ts | 2 +- 9 files changed, 155 insertions(+), 6 deletions(-) create mode 100644 migrations/006_missing_columns.sql create mode 100644 web/src/components/DemoBanner.vue create mode 100644 web/src/components/__tests__/DemoBanner.test.ts diff --git a/migrations/006_missing_columns.sql b/migrations/006_missing_columns.sql new file mode 100644 index 0000000..f44759a --- /dev/null +++ b/migrations/006_missing_columns.sql @@ -0,0 +1,22 @@ +-- Migration 006: Add columns and tables present in the live DB but missing from migrations +-- These were added via direct ALTER TABLE after the v0.8.5 baseline was written. + +-- date_posted: used for ghost-post shadow-score detection +ALTER TABLE jobs ADD COLUMN date_posted TEXT; + +-- hired_feedback: JSON blob saved when a job reaches the 'hired' outcome +ALTER TABLE jobs ADD COLUMN hired_feedback TEXT; + +-- references_ table: contacts who can provide references for applications +CREATE TABLE IF NOT EXISTS references_ ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + relationship TEXT, + company TEXT, + email TEXT, + phone TEXT, + notes TEXT, + tags TEXT, + prep_email TEXT, + role TEXT +); diff --git a/web/src/components/DemoBanner.vue b/web/src/components/DemoBanner.vue new file mode 100644 index 0000000..93162cd --- /dev/null +++ b/web/src/components/DemoBanner.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/web/src/components/HintChip.vue b/web/src/components/HintChip.vue index bc8960b..dc1621e 100644 --- a/web/src/components/HintChip.vue +++ b/web/src/components/HintChip.vue @@ -44,7 +44,7 @@ function dismiss(): void { .hint-chip__message { flex: 1; font-size: 0.85rem; - color: var(--app-primary-light, #68A8D8); + color: var(--color-text, #1a202c); line-height: 1.4; } diff --git a/web/src/components/JobCardStack.vue b/web/src/components/JobCardStack.vue index 6335fce..27e407e 100644 --- a/web/src/components/JobCardStack.vue +++ b/web/src/components/JobCardStack.vue @@ -216,7 +216,23 @@ watch(() => props.job.id, () => { } }) -defineExpose({ dismissApprove, dismissReject, dismissSkip }) +/** Restore card to its neutral state — used when an action is blocked (e.g. demo guard). */ +function resetCard() { + dx.value = 0 + dy.value = 0 + isExiting.value = false + isHeld.value = false + if (wrapperEl.value) { + wrapperEl.value.style.transition = 'none' + wrapperEl.value.style.transform = '' + wrapperEl.value.style.opacity = '' + requestAnimationFrame(() => { + if (wrapperEl.value) wrapperEl.value.style.transition = '' + }) + } +} + +defineExpose({ dismissApprove, dismissReject, dismissSkip, resetCard })