getSalesSummary CSV drops the name column when the top group is unnamed
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
El bug está en toCsv en src/tools/getSalesSummary.ts, que toma su conjunto de columnas solo de Object.keys(rows[0]). Empieza ahí, luego lee el mapeo de grupos que añade la clave name de forma condicional. Añade una prueba en src/tools/tests/sales.test.ts donde solo una fila de menor rango tenga un nombre, y confirma que produce una columna name con una celda vacía para la fila sin nombre. Ejecuta npm test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 5
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TMHSDigital/steam-mcp
-
decision feature priority: medium
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
TMHSDigital/steam-mcp#60 · 2 comentarios ·
-
decision marketing priority: low
Dificultad 3/5 1-2 días Aptitud para principiantes 12/100
TMHSDigital/steam-mcp#50 · 1 comentario ·
-
documentation marketing priority: medium
Dificultad 2/5 Medio día Aptitud para principiantes 50/100
TMHSDigital/steam-mcp#47 · 1 comentario ·
-
marketing priority: high
Dificultad 3/5 Medio día Aptitud para principiantes 42/100
TMHSDigital/steam-mcp#46 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
TMHSDigital/steam-mcp#25 · 1 comentario ·
Todos los issues de TMHSDigital/steam-mcp
Issues similares
-
Y2025: QBI forms print a negative taxable income; Form 8995-A lines 14b/14c check the wrong columnAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
readest/readest#7903 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
type: documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Oddmash/oddmash-ui#72 ·
Los mantenedores suelen responder en 1 día
-
bug priority:p3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
LCNINE/almondyoung-server#1562 ·
Los mantenedores suelen responder en 1 día
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:session-state issue-rating: 🦞 diamond lobster no-stale P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
openclaw/openclaw#204998 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día