fix(gui): exclude timezone from SectionKey so section maps stay exhaustive (tsc) (#49)

The 100%-coverage pass added timezone to FullConfig, but it's a top-level
scalar (own PUT /api/config/timezone), not a section tab — so SectionKey =
keyof FullConfig broke SECTION_DESCRIPTIONS: Record<SectionKey,string>.
Exclude 'timezone' from SectionKey. Docker frontend build failed on this;
live container was untouched.

Co-authored-by: Matt Johnson <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
malice 2026-07-05 19:25:35 -06:00 committed by GitHub
commit adfe9ff4f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -232,7 +232,9 @@ interface FullConfig {
dashboard: DashboardConfig dashboard: DashboardConfig
} }
type SectionKey = keyof FullConfig // `timezone` is a top-level scalar (saved via its own PUT /api/config/timezone),
// not a config section — exclude it so section maps/tabs stay exhaustive.
type SectionKey = Exclude<keyof FullConfig, 'timezone'>
const SECTIONS: { key: SectionKey; label: string; icon: typeof Settings }[] = [ const SECTIONS: { key: SectionKey; label: string; icon: typeof Settings }[] = [
{ key: 'bot', label: 'Bot', icon: Bot }, { key: 'bot', label: 'Bot', icon: Bot },