Repository navigation
fix(remixer): skip ShowOrg prefix when reused page already calls it - #986
Conversation
handleImportedPage prepended the create-time content template to every
imported page body. For topic-category and topic-guide placements, their
templates have `<p>{{template.ShowOrg()}}</p>`, so a source page that
already called ShowOrg rendered the org banner twice.
Check the composed body first and strip ShowOrg from the prefix when the
call is already present, keeping only the template:tag-insert block.
ShowOrg state stays owned by applyArticleKindToPage, which is already
idempotent.
|
No actionable issues found in the changes to The checkout is shallow with no available merge base, so I reviewed the direct diff between the supplied commits. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused change correctly reuses existing behavior and preserves article-kind handling.
Review effort: Balanced
Findings: None
What changed in this PR
Prevents duplicate organization banners when Remixer imports pages already containing ShowOrg.
Changes:
- Extracts reusable
ShowOrgdetection and removal helpers. - Omits
ShowOrgfrom imported-page prefixes when already present.
| File | Description |
|---|---|
server/api/services/remixer-service.ts |
Avoids adding a duplicate ShowOrg call. |
server/api/services/book-service.ts |
Exposes shared ShowOrg helpers. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
🎉 This PR is included in version 2.154.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
handleImportedPage prepended the create-time content template to every imported page body. For topic-category and topic-guide placements, their templates have
<p>{{template.ShowOrg()}}</p>, so a source page that already called ShowOrg rendered the org banner twice.Check the composed body first and strip ShowOrg from the prefix when the call is already present, keeping only the template:tag-insert block. ShowOrg state stays owned by applyArticleKindToPage, which is already idempotent.