Summary
When Simulacrum creates a text page inside a Foundry JournalEntry, it may set the embedded page's name, enable title.show, and also begin text.content with an identical <h1>.
Foundry correctly renders page.name as an H1 when title.show is enabled, then renders the authored H1 inside the page content. The result is a duplicated visible heading such as:
Character Spotlights
Character Spotlights
This is not a Foundry rendering bug. It is a JournalEntry generation-guidance issue: the agent/tooling does not make the interaction between page.name, page.title.show, and the first heading in page.text.content sufficiently clear.
Observed output
Example document data:
{
"name": "Character Spotlights",
"type": "text",
"title": {
"show": true,
"level": 1
},
"text": {
"format": 1,
"content": "<h1>Character Spotlights</h1><ul>...</ul>"
}
}
Foundry renders this as:
<article class="journal-entry-page text level1 page">
<header class="journal-page-header">
<h1>Character Spotlights</h1>
</header>
<section class="journal-page-content">
<h1 data-anchor="character-spotlights$1">Character Spotlights</h1>
<ul>...</ul>
</section>
</article>
Expected behavior
JournalEntry creation guidance should direct the model to use one of these two patterns:
Foundry-rendered page title
{
"name": "Character Spotlights",
"title": { "show": true, "level": 1 },
"text": {
"content": "<ul>...</ul><h2>Mission Pressure</h2><p>...</p>"
}
}
When title.show is enabled, the content should begin with body text, a paragraph, a list, or an H2 subsection—not an H1 identical to page.name.
Authored content title
{
"name": "Character Spotlights",
"title": { "show": false, "level": 1 },
"text": {
"content": "<h1>Character Spotlights</h1><ul>...</ul>"
}
}
If the HTML contains its own primary H1, the Foundry page title should be hidden.
Why this belongs in Simulacrum
Foundry is rendering both supplied headings as instructed. Simulacrum should understand or communicate the presentation semantics of embedded JournalEntry pages so generated journals do not contain redundant headings by default.
The closest related issue is #143, which concerns JournalEntry page validation recovery and stronger create_document guidance. This issue is narrower and concerns valid-but-visually-incorrect page generation rather than schema validation failure.
Suggested implementation areas
Based on the implementation references in #143, likely locations include:
scripts/tools/document-create.js
- Improve the JournalEntry-specific page example and creation guidance.
scripts/utils/validation-errors.js
- Optionally provide a non-blocking warning or corrective hint.
- JournalEntry embedded-page schema descriptions or agent tool instructions.
- Equivalent handling for
update_document, since replacement or insertion of pages can introduce the same duplication.
Proposed guidance text
When page.title.show is true, Foundry renders page.name as the page heading. Do not begin page.text.content with an identical <h1>. Begin with body content or <h2> subsections instead. If the HTML must contain its own primary heading, set page.title.show to false.
Optional detection
A non-blocking warning could detect the common case:
if (
page.type === "text" &&
page.title?.show !== false &&
normalize(firstHeading(page.text?.content)) === normalize(page.name)
) {
warn(
"Foundry will render page.name as a heading; the identical opening H1 in text.content will duplicate the visible page title."
);
}
A warning is preferable to silently stripping or rewriting authored HTML, since duplicate headings could occasionally be intentional.
Acceptance criteria
Reproduction
- Ask Simulacrum to create a multi-page JournalEntry.
- Give each text page a
name and title.show: true.
- Generate page HTML beginning with
<h1> containing the same text as the page name.
- Open the JournalEntry in Foundry.
- Observe two consecutive identical H1 headings on each affected page.
Summary
When Simulacrum creates a text page inside a Foundry
JournalEntry, it may set the embedded page'sname, enabletitle.show, and also begintext.contentwith an identical<h1>.Foundry correctly renders
page.nameas an H1 whentitle.showis enabled, then renders the authored H1 inside the page content. The result is a duplicated visible heading such as:This is not a Foundry rendering bug. It is a JournalEntry generation-guidance issue: the agent/tooling does not make the interaction between
page.name,page.title.show, and the first heading inpage.text.contentsufficiently clear.Observed output
Example document data:
{ "name": "Character Spotlights", "type": "text", "title": { "show": true, "level": 1 }, "text": { "format": 1, "content": "<h1>Character Spotlights</h1><ul>...</ul>" } }Foundry renders this as:
Expected behavior
JournalEntry creation guidance should direct the model to use one of these two patterns:
Foundry-rendered page title
{ "name": "Character Spotlights", "title": { "show": true, "level": 1 }, "text": { "content": "<ul>...</ul><h2>Mission Pressure</h2><p>...</p>" } }When
title.showis enabled, the content should begin with body text, a paragraph, a list, or an H2 subsection—not an H1 identical topage.name.Authored content title
{ "name": "Character Spotlights", "title": { "show": false, "level": 1 }, "text": { "content": "<h1>Character Spotlights</h1><ul>...</ul>" } }If the HTML contains its own primary H1, the Foundry page title should be hidden.
Why this belongs in Simulacrum
Foundry is rendering both supplied headings as instructed. Simulacrum should understand or communicate the presentation semantics of embedded JournalEntry pages so generated journals do not contain redundant headings by default.
The closest related issue is #143, which concerns JournalEntry page validation recovery and stronger
create_documentguidance. This issue is narrower and concerns valid-but-visually-incorrect page generation rather than schema validation failure.Suggested implementation areas
Based on the implementation references in #143, likely locations include:
scripts/tools/document-create.jsscripts/utils/validation-errors.jsupdate_document, since replacement or insertion of pages can introduce the same duplication.Proposed guidance text
Optional detection
A non-blocking warning could detect the common case:
A warning is preferable to silently stripping or rewriting authored HTML, since duplicate headings could occasionally be intentional.
Acceptance criteria
page.name,title.show, and HTML headings interact.title.show: truewith an identical opening H1.title.show: truewith content beginning below H1 level, ortitle.show: falsewith an authored H1.update_document.Reproduction
nameandtitle.show: true.<h1>containing the same text as the page name.