diff --git a/.agents/TODO.md b/.agents/TODO.md
index 953b718..1395c48 100644
--- a/.agents/TODO.md
+++ b/.agents/TODO.md
@@ -16,6 +16,8 @@ Dieses Dokument enthält den aktuellen Entwicklungsstand und detaillierte Aufgab
- Firebase-Projekt Setup & Anbindung
- Newsletter-System (Firebase Firestore)
- Benutzerprofile (Registrierung, Login, Favoriten)
+ - *Rework (Mai 2026): CSS aus login.php in style.css extrahiert, session.php gehärtet,
+ Firebase v10 Error-Codes korrigiert — via korrektem Feature-Branch-Workflow (PR #7)*
- [x] **Phase 3: Nährwerte & Rezepterweiterung**
- Datenmodell & Admin.php Erweiterung
- Visuelles Nährwert-Widget (Floema-Präzision)
diff --git a/.agents/brain.md b/.agents/brain.md
index 5ae699f..ae5d3dd 100644
--- a/.agents/brain.md
+++ b/.agents/brain.md
@@ -33,5 +33,20 @@ This document summarizes the architectural knowledge, conventions, and learnings
- **Phase 3 (Nutrition):** Implemented. Recipes now store `calories`, `protein`, `carbs`, and `fat`. Admin panel handles inputs, and the UI displays them beautifully.
- **Phase 4 (Interactive Cooking Mode):** Implemented. Recipes now support step-by-step looping background videos and interactive timers (`step_videos`, `step_timers`). The UI utilizes a fullscreen overlay slider with Vanilla JS logic.
-## 6. Next Steps
-According to `TODO.md`, the next major feature block is **Phase 5 (PWA & Offline Support)**, which involves service workers, manifest files, and enabling the app to be installable on mobile devices.
+## 6. Git Workflow Violations & Recovery
+
+- **Phase 2 (commit `21833fa`) and Phase 4 (commit `a4a2d83`) were committed directly to `main`**, bypassing the required feature branch → PR flow. This is the correct diagnosis when someone says "Phase X wasn't saved properly" — the code exists, but the audit trail does not.
+- **Recovery strategy (retroactive feature branch):** Branch from current `main`, clean up / improve the work on that branch, then open a PR. This produces the audit trail without rewriting history. Do not force-push or attempt to amend merged commits in `main`.
+
+## 7. Phase 2 Architecture Details
+
+- **Auth CSS location:** All auth/profile/favorites styles live in `assets/style.css` under the `PHASE 2` section header. `login.php` should have **no inline `
@@ -536,8 +245,14 @@ function handleLogin(e) {
.catch(error => {
btn.disabled = false;
let errMsg = error.message;
- if (error.code === 'auth/wrong-password' || error.code === 'auth/user-not-found') {
- errMsg = "Invalid email or password.";
+ // Firebase v10 compat SDK consolidates wrong-password + user-not-found
+ // into auth/invalid-credential. Handle all three for backwards compatibility.
+ if (
+ error.code === 'auth/invalid-credential' ||
+ error.code === 'auth/wrong-password' ||
+ error.code === 'auth/user-not-found'
+ ) {
+ errMsg = 'Invalid email or password.';
}
showAlert(errMsg);
});
diff --git a/partials/head.php b/partials/head.php
index 68f9746..0202167 100644
--- a/partials/head.php
+++ b/partials/head.php
@@ -70,7 +70,9 @@ $description = $description ?? 'Seasonal recipes, tested tips, and approachable
-
+