bug: search prefs GET returns titles key but settings store expects job_titles #126

Open
opened 2026-06-15 16:39:13 -07:00 by pyr0ball · 0 comments
Owner

Summary

Wizard step 7 saves profiles with a titles key in YAML. The GET /api/settings/search endpoint returns the raw profile dict which has titles. The Settings store (stores/settings/search.ts) reads data.job_titles — a different key name — so it always gets undefined and falls back to [].

Fix

Normalize on the GET side:

if "titles" in profile and "job_titles" not in profile:
    profile["job_titles"] = profile.pop("titles")

Also fix step 7 to save using job_titles as the canonical key going forward.

Impact

All search preferences saved via the wizard before this fix show as empty in Settings → Search Prefs.

## Summary Wizard step 7 saves profiles with a `titles` key in YAML. The `GET /api/settings/search` endpoint returns the raw profile dict which has `titles`. The Settings store (`stores/settings/search.ts`) reads `data.job_titles` — a different key name — so it always gets `undefined` and falls back to `[]`. ## Fix Normalize on the GET side: ```python if "titles" in profile and "job_titles" not in profile: profile["job_titles"] = profile.pop("titles") ``` Also fix step 7 to save using `job_titles` as the canonical key going forward. ## Impact All search preferences saved via the wizard before this fix show as empty in Settings → Search Prefs.
Sign in to join this conversation.
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#126
No description provided.