getSalesSummary CSV drops the name column when the top group is unnamed
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
バグは src/tools/getSalesSummary.ts の toCsv にあり、列集合を Object.keys(rows[0]) からのみ取得しています。そこから始めて、name キーを条件付きで追加するグループマッピングを読んでください。src/tools/tests/sales.test.ts に、より下位の行だけが名前を持つテストを追加し、名前のない行に対して空のセルを持つ name 列が生成されることを確認してください。npm test を実行してください。
索引モデルが issue の本文から書いたものです。
説明
Summary
steam_getSalesSummary with format: "csv" takes its columns from the first row only. When the top group has no name but later groups do, the name column is left out of the whole CSV.
Where
src/tools/getSalesSummary.ts(toCsv:const cols = Object.keys(rows[0]);)src/tools/getSalesSummary.ts(group mapping:...(name ? { name } : {}))
Details
function toCsv(rows: Array<Record<string, unknown>>): string {
if (rows.length === 0) return "";
const cols = Object.keys(rows[0]);
...
}
Each group only gets a name key when app_info, package_info, or country_info named it. Rows are sorted by net revenue, so whether the CSV has a name column depends on whether the top earner happened to be named. If row 0 is named and others are not, those get an empty cell, which is fine; the reverse loses every name.
Impact
Low. Steam normally returns names for the countries, apps, and packages on the page, so this needs an unnamed group at the top. When it happens, a spreadsheet export silently drops the names column.
Steps to reproduce
- Stub
GetDetailedSalesso the top-revenue row'scountry_codehas nocountry_infoentry and a smaller row's does. - Call
steam_getSalesSummary { start_date, format: "csv" }. - The header has no
namecolumn.
Suggested fix
Build cols as the union of keys across all rows, in first-seen order, or always set name (empty string when unknown) so every row has the same keys.
Acceptance criteria
- A test where only a lower row is named produces a
namecolumn with that name and an empty cell for the unnamed row.
Getting started
- Relevant files:
src/tools/getSalesSummary.ts,src/tools/__tests__/sales.test.ts - How to run tests:
npm test
Filed by repo-audit/fix-issues at a23ec21. Severity: low. Effort: S. audit-key: bug|src/tools/getSalesSummary.ts|toCsv
- 主要言語
- TypeScript
- スター
- 5
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TMHSDigital/steam-mcp のほかの issue
-
decision feature priority: medium
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
TMHSDigital/steam-mcp#60 · コメント 2 件 ·
-
decision marketing priority: low
難易度 3/5 1〜2日 初心者へのやさしさ 12/100
TMHSDigital/steam-mcp#50 · コメント 1 件 ·
-
documentation marketing priority: medium
難易度 2/5 半日 初心者へのやさしさ 50/100
TMHSDigital/steam-mcp#47 · コメント 1 件 ·
-
marketing priority: high
難易度 3/5 半日 初心者へのやさしさ 42/100
TMHSDigital/steam-mcp#46 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
TMHSDigital/steam-mcp#25 · コメント 1 件 ·
TMHSDigital/steam-mcp の issue をすべて見る
似ている issue
-
Y2025: QBI forms print a negative taxable income; Form 8995-A lines 14b/14c check the wrong columnオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
readest/readest#7903 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
type: documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Oddmash/oddmash-ui#72 ·
メンテナーはふだん 1 日以内に返信
-
bug priority:p3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
LCNINE/almondyoung-server#1562 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:session-state issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
openclaw/openclaw#204998 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信