feat(inventory): 添加库存浏览与筛选 - #136
Open
yourmoln wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更概述
/inventory分页查询,支持物品类型、归档状态和四种服务端排序。验证
.\gradlew.bat :composeApp:compileKotlinDesktop :composeApp:desktopTest --tests "*InventoryApiTest" --tests "*InventoryPagingTest" --tests "*InventoryScreenModelTest" --tests "*AppRoutePanePolicyTest" --tests "*AppNavKeySerializationTest" --tests "*LocaleStringsStructureTest" --tests "*AuthServiceTest.sessionBoundRequestReturnsRefreshedSessionAfterSuccessfulRetry":通过。.\gradlew.bat :composeApp:desktopTest执行 819 项,818 项通过;1 项为现有测试隔离污染:收藏限额夹具返回数组[],而FavoriteLimits解码需要对象,异常由FavoriteApi.getFavoriteLimits的后台协程产生,并以UncaughtExceptionsBeforeTest被归到随后启动的库存测试。库存定向测试独立执行通过,本 PR 未包含该无关修复。git diff --check upstream/newui:通过。实现假设清单
holderId,由服务端按当前认证账号返回库存,页面不会读取其他用户的库存。代码逻辑图
flowchart TD A[个人抽屉点击库存] --> B[打开库存页面] B --> C[库存状态模型观察账号会话] C --> D{当前会话是否有效} D -- 否 --> E[显示需要登录状态] D -- 是 --> F[按筛选和分页参数请求库存接口] F --> G{请求结果} G -- 成功 --> H[按有效物品 ID 去重并更新分页快照] G -- 初始失败 --> I[显示整页错误和重试] G -- 刷新失败 --> J[保留现有列表并显示刷新错误] G -- 加载更多失败 --> K[保留现有列表和偏移并提供重试] H --> L[展示数量和库存列表] L --> M{用户操作} M -- 滚动接近末尾 --> F M -- 刷新 --> N[从偏移 0 请求并在成功后重建分页] M -- 修改筛选 --> O[取消旧请求并重建请求代次] N --> F O --> F C -- 账号切换或登出 --> O