Skip to content

Throwaway guests, shared AI allowance, demo mode - #91

Merged
tim4431 merged 1 commit into
mainfrom
dev
Sep 26, 2026
Merged

tim4431 merged 1 commit into
mainfrom
dev

Conversation

@tim4431

@tim4431 tim4431 commented Sep 26, 2026

Copy link
Copy Markdown
Owner
  • Guests keep nothing: every guest login mints a throwaway guest-<random> account with its own workspace, deleted after guest_ttl_hours by the session middleware and a background sweeper (gamma/guests.py, one workspaces.delete_account). Optional GAMMA_GUEST_SEED starter zip, GAMMA_GUEST_MAX cap. Migration step 20 removes the old shared guest account.
  • Shared AI allowance: tokens per account per rolling 24 h on the admin's shared provider entries (separate limits for accounts and guests), enforced in ai_client.open_ai; own keys are never metered. 429 with a readable detail on chat, translate, metadata and transcribe.
  • Demo mode (demo_mode setting or GAMMA_DEMO=1): the login page leads with Try the demo, the first-paper tour is offered on arrival, guide progress lives in sessionStorage. Settings → Server → Guests holds the lifetime and the switch.
  • demo.gammapdf.com: a demo service in cloud/deploy/compose.yml behind the wildcard Caddy site, demo.env.example, and the update-demo-server skill (branch build of docker.yml, pinned by sha-<short>).
  • Cloud sync logic update.
  • Docs: new docs/dev/guests.md; api, workspaces, user_db, migrations, ai, settings, onboarding and github_actions updated.

🤖 Generated with Claude Code

@tim4431
tim4431 merged commit 30586ef into main Sep 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant