[Feature] 照片收藏:手动标记喜欢与精选照片管理
Open
Nobody has claimed this yet.
enhancement
status: pending-review
- Dominant language
- Python
- Stars
- 739
- Forks
- 97
- Avg merge
- 10h 3m
- Merged PRs (30d)
- 82
Description
背景与目标
TrailSnap 已有 AI 生成的 quality_score 和 memory_score,但用户无法手动标记喜欢的照片。Google Photos 和 Apple Photos 都有核心的"收藏"功能,这是用户最高频的照片管理操作之一。
功能范围
- Photo 模型新增
is_favorite布尔字段 - 照片浏览页、Lightbox 中增加收藏按钮(心形图标)
- 首页增加"最近收藏"卡片
- 照片页支持按"仅收藏"筛选
- Agent 工具支持
is_favorite查询参数
技术方案
- 后端:Photo 模型加
is_favorite列(默认 False),新增PUT /photos/{id}/favorite端点,read_all_photos增加is_favorite过滤 - 前端:PhotoLightbox 和 PhotoGallery 增加收藏按钮,PhotoStore 增加收藏状态管理
- 数据库迁移:Alembic 迁移添加列
优先级
高 — 实现简单、用户价值大、是所有主流相册应用的标配功能
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Photo model, the existing photo routes including read_all_photos, and the Alembic migrations. Then inspect PhotoLightbox, PhotoGallery, and PhotoStore to trace the current photo actions and filtering. Done means the favorite field, endpoint, filtering, migration, UI controls, recent-favorites card, and Agent query support all work together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database, full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100