Skip to content

Fix inclusion of theme icons in host mode#4061

Open
backspace wants to merge 23 commits intomainfrom
icon-fallback-cs-9828
Open

Fix inclusion of theme icons in host mode#4061
backspace wants to merge 23 commits intomainfrom
icon-fallback-cs-9828

Conversation

@backspace
Copy link
Contributor

@backspace backspace commented Feb 25, 2026

There was a problem with #4047 when deployed: …/host/app/index.html includes hardcoded icons, so injected ones are duplicates. This removes the default icons from that file and only injects them when we’re not in host mode or they’re missing. With this branch deployed, you can see the custom icon in the tab:

e8c0a21ef0e0f5101a0d9e590435203ca7bf96af 2026-03-02 14-01-10

The failing host test is unrelated, flaky.

@backspace backspace self-assigned this Feb 25, 2026
@backspace backspace added the bug Something isn't working label Feb 25, 2026
@github-actions
Copy link

github-actions bot commented Feb 25, 2026

Preview deployments

@github-actions
Copy link

github-actions bot commented Feb 25, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   1h 57m 10s ⏱️ + 5m 12s
1 922 tests +3  1 907 ✅ +4  15 💤 ±0  0 ❌ ±0 
1 937 runs  +3  1 922 ✅ +5  15 💤 ±0  0 ❌  - 1 

Results for commit 5a38c38. ± Comparison against base commit 11665e3.

♻️ This comment has been updated with latest results.

@backspace backspace changed the title Fix duplicated favicon elements Fix inclusion of theme icons in host mode Feb 25, 2026
@backspace backspace marked this pull request as ready for review March 3, 2026 04:10
@backspace backspace requested a review from a team March 3, 2026 04:11
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e73b7e7f1f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@backspace backspace marked this pull request as draft March 3, 2026 16:41
@backspace backspace marked this pull request as ready for review March 4, 2026 22:45
@backspace
Copy link
Contributor Author

I’ve fixed this to properly inject <title>Boxel</title> when it’s missing, now ready for review!

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a38c3851c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes duplicate favicon/apple-touch-icon tags in “host mode” by removing hardcoded icon tags from the host app HTML and making the realm server inject default icons only when needed.

Changes:

  • Remove the default icon <link> tags from packages/host/app/index.html to prevent duplication when head HTML injection adds theme icons.
  • Update RealmServer.serveIndex to inject default icon links (and a title fallback) when head HTML is missing or contains no icon links, including for non-public realms.
  • Expand/adjust server endpoint tests to assert there is exactly one favicon and one apple-touch-icon, and add a published-realm scenario test.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/realm-server/tests/server-endpoints/index-responses-test.ts Updates assertions around icon injection/duplication and adds a published-realm test scenario.
packages/realm-server/server.ts Injects default icon links (and title fallback) when head HTML doesn’t supply icons / isn’t available.
packages/host/app/index.html Removes static default icon tags so server-side injection doesn’t duplicate them in host mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@lukemelia lukemelia left a comment

Choose a reason for hiding this comment

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

Codex's feedback should be addressed. Otherwise, looksgood

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants