LC044 / LC044/TrailSnap

[Feature] 照片收藏:手动标记喜欢与精选照片管理

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

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_scorememory_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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.