Skip to content

Fix demo mode for the 0.9.0 instance access model: demo.propr.dev (ProPR 0.9.0, PROPR_DEMO_MODE=true, read-only) hides whole product areas from the demo visitor. Check current upstream main first. #3405

Closed

Description

@propr-dev

Fix demo mode for the 0.9.0 instance access model: demo.propr.dev (ProPR 0.9.0, PROPR_DEMO_MODE=true, read-only) hides whole product areas from the demo visitor. Check current upstream main first.

Observed on demo.propr.dev after upgrading it to 0.9.0: the Access page is not visible; Settings shows only its first default section with no inner navigation; Inbox is empty; Goals is empty even though the demo database contains 26 goals (and 17,995 tasks and 289 plans, which do show). Cause: demo mode authenticates every visitor as the fixed user from getDemoUser() in packages/api/demoMode.ts (id/login propr-demo). Since 0.9.0 the UI gates sections on instance permissions (for example userHasPermission(user, 'instance.manage_settings') in propr-ui/src/pages/SettingsPage/index.tsx, and the Access page on member-management permission), and goals and notifications are scoped to their owning or member users. propr-demo has no instance role or assignment, so those areas disappear. packages/api/authorization.ts already special-cases demo mode in one place.

Goal: a demo visitor sees the whole product read-only, as in 0.8.x, with no ability to change anything and no data beyond what the demo database already exposes:

  1. Give the demo identity an effective read-only viewer permission set that unlocks every UI section a real admin sees (Access, every Settings section and inner navigation, Inbox, Goals and so on), while keeping demoModeReadOnlyMiddleware as the hard write barrier. Mutating actions must stay impossible: 405 with DEMO_MODE_READ_ONLY_CODE, and UI controls disabled or explained as today. Never grant this outside demo mode, and make it impossible to reach with demo mode off; add tests for both.
  2. Make goals and notifications (Inbox) readable to the demo identity in demo mode, for example by treating it as a viewer of all goals and of a representative inbox derived from the existing data, without exposing secrets or other users' private credentials, and respecting the demo's repository whitelist.
  3. Keep the sanitized demo data model; do not add live-data access.
  4. Tests: API tests for the demo viewer permissions (reads allowed, every write refused), goals and inbox visibility in demo mode, and a UI test that the Settings inner navigation and the Access entry render for the demo user.
  5. Add a CHANGELOG [Unreleased] Fixed bullet.

Validation: affected API and UI tests, npm run lint --workspaces --if-present -- --max-warnings 0, root and workspace typechecks. Include before/after visual previews of the demo Settings, Access, Goals and Inbox pages. One focused PR ready for review. Do not auto-merge, tag, publish or deploy.


Submitted by @integry through ProPR.

Activity

  1. propr-dev commented on Oct 31, 2026

    @propr-dev
    ContributorAuthor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3405/claude-opus-5-5-fix-demo-mode-for-the-0-9-20261031-1710-qul
    • Base Branch: main
    • Worktree: issue-3405-20261031-1710-claude-opus-5-5-qul

    🔍 Track Task Execution

  2. added a commit that references this issue on Oct 31, 2026
    99f0224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions