Skip to content

Feat(Blog): 增加博客管理页面 - #1220

Open
Lirzh wants to merge 1 commit into
hydro-dev:masterfrom
Lirzh:master
Open

Lirzh wants to merge 1 commit into
hydro-dev:masterfrom
Lirzh:master

Conversation

@Lirzh

@Lirzh Lirzh commented Oct 12, 2026 •

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features
    • Added a paginated blog management page with blog owners, titles, reply and view counts, last-updated times, and edit links.
    • Added an empty-state message when no blogs are available.
    • Added translated labels for blog management in English, Chinese, Traditional Chinese, and Korean.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The blog package adds a /manage/blog route and ControlPanel entry restricted to PRIV_EDIT_SYSTEM. The handler paginates blogs using the pagination.blog setting and loads owner documents for the displayed blogs. The management page renders an empty state or a blog table with owner details, metrics, edit links, and pagination. Chinese, Traditional Chinese, Korean, and English translations add blog-management labels. The Korean translation loader key changes from kr to ko.

Priority: ⬇️ Low

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

Change: Feature

Merge Risk: ⚪ Minimal · up to f0a83

The management list’s pagination and English labels have no established blocking issue; the change is ready to merge after normal checks.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and accurately describes the main change: adding a blog management page.
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.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)


  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/blog/index.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.



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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 Additional comments (3)
packages/blog/templates/manage_blog.html (1)

1-44: LGTM!

packages/blog/index.ts (2)

269-269: 🎯 Functional Correctness

The repository uses ko consistently. packages/blog/index.ts loads the Korean translations with ctx.i18n.load('ko', {, and the corresponding resource is packages/hydrooj/locales/ko.yaml. The search found no kr loader or locale resource, so this concern is not actionable.


251-252: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Add translations for the new labels in English.

The new keys No blogs yet. and Blogs per page have entries in zh, zh_TW and ko. The en block has no entries for them. English falls back to the key text, so the output is correct. If the project expects the same keys in every locale, add the entries for consistency.

Also applies to: 266-267, 281-282

Source: Learnings


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 12555373-4222-4f97-bc2e-029996c554d9
📥 Commits

Reviewing files that changed from the base of the PR and between da6fb16 and f0a8393.

📒 Files selected for processing (2)
  • packages/blog/index.ts
  • packages/blog/templates/manage_blog.html

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@Lirzh

Lirzh commented Oct 12, 2026

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant