Skip to content

Conversation

@FadhlanR
Copy link
Contributor

@FadhlanR FadhlanR commented Jan 30, 2026

Previously, the default <title>Boxel</title> lived outside the injectable head zone in index.html, while the realm-server and host mode inject head HTML between data-boxel-head-start and data-boxel-head-end. Enabling the title in the head template would have added a second title, so it stayed commented out. This PR moves the default title into that injectable zone and re-enables it in the head template so injected head replaces the default instead of duplicating it. For custom head templates that omit a title, the default "Boxel" is added automatically so the document always has exactly one <title>.

@github-actions
Copy link

Preview deployments

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   1h 43m 14s ⏱️ -26s
1 925 tests ±0  1 908 ✅ ±0  17 💤 ±0  0 ❌ ±0 
1 940 runs  ±0  1 923 ✅ ±0  17 💤 ±0  0 ❌ ±0 

Results for commit 0ca659d. ± Comparison against base commit 397e601.

♻️ This comment has been updated with latest results.

@FadhlanR FadhlanR force-pushed the cs-9807-fix-ember-page-title-when-head-format-template-contains-title branch from 0c021be to 429efc7 Compare February 2, 2026 08:41
@FadhlanR FadhlanR marked this pull request as ready for review February 2, 2026 10:27
@FadhlanR FadhlanR requested review from a team and backspace February 2, 2026 10:27
@lukemelia
Copy link
Contributor

@codex please review

@lukemelia
Copy link
Contributor

Is there still a conflict between ember-page-title updating the title and dynamically updated "head" formats updating the page title? If so, which one wins?

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: 0ca659d5a5

ℹ️ 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".

Comment on lines 382 to 386
if (headHTML != null) {
headFragments.push(headHTML);
headFragments.push(this.ensureSingleTitle(headHTML));
}

if (scopedCSS != null) {

Choose a reason for hiding this comment

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

P2 Badge Preserve default title when only scoped CSS is injected

Because the default <title> was moved into the data-boxel-head-* region, calling injectHeadHTML will remove it. In this block you only add a title when headHTML != null, so when a card has no head template but does have scoped CSS, the injected head becomes just the <style> block and the page ends up with zero <title>. This is likely for cards that define scoped CSS but no head format. Consider adding the default title whenever you inject head content without a title, or explicitly include it when headHTML is null but scopedCSS is present.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants