Skip to content

feat: 知识库筛选器 UI 优化及 All Tags 深色模式适配#24

Open
shaocc1234 wants to merge 5 commits intoJamailar:mainfrom
shaocc1234:fix/xhs-note-kind-classification
Open

feat: 知识库筛选器 UI 优化及 All Tags 深色模式适配#24
shaocc1234 wants to merge 5 commits intoJamailar:mainfrom
shaocc1234:fix/xhs-note-kind-classification

Conversation

@shaocc1234
Copy link
Copy Markdown
Contributor

@shaocc1234 shaocc1234 commented Apr 27, 2026

改动概述

1. 知识库类型筛选器 UI 优化

  • 新增跨平台聚合筛选器:仅图文仅视频,位于平台筛选按钮右侧
  • 聚合筛选器使用 Checkbox 形态(左侧带方框选中态),与平台按钮的实心填充风格形成区分
  • 聚合筛选器无计数 badge(跨平台聚合计数在多条件筛选场景下无法保证准确性)

2. All Tags 深色模式适配

  • All Tags 主按钮背景色使用设计 token bg-surface-secondary
  • 内联标签按钮及抽屉内按钮背景统一使用设计 token
  • 全部标签抽屉容器改用 bg-surface-elevated

3. 代码清理

  • 移除聚合筛选器的无意义计数计算
  • 为 platformFilters 补充 isAggregate: false 类型标记

1. desktop/electron/main.ts:
   - persistStructuredKnowledgeNote() 保存笔记时写入 captureKind 字段,
     使前端能正确区分视频/图文笔记

2. desktop/src/pages/Knowledge.tsx:
   - 卡片 kind 映射增加 note.hasVideo 兜底,兼容旧笔记
   - 新增 all-image / all-video 聚合快捷筛选器(图文/视频跨平台分类)
   - 修复「全部」计数来源错误
   - 搜索防抖从 180ms 调整为 500ms
- 新增「仅图文」「仅视频」跨平台聚合筛选器(Checkbox 形态,与平台按钮风格区分)
- 移除聚合筛选器无意义的计数 badge
- All Tags 按钮及标签项改用设计 token(bg-surface-*),替代硬编码 bg-black/*,修复深色模式适配
- 全部标签抽屉容器及内部元素深色模式适配
@shaocc1234 shaocc1234 changed the title fix: 修复小红书笔记视频/图文分类识别及筛选器逻辑 feat: 知识库筛选器 UI 优化及 All Tags 深色模式适配 Apr 27, 2026
Migrate the RedBox plugin's Xiaohongshu blogger-note workflow toward the
same direct API collection path that already works in social-media-copilot.
The capture flow now defaults to API mode, keeps a fallback tab mode,
moves collection controls into the side panel, adds progress/pause/cancel
state, and trims noisy debug output while preserving actionable logs.

Constraint: Must preserve the existing RedBox extension architecture and avoid new build dependencies
Rejected: Keep tab-per-note capture as the default path | too slow for blogger batch collection
Rejected: Re-implement the request stack from memory | diverged from the proven social-media-copilot runtime behavior
Confidence: medium
Scope-risk: moderate
Reversibility: clean
Directive: Xiaohongshu API signing depends on page-world globals and the bundled md5 runtime; verify both before changing the API path again
Tested: node --check for Plugin/background.js and Plugin/sidepanel.js; manual API-mode collection on a Xiaohongshu blogger page; plugin packaging script run
Not-tested: Traditional tab mode end-to-end after the side panel redesign
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