Skip to content

搜索历史持久化 #25

@robinv8

Description

@robinv8

SearchViewModel 有 searchHistory 属性,但不确定是否持久化(可能只在内存中)。需要使用 UserDefaults 持久化搜索历史。

Status

  • Task Key: search-history-persist
  • Spec Revision: aaa5e6d9
  • Approved Revision: aaa5e6d9
  • Approval State: approved
  • Current Stage: definition
  • Next Stage: run
  • Workflow Entry State: ready_to_start
  • Attempt Count: 0
  • Max Retry Count: 3
  • Code Publication State: not_applicable
  • Close On Done: auto
  • Depends On: none

Dependencies

(no dependencies)

Acceptance Criteria

  • App 重启后搜索历史保留
  • 历史记录上限 20 条,超出时淘汰最旧的
  • 搜索后自动添加到历史(去重,移到最前)
  • 支持单条删除和全部清除

Verification

  • 重启 App 验证历史保留
  • 添加超过 20 条验证淘汰最旧的
  • 测试重复搜索的去重和排序
  • 测试单条删除和全部清除

Source

  • Spec: docs/prd/ios-improvement.md
  • Parent Issue: (no parent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2中优先级enhancementNew feature or requestiosiOS 客户端

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions