Skip to content

fix: docTitle unexpectedly translated#14467

Merged
darkskygit merged 1 commit intotoeverything:canaryfrom
kthreadd:bugfix/14465-doc-title-fix
Feb 17, 2026
Merged

fix: docTitle unexpectedly translated#14467
darkskygit merged 1 commit intotoeverything:canaryfrom
kthreadd:bugfix/14465-doc-title-fix

Conversation

@kthreadd
Copy link
Contributor

@kthreadd kthreadd commented Feb 17, 2026

fix #14465

In Chinese mode, the document with the specified name may not be displayed correctly in the sidebar, and it may be mistaken for the translation of the content that needs to be translated.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed document title display in navigation panels on desktop and mobile to properly render without additional processing steps.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

Two navigation components (desktop and mobile) are updated to remove translation function calls on doc titles, using raw docTitle values instead. This change affects how document titles are displayed in the navigation panel.

Changes

Cohort / File(s) Summary
Doc Title Translation Removal
packages/frontend/core/src/desktop/components/navigation-panel/nodes/doc/index.tsx, packages/frontend/core/src/mobile/components/navigation/nodes/doc/index.tsx
Replaced t.t(docTitle) with raw docTitle parameter in name prop, eliminating translation lookup step for document titles in both desktop and mobile navigation nodes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Translation chains we now untie,
Raw titles hop and catch the eye,
Two paths align in harmony,
Desktop, mobile, wild and free!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: docTitle unexpectedly translated' directly and clearly describes the main change: removing unwanted translation of document titles in the navigation panel.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kthreadd kthreadd marked this pull request as draft February 17, 2026 11:10
@kthreadd
Copy link
Contributor Author

Untitled docTitle is handled by title getter in DocDisplayMetaService:

      // original title
      if (originalTitle) return originalTitle;

      // empty title
      return this.i18nService.i18n.i18next.t('Untitled', { lng });

@kthreadd kthreadd marked this pull request as ready for review February 17, 2026 11:21
@darkskygit darkskygit enabled auto-merge February 17, 2026 13:10
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.92%. Comparing base (8f83338) to head (42e0e62).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #14467      +/-   ##
==========================================
- Coverage   57.01%   56.92%   -0.09%     
==========================================
  Files        2859     2859              
  Lines      154468   154468              
  Branches    23206    23199       -7     
==========================================
- Hits        88073    87937     -136     
- Misses      63488    63618     +130     
- Partials     2907     2913       +6     
Flag Coverage Δ
server-test 74.96% <ø> (-0.18%) ⬇️
unittest 33.91% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@darkskygit darkskygit added this pull request to the merge queue Feb 17, 2026
Merged via the queue into toeverything:canary with commit 35e1411 Feb 17, 2026
61 checks passed
@kthreadd kthreadd deleted the bugfix/14465-doc-title-fix branch February 18, 2026 01:00
kthreadd added a commit to kthreadd/AFFiNE that referenced this pull request Feb 18, 2026
fix toeverything#14465

In Chinese mode, the document with the specified name may not be
displayed correctly in the sidebar, and it may be mistaken for the
translation of the content that needs to be translated.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

* **Bug Fixes**
* Fixed document title display in navigation panels on desktop and
mobile to properly render without additional processing steps.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Bug]: Document with the Specified Name Displayed Correctly

2 participants