Give DigitalOcean SKU trend series readable names with the SKU id as secondary text

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
75/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript
领域
data, frontend

调研方向

Start by reading InsightsSchema in src/lib/adapters/digitalocean/schemas.ts:103-115 and adding description/group_description to it, then follow skuSpendMetrics in src/lib/adapters/digitalocean/index.ts:504-536 where the Daily spend on SKU <id> label is built. Check src/lib/dashboard/trends.ts to see how seriesTitle becomes the chart title and where the accessible name is set, so the id can move to secondary text while staying unique. Mirror realistic descriptions in src/lib/adapters/simulated/digitalocean.ts, extend the adapter tests with the one/several/empty/long description cases, and update docs/providers/digitalocean.md:91 and :256. Done means a unit-tested naming rule plus before/after screenshots of the demo workspace.

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

描述

area: integrations enhancement priority: P2 size: M

Summary

DigitalOcean's daily SKU trend charts are titled with the raw SKU id, for example "Daily spend on SKU 1-AP-PRO-0002 (DigitalOcean, USD)". Give each SKU series a readable name taken from DigitalOcean's own Billing Insights data, and show the SKU id as secondary text. Split out of #263 (decision B1 there), which leaves SKU titles unchanged.

Evidence

  • skuSpendMetrics (src/lib/adapters/digitalocean/index.ts:504-536) writes the label Daily spend on SKU <id> (:528). The trend chart title is that label (seriesTitle, src/lib/dashboard/trends.ts).
  • A snapshot row has no field besides label that could hold a name (usage_snapshots in src/lib/supabase/database.types.ts).
  • The Billing Insights schema the adapter parses (InsightsSchema, src/lib/adapters/digitalocean/schemas.ts:103-115) keeps only usage_team_urn, start_date, total_amount, and sku.
  • DigitalOcean's API also returns description and group_description per data point (docs/providers/digitalocean.md:91); description is the invoice item text, for example droplet name (c-2-4GiB) (docs/providers/digitalocean.md:256). One SKU billed for several resources has one data point, and one description, per resource.
  • Observed on the demo workspace (ce44e95): five DigitalOcean SKU charts, all titled with ids (1-AP-PRO-0002, 1-DB-PG-0003, 1-DO-DROP-0109, 1-DO-DROP-0112, 1-SP-SUB-0001). After #263 they sit behind the DigitalOcean disclosure on the dashboard.

Scope

  • Parse description (and group_description if it helps) in InsightsSchema.
  • Name each SKU series from its descriptions: the description when there is one, and a stated rule (for example "web-1 (s-1vcpu-1gb) and 2 more") when there are several.
  • Carry the SKU id so the chart shows it as secondary text, not in the title.
  • Update the simulator (src/lib/adapters/simulated/digitalocean.ts) to send realistic descriptions, docs/providers/digitalocean.md, and the adapter tests.
  • Stored labels change on the next sync only; say so in the pull request, and do not rewrite stored rows.

Acceptance criteria

  • A DigitalOcean SKU trend chart's title is a readable name from DigitalOcean data, with the SKU id shown as secondary text.
  • Unit tests: one description, several descriptions for one SKU, an empty description, and a very long one.
  • The accessible name of each SKU chart stays unique.
  • Before and after screenshots of the opened DigitalOcean disclosure on the demo workspace.

Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown

主要语言
TypeScript
星标
1
派生
1
平均合并
6 小时 56 分钟
30 天内合并 PR
136

环境准备

从这里开始

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

eddiejaoude/StackDash 的其他 Issue

查看 eddiejaoude/StackDash 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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