Repository navigation
fix(audit): singular counts and a stray period in the audit screens - #1334
Merged
Merged
Conversation
The audit outro and the checks viewer summary always printed plural nouns, so a count of one read "1 warnings" or "1 passes". Both lines now pick the noun by count through a small countNoun helper. Zero stays plural, so the existing zero-count frames do not change. The "Write report" slide also had a period in the middle of its first sentence, after the report file name. Closes #1327 Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
gewenyu99
marked this pull request as ready for review
September 23, 2026 22:23
gewenyu99
commented
Sep 23, 2026
| @@ -0,0 +1,3 @@ | |||
| /** `1 error`, `2 errors`, `0 errors`. Zero stays plural. */ | |||
| export const countNoun = (n: number, noun: string, plural = `${noun}s`) => | |||
Collaborator
Author
There was a problem hiding this comment.
Jesus this is a horrible place for it opus
countNoun is a plain text helper with nothing audit-specific in it, so it belongs in shared utils where other screens can use it. Part of #1327 Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
johncwaters
approved these changes
Sep 23, 2026
gewenyu99
added a commit
that referenced
this pull request
Sep 24, 2026
Release A landed on main as squash commits (#1293, #1297, #1299, #1303). B1 already carries that content through the A3 branch, so the merge keeps B1's tree and adds #1334, the one change main has beyond A3, with B1 import paths. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The audit screens print plural nouns for a count of one. The outro reads
1 warnings · 1 suggestions, and the checks viewer summary reads1 errorsor1 passes. The "Write report" slide also has a stray period mid-sentence:at ./posthog-audit-report.md. that summarizes our findings.Closes #1327
Changes
countNoun. New helper, picks the noun by count. Zero stays plural.AuditChecksOutroSection. Count line uses it for checks, errors, warnings, suggestions.Summary. Viewer summary uses it for errors, warnings, suggestions, passes.WriteReportSlide. Drops the period after the file name.Nothing flows here. Two render sites call one helper in
count-noun.ts.Zero stays plural, so the
audit-outro-*frame snapshots, which show zero counts, don't change.totalandpendingstay as they are, since they read the same at one.Test plan
audit-counts.test.tsxrenders the outro section and the summary with one check per status, and checks the slide sentence. It failed on main on all three points and passes with the fix.pnpm typecheck,pnpm lint(0 errors) andpnpm test(200 files, 3352 tests) pass.LLM context
Written by Claude Code while triaging the real-TUI sweep issues.
Created with PostHog Desktop