View Users on a chart point returns nobody for weekly charts and for organizations outside UTC

未关闭
#654 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@officialasishkumar 已经在做这个了。

开始于 2026年11月7日。

  • #657 来自 @officialasishkumar —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
typescript
领域
analytics

调研方向

Start in packages/core/src/modules/chart/src/sql.ts, especially chartBucketProfilesQuery and bucketEquals, then trace how the chart passes its timezone into queries and compare that with getChartBucketProfiles. Check the chart bucket and drill-down behavior for weekly charts and organizations outside UTC; done means View Users returns the users and count shown for each point. Issue #657 has an open linked pull request.

由索引模型根据 Issue 内容生成。

描述

Description

On a time-series chart, clicking a point and choosing View Users often shows "No users found" while the chart shows a non-zero count for that point.

  • Weekly charts: every point comes back empty, in every timezone.
  • Organizations outside UTC: hour points come back empty, and day and month points match the wrong bucket (empty, or missing users near the edge of the period).

Steps to reproduce

  1. Open a report with a line chart and interval Week.
  2. Click any point with a count above 0 and choose View Users.
  3. The modal says "No users found".

For the timezone case, set the organization's timezone to America/New_York and do the same on an Hour chart.

Root cause

chartBucketProfilesQuery (packages/core/src/modules/chart/src/sql.ts, bucketEquals) doesn't match how the chart buckets its points:

  • The chart builds weeks with toStartOfWeek(created_at, 1, tz), so weeks start on Monday. The drill-down uses toStartOfWeek(toDateTime(created_at)), which uses mode 0, so weeks start on Sunday. A Sunday week start never equals the Monday date the chart sends back.
  • The chart runs with the organization's timezone as session_timezone. getChartBucketProfiles calls runQuery without a timezone, so the drill-down buckets in UTC while the point's date is in the organization's timezone.

Expected behavior

View Users returns the users behind the point, with the same count the chart shows, for every interval and timezone.

主要语言
TypeScript
星标
7.3k
派生
539
平均合并
1 天 20 小时
30 天内合并 PR
80

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

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

Openpanel-dev/openpanel 的其他 Issue

查看 Openpanel-dev/openpanel 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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