maniator / maniator/verticopolis

[P3] Open Help and Gallery in a desktop secondary window, with Back to game closing it

Open
#718 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Owner proposal (2026-07-29): in the desktop shell, open Help as a real secondary window instead of the in-game dialog so reading it does not cover the tower, add a Gallery item alongside it, and make "Back to game" close that window rather than navigate.

The idea is sound and the content already exists. Five findings shape it.

1. The pages already exist

/help and /gallery are already standalone prerendered pages (dist/help.html, dist/gallery.html), so this needs no new content.

Note the asymmetry: Help exists both as an in-game dialog (UI.showHelp) and as a page. Gallery exists only as a page, with no in-game dialog at all. So a Gallery menu item cannot route through the command seam the way the other eight commands do; it has nothing in-game to route to.

2. It has to be a second window, not a navigation

Pointing the main window at either page would destroy the running sim. The shell's will-navigate guard would happily permit it, because both pages are same-origin app://game/.... A second window is the only safe shape.

3. "Back to game" would do the wrong thing in a popup

pageShell renders it as <a href="/">. In a secondary window that navigates the popup to the game root, booting a second game instance inside the popup rather than returning to the first. The page shell needs to learn it is in a secondary window and close instead. This is the public-repo half of the work.

4. Prerequisite: a global web-contents guard

The shell's will-navigate and setWindowOpenHandler are attached to mainWindow.webContents only, so a second window would inherit none of them. Before any second window exists, the shell needs:

  • app.on("web-contents-created") applying the navigation and window-open policy to every contents
  • will-frame-navigate and will-redirect alongside will-navigate
  • an explicit webviewTag: false

This is worth doing on its own merits, independent of this feature.

5. The in-game dialog stays

Keep the Help dialog as the default on every platform. A second OS window is worse on a handheld and with a controller, and removing the dialog would fork the interface shared with web, Android, and iOS. So this is additive, desktop-only, and opt-in.

Split

Mostly the private distribution repo (second window, global guard, menu items), plus a small public change for the page-shell close behavior. /gds-code-review for the public half.

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating pageShell and the desktop shell's mainWindow navigation and window-open handlers, then inspect the existing /help and /gallery pages. Done means desktop users can open those pages in a secondary window, Back to game closes that window, and the existing in-game Help dialog remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.