Phase 46 prompt 99 execution gate - #62
Merged
Merged
Conversation
…s and ship to /api/v1/web-errors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Query, audit script enforces Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…audit gate enforces Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tack with admin override Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… return URL and surface unsaved drafts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…terBar Adds shared ActiveFilterChips + useActiveFilterChips so users see what they have filtered without re-opening every control. Sweeps all FilterBar callers (admin/audit, alerts, alert log, drives, charging sessions, tesla charging history, locations, geofences, notifications) and mounts the chip strip immediately after the bar, wired to URL-state setters. A new audit:filterbar-chips script is chained into npm run lint to keep the pairing enforced. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… bridge and motion-token transitions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…onal GitHub Issues bridge Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… scope with dropdown UX - NEW lib/searchHistory.ts: localStorage v1 store, scoped, capped 12, dedup case-insensitive, min 2 chars, trim — matches commandFrecency resilience contract (handles malformed JSON, non-object payloads, malformed entries). - EXTEND components/forms/SearchInput.tsx with optional historyScope, showHistoryOnFocus, maxHistory props. Dropdown shows when input is focused with empty value and the scope has entries; supports click-to-fill, per-entry remove (X), 'Clear history', and full keyboard nav (ArrowDown, ArrowUp, Enter, Escape) with combobox/listbox ARIA semantics. - ADOPT historyScope on 9 list-page SearchInput callers: drives, charging, charging:sessions, notifications, locations, geofences, alerts:logs, alerts, admin:audit. KeyboardShortcutsModal and AlertStudioPage modal inputs intentionally skipped (transient panel filters, not list searches). - ADD i18n keys search.history.title, .clear, .removeAria. - Drive-by: drop two stale eslint-disable-next-line directives in components/feedback/__tests__/FeedbackModal.test.tsx so the lint gate passes (no-console rule is not enabled, leaving the suppressions as dead --report-unused-disable-directives violations). Tests: 26 lib/searchHistory + 16 SearchInput.history; full suite 1727/1727. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… opt-in and 5-page adoption Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… overrides keep UI visible in Windows high contrast Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…k + audit gate retire ad-hoc sr-only Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-colors users with audit-enforced ariaLabel/data props Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ync option support, replaces hand-rolled selectors Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…fe colors, refactor chatbot to share Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… ChartContainer via ChartExportMenu Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tion + drive maps with audit gate Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The cleanup useEffect listed submit (a TanStack Query mutation object) in its dep array. TanStack Query returns a fresh mutation object on every internal state change — including the very submit.reset() call inside the effect — so while the modal was closed the effect re-fired on every render, flooding the console with Maximum update depth exceeded warnings and pinning a CPU. Drop submit from the deps; the reset only needs to fire on the open->closed transition, which [open] alone captures correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eps input responsive during list re-render Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… dispatcher defers and worker replays Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…reopen flow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Shared Slider (single-thumb) and RangeSlider (dual-thumb) components built on native <input type=range> so all WAI-ARIA APG slider keyboard semantics (Arrow / PageUp / PageDown / Home / End) work natively, with formatted display values surfaced via aria-valuetext for screen readers. RangeSlider stacks two range inputs with pointer-events:none on the track and [&::-webkit-slider-thumb]:pointer-events-auto on the thumbs, swaps z-index based on thumb position so collisions stay grabbable, and sorts the [low, high] tuple in onChange so callers never see an inverted range. Tests are colocated under web/src/components/ui/ to match the gate's allowed-files regex (matches the existing Logo.test.tsx pattern). Adoption sweep skipped per the prompt's Blocked Path: none of the five listed adopter pages have a numeric input that fits a bounded slider model (AlertStudio thresholds are signal-heterogeneous, DriveScore has only date filtering, BatteryHealth has no window picker, GeofenceDrawer uses leaflet-draw, ChargingHeatmap is read-only). Primitives ship now; adopters can land separately when bounded use sites appear. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…m primitives Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…der bell Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ayer Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…+ audit + opt-in annotation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…storage + hero render Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… list pages + audit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…er/Map adoption Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…+ RequiresAuth wrapper Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…m sidebar header; canonical version stays in footer VersionSegment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… in Redis Signal Viewer instead of pretending the cache is empty Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cusable element Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eset/relaunch wiring Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ports + picker UI Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rn the user once Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolves four bugs surfaced when running the latest backend in open-mode
(AUTH_ENABLED=false) with no Tesla account linked.
1. internal/handler/v1/dashboard_handler.go: GetStats no longer returns
401 when no UserClaims is in the request context. Open-mode is the
project's documented default — there is no JWT middleware to populate
the context — so the handler now falls back to the empty-string
subject (the same scope key used by notification_quiet_hours.user_id,
auth_session_handler, and other phase-46 endpoints).
2. internal/api/auth_handler.go::Refresh: when no Tesla account is linked
the handler returned 502 Bad Gateway (teslaClient.RefreshTokens fails
with 'no refresh token available'). It now reads tokenRepo first and
returns 200 {status:noop, reason:no tesla account linked} when there
is nothing to refresh, eliminating the console spam from auto-refresh
loops in open-mode installs.
3. web/src/lib/resilience.ts + api/auth.ts + api/index.ts: removed the
auto-refresh-on-plain-401 logic. It tried to refresh the *Tesla OAuth
token* on every non-Tesla 401 (ForwardAuth session expiry, missing
user context, etc.), which never helped and produced 502 spam.
Plain 401s now go straight to the SessionExpiredModal via
maybeDispatchSessionExpired, matching the documented session model
(cookie is renewed by the upstream sliding-session proxy on
/auth/session polls). Tesla-specific 401s with code
TESLA_TOKEN_EXPIRED still flow through the dedicated TeslaReauthBanner
path, and the user-initiated 'Refresh Tesla token' button in
TeslaAccountSection (useRefreshAuth) still works.
4. migrations/000170_quiet_hours.up.sql: prepended DROP TABLE IF EXISTS
notification_quiet_hours CASCADE. Baseline migration 000142 created
an earlier per-channel notification_quiet_hours table that was
incompatible with the per-user schema in this migration; the
IF NOT EXISTS guard silently skipped the CREATE and the subsequent
index on user_id then fataled, leaving the DB at dirty=170 on every
fresh install. The legacy table was empty in production so the DROP
loses no data.
Verification:
- web: npx tsc --noEmit clean; npm run lint clean (all 22 audits);
npx vitest run = 2640/2640 passed (incl. resilience.test.ts).
- go: build of internal/handler/v1/... clean; vet of internal/api clean
for auth_handler.go. Full repo build is currently broken by an
unrelated, in-flight phase-46 prompt (vehicle_handler.go +
battery_handler.go + new internal/signal/asof.go); those changes
are NOT included in this commit.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…gnal_log + global banner Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nload/email/webhook delivery Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…detection on Settings/Automation/AlertRules Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ner chartKey + URL-persisted state Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… sweep across 4 settings/admin pages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…it + .touch-target utility + baseline fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… by TESLASYNC_REQUIRE_COOKIE_CONSENT (default off) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…h green logs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add support for circle-shaped geofences and synthesize polygon WKT (circleToPolygonWKT, geofenceCreateRequest, decodeGeofenceWriteBody). Use the decoder in Geofence Create/Update handlers and add unit tests for decoding/round-tripping. Emit latitude/longitude/radius in Geofence.MarshalJSON for the web client. Seed automation presets via registerBuiltins and add registry helpers and tests to validate preset shapes. Fix notification_repo to COALESCE nullable `error` column to avoid NULL scan failures. Frontend tweaks: defensive cache updaters in useNotifications hooks (only mutate array-shaped caches), clamp popover positioning in NotificationBellPopover, adjust AddWidgetButton icon/padding, and refine RecentlyViewedWidget spacing and responsive layout.
Hide auth-gated navigation items when no ForwardAuth identity provider is configured by adding a requiresAuth flag and wiring useIsForwardAuth into Layout and CommandPalette. Update isVisibleNavItem signature/logic and related memo deps to respect the auth mode. Reserve footer space in the sidebar for the fixed StatusBar, adjust PageContainer header/action layout for better responsive alignment, and tweak slider background styles to use --glass-border. Make DataTable stickyHeader default to true (with docs and tests) and add tests to cover the new default and opt-out behavior.
Delete generated CI/prompt log artifacts under .github/prompts/db-refactor/logs (phases 45 and 46). These are stale/noisy build and test logs and are being removed to reduce repository clutter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #
Type of Change
Checklist
Screenshots (if applicable)