Preview URLs drop multi-account path prefix (/u/N/)

Steps to reproduce:

  1. Sign into Stitch with multiple Google accounts (so the base URL becomes https://stitch.withgoogle.com/u/1/)

  2. Open a project and navigate to a screen

  3. Click to preview the canvas

Expected behaviour: Preview URL retains the /u/1/ (or /u/2/ etc.) prefix, e.g. https://stitch.withgoogle.com/u/1/project/.../preview/

Actual behaviour: Preview URL omits the /u/N/ segment, e.g. https://stitch.withgoogle.com/project/.../preview/ — this either 404s or loads under the wrong account. Manually re-inserting /u/1/ before /preview/ resolves the issue.

Environment: Chrome, macOS (Apple Silicon)

Hey @MattKneale, thanks so much for bringing this to us! We really appreciate your help. I’ve been trying to reproduce this on my end but haven’t been able to yet, as it seems to be working fine for me. However, we have received similar queries from other users, so I’m adding your details to the report to help the team dig deeper.