Skip to content

fix: preserve numeric percentages in company CSV exports - #1454

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/csv-growth-main
Oct 30, 2026
Merged

tannerlinsley merged 1 commit into
mainfrom
taren/csv-growth-main

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

The company CSV export was adding a literal apostrophe to generated changes such as +50% and -50%. Keep these calculated percentages intact while continuing to escape company names and other source text.

Replaces #1452 after its parent was squash-merged. This carries only the same one-line fix onto current main.

AI review notes:
Five source-derived CSV formatting/parsing cases passed for positive, negative, zero, New, and N/A values. A formula-like company name remains escaped. The prior expression produces the unwanted apostrophe. This is a source-level check, not a rendered browser test.
Full repository checks passed through normal commit hooks on main 8bd5925: types, lint, unit, chat, and desktop tests.

Summary by CodeRabbit

  • Bug Fixes
    • CSV exports now include the same Change value shown for each visitor in the live visitors view. This keeps exported growth labels consistent with their on-screen presentation and makes the exported data easier to compare with the displayed visitor information.

@changeset-bot

changeset-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 69e564d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The live visitors CSV export now writes the growthLabel(row) result directly as the Change value, without passing it through csvSafeText.

Changes: Live visitor CSV export

Layer / File(s) Summary
Export the growth label
src/components/admin/LiveVisitors.tsx
The Change value in the CSV export now uses growthLabel(row) directly. The export no longer applies csvSafeText to that value.

Priority: Normal

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to 69e56

No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix: preserve numeric percentages in company CSV exports" matches the changeset. The one-line change in src/components/admin/LiveVisitors.tsx writes the Change value from growthLabel(row) d…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix: preserve numeric percentages in company CSV exports" matches the changeset. The one-line change in src/components/admin/LiveVisitors.tsx writes the Change value from growthLabel(row) directly instead of passing it through csvSafeText, so values such as +50% and -50% keep their numeric form in the CSV export. The title names the main behavior change and the affected export. It is specific and concise, and it does not describe anything absent from the changeset.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 69e564d Commit Preview URL

Branch Preview URL
Oct 30 2026, 01:10 AM

@tannerlinsley
tannerlinsley merged commit 6a2c559 into main Oct 30, 2026
8 checks passed
@tannerlinsley
tannerlinsley deleted the taren/csv-growth-main branch October 30, 2026 01:23
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.

1 participant