Skip to content

[fix] repair Open Library borrowing page rendering#94

Open
dethan3 wants to merge 1 commit into
mainfrom
fix/borrow-page-hydration
Open

[fix] repair Open Library borrowing page rendering#94
dethan3 wants to merge 1 commit into
mainfrom
fix/borrow-page-hydration

Conversation

@dethan3

@dethan3 dethan3 commented Jul 13, 2026

Copy link
Copy Markdown
Member

PR-94 PR-94 PR-94 Powered by Pull Request Badge

Preserve translation resolver functions across SSR serialization and render paragraph Markdown inline to prevent runtime and hydration errors.

Checklist(清单):

  • Labels
  • Assignees
  • Reviewers

Closes

Summary by CodeRabbit

  • 新功能

    • 优化服务端语言加载,支持更稳定地传递和恢复包含特殊内容的翻译数据。
    • 改进国际化数据初始化流程,提升页面语言显示的一致性。
  • 改进

    • 优化“如何借阅”页面的说明文字与流程步骤展示,改善内联 Markdown 内容的渲染效果。

Preserve translation resolver functions across SSR serialization and render paragraph Markdown inline to prevent runtime and hydration errors.
@dethan3 dethan3 self-assigned this Jul 13, 2026
@dethan3 dethan3 added the bug Something isn't working label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1d9265b4-9d3d-4703-ba43-00e9310499db

📥 Commits

Reviewing files that changed from the base of the PR and between cd2371d and 5a63443.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml and included by none
📒 Files selected for processing (2)
  • models/Translation.ts
  • pages/open-library/how-to-borrow.tsx

📝 Walkthrough

Walkthrough

本次变更调整 SSR 国际化数据的序列化与反序列化流程,并将借阅页面的模型介绍及流程描述改为 Markdown 内联解析。

Changes

国际化与借阅页面渲染

Layer / File(s) Summary
SSR 国际化数据序列化
models/Translation.ts
显式引入编码与解码函数;I18nProps.languageMap 改为字符串,createI18nStore 接收并解析序列化数据,loadSSRLanguage 改为异步加载并编码语言映射。
借阅页面内联 Markdown 渲染
pages/open-library/how-to-borrow.tsx
模型介绍和借阅流程描述改用 marked.parseInline 生成 dangerouslySetInnerHTML 内容。

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题与本次修复 Open Library 借阅页渲染问题的主要变更一致,且简洁明确。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/borrow-page-hydration

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.

@dethan3 dethan3 requested a review from TechQuery July 14, 2026 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant