René's URL Explorer Experiment


Title: fix: keep Tiptap and editor APIs off published pages · Issue #549 · ycode/ycode · GitHub

Open Graph Title: fix: keep Tiptap and editor APIs off published pages · Issue #549 · ycode/ycode

X Title: fix: keep Tiptap and editor APIs off published pages · Issue #549 · ycode/ycode

Description: Summary Visitor-facing pages do not need the rich-text editor. They only need to render Tiptap JSON that was already saved. Despite LayerRendererPublic being split out from the builder renderer, the published bundle still includes: Tipta...

Open Graph Description: Summary Visitor-facing pages do not need the rich-text editor. They only need to render Tiptap JSON that was already saved. Despite LayerRendererPublic being split out from the builder renderer, th...

X Description: Summary Visitor-facing pages do not need the rich-text editor. They only need to render Tiptap JSON that was already saved. Despite LayerRendererPublic being split out from the builder renderer, th...

Opengraph URL: https://github.com/ycode/ycode/issues/549

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix: keep Tiptap and editor APIs off published pages","articleBody":"## Summary\n\nVisitor-facing pages do not need the rich-text **editor**. They only need to **render** Tiptap JSON that was already saved. Despite `LayerRendererPublic` being split out from the builder renderer, the published bundle still includes:\n\n- Tiptap / ProseMirror (`EditorState`, `EditorView`, `PluginKey`, `prosemirror-model`, `prosemirror-view`)\n- `RichTextLink` (`lib/tiptap-extensions/rich-text-link.ts`), which imports `@tiptap/core`\n- Editor/asset helpers from `lib/layer-utils.ts`, including `createComponentViaApi()` which calls `POST /ycode/api/components` (and pulls in `lodash/cloneDeep`)\n\nThese modules are **not required** to paint a published page. They inflate the public JS (see #548 — the duplicated ~499 KB chunks are this graph) and show up in Lighthouse as unused / editor-related code.\n\nRaised by a client website (14 Sep 2026 Lighthouse runs).\n\n## Import chain (published client)\n\n```\nLayerRendererPublic\n  → lib/layer-utils.ts          // 4.5k-line mixed module; includes createComponentViaApi\n      → lib/text-format-utils.ts\n  → lib/text-format-utils.ts    // renderRichText\n      → lib/tiptap-extensions/rich-text-link.ts   // @tiptap/core Mark.create\n      → lib/text-format-utils.ts                  // circular: DEFAULT_TEXT_STYLES\n  → lib/variable-utils.ts\n      → stringToTiptapContent from text-format-utils\n```\n\n`getLinkSettingsFromMark()` is a plain attrs mapper (~20 lines) and does not need `@tiptap/core`. It lives in the same file as the editor Mark, so importing it from the public renderer drags the editor in.\n\n`extractPlainTextFromTiptap` in `lib/tiptap-utils.ts` is already editor-free and is fine to keep.\n\n## What is required on the published site\n\n| Capability | Needed on published? | Notes |\n|---|---|---|\n| Render Tiptap JSON to React (`renderRichText`) | Yes | Keep; move off `@tiptap/core` |\n| `getLinkSettingsFromMark` | Yes | Extract to a tiny helper with no Tiptap import |\n| `@tiptap/react`, ProseMirror view/state, editor Marks/Nodes | No | Builder / canvas only |\n| `createComponentViaApi` / File Manager category helpers | No | Move out of `layer-utils` |\n| GSAP / Swiper / lightbox | Only if the page uses them | Already gated in `PageRenderer` |\n\n## Proposed fix\n\n- Move `getLinkSettingsFromMark` (and any other render-time helpers) out of `lib/tiptap-extensions/rich-text-link.ts` so the public renderer never imports `@tiptap/core`.\n- Split `lib/layer-utils.ts` (and `text-format-utils.ts` if needed) into render-safe vs builder-only modules. Public renderer should not import `createComponentViaApi`.\n- Optionally `next/dynamic` the rich-text renderer so pages with no `richText` layers skip it entirely.\n- Guardrail: fail CI / a bundle test if `@tiptap/core` or `prosemirror-view` appear in the published-route client graph.\n\n## Test plan\n\n- [ ] Grep / source-map of published chunks: no `@tiptap/core`, `prosemirror-view`, or `/ycode/api/components`\n- [ ] Rich text, CMS-bound text, and rich-text links still render on a published page\n- [ ] Creating a component from the builder still works (`createComponentViaApi`)\n- [ ] Combined with #548, duplicated JS in Lighthouse treemap is gone\n","author":{"url":"https://github.com/ysamcode","@type":"Person","name":"ysamcode"},"datePublished":"2026-09-15T05:43:55Z","url":"https://github.com/ycode/ycode/issues/549"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d7bedef3-1148-0fc7-39d8-56ca7a6f0daf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE6D6:2DDAAE:1BAD2B:256196:6AFE381B
html-safe-nonce77406c28fa6f4726d248bb233f572a800be7d5d7d6412ae44b2d59770533b829
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkQ2OjJEREFBRToxQkFEMkI6MjU2MTk2OjZBRkUzODFCIiwidmlzaXRvcl9pZCI6Ijg4MjIzMDMwNzgwODIyOTQwMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac62e3df19fbfe4302d4712a15f0d1a65eda8a53541aad6d73105ecc20689ae040
hovercard-subject-tagissue:5458038756
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ycode/ycode/549/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c779d30660d06d9b1a1c91f7426e30fe6822bbf58cc9821730d4887b1c7bf1f3/ycode/ycode/issues/549
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c779d30660d06d9b1a1c91f7426e30fe6822bbf58cc9821730d4887b1c7bf1f3/ycode/ycode/issues/549
og:image:altSummary Visitor-facing pages do not need the rich-text editor. They only need to render Tiptap JSON that was already saved. Despite LayerRendererPublic being split out from the builder renderer, th...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameysamcode
hostnamegithub.com
expected-hostnamegithub.com
None260deedcf4630abb0a6b4aaa02fd2af70eab44d2529712694ceae59ca131b02e
turbo-cache-controlno-preview
go-importgithub.com/ycode/ycode git https://github.com/ycode/ycode.git
octolytics-dimension-user_id65892203
octolytics-dimension-user_loginycode
octolytics-dimension-repository_id1165452593
octolytics-dimension-repository_nwoycode/ycode
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1165452593
octolytics-dimension-repository_network_root_nwoycode/ycode
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8b413ea7a9b010f4f2ebbb923b041b0d6091dd94
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/ycode/ycode/issues/549#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fissues%2F549
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fissues%2F549
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ycode%2Fycode
Reloadhttps://github.com/ycode/ycode/issues/549
Reloadhttps://github.com/ycode/ycode/issues/549
Reloadhttps://github.com/ycode/ycode/issues/549
ycodehttps://github.com/ycode
ycodehttps://github.com/ycode/ycode
Codehttps://github.com/ycode/ycode
Issues7 (7)https://github.com/ycode/ycode/issues
Pull requests1 (1)https://github.com/ycode/ycode/pulls
Discussionshttps://github.com/ycode/ycode/discussions
Actionshttps://github.com/ycode/ycode/actions
Projectshttps://github.com/ycode/ycode/projects
Security and quality1 (1)https://github.com/ycode/ycode/security
Insightshttps://github.com/ycode/ycode/insights
https://github.com/ycode/ycode
New issuehttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/549
New issuehttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/549
#552https://github.com/ycode/ycode/pull/552
fix: keep Tiptap and editor APIs off published pageshttps://github.com/ycode/ycode/issues/549#top
#552https://github.com/ycode/ycode/pull/552
https://github.com/ysamcode
BugSomething isn't workinghttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com/ysamcode
ysamcodehttps://github.com/ysamcode
on Sep 15, 2026https://github.com/ycode/ycode/issues/549#issue-5458038756
#548https://github.com/ycode/ycode/issues/548
fix: stop shipping duplicate JS chunks on published pages #548https://github.com/ycode/ycode/issues/548
ysamcodehttps://github.com/ysamcode
on Sep 15, 2026https://github.com/ycode/ycode/issues/549#event-31149778929
ysamcodehttps://github.com/ysamcode
BugSomething isn't workinghttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Bug%22
on Sep 15, 2026https://github.com/ycode/ycode/issues/549#event-31149779604
https://github.com/ysamcode
ysamcodehttps://github.com/ysamcode
on Sep 15, 2026https://github.com/ycode/ycode/issues/549#issuecomment-5675369417
#551https://github.com/ycode/ycode/issues/551
#548https://github.com/ycode/ycode/issues/548
#550https://github.com/ycode/ycode/issues/550
tristan-mouchethttps://github.com/tristan-mouchet
fix: keep Tiptap and editor APIs off published pages #552https://github.com/ycode/ycode/pull/552
on Sep 15, 2026https://github.com/ycode/ycode/issues/549#event-31157599893
tristan-mouchethttps://github.com/tristan-mouchet
completedhttps://github.com/ycode/ycode/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
5b3cc3bhttps://github.com/ycode/ycode/commit/5b3cc3bc585b0e374a0f8f764eaf7c0c644f1ea8
on Sep 16, 2026https://github.com/ycode/ycode/issues/549#event-31226773210
pullhttps://github.com/apps/pull
on Sep 16, 2026https://github.com/ycode/ycode/issues/549#event-31226939435
fix: keep Tiptap and editor APIs off published pageshttps://github.com/sheikharifulislam/ycode/commit/5b3cc3bc585b0e374a0f8f764eaf7c0c644f1ea8
https://docs.github.com/articles/closing-issues-via-commit-messages
5b3cc3bhttps://github.com/sheikharifulislam/ycode/commit/5b3cc3bc585b0e374a0f8f764eaf7c0c644f1ea8
Sign up for freehttps://github.com/signup?return_to=https://github.com/ycode/ycode/issues/549
Sign in to commenthttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/549
ysamcodehttps://github.com/ysamcode
BugSomething isn't workinghttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.