v0.6.0 — Kiểm duyệt AI, xử lý nền và đường dẫn nhóm
· 3 phút để đọc
Thời gian: 2026-03-24 → 2026-04-03
Phiên bản này cải tổ phần nền tảng: xử lý các tác vụ nặng ở chế độ nền, kiểm duyệt nội dung bằng AI, và chuyển đường dẫn nhóm sang dạng thân thiện hơn.
Tính năng mới
Kiểm duyệt nội dung tự động
- Thêm worker AI moderation (
process-ai-moderation-queue.ts) chạy định kỳ mỗi 30 giây. - Xử lý các job kiểm duyệt nội dung tự động bằng AI.
- Job type
AI_MODERATIONvàAI_GROUP_MODERATIONđược enqueue vàoNotificationQueue.
Xử lý nền cho tác vụ nặng
Chuyển các tác vụ nặng từ inline (fire-and-forget) sang queue bất đồng bộ:
| Tác vụ | Trước | Sau |
|---|---|---|
| XP Award | Inline trong transaction | Enqueue sau commit |
| Manga Embedding | Inline sau save | Enqueue sau commit |
| Chapter Notifications | Inline khi publish | Enqueue sau publish |
- Đảm bảo XP award dùng transaction client để tránh phantom job khi rollback.
- Loại
MANGA_EMBEDDINGvàXP_AWARDra khỏi notification worker, chuyển sang AI worker.
Gộp các worker
- Gộp tất cả 3 queue workers thành một process duy nhất để giảm RAM usage trên server.
- Chuyển workers sang long-lived processes với internal sleep loop thay vì spawn mới mỗi lần.
Nhập hàng loạt dễ hơn
- Thêm admin bulk import tools: giao diện import manga hàng loạt từ admin dashboard.
- Import chương tuần tự có thứ tự (sequential upload) tránh race condition.
- Quản lý file ZIP bulk import trong
./data/bulk-import-zips.
Đường dẫn nhóm thân thiện
Hoàn chỉnh migration URL nhóm dịch:
- Thêm field
slugvào modelScanlationGroup. - Thêm
makeUniqueGroupSlugvà backfill script cho dữ liệu hiện có. - Thêm
getGroupBySlugservice method. - Thêm helper
groupUrl(slug)dùng toàn platform. - Replace toàn bộ route
/group/[id]/→/g/[slug]/. - Thêm redirect shim tại
/group/[id]→/g/[slug]cho backward compatibility. - Migrate tất cả components sử dụng
groupIdprop →slug. - Cập nhật
revalidatePathcalls theo route mới.
Điều hướng chương tiếp theo
- Thay thế cơ chế "hold" desktop bằng sticky bottom bar cho điều hướng chương tiếp.
- Cải thiện pull indicator mobile:
- Dùng
position: fixedtránh layout shift. - Dùng
getBoundingClientRectcho touch gesture chính xác hơn. - Dùng
IntersectionObserverthay scroll listeners để phát hiện cuối trang. - Dùng
translateYthaymax-heightanimation cho smooth hơn. - Reset pull indicator khi đổi chương.
- Dùng
Mẫu email
- Migrate toàn bộ email templates sang EmailMD format.
Hệ thống emoji (bản thiết kế)
- Thêm spec và kế hoạch triển khai hệ thống emoji/reaction cho bình luận.
Cải tiến
- Cập nhật Next.js, React và eslint-config-next lên phiên bản mới nhất.
- Sync pnpm lockfile với dependencies mới.
Sửa lỗi
- Sanitize recommendation payloads tránh lộ thông tin nội bộ.
- Cập nhật admin group-manga links sang
/g/[slug]/đúng format. - Resolve các
/group/link còn sót và type errors sau migration. - Fix dead code trong floating hub reader (unused constants).
- Sửa scroll jank reader với
IntersectionObserver.
Commits nổi bật
| Hash | Mô tả |
|---|---|
3c02684 | refactor: merge all queue workers into single unified process |
feat | feat: implement AI moderation worker script |
feat | feat: enqueue XP award instead of fire-and-forget inline |
feat | feat: enqueue manga embedding instead of fire-and-forget inline |
feat | feat: enqueue chapter notifications instead of inline processing |
3c02684 | feat: add admin manga bulk import tools |
feat | feat: migrate group URLs from /group/[id] to /g/[slug] |
feat | feat: replace desktop hold mechanism with sticky bottom bar for next chapter nav |
feat | feat: migrate email templates to EmailMD |