Skip to content

Audit screens print "1 warnings" and a stray period in the report slide #1327

Closed

Description

@gewenyu99

Problem

The audit TUI has two small text errors. Both are on main.

The outro count line always uses plural nouns. A run with one warning and one suggestion prints "1 warnings" and "1 suggestions". The checks viewer summary shown during the run has the same pattern, so a count of one reads "1 errors", "1 warnings", "1 suggestions" or "1 passes".

The "Write report" slide has a stray period in the middle of a sentence. It reads "at ./posthog-audit-report.md. that summarizes our findings."

Evidence

Seen in a real-TUI sweep of the audit program against the posthog-demo-3000 app. It showed up on the refactor stack (d938a43, #1307) and on the Release A top (200961f, #1303). The code is unchanged on main (d8486dc), so this is not a stack regression.

Outro frame: 14 checks · 5 errors · 1 warnings · 1 suggestions. The Release A run printed 14 checks · 6 errors · 2 warnings · 1 suggestions.

Run frame, slide text: ./posthog-audit-report.md. that summarizes our findings.

Code on main:

  • src/ui/tui/screens/audit/AuditChecksOutroSection.tsx:35-36: the outro count line hardcodes "checks", "errors", "warnings" and "suggestions".
  • src/ui/tui/screens/audit/AuditChecksViewer/Header.tsx:50-52: the Summary line, used by AuditChecksViewer/AuditChecksViewer.tsx:137 and AuditChecksViewer/Footer.tsx:13, hardcodes "errors", "warnings", "suggestions" and "passes".
  • src/ui/tui/screens/audit/slides/writeReport.tsx:25: the slide sentence with the extra period.

Other audit files already handle singular forms. AuditChecksViewer/AuditChecksViewer.tsx:127 picks "area" or "areas", and AuditChecksViewer/DetailRow.tsx:33 and :37 pick "item" or "items" and "field" or "fields".

The "1 warnings" outro was noticed before: the author of #1064 (closed, not merged) noted that AuditChecksOutroSection renders "1 warnings" and left it alone as pre-existing. Nothing has fixed it since.

Open draft #1047 rewrites the slide sentence as part of the notebook handoff change, which removes the typo. That PR does not touch the count lines, and it has not been updated since July. The same slide also names ./posthog-audit-report.md, a file the agent may not write on main. That part belongs to the report-file issue, not this one.

Suggested fix

Pick the noun by count in both count lines, the same way DetailRow.tsx does (n === 1 ? '' : 's'), or with a small shared helper. Include "checks" in the outro line. "passes" becomes "pass" at one. Zero stays plural, so the existing audit-outro-* frame snapshots, which show zero counts, should not change.

Drop the period after the filename in slides/writeReport.tsx:25. If #1047 lands first, the sentence is gone and only the count fix is left.

Add a render test that sets one check per status and asserts the singular forms.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions