feat(monitor): 作品栏按博主分组折叠,评论栏改为 博主/作品/评论 三级
Deploy VitePress site to Pages / build (push) Canceled after 0s
Deploy VitePress site to Pages / Deploy (push) Canceled after 0s

先回答现状:跳转作品的按钮本来就有(作品栏每行末尾的外链图标);
评论栏原本是**两级**(作品 -> 评论),第一级是作品不是博主,所以并不是三级。

- MonitorNote 新增 creator_name(爬虫产出的 jsonl 里本来就有昵称,只是没存)。
  存的是**已脱敏**的值(张***三),与项目一贯的匿名化姿态一致 —— 爬虫刻意不落原始
  user_id(tools/user_hash.py),所以 creator_hash 是唯一稳定的分组依据。
  实测该哈希是无盐 sha256,能用任务目标的 external_id 反算配对。
- 入库时刷新 creator_name:作者改昵称是常事,只在首次写一次会一直显示旧的
- 作品栏:按 creator_hash 分组,组头可折叠(默认展开 —— 折叠的默认值不该藏数据),
  行内跳转按钮加了 title 说明
- 评论栏:一级博主、二级作品、三级评论。_note_meta_map 补上博主维度,
  评论流和作品分组都带上它
- 认不出博主的作品归到「未知博主」,不丢

顺带修一个语法错误:JSX 注释放在三元表达式分支里是非法的(那是子节点语法不是表达式),
移进 div 内。
This commit is contained in:
2026-10-08 09:43:19 +08:00
parent b11bbf771a
commit 0eb6ba31c5
6 changed files with 256 additions and 69 deletions
+16
View File
@@ -84,6 +84,15 @@ export interface MonitorNote {
title: string
note_url: string
cover: string
/**
* 创作者标识。
*
* `creator_hash` 是唯一稳定的分组依据 —— 爬虫刻意不落原始 user_id(见
* tools/user_hash.py),所以没有比它更具体的身份了。
* `creator_name` 是**已脱敏**的昵称(张***三 这种)。
*/
creator_hash: string
creator_name: string
first_seen_at: number
last_seen_at: number
is_new: boolean
@@ -116,6 +125,9 @@ export interface MonitorComment {
note_title: string
note_cover: string
note_url: string
/** 所属作品的创作者 —— 评论流按 博主 -> 作品 -> 评论 三级展开时用。 */
note_creator_hash: string
note_creator_name: string
}
/** One work that has comments, for the filter dropdown. */
@@ -124,6 +136,8 @@ export interface CommentNoteOption {
note_title: string
note_cover: string
note_url: string
creator_hash: string
creator_name: string
comment_count: number
latest_at: number
}
@@ -134,6 +148,8 @@ export interface CommentBucket {
note_title: string
note_cover: string
note_url: string
creator_hash: string
creator_name: string
comments: MonitorComment[]
}