Fix request type visibility, mobile layout overflow, and overnight polling (#23, #24, #25) - #26
Open
pataniaeli wants to merge 5 commits into
Open
Fix request type visibility, mobile layout overflow, and overnight polling (#23, #24, #25)#26pataniaeli wants to merge 5 commits into
pataniaeli wants to merge 5 commits into
Conversation
Traced via Supabase request logs (edge_logs, filtered to the node/service-role user agent): two spaces' /display/[spaceId] pages were each generating ~270 identical requests to spaces/space_bookings/space_blackouts over a 16-hour window, continuing straight through the night regardless of whether anyone could see the screen. That is exactly the profile in the reported Screen Time chart -- solid, continuous usage attributed to this site across 12AM-5AM. Both the 50s data poll and the 1s clock tick now check document.visibilityState before doing anything, so a display left open in a backgrounded tab (screen off, phone locked, tab switched away) stops generating traffic and CPU wake-ups. A visibilitychange listener fetches immediately on return so the display catches up rather than waiting out the rest of the interval. A kiosk whose screen genuinely stays on and visible the whole time -- the feature's actual use case -- is unaffected, since visibilityState stays 'visible' for as long as it's actually on screen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Requests have carried scope/division/room_request_bodies since #19, but nothing rendered it: every request list showed only the originating body, with no way to tell a single-body request from a divisional or multi-body one, and no way to filter by it. - /api/administrator/requests and /api/me/requests now select scope, division, and room_request_bodies(body_id, bodies(name)) alongside what they already returned. - ScopeLabel (already used for bookings) now renders on every request surface: the admin Requests tab, the Fulfill Request modal's summary card, the Open Requests sidebar in all three admin creation forms, and leadership's own My Requests list. - A type filter (All / Single Body / Divisional / Multi-Body) is added alongside the Requests tab's existing status grouping, and to each Open Requests sidebar next to its existing per-body filter -- mirroring the scope selector's own option set so the two stay in sync. FulfillModal takes the owning body's name, scope, division and linked bodies as plain fields on `request` rather than the raw row, since its only source is the caller passing through what it already rendered -- avoids re-deriving ScopedRow shape in a component that isn't otherwise scope-aware. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Each fix targets the specific reported symptom, no broader redesign: - Dashboard content now clears the fixed mobile hamburger button (top-4, ~40px tall, no reserved layout space) with pt-20 on small screens, restored to the normal pt-8 at md+. This was the root cause behind two of the reported screens, where a right-aligned control sat directly under it. - My Rooms' title/bell/filter-buttons header row now wraps instead of forcing the "Next 1/3/7 Days" buttons hard against the bell. - The notification dropdown's fixed w-80 overflowed off the right edge on mobile, since the bell sits near the left of that row -- clamped to w-[min(20rem,calc(100vw-2rem))]. - Settings' "Add a body" <select> ignored its flex-1 and stayed pinned to its widest <option>'s content width (the classic flexbox min-width:auto gotcha), pushing the Join/Request button off-screen -- fixed with min-w-0. - The request-a-booking type tabs didn't scroll, hiding the "Viewing Previous Requests" toggle past the screen edge -- now uses the same overflow-x-auto + whitespace-nowrap pattern already established for the Administrator tab bar (issue #10). The Weekly Room Start/End Date inputs overlapped for the same min-width:auto reason as the body select above. - SGA Spaces' booking-range filter buttons (This Week/Month/Semester/All) now wrap instead of running off the page; the blackout create/edit forms' Date+Time grid now stacks to one column below sm instead of cramming a 3-select TimePicker into half a row; Active Blackouts was overflow-hidden (clipping) instead of overflow-x-auto (scrolling), so it could never be scrolled to see cut-off columns. public/sw.js is the regenerated next-pwa artifact. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was
linked to
issues
Aug 26, 2026
The grid-cols-1 stacking fix in the previous commit solved the layout collision, but a distinct bug remained: on a WebKit-based mobile browser (reported via Opera on iOS -- Apple requires all iOS browsers to render on WebKit, so this reproduces in Safari too, and anywhere else on iOS), the Start/End Date `<input type="date">` fields themselves rendered wider than their bordered box and spilled past its right edge, regardless of width or min-width. Root cause: globals.css applies the site's custom font (Space Grotesk) to every input, including native date inputs. iOS's date-picker widget sizes its internal day/month/year segments using the input's own font metrics, and Space Grotesk's glyph widths differ enough from the system font that WebKit miscalculates and renders wider than the CSS box. Fixed with one rule: `input[type="date"]` falls back to the system font, letting iOS size it against the metrics its own picker expects. Confirmed via grep that every date field in the app (17 call sites across 10 files -- SGA Spaces blackouts, all three admin booking create/edit forms, and all three Request a Booking date fields) is a plain native `<input type="date">` with no local font override, so this single global rule covers every instance rather than needing a per-file fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Isolates the reported "Date field uncontained/blank" symptom into four minimal cases (empty w/ Space Grotesk, empty w/ system font, a filled value, and a plain text input for comparison) so it can be checked directly on the device where the bug reproduces, without needing an authenticated session. Not a fix -- remove once the real cause is confirmed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Fixes #23, #24, and #25.
#25 — User reports high usage overnight
Rather than guess at a polling bug, I checked the actual Supabase request logs (
edge_logs, filtered to the service-role/nodeuser agent) for the overnight window. Two spaces'/display/[spaceId]kiosk pages were each generating ~270 identical requests tospaces/space_bookings/space_blackoutsover 16 hours — continuous polling every 50s regardless of whether anyone could see the screen. That matches the reported Screen Time chart exactly: solid, uninterrupted usage attributed to the site across 12AM–5AM.Fix: both the 50s data poll and the 1s clock tick now check
document.visibilityStatebefore doing anything, so a display left open in a backgrounded tab (screen off, phone locked, tab switched away) stops generating traffic. Avisibilitychangelistener fetches immediately on return so it catches up rather than waiting out the interval. A kiosk whose screen genuinely stays on the whole time — the feature's actual use case — is unaffected.#23 — Request types not visible or filterable
Requests have carried
scope/division/room_request_bodiessince #19, but nothing rendered it anywhere. Added:scope,division, androom_request_bodies(body_id, bodies(name))to the/api/administrator/requestsand/api/me/requestsselects.ScopeLabel(already used for bookings) on every request surface: the admin Requests tab, the Fulfill Request modal, the Open Requests sidebar in all three admin creation forms, and leadership's own My Requests list.#24 — Mobile layout clipping and overflow
Traced each of the seven reported symptoms to a specific cause rather than a general responsive pass:
pt-20clearance on mobile.w-80overflowed off-screen since the bell sits near the left of its row — clamped to the viewport.<select>hit the classic flexboxmin-width: autogotcha (pinned to its widest<option>, ignoringflex-1) and pushed the Join/Request button off-screen — same root cause broke the Weekly Room Start/End Date fields in the request form.overflow-x-autopattern already established for the Administrator tab bar (Administrator Tab will not scroll on mobile #10).sminstead of cramming a 3-select TimePicker into half a row; Active Blackouts wasoverflow-hidden(clipping) instead ofoverflow-x-auto(scrollable).Verification
tsc --noEmitclean,npm run buildcompiles all 61 routes. Lint on the touched files shows only three pre-existingsetState-in-effecterrors in code I didn't modify (confirmed viagit diffthat none of my changes touch those effects) — no new errors or warnings introduced.I did not do a live authenticated click-through of the mobile fixes in a browser — verification here is build/typecheck plus a careful read of each fix against the reported screenshot. Worth a manual pass on a real phone before merging, particularly the notification dropdown clamp and the blackout form stacking.
🤖 Generated with Claude Code