feat(wizard): Vue onboarding wizard + user config isolation fixes #65

Merged
pyr0ball merged 3 commits from feature/vue-wizard into main 2026-04-02 18:46:43 -07:00
Owner

Summary

  • Vue onboarding wizard (7 steps): Hardware → Tier → Resume → Identity → Inference → Search → Integrations
  • Wizard API endpoints (GET /api/wizard/status, POST /api/wizard/step, GET /api/wizard/hardware, POST /api/wizard/inference/test, POST /api/wizard/complete)
  • Pinia wizard store with crash-recovery, cloud auto-skip (steps 1/2/5), and soft-fail inference test
  • wizardGuard router gate — all routes require wizard completion; /setup bounces complete users to /
  • AppNav hidden and sidebar margin removed on /setup routes
  • 4 user config isolation + resume upload bugs fixed:
    • _user_yaml_path() dangerous fallback to Meg's legacy profile removed
    • RESUME_PATH replaced with _resume_path() — user-isolated, derived from STAGING_DB
    • upload_resume was passing file path string to structure_resume() (expects text); now extracts bytes → text correctly
    • WizardResumeStep.vue was reading data.experience instead of resp.data.experience

Test plan

  • All 30 wizard API tests pass (pytest tests/test_wizard_api.py -v)
  • Fresh wizard flow end-to-end (hardware → finish → redirect to /)
  • Resume upload (DOCX/PDF) parses and populates identity fields
  • Cloud instance shows correct user data (not Meg's)
  • /setup inaccessible after wizard complete; redirects to /
## Summary - **Vue onboarding wizard** (7 steps): Hardware → Tier → Resume → Identity → Inference → Search → Integrations - Wizard API endpoints (`GET /api/wizard/status`, `POST /api/wizard/step`, `GET /api/wizard/hardware`, `POST /api/wizard/inference/test`, `POST /api/wizard/complete`) - Pinia `wizard` store with crash-recovery, cloud auto-skip (steps 1/2/5), and soft-fail inference test - `wizardGuard` router gate — all routes require wizard completion; `/setup` bounces complete users to `/` - `AppNav` hidden and sidebar margin removed on `/setup` routes - **4 user config isolation + resume upload bugs fixed**: - `_user_yaml_path()` dangerous fallback to Meg's legacy profile removed - `RESUME_PATH` replaced with `_resume_path()` — user-isolated, derived from STAGING_DB - `upload_resume` was passing file path string to `structure_resume()` (expects text); now extracts bytes → text correctly - `WizardResumeStep.vue` was reading `data.experience` instead of `resp.data.experience` ## Test plan - [ ] All 30 wizard API tests pass (`pytest tests/test_wizard_api.py -v`) - [ ] Fresh wizard flow end-to-end (hardware → finish → redirect to `/`) - [ ] Resume upload (DOCX/PDF) parses and populates identity fields - [ ] Cloud instance shows correct user data (not Meg's) - [ ] `/setup` inaccessible after wizard complete; redirects to `/`
pyr0ball added 3 commits 2026-04-02 18:44:26 -07:00
New endpoints:
- GET  /api/wizard/status       — resume-after-refresh; returns wizard_step + saved_data
- POST /api/wizard/step         — persist step data; side effects per step
                                  (step 3: plain_text_resume.yaml, step 5: .env keys,
                                   step 6: search_profiles.yaml)
- GET  /api/wizard/hardware     — GPU detection + profile suggestion
- POST /api/wizard/inference/test — soft-fail Ollama/LLM connectivity check
- POST /api/wizard/complete     — set wizard_complete=true, apply service URLs

Updated:
- GET /api/config/app now includes wizardComplete (from user.yaml) and isDemo
  (from DEMO_MODE env) so the Vue nav guard can gate on a single config fetch

30 tests, all passing
- WizardLayout.vue: full-page card, progress bar, crash-recovery via
  loadStatus(isCloud); auto-skips steps 1/2/5 in cloud mode
- wizard.css: shared step styles (headings, banners, radio cards,
  chip lists, form fields, expandables, nav buttons)
- Step 1 — Hardware: GPU detection, profile select, mismatch warning
- Step 2 — Tier: Free/Paid/Premium radio cards
- Step 3 — Resume: upload (PDF/DOCX/ODT) or manual experience builder;
  pre-fills identity fields from parsed resume data
- Step 4 — Identity: name/email/phone/LinkedIn/career summary;
  full validation before saveStep
- Step 5 — Inference: remote API keys vs local Ollama; advanced
  service-host/port expandable; soft-fail connection test
- Step 6 — Search: chip-style job title + location input with
  comma/Enter commit; remote-only checkbox
- Step 7 — Integrations: optional tile-grid (Notion/Calendar/Slack/
  Discord/Drive); paid-tier badge for gated items; calls
  wizard.complete() on Finish
- wizard.ts Pinia store: loadStatus, detectHardware, saveStep,
  testInference, complete; cloud auto-skip logic
- wizardGuard.ts: gates all routes behind /setup until
  wizard_complete; redirects complete users away from /setup
- router/index.ts: /setup nested route tree; unified beforeEach guard
  (wizard gate → setup branch → settings tier gate)
- App.vue: hide AppNav + strip sidebar margin on /setup routes
fix(isolation): 4 user config isolation + resume upload bugs
Some checks failed
CI / test (pull_request) Failing after 33s
deeba0211d
- _user_yaml_path(): remove dangerous fallback to /devl/job-seeker/
  config/user.yaml (Meg's legacy profile); a missing user.yaml now
  returns an empty dict via load_user_profile, never another user's data
- RESUME_PATH: replace hardcoded relative Path('config/plain_text_
  resume.yaml') with _resume_path() that derives from _user_yaml_path()
  so resume file is always co-located with the correct user.yaml
- upload_resume: was passing a file path string to structure_resume()
  which expects raw text; now extracts bytes, dispatches to the correct
  extractor (pdf/odt/docx), then passes text — matches Streamlit wizard
- WizardResumeStep.vue: upload response is {ok, data: {experience…}}
  but component was reading data.experience (top level); fixed to
  read resp.data.experience to match the actual API envelope
pyr0ball merged commit 9069447cfc into main 2026-04-02 18:46:43 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#65
No description provided.