Skip to content

Clean up plaintiff workflow and footer UI#47

Merged
mikepsinn merged 3 commits into
mainfrom
feature/mike-ui-complaint-checklist
May 6, 2026
Merged

Clean up plaintiff workflow and footer UI#47
mikepsinn merged 3 commits into
mainfrom
feature/mike-ui-complaint-checklist

Conversation

@mikepsinn
Copy link
Copy Markdown
Owner

@mikepsinn mikepsinn commented May 6, 2026

Summary

  • reframes the /people conversion surface around plaintiffs and Humanity v. Government while keeping the public path stable
  • removes distracting top-level counters/FAQ copy, simplifies the footer, and drops the source-code sentence from the footer baseline
  • makes plaintiff browsing less noisy with photo-first ordering, smaller pagination, a subtle filter control, and cleaner plaintiff detail/manage copy
  • keeps the AGENTS checklist documenting the UI complaint pattern for future work

Verification

  • pnpm --filter @optimitron/web run typecheck:fast
  • pnpm --filter @optimitron/web exec vitest run src/config/__tests__/site-variant-ui.test.ts
  • pnpm --filter @optimitron/web exec prettier --check ...
  • git diff --check
  • Playwright screenshot audit: packages/web/output/playwright/people-audit/review.html

Route note

I did not rename /people to /plaintiffs in this PR. /people is still the broader person/profile namespace; a later PR can add /plaintiffs as a focused conversion/gallery route once /people has a true general directory.

Summary by CodeRabbit

  • Documentation

    • Added a UI design and review checklist to AGENTS.md for public and authenticated interfaces.
  • UI / Content Updates

    • Updated site copy to reference "Humanity v. Government" across people flows, profile pages, and empty states.
    • Renamed navigation and management labels to "Plaintiffs" and "Your Plaintiffs".
  • Profile & Evidence

    • Unified profile summary cards, clarified evidence messaging, and updated evidence package download text.
  • Footer & Layout

    • Modernized footer with a responsive column layout and simplified bottom section.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
optimitron-wishonia Ignored Ignored May 6, 2026 5:27am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

📝 Walkthrough

Walkthrough

Renames and copy updates shift product language to “Plaintiffs” and reference the class action “Humanity v. Government.” UI components, pages, and site footer/config were updated (text, small behavior tweaks, sorting, responsive footer rendering). A new "Mike UI Complaint Checklist" was added to AGENTS.md. No public API function signatures were added or removed.

Changes

Plaintiffs / Represented People UI

Layer / File(s) Summary
Data / Server
packages/web/src/lib/represented-people.server.ts
Added multi-level sorting for "recent" (image presence desc nulls-last, then createdAt desc); explicit CAUSE_OF_DEATH enum check for top condition; append brandName to interventionName when present.
Core UI Logic
packages/web/src/components/people/PersonFaceTile.tsx, packages/web/src/components/people/ManageRepresentedPeopleClient.tsx
lifeStatus messaging changed; photo area shows initials when no image and adaptive upload/change/uploading labels; cause/category and death field labels adjusted; evidence kinds updated; delete button shows "Deleting" state.
Pages / Wiring
packages/web/src/app/people/page.tsx, packages/web/src/app/people/[id]/page.tsx, packages/web/src/app/people/manage/page.tsx
Global copy changed to reference "Plaintiffs" and "Humanity v. Government"; summaryCards added to person profile; evidence package copy and download label updated; pageSize=24 added to gallery fetch; UI text/empty states and some conditional render gating adjusted.
Filter / Small UI
packages/web/src/components/people/PeopleFilterBar.tsx
Filter panel header changed to use SlidersHorizontal icon and new compact/absolute-positioned panel styling and label "Filter".
Tests
packages/web/src/config/__tests__/site-variant-ui.test.ts
Removed validation block for footer.sourceLink in site variant UI tests.

Footer, Site Config, and Exports

Layer / File(s) Summary
Public Types / Config
packages/web/src/lib/site.ts
Added optional sourceLink?: NavItem to SiteFooterConfig; replaced exported githubLink with footerAppLinks; updated several footer configurations' bottomText/brandDescription values to dynamic copyright strings and new text.
Footer Component
packages/web/src/components/Footer.tsx
Imported getSiteConfig and site types; introduced FooterColumnLinks helper; reworked responsive footer rendering (collapsible columns on small screens, blocks on large screens); simplified bottom/contact rendering and removed source link handling.
Exports / Routes
packages/web/src/lib/routes.ts
Updated peopleLink and peopleManageLink labels, descriptions, taglines, and CTA text to use plaintiffs terminology.
Tests
packages/web/src/config/__tests__/site-variant-ui.test.ts
Removed conditional footer.sourceLink validation to align with the new optional sourceLink field.

Documentation

Layer / File(s) Summary
Docs
packages/web/AGENTS.md
Inserted "Mike UI Complaint Checklist" section (12 bullet guidelines) to AGENTS.md (lines 43–61).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 A rabbit hopped through docs and code today,
"Plaintiffs" now march where the old words lay,
Footers reshape and profiles show the case,
A checklist tucked in AGENTS took its place,
Hooray — a small hop forward, neatly made.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Title check ✅ Passed The title 'Clean up plaintiff workflow and footer UI' accurately reflects the main changes: comprehensive updates to plaintiff-related pages (people, manage, profile) and footer refactoring, addressing both workflow improvements and UI structural changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/mike-ui-complaint-checklist

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 and usage tips.

@claude
Copy link
Copy Markdown

claude Bot commented May 6, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mikepsinn mikepsinn changed the title Document UI complaint checklist Clean up plaintiff conversion pages May 6, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
packages/web/src/components/Footer.tsx (1)

26-30: 💤 Low value

Use replaceAll so multiple {year} placeholders all substitute.

String.prototype.replace with a literal string replaces only the first match. No current config uses {year} more than once, but replaceAll is the same cost and avoids a future footgun (e.g. "© {year} … rev. {year}").

♻️ Proposed change
   const bottomText =
     config.bottomText.trim().length > 0
-      ? config.bottomText.replace("{year}", String(year))
+      ? config.bottomText.replaceAll("{year}", String(year))
       : `© ${year} ${site.organizationName}.`;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/web/src/components/Footer.tsx` around lines 26 - 30, The bottomText
construction uses config.bottomText.replace("{year}", String(year)) which only
replaces the first occurrence; change it to use replaceAll (i.e.,
config.bottomText.replaceAll("{year}", String(year))) so every "{year}" token is
substituted (refer to the bottomText constant, the year variable, and
config.bottomText in Footer.tsx); ensure the runtime environment supports
String.prototype.replaceAll or add a small fallback if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/web/src/app/people/`[id]/page.tsx:
- Around line 88-96: Extract the duplicated label logic into a single helper and
import it where needed: move the implementation of getRepresentedLifeStatusLabel
(the mapping for PersonLifeStatus -> string) into a new shared module (e.g.,
lib/represented-life-status.ts) and export it, remove the local copy in
packages/web/src/app/people/[id]/page.tsx and delete the identical
lifeStatusBadge logic from PersonFaceTile.tsx, then replace both usages to
import and call the shared getRepresentedLifeStatusLabel function (ensure you
import PersonLifeStatus enum where required).

In `@packages/web/src/components/people/PeopleFilterBar.tsx`:
- Around line 137-147: The details open state is currently tied to hasFilter,
causing the panel to collapse when Clear flips hasFilter to false; replace that
coupling by adding a local state (e.g., const [isOpen, setIsOpen] =
useState<boolean>(hasFilter)) and use {...(isOpen ? { open: true } : {})} on the
<details> element instead of hasFilter. Update the Clear handler (the function
that runs on the "Clear" click) so it clears filters but does not set isOpen to
false, and add a useEffect that sets setIsOpen(true) when hasFilter becomes true
(so applying a filter opens the panel). Ensure summary toggles still call
setIsOpen(!isOpen) (or rely on onToggle) so the user can open/close the panel
independently of hasFilter.

In `@packages/web/src/lib/represented-people.server.ts`:
- Around line 275-283: The "recent" ordering currently returns an orderBy that
uses person.image with a nulls: "last" option (case "recent" -> person.image),
which is unsupported in Prisma 7.x and causes P2009; fix it by removing the
nulls option or by moving the nullable field to a top-level order (e.g., order
by personId image presence or createdAt) so you do not traverse a relation with
nulls, and update the return for case "recent" (the block returning person: {
image: { sort: "desc", nulls: "last" } }, { createdAt: "desc" }) to instead use
a supported ordering expression without nulls or a different top-level scalar.

---

Nitpick comments:
In `@packages/web/src/components/Footer.tsx`:
- Around line 26-30: The bottomText construction uses
config.bottomText.replace("{year}", String(year)) which only replaces the first
occurrence; change it to use replaceAll (i.e.,
config.bottomText.replaceAll("{year}", String(year))) so every "{year}" token is
substituted (refer to the bottomText constant, the year variable, and
config.bottomText in Footer.tsx); ensure the runtime environment supports
String.prototype.replaceAll or add a small fallback if needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 82d71663-b7d5-487b-9d1f-5980f59ee667

📥 Commits

Reviewing files that changed from the base of the PR and between 9dfef33 and 9089630.

📒 Files selected for processing (11)
  • packages/web/src/app/people/[id]/page.tsx
  • packages/web/src/app/people/manage/page.tsx
  • packages/web/src/app/people/page.tsx
  • packages/web/src/components/Footer.tsx
  • packages/web/src/components/people/ManageRepresentedPeopleClient.tsx
  • packages/web/src/components/people/PeopleFilterBar.tsx
  • packages/web/src/components/people/PersonFaceTile.tsx
  • packages/web/src/config/__tests__/site-variant-ui.test.ts
  • packages/web/src/lib/represented-people.server.ts
  • packages/web/src/lib/routes.ts
  • packages/web/src/lib/site.ts
💤 Files with no reviewable changes (1)
  • packages/web/src/config/tests/site-variant-ui.test.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/web/src/app/people/manage/page.tsx

Comment thread packages/web/src/app/people/[id]/page.tsx Outdated
Comment thread packages/web/src/components/people/PeopleFilterBar.tsx
Comment thread packages/web/src/lib/represented-people.server.ts Outdated
@mikepsinn mikepsinn changed the title Clean up plaintiff conversion pages Clean up plaintiff workflow and footer UI May 6, 2026
@mikepsinn mikepsinn merged commit 1d4e185 into main May 6, 2026
8 checks passed
@mikepsinn mikepsinn deleted the feature/mike-ui-complaint-checklist branch May 6, 2026 05:39
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