Commit graph

73 commits

Author SHA1 Message Date
06690f0581 portal: multi-line topic scope input + 'Add topic' on existing MQTT clients
Matches settings' new multi-topic-per-client support: the create form's
Topic scope field is now a textarea (one pattern per line), the list shows
all of a client's scopes, and a '+ Topic' button lets an admin grant an
existing client more topic access without recreating it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-13 14:01:24 +00:00
411911c4c8 portal: 'service consumer' checkbox for MQTT broker clients
Surfaces settings' new service-client flag in the MQTT Broker Clients tab —
a checkbox that stores the password encrypted so a stack app (e.g.
hvac-backend) can fetch its own login at runtime, plus a 'service' badge in
the client list. Device logins are unchanged (leave the box off).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-13 13:42:58 +00:00
d1b253a00c Register Gauge icon for plant, remove stale duplicate AppIcon.js
AppIcon.js was a stale, tracked, out-of-sync compiled duplicate of
AppIcon.tsx (missing Zap/Thermometer too) sitting next to the real
source. Since imports use bare 'from ./AppIcon' with no extension,
Vite's default resolve order picks .js before .tsx, so it may have
been silently shadowing the real source. Removed it so there's a
single source of truth, and added Gauge (plant's icon) there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 09:32:34 +00:00
26c16e952d MQTT tab: topic tree + feed views, auto-refresh
Replaces the flat scrolling capture log with a structured message buffer
(mqttMessages) rendered two ways: a collapsible topic tree showing each
topic's latest value (MQTT-Explorer-ish), and a chronological feed. An
"Auto-refresh" toggle repeats the existing 8s /deploy/exec capture every
~9s and merges results in, rather than requiring a manual click each time.

Still not a genuine live stream (no WebSocket listener on the broker) —
just polling dressed up to feel closer to one, without touching the
broker or NPM config.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 17:38:04 +00:00
e53ff84761 Add MQTT tab (broker capture) and MQTT Clients admin page
AdminMonitor: new "MQTT" tab reuses the existing Shell tab's /deploy/exec
mechanism to run a bounded (8s) mosquitto_sub capture against the broker
LXC via a read-only "mqtt-inspector" identity — a one-shot capture, not a
live stream, since /deploy/exec is request/response. Retained messages
(most device telemetry) show immediately regardless.

AdminSettings: new "MQTT Clients" tab — create/list/revoke broker
identities via the new settings API, matching forecasting's API Keys
show-once-password UX. Removes the need to hand-run mosquitto_ctrl for
every new device or app that needs broker access.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 17:11:50 +00:00
dd49d00a84 Widen calendar summary query window from 7 to 30 days
A 7-day window meant "next week"-type events could miss both the Mine
fetch and the All backfill entirely, since they queried the same range.
The Upcoming list is still capped by UPCOMING_LIMIT, so this doesn't
flood the dashboard — it just means events further out get a chance.
2026-07-28 15:41:00 +00:00
8320ae8789 Backfill dashboard calendar summary to a minimum of 3 events
When the Mine tab has fewer than 3 relevant events in range, top it up with
the earliest not-mine events from All (Today + Upcoming combined), rendered
in italics so it's clear they aren't personally assigned.
2026-07-28 12:54:21 +00:00
0b8fed2e96 Add calendar summary to dashboard; default portal to 1hr inactivity timeout
Dashboard now shows today's and upcoming events (mine or all, toggle) for
users with calendar app access. Also gives the portal shell a 1-hour
inactivity default for devices that have never been configured, instead of
following child apps into an unlimited 30-day session — that's why the
dashboard could sit logged in for days without prompting. An explicit "Off"
choice in Admin Settings still overrides it (now written as mins=0 instead
of clearing the cookie, so it's distinguishable from "never configured").
2026-07-28 12:45:29 +00:00
709e83b6d5 Register Zap and Thermometer icons for utilities and hvac apps
Both apps were seeded in auth/src/db.js with icon names not present
in AppIcon's iconMap, so the sidebar/dashboard rendered no icon.
2026-07-26 22:07:17 +00:00
25afbc726a Register CalendarDays icon so the Calendar app shows a sidebar icon 2026-07-25 21:43:53 +00:00
d2603bca99 Fix session-expiry redirect losing return-to-app + wire up inactivity timer
Login.tsx only read the return path from router state, which a hard
cross-document navigation (a child app bouncing the whole shell here
on session expiry) can never carry — so re-authenticating always
landed on the Dashboard instead of back in whatever app you were
using. Login.tsx now also accepts a ?from= query param for that case.

Also wired up AuthGate's inactivity auto-logout timer, which was
defined (getInactivityMs) but never actually called — so the
per-device timeout configurable in Admin Settings had no effect.
Disabled for installed PWAs as intended.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 17:07:21 +00:00
58b64c5450 Add DollarSign to AppIcon map (wages app icon)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-23 10:01:12 +00:00
f89600a135 Force desktop width on AdminMonitor — admin tool not suited to mobile layout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:37:56 +00:00
b3c02adf76 Add PageShell — collapsed sidebar strip on Dashboard and all admin pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:15:12 +00:00
de49df70b0 Listen for hnf:viewport postMessage — resize iframe to 1280px for desktop-forced pages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-21 09:00:37 +00:00
9e5c415685 Fix app switching — remount AppFrame on slug change so iframe src recomputes 2026-07-15 18:10:56 +00:00
24b08012e8 Use UtensilsCrossed icon for Table Bookings app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 17:41:13 +00:00
e7063049f0 Add Armchair to AppIcon map for Table Bookings app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 17:33:29 +00:00
e76753f92f Fix hosted_tables isConfigured — check site_url config field not secrets
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 17:22:58 +00:00
880cd9793d Add auth secret reveal panel to Hosted Tables integration card
Admin clicks 'Auth secret', re-enters their password, and sees CENTRAL_AUTH_SECRET
with a copy button. Secret auto-clears after 60 seconds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 15:46:41 +00:00
279872364c Add site_url field label for Hosted Tables integration card
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 15:41:53 +00:00
51c99f1ee9 Persist iframe sub-page in URL hash so refresh returns to the same page
On every iframe load, mirror its current path to the portal URL hash
(e.g. /app/cashup#/reports). On mount, initialSrc reads that hash and
restores the correct page after a refresh. Hash is cleared when
switching apps so it doesn't bleed across slugs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 10:51:23 +00:00
2b4de33289 Re-check session on tab focus to fix stale user name in sidebar footer
If a different user logs into a child app while the portal tab is open,
the portal cookie changes but the in-memory user state goes stale. Now
AuthGate re-fetches /api/auth/me on visibilitychange and focus events,
updating state only when the user identity actually changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 10:48:52 +00:00
d0fb78da51 Show commits-behind badge on Updates tab
Displays a gold badge next to the latest commit hash when the backend
returns a commitsBehind count greater than zero.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 09:24:31 +00:00
4cff59f8ca Collapse user permissions into expandable section on admin users page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 15:55:08 +00:00
bcd91f1c50 Show custom success message from test result if present
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 13:55:34 +00:00
03b241ec74 Add Rebuild button to Updates tab — triggers rebuild without git pull 2026-07-14 13:22:58 +00:00
3562c178d7 Add FIELD_LABELS for SambaPOS split SQL/GraphQL credential fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 13:09:09 +00:00
8a8c4073e5 Add Nextcloud directory browser to backup_path field in Settings
The Backup Directory field in the Nextcloud integration card gains a
Browse button that opens an inline panel with: breadcrumb navigation,
scrollable directory list, and a Select button to pick the current path.
Falls back to manual text entry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 11:09:47 +00:00
3cfa092f73 Add Backups tab to AdminMonitor, backup_path label to Settings
Backups tab shows last-run status, expandable run history with per-item
breakdown (db/vol, size, status), and a Run Now trigger button.
Settings Nextcloud card gains a Backup Directory field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 11:03:52 +00:00
c40d7617f4 Add Shell tab to AdminMonitor — run commands on app containers via SSH
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 09:27:45 +00:00
43a54e8b4c Rename Uptime tab to States; add RAM/disk progress bars per service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 09:04:23 +00:00
f36fd83196 Replace hotel emoji on login screen with Lucide Hotel icon; add sidebar scrollbar styles
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 08:17:51 +00:00
567e5bf73e Add History icon to AppIcon registry
Portal sidebar was rendering nothing for the history app entry because
History was missing from the Lucide icon map.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-13 15:44:36 +00:00
63b6240c22 Add This Device tab to portal admin settings 2026-07-13 12:48:06 +00:00
af810f14c7 Configurable inactivity timeout — disabled automatically in PWA/standalone mode 2026-07-13 12:29:03 +00:00
b280d391e8 Add shared device inactivity timeout to AuthGate 2026-07-13 11:53:06 +00:00
9a7d7dd5b4 Add Monitor icon to AppIcon map for KDS app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 12:48:57 +00:00
905a447760 Fix issue #7: add Wrench and BarChart2 to portal AppIcon map
Maintenance (Wrench) and Reports (BarChart2) icons were missing from
the hardcoded iconMap, causing those app tiles to show no icon.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-08 12:10:05 +00:00
5b11a0d4aa Register: add confirm password field with mismatch highlight
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 15:54:13 +00:00
817e5f905d AdminSettings: labels for from and reply_to SMTP fields
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 15:47:11 +00:00
dd022f80bb AdminSettings: restore location name display in dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:14:11 +00:00
4e5a9f6466 AdminSettings: show team names in location dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:11:17 +00:00
28e470433a AdminSettings: show error message when location fetch fails
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 13:03:57 +00:00
f902e87e25 Add App Settings tab to admin settings — per-app session timeout UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:57:17 +00:00
1ccaaed8be AdminSettings: Workforce location picker with fetch button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:52:37 +00:00
1dcf8bfbcb AdminDepartments: light theme, group by location, location_name support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:42:50 +00:00
f3d46b8c80 Add bearer_token and other missing Workforce field labels
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 12:35:01 +00:00
0857e9b998 Add PWA manifest icons + favicon — fixes 404s on /icons/icon-192.png and /favicon.ico
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 13:34:59 +00:00
9451de5a6c feat(monitor): show commit timestamps in updates tab
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-02 15:58:42 +00:00