Skip to content

feat: prioritize high-value comments for review#1

Open
dyxg wants to merge 18 commits into
devfrom
feature/priority-comment-queue
Open

feat: prioritize high-value comments for review#1
dyxg wants to merge 18 commits into
devfrom
feature/priority-comment-queue

Conversation

@dyxg

@dyxg dyxg commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a configurable priority comment selector that ranks high-engagement posts and comments while preserving the original comment table.
  • Route the selected priority queue through LangGraph output, SSE comment streaming, per-comment AI generation, and /insights review data.
  • Update the frontend review queue to refresh existing task insights, display selection metadata, and copy generated copy instead of sending comments.
  • Add task 3 documentation, Auto-Log records, and focused backend/frontend tests.

MediaCrawler boundary

  • Existing /api/ad-intel/run MediaCrawler capability is preserved.
  • Automated tests and local mock task validation do not invoke MediaCrawler or require Xiaohongshu login.

Testing

  • python -m pytest -q → 63 passed
  • npm test → 7 passed
  • npm run build → passed
  • python -m ruff check app/services/comment_selector.py tests/test_comment_selector.py app/api/routes.py → passed

Notes

  • Local ignored mock data was created under data/ for manual testing with mock-priority-001, but it is intentionally not included in the PR.
  • Existing dirty vendor/MediaCrawler worktree state was left untouched and is not part of this PR.

dyxg and others added 7 commits May 12, 2026 21:15
feat(api): 添加评论点赞数和笔记ID字段

- 在API路由中添加likes和note_id字段到评论数据结构
- 从评论对象中提取likes值并转换为整数类型
- 添加note_id字段用于标识笔记

feat(frontend): 实现评论刷新功能和点赞排序

- 添加刷新评论按钮及加载状态指示器
- 实现评论列表按点赞数排序功能
- 显示评论刷新状态和同步时间信息
- 在评论作者信息中显示点赞图标和数量
- 更新API类型定义以包含新的字段

refactor(frontend): 优化评论加载和状态管理

- 修改loadInsights方法支持更新审查状态参数
- 添加refreshComments方法实现手动刷新功能
- 改进错误处理和同步状态反馈机制
- 在轮询过程中隐藏状态更新避免干扰
```

dyxg commented May 15, 2026

Copy link
Copy Markdown
Owner Author

Update pushed in 70547fd:

  • GET /api/ad-intel/task/{task_id}/insights review items now include:
    • likes: integer comment like count
    • note_id: source post id string
  • Existing comment_like_count remains for backward compatibility.
  • Frontend ReviewItem type updated and UI now prefers likes for display.

Validation:

  • python -m pytest -q → 63 passed
  • npm test → 7 passed
  • npm run build → passed
  • python -m ruff check app/api/routes.py tests/test_routes_helpers.py → passed

dyxg and others added 11 commits May 16, 2026 00:20
Co-authored-by: Cursor <cursoragent@cursor.com>
前端添加评论点赞数和笔记 ID
…xt-nlp

fix(ci): resolve mypy import fallback for agent3
…lure-polling

fix(frontend): avoid premature task failure during polling
…memory

压力测试套件Feature/agent4 rag memory
…iority-comment-queue

# Conflicts:
#	app/api/routes.py
#	frontend/src/App.vue
#	frontend/src/services/adIntelApi.ts
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.

6 participants