feat: presentation demo mode — one-click private demo patient, screening on/off switch
CI / ruff · pytest (pull_request) Failing after 2m33s
CI / ruff · pytest (pull_request) Failing after 2m33s
- POST /auth/demo/fresh + «Демо: войти как Андрей» on the welcome screen: every sign-in gets a fresh private copy of veteran Andrey (consent, prescription, ЕМИАС record) and lands in the chat — no codes, nobody's crisis or half-done questionnaire leaks into another viewer. - Initial screening switch: SCREENING_ENABLED env default + /demo/settings + a toggle in the demo console; off → after consent straight to the chat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,9 +66,13 @@ def menu_reply(ctx: Ctx, text: str | None = None) -> Reply:
|
||||
async def onboarding_entry(ctx: Ctx, after: str | None = None) -> str:
|
||||
"""Entry state of the next module onboarding: `"{module}.onboarding.start"` for the first module of the
|
||||
profile (after `after`, if given) that has such a state registered; `"idle"` when none is left."""
|
||||
from app.core.demo_settings import screening_enabled
|
||||
from app.core.intake_runtime import intake_enabled
|
||||
|
||||
if after is None and not await screening_enabled(ctx.session):
|
||||
return "idle" # demo switch: no initial questionnaires, straight to the chat
|
||||
profile = await ctx.profile()
|
||||
modules = list(profile.modules) if profile is not None and profile.modules else []
|
||||
from app.core.intake_runtime import intake_enabled
|
||||
|
||||
# Stage 1 is the same for everyone (ADR-012): it does not depend on modules, which it sets itself — an anonymous
|
||||
# person has no profile at all before it.
|
||||
|
||||
Reference in New Issue
Block a user