feat: Phase 2 — saved recipes, browser, accessibility, level UX #69

Merged
pyr0ball merged 17 commits from feature/orch-auto-lifecycle into main 2026-04-08 15:13:45 -07:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit ed6813713e - Show all commits

View file

@ -208,8 +208,6 @@ def get_session(request: Request) -> CloudUser:
if not CLOUD_MODE: if not CLOUD_MODE:
return CloudUser(user_id="local", tier="local", db=_LOCAL_KIWI_DB, has_byok=has_byok) return CloudUser(user_id="local", tier="local", db=_LOCAL_KIWI_DB, has_byok=has_byok)
# Prefer X-Real-IP (set by nginx from the actual client address) over the
# TCP peer address (which is nginx's container IP when behind the proxy).
# Prefer X-Real-IP (set by nginx from the actual client address) over the # Prefer X-Real-IP (set by nginx from the actual client address) over the
# TCP peer address (which is nginx's container IP when behind the proxy). # TCP peer address (which is nginx's container IP when behind the proxy).
client_ip = ( client_ip = (

View file

@ -6,10 +6,10 @@ import pytest
os.environ.setdefault("CLOUD_MODE", "false") os.environ.setdefault("CLOUD_MODE", "false")
import app.cloud_session as cs
from app.cloud_session import ( from app.cloud_session import (
CloudUser, CloudUser,
_user_db_path, _user_db_path,
CLOUD_DATA_ROOT,
) )
@ -28,11 +28,13 @@ def test_clouduser_household_defaults_none():
assert u.is_household_owner is False assert u.is_household_owner is False
def test_user_db_path_personal(): def test_user_db_path_personal(tmp_path, monkeypatch):
path = _user_db_path("abc123", household_id=None) monkeypatch.setattr(cs, "CLOUD_DATA_ROOT", tmp_path)
assert path == CLOUD_DATA_ROOT / "abc123" / "kiwi.db" result = cs._user_db_path("abc123")
assert result == tmp_path / "abc123" / "kiwi.db"
def test_user_db_path_household(): def test_user_db_path_household(tmp_path, monkeypatch):
path = _user_db_path("abc123", household_id="hh-xyz") monkeypatch.setattr(cs, "CLOUD_DATA_ROOT", tmp_path)
assert path == CLOUD_DATA_ROOT / "household_hh-xyz" / "kiwi.db" result = cs._user_db_path("abc123", household_id="hh-xyz")
assert result == tmp_path / "household_hh-xyz" / "kiwi.db"