dashboard Project Overview

check_circle
Passing
CI Status — GitHub Actions ↗
science
508+ / 2119
Tests (BE + FE)
task_alt
4
Active Plans
bug_report
1
Open Bugs

Current Work

  • PLAN_BUG04_frontend-form-validation.md — BUG04 frontend form validation
  • PLAN_F07_push-notifications.md — F07 push notifications
  • PLAN_F08_offline-support.md — F08 offline support
  • PLAN_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.

login

Anmeldung & Registrierung

Account erstellen, einloggen, Gast-Modus, Google-Login.

dashboard

Dashboard

Tagesübersicht, Schnellaktionen, Streak, nächste Fütterung.

restaurant

Fütterung

Mahlzeiten erfassen, Kalorien tracken, Futterplan, Produktsuche.

directions_walk

Spaziergänge

GPS-Tracking, Live-Karte, Ereignisse, Walk-Historie, Heatmap.

fitness_center

Training

Trainingseinheiten, Übungen, Erfolgsbewertung.

calendar_month

Kalender

Tierarzttermine, Impfungen, Erinnerungen.

folder

Dokumente

Impfpass, Gesundheitsakten, Fotos hochladen und verwalten.

checklist

Checklisten

To-Do-Listen pro Haustier erstellen und abhaken.

emoji_events

Gamification

Streaks, Achievements, Avatar, XP-System, Level.

settings

Einstellungen

Sprache, Theme, Benachrichtigungen, Account-Verwaltung.

route Roadmap

Low Priority (Post-MVP)

B06 Feature
Push Notifications
FCM + Capacitor Push Notifications + backend scheduler
B07 Feature
Offline Support
Read cache + write queue sync
B11 Feature
Subscription / PayPal
Guest session done (F13). Free / Premium tiers + PayPal still open.
B40 Feature
Meal form: per-item FeedType selector
Each food item should have its own FeedType (Dry/Wet/Raw/Treat) for accurate calorie auto-estimation. Currently hardcoded to DryFood. See L23.
B41 Feature
Calorie calculation for other species
Extend RER/MER formula to rabbits, birds, hamsters, etc. Currently dogs and cats only. See L24.
B42 Feature
Pregnancy phase calorie adjustment
Optional 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.
B43 Feature
Ideal weight calculation (Plan B)
Breed-specific ideal weight ranges, Body Condition Score (BCS), weight-based calorie adjustment. Uses HeightCm field already collected in F11.
B47 Feature
Unit-aware calorie computation
Calorie calculation should work for all units (g, ml, Stk, future units), not just grams. Needs: 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.
B45 Feature
Produktdetailseite
Nährwerte, Zusammensetzung, Fütterungsempfehlung etc. aus GlobalFoodProduct.RawData anzeigen.
B46 Feature
User: Produkte vorschlagen + Bilder einreichen
User können fehlende Produkte melden und Bilder zu Produkten hochladen. Moderations-Workflow nötig.
B19 Feature
Diskussion: Training & Feeding als Stammdaten
Klären ob Training-Typen und Feeding-Typen/-Pläne als Stammdaten (vordefiniert/verwaltbar) statt als manuelle Freitexteinträge umgesetzt werden sollen. Betrifft Datenmodell, Dateneingabe und ggf. Kalenderlogik.
B22 Feature
Android notification: event action buttons
Android foreground notification during walk should have quick-action buttons (Pee/Poop/Mark). Requires custom BroadcastReceiver — beyond Capacitor scope. Deferred from F12.
B24 Feature
Walk photo: TakenAt timestamp
WalkPhoto entity only stores upload time (CreatedAt from BaseEntity). Add TakenAt field (photo capture time) for future timeline / map-pin features. Deferred from F12 (R11).
B25 Feature
Walk history: pagination / infinite scroll
Walk history loads up to 100 walks on init with no progressive loading. Add server-side pagination or infinite scroll for users with many walks. Deferred from F12 (R14).
B28 Feature
Guest account cleanup job
Abandoned guest accounts (never upgraded) accumulate in the DB indefinitely. Add a scheduled backend job that deletes guest accounts (IsGuest = true) older than 30 days along with all their associated data (Pets, Feedings, Walks, etc.).
B30 Feature
PetAccess: E-Mail-Einladungen
Einladungslink per E-Mail versenden (MailKit + SMTP). Folge-Feature zu F10 — F10 implementiert nur kopierbaren Link. Erfordert SMTP-Konfiguration + Human-Freigabe für MailKit-Paket.
B31 Feature
PetAccess: Push-Notification bei Ablauf
User erhält Push-Notification wenn temporärer Zugang in <24h abläuft. Abhängig von F07 (Push Notifications).
B32 Feature
Username-Handle (Option C)
Eigener Username-Handle (@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.
B33 Feature
GPS: GNSS Raw Measurements (Android)
Tap into GNSS raw measurements (Android 7+) for carrier-phase positioning — enables sub-meter accuracy on newer devices. Extends NativeGps plugin with GnssStatus.Callback + GnssMeasurementsEvent. iOS: not available.
B34 Feature
GPS: Heading/Bearing Validation
Use magnetometer/compass data to validate GPS direction. Reject GPS points that show implausible direction changes (e.g. 180° jump while compass says straight ahead). Reduces route "zacken". Extends NativeGps plugin on both platforms.
B35 Feature
GPS: Satellite Count Monitoring
Track number of visible GPS satellites as quality signal. GnssStatus.Callback on Android. < 4 satellites → flag fix as unreliable, raise accuracy threshold dynamically. iOS: not directly available — skip or approximate from horizontalAccuracy trend.
B38 Feature
Home Screen Widgets (iOS / Android)
Native Widgets für den Homescreen wie im Wireframe definiert (z.B. nächste Fütterung, Walk-Status, Streak). Erfordert native Implementierung: Android (Glance/AppWidget), iOS (WidgetKit). Kommunikation mit der App via Shared Storage / App Groups.
B48 Feature
Weekly Recap
Sonntag-Abend Popup mit Wochen-Zusammenfassung (Walks, Fütterungen, Training, Streak, neue Badges). Abschaltbar in Settings. Konzept definiert in docs/konzepte/17-gamification.md Section 5. Deferred from F27.
B36 Feature
Account-Löschung: 14-Tage-Gnadenfrist
Statt sofortiger Löschung: Account als "zum Löschen vorgemerkt" markieren (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.ä.).
B49 Feature
Guest: Upgrade-Nudge vor Token-Ablauf
Guest-User aktiv auffordern, ein Konto zu erstellen, wenn ihr Refresh Token in <7 Tagen abläuft. In-App-Banner oder Dialog mit Hinweis "Deine Daten sind nur noch X Tage gesichert". Benötigt: Token-Expiry im Frontend auswerten oder Backend-Endpoint für verbleibende Session-Dauer.
B50 Feature
Guest: Device-basierte Session-Recovery
Guest-Account an Capacitor Device-ID koppeln. Bei erneutem Guest-Login vom selben Gerät wird der alte Account wiederhergestellt statt einen neuen zu erstellen. Benötigt: DeviceId-Feld auf ApplicationUser, Capacitor Device Plugin, Backend-Logik für Device-Matching.

Technical Debt / Housekeeping

T01 Tech
E2E tests
Playwright or Cypress for critical user flows
T03 Tech
API documentation
Swagger/OpenAPI properly set up
T08 Tech
Papierkorb: 30-Tage-Cleanup für gelöschte Dokumente
Soft-deleted docs with DeletedAt need UI (restore/purge) + background cleanup job
T20 Tech
Swipe-to-delete for list entries
Replace visible delete buttons on feeding/training list entries with swipe-to-delete gesture. Cleaner mobile UX.
T32 Tech
Walk GPS location batching
Location points are sent to backend individually on every GPS position update (every ~5m). Should batch and flush every 10–15 seconds to reduce network traffic and battery drain.
T34 Tech
Calendar: periodLabel week-end uses local setDate/getDate on UTC-midnight Date
periodLabel 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.
T36 Tech
Fix 81 failing frontend-v2 tests
Tests fail due to missing imports/components from B12 migration. Must fix to make CI tests strict (remove continue-on-error from .github/workflows/ci.yml).
T37 Tech
Move large seed file to Git LFS
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.
T38 Tech
Replace capacitor-google-auth package
@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.
T39 Tech
Fix flaky app.spec.ts Capacitor mock isolation
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.
T40 Tech
Fix timezone-dependent StreakService test in CI
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.ts with 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-watch initialized 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.com with 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 = 0 causing 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: Func delegate for role-aware token expiry, 2 new tests, 508 tests green
  • Frontend: centralizedRefreshAsync() + simplified interceptor (removed isRefreshing/BehaviorSubject), removed dead handleTokenRefreshAsync, 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.java now reads actual system bar insets via ViewCompat.setOnApplyWindowInsetsListener, converts to CSS dp, and injects as --native-inset-* CSS custom properties via WebViewListener
  • Frontend: New global CSS variables --safe-area-top/bottom/left/right with fallback chain: native injection (Android) → env() (iOS) → 0px (web)
  • 32 files updated — replaced all triple-fallback patterns (hardcoded + constant() + env()) with single var(--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_IN key 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 revision ReadonlySignal to BreedTranslationService as 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_LABELS with translate pipe (i18n-ready)

F26: Schedule Completion Creates Meal Automatically

  • Backend: CompleteAsync now auto-creates a Meal with Feeding items 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.LinkedMealId always set on new completions; log + meal persisted atomically
  • Backend: Removed CheckMatchAsync endpoint, GetMatchingScheduleAsync repository 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: completeAsync facade returns FeedingScheduleLog (was void)
  • Frontend: Removed PlanMatchDialogComponent, checkMatchAsync, ScheduleMatch interface, feedingScheduleMatch endpoint config
  • Frontend: Removed vestigial linkedMealId from CompleteScheduleRequest

B44: Complete Product Scraping (All Variants)

  • Scraping expanded from 6,733 to 14,576 products by following variant selectors (flavor × package size)
  • New --scrape-variants mode 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

BUG03 Open Medium
Pet creation form missing frontend validation (parity with backend)

Resolved

BUG01 Fixed High
Safe Area Insets not applied on Android
BUG02 Fixed High
File uploads not served (avatars, documents, walk photos)

devices Wireframes

Interaktive Wireframes aller App-Screens. Klicke auf einen Eintrag um das Wireframe zu öffnen.

monitoring Cron-Reports

schedule

Cron-Jobs werden in Phase D eingerichtet.
Reports erscheinen hier automatisch.

Last updated: 2026-03-29 — PetWatch Project Dashboard v1.0