Repository navigation
Conversation
`--app-name` renames code-server, but the tab and an installed PWA still show the code-server logo, so operators who run it as one app among several cannot give it an icon that matches the name. The only way today is to overwrite files under src/browser/media in the installed release, which breaks when an upgrade renames or adds icon files. `--app-icon` (or `app-icon` in the config file) takes a PNG or SVG file. code-server serves it at the bundled icon URLs that the login page, the error page and VS Code's workbench all link to, so every page picks it up without a change to the VS Code patches. The manifest lists the custom icon once with its real type and size (an SVG fits any size; a PNG's width and height are read from its header, since browsers only offer to install an app whose manifest declares a large enough icon), and drops the maskable variants, which browsers would crop to a shape. Any other file type is rejected at startup. Fixes coder#8145 Assisted-by: AI
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8145
--app-namerenames code-server, but the tab and an installed PWA still show the code-server logo, so operators who run it as one app among several cannot give it an icon that matches the name. The only workaround is overwriting files undersrc/browser/mediain the installed release, which breaks when an upgrade renames or adds icon files.--app-icon(orapp-iconin the config file) takes a PNG or SVG file. code-server serves it at the bundled icon URLs that the login page, the error page and VS Code's workbench already link to, so every page picks it up without touching the VS Code patches. The manifest lists the custom icon once with its real type and size: an SVG fits any size, and a PNG's width and height are read from its header, since browsers only offer to install an app whose manifest declares a large enough icon. The maskable variants are dropped for a custom icon, because browsers crop those to a shape. Any other file type is rejected at startup.On naming: I went with
--app-iconto pair with--app-name, as proposed in the issue; happy to rename.