Skip to content

Review/wiki framework - #1234

Closed
yjwyyds1 wants to merge 63 commits into
hydro-dev:masterfrom
HGNU:review/wiki-framework
Closed

yjwyyds1 wants to merge 63 commits into
hydro-dev:masterfrom
HGNU:review/wiki-framework

Conversation

@yjwyyds1

@yjwyyds1 yjwyyds1 commented Nov 19, 2026 •

Copy link
Copy Markdown

算法 Wiki 与编辑权限

Summary by CodeRabbit

  • New Features
    • Added contest photo albums with browsing, search, editing, uploads, and photo viewing.
    • Added a searchable Wiki with article editing and directory management, plus a discussion table of contents.
    • Added student profiles, class listings, course browsing, and student import tools.
    • Added responsive image previews and expanded virtual-judge support for Kattis and LOJ.
  • Updates
    • Updated scoreboards to show student details and revised discussion pages to emphasize announcements.
  • Bug Fixes
    • Improved homework judging behavior and corrected several submission, migration, and discussion-view issues.

ZTL123Z and others added 30 commits August 1, 2024 11:38
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
guke1024 and others added 27 commits August 13, 2024 16:52
将实际部署的 HGNUOJ 4.13.4 定制版本同步至 Hydro 5.1.0(上游提交 `17f8ac3cef550283894279727b027b1798efee9b`),保留学校功能,并适配新版接口、数据库迁移和依赖。

### 同步的上游功能
- 新的域加入、退出、邀请及成员排行榜规则;多题面和组队参赛。
- 比赛补题、提前退出、比赛材料、榜单公开控制与新版榜单接口。
- 提交记录重测历史、多组自测、multi-pass 题型及交互题评测改进。
- OAuth 绑定/解绑、OIDC、新设置界面及新的插件 API。
- 恢复上游 `@elastic/elasticsearch 9.2.0` 客户端,配合 Elasticsearch 9.2.8 重建题目搜索索引。

### 保留的 HGNU 定制
- 学生姓名、学号、班级,注册信息、学生批量导入、班级统计与课程列表。
- 六种赛制的学校信息列及导出;作业显示原始总分、默认延期 0 天、作业评测详细反馈。
- HGNU RP 题目分公式(难度和得分加权后除以 10,包含本人创建题目);比赛 RP 沿用上游计算。
- HGNU 导航、校徽、主页、个人标识与页脚;原站站内信和个人资料限制;已有维护脚本。

### 升级适配与修复
- 学生数据适配新 MongoDB 驱动;修复缓存失效、重复学号并发创建、导入失败回滚和学生信息修改权限。
- 旧设置正确迁移到新配置结构,保存成功才标记完成,失败可重试;日志不输出配置秘密。
- 迁移旧远程评测挂载及语言标识,首次初始化迁移通道时也执行迁移,并保留同步进度。
- 维护 CLI 不启动评测消费者;保留上游 sum/max 子任务遇到错误后继续统计、min 短路的语义。
- 严格采用官方 v5 域规则,撤销免加入访问兼容;修复上游批量 upsert 未逐用户建立 system 成员记录的问题。独立修复通道不会占用后续上游迁移版本号,不改变其他域的退出或封禁状态。
- 课程成员数仅统计已加入用户;Koa 类型适配;fork 的 CI 不发布上游 npm 包。
- 合并 master 上已有提交历史,保留上述功能适配后的实现。

### 验证
- GitHub CI 通过;111 测试服务器依赖锁定安装、TypeScript 构建和 lint 通过。
- 8 组 HGNU 定制回归及 14 项域权限/迁移断言通过,包括重复执行和其他域封禁保持。
- Elasticsearch 9.2.8 实例与上游 9.2.0 客户端联调,索引重建和按题号检索通过。
- 网页验证:域自助加入、邀请码、封禁、预分配角色、退出及 system 不可退出通过;两道真实 C++ 提交均 AC、100 分,临时数据已清理。
- 原站备份仅保留在服务器;题目文件与附件无需复制,搜索索引从 MongoDB 重新生成。

官方说明:[升级指南](https://docs.hydro.ac/zh/docs/Hydro/FAQ/upgrade)、[v5 域规则](https://docs.hydro.ac/zh/docs/Hydro/user/domain)。

外部远程题源连通性受对方服务影响,未将 Codeforces 的 HTTP 403 等外部问题标记为已解决。
支持完整年份分页、批量上传、封面排序、金银铜牌、响应式大图及独立样式加载;调整顶部导航与相册标题操作区域。已通过类型检查、5 项模型测试及桌面和手机浏览器验证。
通过 PR #2 发布响应式图片预览、公告目录、比赛相册和奖项展示。保留各功能提交和 HGNU 定制功能。
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your submission. We really appreciate it! Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request comment same as the below format.


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


0 out of 3 committers have signed the CLA.
❌ @ZTL123Z
❌ @guke1024
❌ @yjwyyds1
ZTL123Z seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request adds Wiki, student and course, contest-album, image-preview, and discussion table-of-contents features. It also changes account and scoreboard data, several Hydro runtime behaviors, maintenance scripts, and vjudge providers. UI templates, styles, locales, documentation, and tests are updated alongside these changes.

Estimated code review effort: 5 (Critical) | ~120 minutes

Change: Feature

Suggested reviewers: undefined-moe, pandadtdyy

Merge Risk: High · up to e2faa

This large change adds Wiki, student, album, preview and provider features. Several defects remain: account settings can fail to save, discussion replies are hidden, assignment scores are shown unadjusted, and wiki saves can fail behind an HTTPS proxy. Blog creation is also blocked only in the page template, not on the server, and data-import scripts can corrupt or stall. Fix these before merging.

- [ ] 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.

package.json

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

packages/common/permission.ts

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

packages/contest-album/frontend/album.css

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

  • 61 others

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

@yjwyyds1 yjwyyds1 closed this Nov 19, 2026
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.

3 participants