Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: Mobile usage filter shows a dot while loading and nothing when an environment fails

已关闭 适合新手
#15,558 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 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 内容生成。

描述

bug via-triage
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
  1. Open Usage in the mobile app with at least one connected environment.
  2. Watch the filter icon in the header while "Scanning provider transcripts…" is showing.
  3. 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 hasLoadingEnvironments in apps/mobile/src/features/usage/UsageRouteScreen.tsx. isUsageLoading in 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 uses pendingCount and hasIssue.
  • The mobile app uses ActivityIndicator for 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

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。