[Bug]: Mobile usage filter shows a dot while loading and nothing when an environment fails
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 84/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- mobile-dev
调研方向
从 apps/mobile/src/features/usage/UsageRouteScreen.tsx 开始,重点查看 hasLoadingEnvironments 和 isUsageLoading,然后使用 pendingCount 和 hasIssue 对比 apps/web/src/components/usage/UsagePage.tsx 中的等效逻辑。完成的标准是:加载时使用带有现有 scanning 文本的 spinner,同时筛选器圆点和无障碍标签能够标识存在错误或 usage 版本不匹配的已选环境。
由索引模型根据 Issue 内容生成。
描述
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
- Open Usage in the mobile app with at least one connected environment.
- Watch the filter icon in the header while "Scanning provider transcripts…" is showing.
- Separately, open Usage with two environments where one cannot report usage, so its query fails.
Expected behavior
- Loading is shown with a spinner, as it is elsewhere in the mobile app.
- When a selected environment fails to report usage, the filter icon is marked, so I know the totals are incomplete without opening the menu.
Actual behavior
- While any selected environment is still loading, an amber dot appears on the filter icon. A dot on a filter icon reads as "a filter is applied", not as "loading". The meaning is only stated in the accessibility label.
- When an environment fails, the dot disappears and the icon looks normal. The failure is only visible by opening the filter menu and reading "Usage unavailable" under that environment. The totals on screen silently exclude it.
The loading dot was observed in the app. The failure behavior comes from reading the code and has not been reproduced on a device.
Suggested fix
- Show a spinner with the "Scanning provider transcripts…" text and drop the loading dot.
- Show the dot on the filter icon only when a selected environment errored or reports a usage version mismatch, with an accessibility label saying so.
This matches web, which shows a dashed-circle icon while scanning and a warning icon labelled "Some environments could not report usage" on failure.
Supporting detail
- The dot is drawn from
hasLoadingEnvironmentsinapps/mobile/src/features/usage/UsageRouteScreen.tsx.isUsageLoadingin the same file excludes environments that have an error, so a failure clears the dot. - Web's equivalent is the environment menu trigger in
apps/web/src/components/usage/UsagePage.tsx, which usespendingCountandhasIssue. - The mobile app uses
ActivityIndicatorfor loading in 30 files. This dot is the only badge overlaid on an icon.
Impact
Minor bug or occasional failure
Version or commit
d60a71ef6e
Workaround
Open the filter menu and read each environment's status line.
- 主要语言
- TypeScript
- 星标
- 24.8k
- 派生
- 6.4k
- 平均合并
- 3 小时 21 分钟
- 30 天内合并 PR
- 297
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pingdotgg/t3code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
"Open question" banner opens an empty new thread when the child thread runs on a linked environment未关闭
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
pingdotgg/t3code#26989 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
相似的 Issue
-
b:minor bug
难度 2/5 1-3 小时 新手友好度 76/100
software-mansion/argent#1698 ·
维护者通常 1 天内回复
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4624 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
better-auth/better-auth#12132 · 1 个 reaction ·
维护者通常 1 天内回复
-
automation missing-model model-sync provider:tinfoil
难度 2/5 1-3 小时 新手友好度 68/100
anomalyco/models.dev#12053 ·
维护者通常 1 天内回复
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
hurttlocker/o8#5112 ·