Skip to content

Admin comment and em dash sweep - #41

Closed
theobong wants to merge 10 commits into
fix/admin-campaign-04-correctnessfrom
chore/admin-campaign-05-comments
Closed

theobong wants to merge 10 commits into
fix/admin-campaign-04-correctnessfrom
chore/admin-campaign-05-comments

Conversation

@theobong

Copy link
Copy Markdown
Member

What changed

A cleanup of comments and copy. Wasteful comments are gone, along with references to retired documents and prototypes and 49 empty leftovers from an old comment-stripping tool. Every em dash is removed from the dashboard. Only WHY comments remain.

The one visible change is copy:

  • sentences that used an em dash are reworded;
  • separators read " · " or ": ";
  • empty values show a single "-" (one constant, so the glyph can change in one place).

Visible in: admin.

Before you start

Verify

[Admin]

  1. Open the "Dashboard". Expect: the tile descriptions read as full sentences with no long dashes. For example, the Reports tile reads "Every report neighbors submit, routed to the right city department. Track status and close the loop."
  2. Look at the "Moderation" tile. Expect: its count line reads "queued · user reports, held media, clusters and appeals".
  3. Open "Organizations", pick an org that never applied for verification, and open "Profile". Expect: empty facts such as the kind show "-".
  4. Open "Users" and look at the page intro. Expect: "Every neighbor on civfix and what they've contributed: the reports they've ...".
  5. Open "Signup pages" and pick a page with an agenda. Expect: agenda lines in the preview read like "9:00 · Check-in".
  6. Open "Jurisdictions" and pick a row. Expect: the handle field's placeholder reads "e.g. sf (tags this jurisdiction in a report discussion)".

Regression

Every section: [Admin]

  1. Open each section from the Dashboard and select an item. Expect: nothing changes except the wording in the table below. Layout, buttons and behavior are the same as with Admin correctness and accessibility fixes #40.

Not covered

  • Comment-only commits have no in-app surface. A syntax-tree comparison showed they change no code.

Findings addressed

  • ADM-CMT-*: WHAT comments, restating JSDoc, banners and narration are deleted. So are references to retired things ("doc 16", "enumeration", "PinIt", "prototype", "map.jsx", "Phase-1", the retired sibling repos). Comments that record a security, vendor or non-obvious reason are kept and tightened.
  • The 49 empty { } JSX expressions and the double blank lines are gone.
  • Em dashes are removed from comments, test titles, NOTICE and user-facing copy. The README, the workflows and globals.css are cleaned in Admin repo hygiene: docs, env example, unused deps, favicon #32.
  • One unused eslint-disable for exhaustive-deps is removed from the boundary map.

Decisions for the reviewer

  • Empty value: the bare "—" placeholder becomes EMPTY_VALUE = "-" in lib/empty-value.ts. It now matches the server's own "-" sentinel. The trade-off: at default punctuation settings, some screen readers read a lone hyphen as silence. Change the one constant for another glyph.
  • Separators and prose: all rewritten by hand. The table below lists every string.

User-visible copy changes

Where Before After
27 empty-value placeholders (lists, detail facts, stats) — -
features/discovery/discovery-page.tsx:586 "Add a contact — reports waiting" "Reports waiting: add a contact"
features/home/home-preview-presentation.ts:14 queued — ${MODERATION_MIX} queued · ${MODERATION_MIX}
features/mail/forward-template-modal.tsx:156 title={${v.label} — ${v.description}} title={${v.label}: ${v.description}}
features/pages/page-blocks.ts:63 ${when} — ${what} ${when} · ${what}
features/pages/page-blocks.ts:71 ${plain(entry.name)} — ${role} ${plain(entry.name)} · ${role}
features/reports/reports-page.tsx:1157 placeholder={Message ${report.city.dept} — e.g. nudge for an update…} placeholder={Message ${report.city.dept}, e.g. nudge for an update…}
features/discovery/discovery-page.tsx:416 title="The routing contact hard-bounced — re-enter a contact to clear it" title="The routing contact hard-bounced. Re-enter a contact to clear it."
features/discovery/discovery-page.tsx:494 placeholder="sf — tag this jurisdiction in a report discussion" placeholder="e.g. sf (tags this jurisdiction in a report discussion)"
features/discovery/discovery-page.tsx:671 does not email the reports already waiting — send each of those from its report.{" "} does not email the reports already waiting; send each of those from its report.{" "}
features/events/events-page.tsx:830 Events neighbors organize on civfix — cleanups and other volunteer events alike. Track Cleanups and other volunteer events neighbors organize on civfix. Track
features/home/home-page.tsx:104 "Jurisdictions with reports waiting on routing setup — work the queue so neighbors' reports reach the right city department." "Jurisdictions with reports waiting on routing setup. Work the queue so neighbors' reports reach the right city department."
features/home/home-page.tsx:118 "Every report neighbors submit, routed to the right city department — track status and close the loop." "Every report neighbors submit, routed to the right city department. Track status and close the loop."
features/home/home-page.tsx:132 "Community cleanups neighbors organize — track turnout, keep them legit, and message attendees." "Community cleanups neighbors organize. Track turnout, keep them legit, and message attendees."
features/home/home-page.tsx:146 "Two-way mail with municipal contacts — outbound routing and the replies that come back." "Two-way mail with municipal contacts: outbound routing and the replies that come back."
features/home/home-page.tsx:172 "The numbers are the proof civfix works — dropped, routed, resolved, cleaned up." "The numbers are the proof civfix works: dropped, routed, resolved, cleaned up."
features/home/home-page.tsx:630 "Two-way outreach with municipal contacts plus catch-all inbound to *@civfix.org — replies, support requests, and cold mail in one place." "Two-way outreach with municipal contacts plus catch-all inbound to *@civfix.org: replies, support requests, and cold mail in one place."
features/mail/mail-page.tsx:426 Hard bounce — the address rejected delivery. Hard bounce: the address rejected delivery.
features/moderation/gov-claim-presentation.ts:74 cannot be re-roled here — the applicant needs a different address. cannot be re-roled here, so the applicant needs a different address.
features/moderation/gov-claims-views.tsx:268 Verify the applicant before approving — approval grants a government role on the Verify the applicant before approving: approval grants a government role on the
features/moderation/moderation-page.tsx:784 The moderation queue — citizen content reports (the in-app “Report” button) The moderation queue: citizen content reports (the in-app “Report” button)
features/moderation/moderation-page.tsx:791 approve — which provisions a government role on their account — or reject with a reason. approve (which provisions a government role on their account) or reject with a reason.
features/orgs/create-org-panel.tsx:255 "Created already verified — no evidence round-trip. Use for "Created already verified, with no evidence round-trip. Use for
features/orgs/orgs-page.tsx:166 every write under its name — events, broadcasts, invites — is refused until it is restored. every write under its name (events, broadcasts, invites) is refused until it is restored.
features/reports/reports-page.tsx:682 It was already emailed to the city — rejecting does not recall that email. It was already emailed to the city, and rejecting does not recall that email.
features/reports/reports-page.tsx:998 No contact on file — set one in Jurisdictions No contact on file. Set one in Jurisdictions.
features/reports/reports-page.tsx:1276 Every report neighbors submit — verified, then routed to the right city department. Track Every report neighbors submit, verified and then routed to the right city department. Track
features/users/users-page.tsx:526 title="Report-verified — this reporter's reports auto-forward to their jurisdiction" title="Report-verified: this reporter's reports auto-forward to their jurisdiction"
features/users/users-page.tsx:557 title="Copy the raw account UUID (admin/DB only — not shown to neighbors)" title="Copy the raw account UUID (admin/DB only, not shown to neighbors)"
features/users/users-page.tsx:610 Account self-deleted — status actions disabled. Per-content removal stays available. Account self-deleted, so status actions are disabled. Per-content removal stays available.
features/users/users-page.tsx:766 Every neighbor on civfix and what they've contributed — the reports they've Every neighbor on civfix and what they've contributed: the reports they've

Tests changed

  • Placeholder assertions now use EMPTY_VALUE with exact matches: dates, discovery chips, analytics cells, and the org profile facts.
  • Two copy assertions follow the new " · " separators: the home moderation tile and the page-block agenda.

Verification

  • Node v22.23.2. pnpm lint, pnpm typecheck, pnpm build and pnpm test pass: 98 files, 1,056 tests.
  • The six comment commits were proven behavior-neutral: a reviewer parsed every touched file before and after with the TypeScript compiler, stripped comments, and found the code identical. The only exception is one test title with a non-user-facing em dash.
  • Two WHY comments the review flagged as lost were restored: why admin uses Leaflet rather than the MapLibre seam, and why every request sends the x-client header.
  • git grep for the em dash character finds only the three files Admin repo hygiene: docs, env example, unused deps, favicon #32 cleans: the README, the deploy workflow and globals.css.

🤖 Generated with Claude Code

@byteful byteful closed this Sep 24, 2026
@byteful
byteful deleted the chore/admin-campaign-05-comments branch September 24, 2026 20:13
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