From e92d6e2758ac76ec45b5ead3d7b53fdc203d979c Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 6 Nov 2026 08:56:36 -0800 Subject: [PATCH] Sentry: Tidy the events page and phone alerts card --- openpilot/starpilot/galaxy/web/css/galaxy.css | 10 ++ .../galaxy/web/js/sentry-notifications.js | 98 +++++++++++-------- openpilot/starpilot/galaxy/web/js/sentry.js | 21 ++-- 3 files changed, 81 insertions(+), 48 deletions(-) diff --git a/openpilot/starpilot/galaxy/web/css/galaxy.css b/openpilot/starpilot/galaxy/web/css/galaxy.css index ad82da4fbe..4149a4536e 100644 --- a/openpilot/starpilot/galaxy/web/css/galaxy.css +++ b/openpilot/starpilot/galaxy/web/css/galaxy.css @@ -1160,6 +1160,16 @@ mask: radial-gradient(farthest-side, transparent calc(100% - 22px), #000 calc(10 } .gx-sentry-channel__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0; } .gx-sentry-channel__fields .gx-field { width: 100%; min-width: 0; box-sizing: border-box; } +.gx-sentry-events { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--sp-3); } +.gx-sentry-event { display: flex; flex-direction: column; overflow: hidden; } +.gx-sentry-event .gx-row__info { display: grid; gap: var(--sp-1); } +.gx-sentry-event .gx-row__info small { word-break: break-all; } +.gx-sentry-event__media { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-rows: minmax(0, 1fr); gap: 2px; aspect-ratio: 4 / 3; overflow: hidden; } +.gx-sentry-event__media .gx-media { width: 100%; height: 100%; object-fit: cover; } +.gx-sentry-events__bar { justify-content: space-between; } +.gx-sentry-events__bar p { margin: 0; } +.gx-sentry-relay { margin-top: var(--sp-3); } + /* Recording library follows the shared section/row control hierarchy. */ .gx-recordings__library, .gx-recordings__list, .gx-recordings__delete { overflow: hidden; } .gx-recordings__heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); } diff --git a/openpilot/starpilot/galaxy/web/js/sentry-notifications.js b/openpilot/starpilot/galaxy/web/js/sentry-notifications.js index fdcb1582fa..0f6f886dfe 100644 --- a/openpilot/starpilot/galaxy/web/js/sentry-notifications.js +++ b/openpilot/starpilot/galaxy/web/js/sentry-notifications.js @@ -70,6 +70,7 @@ export const SentryNotifications = { this.start() }, beforeUnmount() { clearInterval(this.testPoll); this.client.stop(); clearInterval(this.poll); document.removeEventListener("visibilitychange", this.visibility) }, + computed: { relay() { return this.notifications?.relayEnrollment?.supported ? this.notifications.relayEnrollment : null } }, methods: { reportSave, refreshPush() { try { this.pushState = JSON.parse(window.StarPilotApp?.sentryPush?.() || '{}') } catch { this.pushState = {} } }, @@ -98,6 +99,9 @@ export const SentryNotifications = { async relayAction(action) { if (await this.client.run({ action, confirmed: this.relayConfirmed })) this.relayConfirmed = false }, + relayChip() { + return ({ unenrolled: 'Not set up', enrolling: 'Setting up', enrolled: 'On', rotating: 'Updating', confirming: 'Updating', revoking: 'Paused', revoked: 'Off', actionRequired: 'Needs attention' })[this.relay?.state] || 'Unknown' + }, relayStatus() { const state = this.notifications?.relayEnrollment?.state return ({ unenrolled: 'Enable alerts to set up this comma and phone automatically.', enrolling: 'Enrolling — waiting for the relay. Retries continue when internet returns.', enrolled: 'Relay enrolled. Enable alerts on each phone, then send a test.', rotating: 'Updating the relay credential.', confirming: 'Confirming the new relay credential.', revoking: 'Sending paused. Revocation is pending until the relay acknowledges it.', revoked: 'Alerts are disabled. Enable alerts to enroll again.', actionRequired: 'Relay authorization needs attention. Ask the operator to check or revoke the installation before enrolling again.' })[state] || 'This comma does not support relay enrollment.' @@ -154,45 +158,61 @@ export const SentryNotifications = { The notification queue is full. Some events could not be queued. `, diff --git a/openpilot/starpilot/galaxy/web/js/sentry.js b/openpilot/starpilot/galaxy/web/js/sentry.js index b9518d0e0e..448e4ffba8 100644 --- a/openpilot/starpilot/galaxy/web/js/sentry.js +++ b/openpilot/starpilot/galaxy/web/js/sentry.js @@ -63,6 +63,7 @@ export const SentryEventsPage = { }, beforeUnmount() { document.removeEventListener("visibilitychange", this.visibility); this.feed.stop() }, methods: { systemTime, storedSize }, + computed: { kinds: () => ({ alarm: { label: 'Alarm', icon: 'bi-bell' }, warning: { label: 'Motion', icon: 'bi-exclamation-triangle' }, selfie: { label: 'Selfie', icon: 'bi-camera' } }) }, template: `

Sentry

@@ -76,18 +77,20 @@ export const SentryEventsPage = { Reading local motion events… {{ error }}
`,