mermaid-js / mermaid-live-editor

Edit, preview and share mermaid charts/diagrams. New implementation of the live editor.
https://mermaid.live
MIT License
4.3k stars 654 forks source link

Actual URL does not match the start_url and scope in PWA manifest.json #1480

Closed allxiao closed 4 months ago

allxiao commented 4 months ago

Describe the bug

The Mermaid Live Editor has an URL path /edit. However, in the PWA manifest.json (src: static/manifest.json), the start_url and scope are defined as /edit/ (with a trailing /). This seems to cause the web app installed on Windows treats the editor page as out of the defined app scope, and it will display an annoying URL indicator on top, for security awareness.

To Reproduce Link to Live Editor: https://mermaid.live Steps to reproduce the behavior:

  1. Go to https://mermaid.live
  2. Click on "App available. Install Mermaid Live Editor" button appeared on the right part of the address bar.
  3. Lauch the web app installed from the Start Menu / Task Bar or Desktop
  4. See the website URL indicator appeared on top of the app view.

Expected behavior The editor URL is consistent with the start_url and scope defined in the PWA manifest.json

Screenshots image

Desktop (please complete the following information):

Additional context It works well if I remove the trailing slash from the start_url and scope. See https://allxiao.github.io/mermaid-live/