imeepos
7e6de68891
fix: bug
2026-01-29 15:51:39 +08:00
imeepos
6279752f23
fix: 添加skills
2026-01-29 15:13:27 +08:00
imeepos
7c50d396e9
fix: bug
2026-01-28 18:46:44 +08:00
imeepos
7d73cfbc3e
fix: bug
2026-01-28 15:26:00 +08:00
imeepos
ea53d8d70e
fix: bug
2026-01-28 14:46:12 +08:00
imeepos
2757b68756
feat: add TemplateGrid and TitleBar components with tests
...
- Implemented TemplateGrid component for displaying templates in a grid layout.
- Added calculateCardWidth helper function for dynamic card sizing.
- Created TitleBar component for displaying the title and points with interaction.
- Added unit tests for TemplateGrid and TitleBar components to ensure proper functionality.
- Introduced useStickyTabs and useTabNavigation hooks with tests for managing sticky tab behavior and navigation logic.
- Implemented useTemplateFilter hook for filtering templates based on video content.
- Added comprehensive tests for all new hooks and components to validate behavior and edge cases.
2026-01-26 12:43:20 +08:00
imeepos
e1340fa101
feat: 实现 API 接口对接功能 (删除作品、作品搜索、修改密码)
...
按照 TDD 规范完成三个核心功能的接口对接:
## 新增功能
### 1. 删除作品功能 (app/generationRecord.tsx)
- 新增 use-template-generation-actions.ts hook
- 支持单个删除和批量删除作品
- 删除确认对话框
- 删除成功后自动刷新列表
- 完整的错误处理和加载状态
### 2. 作品搜索功能 (app/searchWorksResults.tsx)
- 新增 use-works-search.ts hook
- 替换模拟数据为真实 SDK 接口
- 支持关键词搜索和分类筛选
- 支持分页加载
- 完整的加载、错误、空结果状态处理
### 3. 修改密码功能 (app/changePassword.tsx)
- 新增 use-change-password.ts hook
- 使用 Better Auth 的 changePassword API
- 客户端表单验证(密码长度、确认密码匹配等)
- 成功后自动返回并提示
## 技术实现
- 严格遵循 TDD 规范(先写测试,后写实现)
- 新增 3 个 hooks 和对应的单元测试
- 更新中英文翻译文件
- 更新 jest.setup.js 添加必要的 mock
## 文档
- 新增 api_integration_report.md - API 对接分析报告
- 新增 api_integration_development_plan.md - 开发计划和完成汇总
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 19:15:24 +08:00
imeepos
4c01d8e9e7
fix: bug
2026-01-21 16:25:26 +08:00
imeepos
1fc79d29ed
feat: 重构测试结构并添加动态表单组件
...
主要更改:
- 重构测试文件结构,删除旧的测试文件并添加新的测试覆盖
- 添加 DynamicForm 组件及其测试
- 更新 Jest 配置以支持新的测试结构
- 更新组件、抽屉和国际化文件
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-19 14:31:48 +08:00
imeepos
6e85460b2e
test: 为 app/auth.tsx 添加完整的测试覆盖
...
- 新增 app/auth.test.tsx,包含 10 个测试用例
- 测试覆盖加载状态、认证状态、未认证状态、导航行为和副作用
- 优化 Jest 配置,添加 skipLibCheck 和 useLocalSearchParams mock
- 添加必要的组件 mock(FlashList、icon、HomeSkeleton 等)
- 添加 coverage 目录到 .gitignore
- 修复 index.tsx 中多余的 key 属性
- 更新 tsconfig.json 添加 esModuleInterop 和 skipLibCheck
测试覆盖率: app/auth.tsx 达到 100%
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-19 12:41:10 +08:00
imeepos
a1544ec85f
fix: 修复 Jest 测试配置和 useCategories hook 实现
...
- 修复 jest.setup.js 中不存在的 NativeAnimatedHelper 模块引用
- 优化 jest.config.js 配置,分离 js 和 ts/tsx 的转换配置
- 添加 @testing-library/react 依赖
- 导出 useCategoriesStore 以供测试使用
- 修复 useCategories hook 的参数合并逻辑,确保 inputParams 正确覆盖默认参数
- 修复错误处理时 data 状态设置为 null
- 更新 CategoriesState 类型定义,允许 data 为 null
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-19 11:46:51 +08:00
imeepos
1f9b6e22d6
feat: 添加测试框架和优化项目结构
...
- 添加 Jest 配置和测试设置
- 添加 use-categories hook 的单元测试
- 更新 CLAUDE.md 添加包管理工具说明
- 优化首页、视频页和频道页的组件结构
- 添加 .claude 命令配置文件
- 移除 bun.lock 和 package-lock.json,统一使用 bun
- 更新 package.json 依赖
Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-19 10:53:54 +08:00