Skip to content

Add Universe PWA branding#172

Open
Shreshth3 wants to merge 1 commit into
BAWES-Universe:universefrom
Shreshth3:feat/mobile-pwa-branding-shreshth
Open

Add Universe PWA branding#172
Shreshth3 wants to merge 1 commit into
BAWES-Universe:universefrom
Shreshth3:feat/mobile-pwa-branding-shreshth

Conversation

@Shreshth3

@Shreshth3 Shreshth3 commented Jun 12, 2026

Copy link
Copy Markdown

Summary

  • add /manifest.webmanifest with BAWES Universe app identity
  • add 192px and 512px Universe app icons under play/public/static/
  • point the play HTML entry at the new manifest and add mobile app meta tags

Fixes #3
/claim #1

Verification

  • python3 -m json.tool play/public/manifest.webmanifest
  • checked icon dimensions/mode with Pillow
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added Progressive Web App manifest configuration for improved mobile app installation and branding.
  • Chores

    • Updated mobile web app meta configuration with enhanced Apple device support and refined theme settings.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 12, 2026
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR establishes PWA branding for the BAWES Universe play app by creating a web app manifest with Universe identity metadata and updating the HTML entry point with mobile meta tags and manifest link configuration.

Changes

PWA Manifest and Mobile Configuration

Layer / File(s) Summary
PWA manifest and mobile meta configuration
play/public/manifest.webmanifest, play/index.html
New manifest.webmanifest defines the PWA identity (BAWES Universe name, fullscreen display, landscape orientation, black theme, and 192×512 icon references). HTML adds hardcoded black theme-color, Apple web-app capability meta tags, and updates the manifest link to point to /manifest.webmanifest.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A Universe takes shape with manifest care—
Black themes and icons dancing in air,
PWA branding, mobile and true,
BAWES identity shines right on through! 🌙✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Manifest file created with all required fields and values; HTML entry updated with required meta tags. Icon files (PNG) are excluded by path filters but their presence cannot be verified from the provided summary. Confirm that universe-icon-192.png and universe-icon-512.png exist in play/public/static/ and meet maskable safety requirements, and verify Lighthouse PWA audit completion.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Universe PWA branding' directly describes the main change: adding PWA branding configuration for the BAWES Universe app via manifest and meta tags.
Out of Scope Changes check ✅ Passed All changes are scoped to play/public/ (manifest and icons) and the HTML entry file (play/index.html), with no modifications outside the defined boundaries.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines +17 to +22
{
"src": "/static/universe-icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The PWA icon combines maskable and any purposes, causing it to appear shrunken in non-maskable contexts like home screen shortcuts.
Severity: LOW

Suggested Fix

Separate the icon definitions in manifest.webmanifest. Provide one icon entry with "purpose": "maskable" and another identical icon entry with "purpose": "any". This ensures the appropriate icon is used in each context, displaying correctly on home screens and in other UI surfaces.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: play/public/manifest.webmanifest#L17-L22

Potential issue: The 512px PWA icon in `manifest.webmanifest` specifies `"purpose":
"maskable any"`. This is an anti-pattern because browsers will use this single, padded
icon for both maskable and non-maskable (`any`) contexts. As a result, when a user adds
the PWA to their home screen, the icon will appear shrunken due to the unnecessary
safe-zone padding intended for masking, leading to inconsistent and poor branding
presentation.

Did we get this right? 👍 / 👎 to inform future reviews.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@play/index.html`:
- Line 23: The two meta tags are inconsistent: <meta
name="msapplication-TileColor" content="{{ themeColor }}" /> and <meta
name="theme-color" content="`#000000`" />; pick one approach and make them match.
Either hardcode both values to "`#000000`" (change msapplication-TileColor to
"`#000000`") or make both use the template variable (change theme-color to "{{
themeColor }}"); update the tags accordingly so msapplication-TileColor and
theme-color are consistent.
- Line 49: The index now points to a static /manifest.webmanifest which breaks
per-deployment dynamic manifests; either revert play/index.html to reference the
dynamic endpoint (/static/images/favicons/manifest.json) or make the dynamic
generator serve at /manifest.webmanifest instead; locate play/index.html and
change the <link rel="manifest"> href accordingly, or update FrontController.ts
so the existing displayManifestJson(...) handler (the function
displayManifestJson and its route in FrontController) is mounted at
/manifest.webmanifest and returns the same dynamic content and headers as the
old path to restore backward compatibility.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84aefb0f-129e-48e4-a9f1-d43700eaec56

📥 Commits

Reviewing files that changed from the base of the PR and between 063f13a and 7d6a4c6.

⛔ Files ignored due to path filters (2)
  • play/public/static/universe-icon-192.png is excluded by !**/*.png
  • play/public/static/universe-icon-512.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • play/index.html
  • play/public/manifest.webmanifest

Comment thread play/index.html
@@ -22,7 +22,9 @@
<!-- App Design -->
<meta name="msapplication-TileColor" content="{{ themeColor }}" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Inconsistent theme-color handling: hardcoded vs template variable.

Line 23 uses the template variable {{ themeColor }} for msapplication-TileColor, but line 25 hardcodes #000000 for theme-color. Both serve similar purposes (Windows tile color vs browser theme color) and should be consistent. All other dynamic meta tags (title, description, url, cardImage, etc.) still use template variables.

If theme-color must be hardcoded to #000000 for Universe branding, then msapplication-TileColor should also be hardcoded to match. Alternatively, both should use {{ themeColor }} to allow per-deployment customization.

🔧 Proposed fixes

Option A: Hardcode both for consistency (if Universe branding requires fixed black theme)

-        <meta name="msapplication-TileColor" content="{{ themeColor }}" />
+        <meta name="msapplication-TileColor" content="`#000000`" />
         <meta name="theme-color" content="`#000000`" />

Option B: Use template variable for both (if per-deployment customization is needed)

         <meta name="msapplication-TileColor" content="{{ themeColor }}" />
-        <meta name="theme-color" content="`#000000`" />
+        <meta name="theme-color" content="{{ themeColor }}" />

Also applies to: 25-25

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@play/index.html` at line 23, The two meta tags are inconsistent: <meta
name="msapplication-TileColor" content="{{ themeColor }}" /> and <meta
name="theme-color" content="`#000000`" />; pick one approach and make them match.
Either hardcode both values to "`#000000`" (change msapplication-TileColor to
"`#000000`") or make both use the template variable (change theme-color to "{{
themeColor }}"); update the tags accordingly so msapplication-TileColor and
theme-color are consistent.

Comment thread play/index.html
<link rel="{{ rel }}" type="image/png" sizes="{{ sizes }}" href="{{ src }}" />
{{/favIcons}}
<link rel="manifest" href="/static/images/favicons/manifest.json?url={{ url }}" />
<link rel="manifest" href="/manifest.webmanifest" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for references to the old manifest endpoint that may need updating

echo "=== Checking for hardcoded references to old manifest endpoint ==="
rg -n 'static/images/favicons/manifest.json' --type html --type ts --type js

echo -e "\n=== Checking if FrontController manifest handler can be safely removed ==="
rg -n 'displayManifestJson|static/images/favicons/manifest.json' play/src/pusher/controllers/FrontController.ts

echo -e "\n=== Verifying new manifest is being served correctly ==="
rg -n 'manifest.webmanifest' play/

Repository: BAWES-Universe/workadventure-universe

Length of output: 767


Breaking change: play/index.html now loads a static manifest, bypassing dynamic per-deployment metadata

  • play/index.html (line 49) now links to /manifest.webmanifest, so browsers will load the static file instead of the dynamically generated manifest.
  • The old dynamic endpoint /static/images/favicons/manifest.json is still implemented in play/src/pusher/controllers/FrontController.ts and calls displayManifestJson(..., query.url), but it’s no longer used via the default manifest link.
  • Deployments that previously depended on admin/map-based manifest customization will lose that behavior in the normal browser flow; either migrate/replace the dynamic behavior for the manifest link or provide a backward-compatible path for existing deployments.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@play/index.html` at line 49, The index now points to a static
/manifest.webmanifest which breaks per-deployment dynamic manifests; either
revert play/index.html to reference the dynamic endpoint
(/static/images/favicons/manifest.json) or make the dynamic generator serve at
/manifest.webmanifest instead; locate play/index.html and change the <link
rel="manifest"> href accordingly, or update FrontController.ts so the existing
displayManifestJson(...) handler (the function displayManifestJson and its route
in FrontController) is mounted at /manifest.webmanifest and returns the same
dynamic content and headers as the old path to restore backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Bounty claim size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Universe PWA branding: manifest + icons in play/public/

1 participant