René's URL Explorer Experiment


Title: feat: translate long rich text in segments by tristan-mouchet · Pull Request #672 · ycode/ycode · GitHub

Open Graph Title: feat: translate long rich text in segments by tristan-mouchet · Pull Request #672 · ycode/ycode

X Title: feat: translate long rich text in segments by tristan-mouchet · Pull Request #672 · ycode/ycode

Description: Summary Translating a long rich-text body (e.g. a blog post) over MCP meant sending the whole Tiptap document in one call: about 134k characters for a long post, roughly 30 minutes per upload, and internal page links couldn't be expressed with set_rich_text_translation. Agents can now translate just the text, in segments, while links, images and tables are kept from the source. Changes Add get_rich_text_segments: returns a rich-text field as numbered segments (one per paragraph/heading) with formatting and links as … tags and inline elements as placeholders, plus a structure_key Add set_rich_text_segments: rebuilds the document from the source with the translated segments, so links, images, tables and lists can't break Support partial uploads in parts; segments not sent keep their previous translation Return each segment's current translation (translated_text) when a locale is given, so a translation can be corrected segment by segment Reject invalid input atomically: dropped links or placeholders, broken tag nesting, empty or unknown segments, outdated structure_key Save with a conditional write and retry, so parts sent in parallel don't overwrite each other Mark the translation complete once every segment is translated; otherwise return a hint that it stays hidden on the live site Works for CMS rich-text fields and page/component rich-text layers Add parseTiptapDocOrNull to tiptap-utils and document the workflow in the localization guide Test plan Call get_rich_text_segments on a long CMS rich-text field with links, images and tables Translate it with set_rich_text_segments in several parts (sequential and parallel) and check every link, image and table is kept Call get_rich_text_segments with locale_id, edit one translated_text, resend it and confirm only that segment changes Send a segment without one of its link tags and confirm nothing is saved and the error names the segment Translate a rich-text layer on a page and a component Open the translated field in the builder's translation editor and on the localized page

Open Graph Description: Summary Translating a long rich-text body (e.g. a blog post) over MCP meant sending the whole Tiptap document in one call: about 134k characters for a long post, roughly 30 minutes per upload, and ...

X Description: Summary Translating a long rich-text body (e.g. a blog post) over MCP meant sending the whole Tiptap document in one call: about 134k characters for a long post, roughly 30 minutes per upload, and ...

Opengraph URL: https://github.com/ycode/ycode/pull/672

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:68b7e924-610c-2100-9046-da8591c99a58
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC8AE:264CD6:5B13AB:783B21:6AFE6B37
html-safe-nonce096f615387c7b11db933afa8a98a31e8040a5d61905fc71469e786f61abbcc7c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOEFFOjI2NENENjo1QjEzQUI6NzgzQjIxOjZBRkU2QjM3IiwidmlzaXRvcl9pZCI6IjcwMTk0Njc0NzExNjE1NTE2NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb92a477273a9f8ba7f0fa4789eb0a86ccdea5cdd2aa7233969e9526d6e087048
hovercard-subject-tagpull_request:5169010452
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/ycode/ycode/pull/672/files
twitter:imagehttps://avatars.githubusercontent.com/u/82507011?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/82507011?s=400&v=4
og:image:altSummary Translating a long rich-text body (e.g. a blog post) over MCP meant sending the whole Tiptap document in one call: about 134k characters for a long post, roughly 30 minutes per upload, and ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ycode/ycode/pull/672/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fpull%2F672%2Ffiles
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%2Fpull%2F672%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=ycode%2Fycode
Reloadhttps://github.com/ycode/ycode/pull/672/files
Reloadhttps://github.com/ycode/ycode/pull/672/files
Reloadhttps://github.com/ycode/ycode/pull/672/files
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
Sign up for GitHub https://github.com/signup?return_to=%2Fycode%2Fycode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fycode%2Fycode%2Fissues%2Fnew%2Fchoose
tristan-mouchethttps://github.com/tristan-mouchet
develophttps://github.com/ycode/ycode/tree/develop
feat/rich-text-translation-segmentshttps://github.com/ycode/ycode/tree/feat/rich-text-translation-segments
Conversation 0 https://github.com/ycode/ycode/pull/672
Commits 1 https://github.com/ycode/ycode/pull/672/commits
Checks 0 https://github.com/ycode/ycode/pull/672/checks
Files changed https://github.com/ycode/ycode/pull/672/files
Please reload this pagehttps://github.com/ycode/ycode/pull/672/files
feat: translate long rich text in segments https://github.com/ycode/ycode/pull/672/files#top
Show all changes 1 commit https://github.com/ycode/ycode/pull/672/files
c812598 feat: translate long rich text in segments tristan-mouchet Nov 5, 2026 https://github.com/ycode/ycode/pull/672/commits/c81259863b8e852f79c4fec180c41348015f4426
Clear filters https://github.com/ycode/ycode/pull/672/files
Please reload this pagehttps://github.com/ycode/ycode/pull/672/files
Please reload this pagehttps://github.com/ycode/ycode/pull/672/files
instructions.ts https://github.com/ycode/ycode/pull/672/files#diff-35ae6d1dc5282caf4b20abc977a5fa2bb5c1063fb5fef1cf81821c0274750825
tool-annotations.ts https://github.com/ycode/ycode/pull/672/files#diff-60103ed71bcd6e529b9c8ccd496be887facb484dbbe1ab2b2faa368303219bb6
locales.ts https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
translationRepository.ts https://github.com/ycode/ycode/pull/672/files#diff-c0ca284a376bb00fee4173a8e2bac30fb4249ab8810e5770d65ff6779ccbe92d
rich-text-segments.test.ts https://github.com/ycode/ycode/pull/672/files#diff-c054b726c60f2c71fb66c1a014374ca4ea3bd36bc70c5929910e7f7506f21515
rich-text-segments.ts https://github.com/ycode/ycode/pull/672/files#diff-73beab46fa6f3535dbca4ef3db55fa81db6215c7687923015ef3d04a3a2c296e
tiptap-utils.test.ts https://github.com/ycode/ycode/pull/672/files#diff-95b45e9c4e357b4ce37e98029ed12e9a2335954f17aa83caae9f0a1dbf37c924
tiptap-utils.ts https://github.com/ycode/ycode/pull/672/files#diff-080d142519a8c9d6c143024a526dddbc52210db748518e4276031ec8ee0b37ac
useAiChatStore.ts https://github.com/ycode/ycode/pull/672/files#diff-e8328c1c455c9d474ba212fd2ee2742fc0c5a3a9927f09f5dde1ae789f0b3add
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
lib/mcp/instructions.tshttps://github.com/ycode/ycode/pull/672/files#diff-35ae6d1dc5282caf4b20abc977a5fa2bb5c1063fb5fef1cf81821c0274750825
View file https://github.com/ycode/ycode/blob/c81259863b8e852f79c4fec180c41348015f4426/lib/mcp/instructions.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/672/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/672/files#diff-35ae6d1dc5282caf4b20abc977a5fa2bb5c1063fb5fef1cf81821c0274750825
https://github.com/ycode/ycode/pull/672/files#diff-35ae6d1dc5282caf4b20abc977a5fa2bb5c1063fb5fef1cf81821c0274750825
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
lib/mcp/tool-annotations.tshttps://github.com/ycode/ycode/pull/672/files#diff-60103ed71bcd6e529b9c8ccd496be887facb484dbbe1ab2b2faa368303219bb6
View file https://github.com/ycode/ycode/blob/c81259863b8e852f79c4fec180c41348015f4426/lib/mcp/tool-annotations.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/672/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/672/files#diff-60103ed71bcd6e529b9c8ccd496be887facb484dbbe1ab2b2faa368303219bb6
https://github.com/ycode/ycode/pull/672/files#diff-60103ed71bcd6e529b9c8ccd496be887facb484dbbe1ab2b2faa368303219bb6
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
lib/mcp/tools/locales.tshttps://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
View file https://github.com/ycode/ycode/blob/c81259863b8e852f79c4fec180c41348015f4426/lib/mcp/tools/locales.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/672/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/pull/672/files#diff-8d2def6db96142f5eb33edfdf372c28a54c3c1fc5c568e9cc98c53c620ea69a4
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
lib/repositories/translationRepository.tshttps://github.com/ycode/ycode/pull/672/files#diff-c0ca284a376bb00fee4173a8e2bac30fb4249ab8810e5770d65ff6779ccbe92d
View file https://github.com/ycode/ycode/blob/c81259863b8e852f79c4fec180c41348015f4426/lib/repositories/translationRepository.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/672/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/672/files#diff-c0ca284a376bb00fee4173a8e2bac30fb4249ab8810e5770d65ff6779ccbe92d
https://github.com/ycode/ycode/pull/672/files#diff-c0ca284a376bb00fee4173a8e2bac30fb4249ab8810e5770d65ff6779ccbe92d
Please reload this pagehttps://github.com/ycode/ycode/pull/672/files
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.