Repository navigation
feat(mensa): show the canteen menu on Today - #53
Merged
Merged
Conversation
Canteen, Meal and CanteenMenu (grouped by category), a CanteenService port, the canteen setting (nil hides the menu), MensaSchedule (after 15:00 the next day's menu is more useful) and LoadCanteenMenuUseCase, which keeps the menu of the day in memory. Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
OpenMensaClient talks to the public OpenMensa API v2: canteens near a coordinate, whether a day is closed and its meals with the student price. A missing menu (404) and network errors map to MensaError. Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
MensaViewModel loads the chosen canteen's menu for today (tomorrow after lunch) and reports off, loading, closed, menu or unavailable. MensaCard groups the meals by category with the student price; MensaSettingsSection offers the canteens around Oldenburg. Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
„Heute“ shows the menu card at the end of the right column when a canteen is chosen; Settings → Allgemein gets a „Mensa“ section. The menu refreshes with the five-minute background loop, which switches to tomorrow's menu after lunch. Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
Refs #43 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
# Conflicts: # App/AppContainer.swift # App/StudyAppApp.swift # Presentation/RootView.swift # Presentation/Today/TodayView.swift
# Conflicts: # Presentation/Settings/SettingsPane.swift # docs/FEATURES.md
Owner
Author
|
CI: „test runner hung before establishing connection“. Das ist derselbe Hänger wie seit ca. 13 Uhr auf Generated by Claude Code |
# Conflicts: # App/AppContainer.swift # Data/Preferences/UserDefaultsStudyPreferences.swift # Domain/Repositories/StudyPreferences.swift
# Conflicts: # App/AppContainer.swift # App/StudyAppApp.swift # Presentation/RootView.swift # docs/FEATURES.md
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.
Closes #43
What changes and why?
The canteen menu on „Heute“, from the public OpenMensa API v2 (no account needed). One commit per layer:
Canteen,Meal,CanteenMenu(grouped by category),CanteenServiceport, settingcanteenID(nil = off),MensaSchedule(after 15:00 the next day),LoadCanteenMenuUseCase(keeps the day's menu in memory)OpenMensaClient+OpenMensaParser: canteens near the university, closed days, meals with student price; 404 and network errors becomeMensaErrorMensaViewModel(off / loading / closed / menu / unavailable),MensaCard,MensaSettingsSection(canteens around Oldenburg, nearest first)Note
openmensa.orgwas not reachable from my environment, so the parser is tested against sample JSON in the documented API v2 format. Please pick the Uhlhornsweg canteen in the settings and check the card. The app sandbox already allows outgoing connections.Tests
Checklist
Generated by Claude Code