From bc239119f31e144b75fac8dfd27866e1c5c3c3f9 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 28 Apr 2026 07:58:15 -0400 Subject: [PATCH] fix: SettingsView TS errors + calendar month/year font MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI typecheck failed: JournalLocation interface requires `address: string`, but Profile-tab Locations code created defaults like `{ label: 'Home' }` without it. Symptoms were six TS2741 errors in SettingsView.vue. Fix: include `address` in defaults and treat the user's place-name input as the address field. Now homeQuery / workQuery sync to locations.{home|work}.address — both at load time and on geocode. loadJournalConfig now reads address (was reading label, which is fixed to "Home"/"Work"); geocodeFor writes the typed query into address while also setting lat/lon on success. Calendar Month/Year title was actually rendering Fraunces, not Inter as I'd claimed. FullCalendar renders .fc-toolbar-title as an

, which the global theme.css `h1, h2 { font-family: 'Fraunces' }` rule catches before the parent .fc font-family inherit can do anything. At 1.1rem it's below the doc's "Fraunces only at ≥18px" threshold, so explicit Inter override on the deep selector. Co-Authored-By: Claude Opus 4.7 --- frontend/src/views/CalendarView.vue | 4 ++++ frontend/src/views/SettingsView.vue | 16 +++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/frontend/src/views/CalendarView.vue b/frontend/src/views/CalendarView.vue index 065347b..6f40a40 100644 --- a/frontend/src/views/CalendarView.vue +++ b/frontend/src/views/CalendarView.vue @@ -459,6 +459,10 @@ const upcomingGrouped = computed(() => { font-family: inherit; } :deep(.fc-toolbar-title) { + /* FullCalendar renders this as

, which would otherwise pick up the + theme.css h1/h2 → Fraunces rule. At 1.1rem it's below the doc's + "Fraunces only at ≥18px" threshold, so explicit Inter. */ + font-family: 'Inter', system-ui, sans-serif; font-size: 1.1rem; font-weight: 500; cursor: pointer; diff --git a/frontend/src/views/SettingsView.vue b/frontend/src/views/SettingsView.vue index 2ad5651..084ee11 100644 --- a/frontend/src/views/SettingsView.vue +++ b/frontend/src/views/SettingsView.vue @@ -600,7 +600,7 @@ const journalConfig = ref({ prep_hour: 5, prep_minute: 0, day_rollover_hour: 4, - locations: { home: { label: 'Home' }, work: { label: 'Work' } }, + locations: { home: { label: 'Home', address: '' }, work: { label: 'Work', address: '' } }, temp_unit: 'C', }) const journalConfigSaving = ref(false) @@ -623,13 +623,13 @@ async function loadJournalConfig() { morning_end_hour: cfg.morning_end_hour, midday_end_hour: cfg.midday_end_hour, locations: { - home: cfg.locations?.home ?? { label: 'Home' }, - work: cfg.locations?.work ?? { label: 'Work' }, + home: cfg.locations?.home ?? { label: 'Home', address: '' }, + work: cfg.locations?.work ?? { label: 'Work', address: '' }, }, temp_unit: cfg.temp_unit ?? 'C', } - homeQuery.value = cfg.locations?.home?.label && cfg.locations.home.lat ? cfg.locations.home.label : '' - workQuery.value = cfg.locations?.work?.label && cfg.locations.work.lat ? cfg.locations.work.label : '' + homeQuery.value = cfg.locations?.home?.address ?? '' + workQuery.value = cfg.locations?.work?.address ?? '' } catch { /* non-critical */ } } @@ -637,10 +637,11 @@ async function geocodeFor(which: 'home' | 'work') { const query = (which === 'home' ? homeQuery.value : workQuery.value).trim() const statusRef = which === 'home' ? homeGeoStatus : workGeoStatus const msgRef = which === 'home' ? homeGeoMsg : workGeoMsg + const label = which === 'home' ? 'Home' : 'Work' if (!query) { // Clear location if (!journalConfig.value.locations) journalConfig.value.locations = {} - journalConfig.value.locations[which] = { label: which === 'home' ? 'Home' : 'Work' } + journalConfig.value.locations[which] = { label, address: '' } statusRef.value = '' msgRef.value = '' return @@ -656,7 +657,8 @@ async function geocodeFor(which: 'home' | 'work') { } if (!journalConfig.value.locations) journalConfig.value.locations = {} journalConfig.value.locations[which] = { - label: which === 'home' ? 'Home' : 'Work', + label, + address: query, lat: result.lat, lon: result.lon, }