Skip to content

fix(dashboard): export usage rows with CSV escaping - #3839

Closed
tang-vu wants to merge 1 commit into
Osmantic:mainfrom
tang-vu:fix/usage-csv-escaping-20260908
Closed

tang-vu wants to merge 1 commit into
Osmantic:mainfrom
tang-vu:fix/usage-csv-escaping-20260908

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Why this matters

Usage export currently uses JSON string quoting for CSV cells, corrupting model names containing quotes, backslashes or newlines. Quote text cells with doubled CSV quotes and emit CRLF row separators while preserving numeric cells.

Overlap check

Searched open and closed upstream PRs by semantic keywords and changed production files before implementation, using the full PR inventory and inspecting related descriptions; refreshed latest PRs through #3832 before publication.

Files: ods/extensions/services/dashboard/src/pages/Usage.jsx.

#3043 handles auxiliary report failures; #3051 readiness; existing helper-test PRs cover selectors. #3711 exports GPU history in another file. None fixes Usage CSV serialization.

Regression and focused validation

Rendered Usage export regression captures the downloaded Blob and checks a model containing quotes, comma, newline, Unicode and backslash. Usage + history suites: 12 passed.

Tradeoffs, rollback and remaining validation

Format correctness only: no spreadsheet-formula sanitization claim. No external spreadsheet application was tested. Revert restores JSON escaping in CSV downloads.

Combined validation and merge order

Validated the ten independent branches on synthetic integration commit 8d5e17801b6789985f74496f709e482bf571f278 (branch integration/quality-next-ten-20260908 on tang-vu/DreamServer). Dashboard: 262 tests passed, lint and production build passed. Related dashboard API suites: 70 passed; interpreter timeout suite: 3 passed; four new standalone release/CLI tests and existing provider egress contracts passed. CI-equivalent Ruff selection passed across ods; shell/Python syntax passed. Smoke and installer simulation passed.

make gate is NOT green: it stops at the Hermes max_tokens template contract, reproduced unchanged on base 21f4b3a6. Full BATS: 408 passed and 10 failed in AMD text fixtures, WSL dispatch and root-sensitive installer/path tests. All ten failures reproduce on the untouched base in the affected suites. Pre-commit gitleaks, size and shell hooks pass, while detect-private-key flags the two existing dummy-key fixtures in test_host_agent.py and test-remote-provider-egress-policy.py. These results do not establish hardware or live-service behavior. API tests also emit an existing unclosed aiohttp-session warning.

Suggested batch merge order: invites, interpreter timeout, n8n pagination, Milvus (only after its live gate), healthcheck, provider redirects (after human review), Usage CSV, branch exclusions, PWA storage, Lemonade paths. Production changes are independent; draft reviews need not block unrelated changes. Four branches add adjacent Makefile test registrations: preserve all four lines when resolving that textual conflict, as on the integration head. Each PR starts directly from upstream main; no stacked branch dependency.

GitHub checks completed for candidate cac11e23be316940e26ec0aebdb0caf18cb406c7: 28 successful checks, 4 conditionally skipped review checks, zero failed or pending checks. All scheduled technical CI checks passed; the local baseline failures and live-validation limitations above still apply.

@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. We're closing outside-contributor pull requests that have had no activity for 14 days or more, so the queue reflects work that can still land. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and reopen it or open a focused PR. See #7253 for details and the contribution policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants