Campus & availability improvements: cafeteria hours, Deggendorf time, off-campus filter, lock hints - #10
Merged
Conversation
arudaev
commented
Jul 7, 2026
Owner
THabella reports events in Europe/Berlin wall-clock time, but the app derived "now" from the device clock. On a device set to another timezone that computed the wrong current time and mislabelled rooms as free, occupied, or the campus as open/closed. Add campusNow()/toCampusWallClock() (framework-free) and use them for the query time, auto-refresh, reset and the teaching-week fetch, so all availability and opening-hours reasoning runs on the Deggendorf clock.
The Saved screen computed availability purely from THabella events and ignored campus opening hours, so a saved room showed "Free / all day" even when the buildings were shut — it always looked open. It also never capped free windows at closing time. Mirror the room-detail logic: when the campus is closed (and not previewing an opening later today) show a ClosedNotice and mark each card CLOSED; when open, rank status at planningTime and cap at todayClose. Adds an optional statusLabel to RoomCard so a card can read "closed".
Glashaus, the Mensa-building cafeteria and the Kaffeebar host no THabella teaching, so they rendered as neutral footprints with no hours. Add their STWNO schedules (term/exam vs lecture-free) to the opening-hours domain as first-class venues, alongside the Library. The campus panel now shows a live "Open until 14:00" / "Closed · opens Wed 07:30" line for each, and open cafeterias tint teal on the map, matching how the Library already behaves.
The Cham/Badstraße site reuses Deggendorf's building letters (it has its own A and B), so its rooms mapped onto the core footprints and showed up in the Campus list even though the 2.5D map only covers Deggendorf. Add isOnCampusMap(room) — a room qualifies only if it resolves to a mapped footprint and carries no remote-site marker (Badstraße/Cham/Pfarrkirchen/ ECRI/Rottal) — and filter the Campus lists and map tint through it. These rooms remain in the full Rooms list, just not on Campus.
THabella marks a room free the moment no event occupies it, but labs, computer rooms and small seminar/meeting rooms are usually locked when no class is scheduled — so a student shouldn't cross campus on a maybe. Add mayBeLocked(room): specialised labs (incl. EDV) at any size, and any non-lecture-hall room under 40 seats, since seat count is the only signal separating a 16-seat seminar room from a 220-seat hall. Detection reads the room name, not facilities, so the "Sendehörsaal" broadcast feature no longer misclassifies seminar rooms as lecture halls. Surfaced as a soft amber "· may be locked" caveat on the card and a muted note on detail — we never hide these rooms.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.