dashboard Project Overview
Current Work
PLAN_BUG04_frontend-form-validation.md— BUG04 frontend form validationPLAN_F07_push-notifications.md— F07 push notificationsPLAN_F08_offline-support.md— F08 offline supportPLAN_F16_feeding-schedules.md— F16 feeding schedules
Recent Completions
- T36: Fix Failing Frontend Tests + Project Automation Setup
- F27: Gamification — Streaks + Avatar + Achievements
- BUG05: Session Stability & Token Refresh Robustness
- BUG05: Native Safe-Area Insets
- BUG: Next-feeding badge shows raw minutes
menu_book App-Dokumentation
Vollständige Anwenderdokumentation — wie PetWatch funktioniert und wie man es bedient.
Anmeldung & Registrierung
Account erstellen, einloggen, Gast-Modus, Google-Login.
Dashboard
Tagesübersicht, Schnellaktionen, Streak, nächste Fütterung.
Fütterung
Mahlzeiten erfassen, Kalorien tracken, Futterplan, Produktsuche.
Spaziergänge
GPS-Tracking, Live-Karte, Ereignisse, Walk-Historie, Heatmap.
Training
Trainingseinheiten, Übungen, Erfolgsbewertung.
Kalender
Tierarzttermine, Impfungen, Erinnerungen.
Dokumente
Impfpass, Gesundheitsakten, Fotos hochladen und verwalten.
Checklisten
To-Do-Listen pro Haustier erstellen und abhaken.
Gamification
Streaks, Achievements, Avatar, XP-System, Level.
Einstellungen
Sprache, Theme, Benachrichtigungen, Account-Verwaltung.
route Roadmap
Low Priority (Post-MVP)
PregnancyStartDate on Pet → distinguish early (factor 1.8) vs late (factor 3.0) gestation for more accurate calorie needs during pregnancy. Currently uses midpoint factor.CaloriesPerUnit field on FoodProduct (e.g. kcal per piece/tablet), unit conversion table (e.g. ml→g density factor per product) for cross-unit calculation. Currently Piece-unit products always show null calories.BroadcastReceiver — beyond Capacitor scope. Deferred from F12.TakenAt timestampWalkPhoto entity only stores upload time (CreatedAt from BaseEntity). Add TakenAt field (photo capture time) for future timeline / map-pin features. Deferred from F12 (R11).IsGuest = true) older than 30 days along with all their associated data (Pets, Feedings, Walks, etc.).@handle) auf ApplicationUser — neues Feld, Uniqueness-Constraint, Migration, Profile-UI zum Setzen/Ändern, Backend-Suchendpoint. Ermöglicht Nutzersuche in F10 per Handle statt nur per E-Mail.GnssStatus.Callback + GnssMeasurementsEvent. iOS: not available.GnssStatus.Callback on Android. < 4 satellites → flag fix as unreliable, raise accuracy threshold dynamically. iOS: not directly available — skip or approximate from horizontalAccuracy trend.docs/konzepte/17-gamification.md Section 5. Deferred from F27.DeletionScheduledAt). User kann sich innerhalb von 14 Tagen erneut einloggen und die Löschung abbrechen. Nach 14 Tagen: Hintergrund-Job löscht Account + alle Daten endgültig (wie aktueller Hard-Delete). Benötigt: neues Feld auf ApplicationUser, Login-Check mit Reaktivierungs-Dialog, Scheduled Job (Hangfire o.ä.).DeviceId-Feld auf ApplicationUser, Capacitor Device Plugin, Backend-Logik für Device-Matching.Technical Debt / Housekeeping
DeletedAt need UI (restore/purge) + background cleanup jobperiodLabel week-end uses local setDate/getDate on UTC-midnight DateperiodLabel computes week-end via end.setDate(end.getDate() + 6) — in UTC-negative timezones this returns the wrong day. Fix: use Date.UTC(..., getUTCDate() + 6) before passing to toLocaleDateString(). Pre-existing, found in BUG04 review.continue-on-error from .github/workflows/ci.yml).backend/src/PetWatch.Persistence/Seeds/global_food_products_seed.sql is 60MB — exceeds GitHub's 50MB recommendation. Move to Git LFS or exclude from repo and load via separate script.@codetrix-studio/capacitor-google-auth@3.4.0-rc.4 requires @capacitor/core@^6 but project uses v8. Works only with legacy-peer-deps=true. Find Capacitor 8-compatible alternative.app.spec.ts has 7 tests that sporadically fail because Angular 21's @angular/build:unit-test builder shares module cache across files (isolate: false). vi.mock('@capacitor/core') from different files compete. All tests pass individually. Options: refactor Capacitor calls behind Angular DI, or wait for upstream fix. CI frontend tests are continue-on-error until fixed.StreakServiceTests.RecordVisitAsync_SameDay_NoOp fails in CI (UTC) but passes locally (CET). Test likely compares dates without accounting for timezone differences.history Changelog
T36: Fix Failing Frontend Tests + Project Automation Setup
- Frontend tests: Fixed 128 of 140 failing test files (138→7 failed tests). Created
vitest.config.tswith path alias resolution, jsdom environment, globals, test setup. Fixed ~20 test files: stale expectations, missing mocks, Capacitor vi.mock patterns. - CI/CD: GitHub Actions pipeline for backend (.NET 10 build+test) and frontend (Angular 21 build+test). Frontend tests now strict (no continue-on-error).
- GitHub: Repository
dotlashlabs/pet-watchinitialized with current project state. Renovate configured for automated dependency updates. - Workflow: CLAUDE.md rewritten with 5-phase lifecycle (Brainstorming → Wireframe+Plan → Go → Implementation → Handoff). 6 slash commands:
/new-feature,/fix-bug,/execute-plan,/archive-plan,/project-status,/next-task. Impact Checklist mandatory in every plan. - Wireframe Toolkit: Shared
wireframe-base.js(1692 lines) — CSS tokens, phone frame, header, tab bar, template functions. Eliminates ~500 lines duplication per wireframe. - Status Dashboard: Professional static site at
status.dotslash-labs.comwith SSL — Overview, App-Dokumentation, Roadmap, Changelog, Bugs, Wireframes, Cron-Reports. - Automation: 3 weekly remote triggers (Monday 8am CET): Drift Detection, Doc Freshness, Backlog Grooming. Email reports to project owner.
- Known: 1 flaky test file (
app.spec.ts) due to Angular 21 builder mock isolation limitation (T39).
F27: Gamification — Streaks + Avatar + Achievements
- Streaks: Daily engagement counter on Dashboard. 48h break rule, 5 reactivations/month, milestones at 3/7/14/30/60/100/365 days
- Virtual Pet Avatar: 7 emotional states (happy, content, hungry, restless, sleepy, ecstatic, celebrating) based on care activities for the active pet. Custom SVG illustrations (QuiverAI) with PetWatch brand colors
- Achievements: 41 badges in 6 categories (Walking, Feeding, Training, Streaks, Pet Care, Special), 4 rarity tiers (Bronze/Silver/Gold/Legendary), idempotent achievement evaluator
- Dashboard redesign: Pet Hero Card with avatar in XP ring, level badge, care quest indicators (Fed/Walk/Train), streak footer with week dots
- Achievements page:
/tabs/achievements— all badges with progress, badge detail bottom sheet, rarity legend - Profile integration: Featured badges row, "Achievements" menu item with unlock count
- Milestone celebration: Full-screen overlay with CSS confetti animation for streak milestones and Gold/Legendary badge unlocks
- Backend: 3 new entities (UserStreak, Achievement, UserAchievement), 5 new endpoints, 93 new tests
- Frontend: 6 new components, 74 new tests, 135+ i18n keys (DE/EN)
BUG05: Session Stability & Token Refresh Robustness
- Fixed: Session loss on app startup with transient network/server errors —
_tryRefreshTokenAsync()now only clears session on 401/403, keeps tokens on network/5xx errors - Fixed: Race condition between Facade refresh (app resume) and Interceptor refresh (401 handler) — centralized into single
centralizedRefreshAsync()with Promise deduplication - Fixed:
ClockSkew = 0causing unnecessary 401s on devices with slight clock drift — set to 30 seconds - Fixed: Interceptor infinite loop when refresh endpoint itself returns 401 — refresh URL now excluded from retry logic
- Improved: Guest refresh token lifetime increased from 30 → 180 days (guests cannot re-login)
- Backend:
Funcdelegate for role-aware token expiry, 2 new tests, 508 tests green - Frontend:
centralizedRefreshAsync()+ simplified interceptor (removedisRefreshing/BehaviorSubject), removed deadhandleTokenRefreshAsync, 9 interceptor + 79 facade tests green
BUG05: Native Safe-Area Insets
- Fixed: Tab bar and content overlapping system navigation bar on older Android devices with on-screen nav buttons
- Root cause:
env(safe-area-inset-bottom)returned 0 on these devices despite edge-to-edge mode, overriding the CSS fallback - Android:
MainActivity.javanow reads actual system bar insets viaViewCompat.setOnApplyWindowInsetsListener, converts to CSS dp, and injects as--native-inset-*CSS custom properties viaWebViewListener - Frontend: New global CSS variables
--safe-area-top/bottom/left/rightwith fallback chain: native injection (Android) →env()(iOS) →0px(web) - 32 files updated — replaced all triple-fallback patterns (
hardcoded + constant() + env()) with singlevar(--safe-area-*)references - Removed all
constant(safe-area-inset-*)legacy syntax and hardcoded 34px/24px fallbacks
BUG: Next-feeding badge shows raw minutes
- Dashboard next-feeding badge now shows human-readable time: "in 11 Std. 31 Min." instead of "in 691 min"
- Format: < 60 min → "in X Min.", full hours → "in X Std.", mixed → "in X Std. Y Min."
- 3 new i18n keys, old
NEXT_FEEDING_INkey removed
UI01: Meal Form — Compact Table Layout
- Restyled food items and supplements sections from individual outlined fields to a compact table layout with column headers (Produkt/Menge/kcal), thin row separators, and borderless inline inputs
- Column headers: 11px/600 uppercase, distinct labels per section ("Produkt" vs "Supplement")
- "Neues Produkt anlegen" button restyled from outlined button to compact bordered chip (primary for food, tertiary for supplements)
- Fixed column widths for consistent alignment (name flex:1, amount 64px, kcal 48px)
- Autocomplete disabled on already-selected products — no more "Keine Produkte gefunden" when clicking a filled product name
- i18n: 4 new keys (COL_PRODUCT, COL_SUPPLEMENT, COL_AMOUNT, COL_CALORIES) in de + en
- Wireframe:
docs/design/wireframes/petwatch-meal-form-wireframes.html
BUG: Breed label shows raw enum after page reload
- Fixed race condition where breed translations (lazy-loaded via HTTP) arrived after
computed()signals had already cached the raw enum key (e.g. "MIXED_BREED" instead of "Mischling") - Added
revisionReadonlySignal toBreedTranslationServiceas reactive trigger for consumers - Patched 6
computed()signals across Pet Care page, Pet Care Overview, and Pet Wizard
Unit-aware labels in meal form
- Meal form now shows the correct unit suffix per product: "g" (Gram), "ml" (Milliliter), "Stk" (Piece) — previously always "g"
- Uses existing
FOOD_PRODUCT_UNIT_LABELSwithtranslatepipe (i18n-ready)
F26: Schedule Completion Creates Meal Automatically
- Backend:
CompleteAsyncnow auto-creates aMealwithFeedingitems from schedule products (name, amount, feedType, calories) — no more double-entry for calorie tracking - Backend: Calorie computation uses 3-level fallback: FoodProduct → GlobalFoodProduct → FeedType default; Piece-unit products get null amount/calories
- Backend:
FeedingScheduleLog.LinkedMealIdalways set on new completions; log + meal persisted atomically - Backend: Removed
CheckMatchAsyncendpoint,GetMatchingScheduleAsyncrepository method,ScheduleMatchDto - Backend: 6 new tests (meal creation, calorie computation, fallbacks, piece handling, idempotency, feed-type default)
- Frontend: Schedule completion now refreshes meal list so auto-created meal appears immediately
- Frontend:
completeAsyncfacade returnsFeedingScheduleLog(wasvoid) - Frontend: Removed
PlanMatchDialogComponent,checkMatchAsync,ScheduleMatchinterface,feedingScheduleMatchendpoint config - Frontend: Removed vestigial
linkedMealIdfromCompleteScheduleRequest
B44: Complete Product Scraping (All Variants)
- Scraping expanded from 6,733 to 14,576 products by following variant selectors (flavor × package size)
- New
--scrape-variantsmode discovers variant URLs from existing data and scrapes only missing ones - 404 pages detected and skipped instantly (no timeout wait)
- Frontend: search results deduplicated by product name (package size variants collapsed)
- Frontend: package size stripped from autocomplete display
- Frontend: subscript spacing and "based on" hint removed from product form
bug_report Open Bugs
Resolved
devices Wireframes
Interaktive Wireframes aller App-Screens. Klicke auf einen Eintrag um das Wireframe zu öffnen.
monitoring Cron-Reports
Cron-Jobs werden in Phase D eingerichtet.
Reports erscheinen hier automatisch.