[PR #656] Web app: the home-screen icon opens the page, not /web/ #654

Open
opened 2026-10-29 21:27:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/656
Author: @needmorevram
Created: 10/29/2026
Status: 🔄 Open

Base: main ← Head: web-home-screen-start-url


📝 Commits (1)

  • e6c9cff Web app: the home-screen icon opens the page, not /web/

📊 Changes

3 files changed (+35 additions, -2 deletions)

View changed files

📝 serve/server.py (+10 -0)
📝 serve/test_server.py (+23 -0)
📝 serve/web/manifest.webmanifest (+2 -2)

📄 Description

What

Adding the web app to an iOS home screen saved http://<host>:8080/web/, which the server answers with a 404, so the icon opened an error page.

The cause is the manifest (serve/web/manifest.webmanifest): start_url and scope were "./", and a manifest's URLs resolve against the manifest's own path, /web/manifest.webmanifest. So "./" meant /web/, not the page.

  • start_url and scope are "../": they resolve to the page. They stay relative, so the app still works behind a path-prefixed proxy (#82).
  • /web and /web/ redirect to the page (302 with a relative Location, query kept). Icons already saved with the old start URL open the app too.

Tested

  • serve/test_server.py + serve/test_dashboard.py: 151 tests pass.
  • New WebApp.test_home_screen_start_url:
    • the served manifest's start_url and scope resolve to /;
    • /web/, /web and /web/?q=hi redirect to the page;
    • a followed /web/ gives the page.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/656 **Author:** [@needmorevram](https://github.com/needmorevram) **Created:** 10/29/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `web-home-screen-start-url` --- ### 📝 Commits (1) - [`e6c9cff`](https://github.com/mw00/project-maya/commit/e6c9cff319148e0f4f326a3a6782dc3568e26aaa) Web app: the home-screen icon opens the page, not /web/ ### 📊 Changes **3 files changed** (+35 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+10 -0) 📝 `serve/test_server.py` (+23 -0) 📝 `serve/web/manifest.webmanifest` (+2 -2) </details> ### 📄 Description ## What Adding the web app to an iOS home screen saved `http://<host>:8080/web/`, which the server answers with a 404, so the icon opened an error page. The cause is the manifest (`serve/web/manifest.webmanifest`): `start_url` and `scope` were `"./"`, and a manifest's URLs resolve against the manifest's own path, `/web/manifest.webmanifest`. So `"./"` meant `/web/`, not the page. - **`start_url` and `scope` are `"../"`:** they resolve to the page. They stay relative, so the app still works behind a path-prefixed proxy (#82). - **`/web` and `/web/` redirect to the page** (302 with a relative `Location`, query kept). Icons already saved with the old start URL open the app too. ## Tested - `serve/test_server.py` + `serve/test_dashboard.py`: 151 tests pass. - New `WebApp.test_home_screen_start_url`: - the served manifest's `start_url` and `scope` resolve to `/`; - `/web/`, `/web` and `/web/?q=hi` redirect to the page; - a followed `/web/` gives the page. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#654
No description provided.