Login/signup modal renders behind the app in expanded mode (showLoginPrompt looks like a no-op)

Open
#304 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start with the expanded-mode flow in @devvit/web/client, especially requestExpandedMode, exitExpandedMode, and showLoginPrompt; use the linked minimal repro to compare the prompt before and after exiting expanded mode. Trace how the host displays its auth modal and how the expanded web view is layered. Done when both the app's login prompt and Reddit's Join button show the modal above the expanded app.

Written by the indexing model from the issue text.

Description

Summary

For a logged-out viewer on desktop web, Reddit's login/signup modal is rendered behind the app while the web view is in expanded mode, so showLoginPrompt() looks like a no-op.

Environment

  • Devvit packages / CLI: 0.15.4 (@devvit/web, @devvit/start, devvit)
  • Desktop web browser (reproduced in Chrome on reddit.com)
  • Viewer is logged out

Steps to reproduce

Minimal repro app: https://github.com/yusakman/devvit-expanded-login-prompt

  1. Install/playtest the repro app on a test subreddit and open its post while logged out.
  2. Tap Play — the app opens in expanded mode (requestExpandedMode(event, 'game')).
  3. Tap the button that calls showLoginPrompt() from @devvit/web/client.

Expected

Reddit's Sign Up / Log In modal appears on top of the app.

Actual

The modal is drawn in the host page behind the full-screen expanded web view, so it is not visible. It looks like the button did nothing.

Additional observations:

  • Leaving expanded mode first (exitExpandedMode(event)) and then calling showLoginPrompt() makes the modal visible — that is the workaround the reporting app ships — but the game has to collapse out of expanded mode just to show a login prompt.
  • Reddit's own Join button in the expanded-view header (the … / Join / expand / close bar) behaves the same way: its auth modal also appears behind the app, which suggests the host overlay/modal layer sits below the expanded web view rather than above it.

Impact

Logged-out players who play a run and tap "Sign in" cannot log in, because the modal is invisible, and Reddit's own Join in the expanded header is affected too.

Dominant language
TypeScript
Stars
217
Forks
89
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reddit/devvit

All issues in reddit/devvit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.