Skip to content

Unified mail inbox with city replies (#138) - #36

Merged
theobong merged 6 commits into
mainfrom
feat/unified-mail-inbox
Sep 23, 2026
Merged

theobong merged 6 commits into
mainfrom
feat/unified-mail-inbox

Conversation

@theobong

Copy link
Copy Markdown
Member

Part of civfix/issue-tracker#138

What changed

The admin Inbox becomes one list of city replies and all other mail sent to CivFix, with filters for unread, replies, replies that need review, unmatched and archived mail. Opening a reply shows its whole thread. Admin.

Before you start

  • Where: staging (admin.civfix.dev) after the main push
  • Sign in as: operator
  • Data: a city reply on a report thread and on an event thread, a withheld reply, and an unread email; staging shows only the replies and emails it already holds
  • Stacked on: Mail reader shows the sender check and reply publication (#138) #35 (review only this PR's own diff; test with it merged)
  • Size: 400 counted lines, 146 of them tests: the feed list, its filters and the reader for reply rows only work together

Verify

[Admin]

  1. On the Dashboard, click the "Mail" tile header, then "Inbox" — Expect: chips "All", "Unread", "Replies", "Needs review", "Unmatched" and "Archived"; the search box reads "Search sender, subject, org…".
  2. On "All", find a city reply — Expect: the row shows the city org, a "Report reply" or "Event reply" tag, and a "Published", "Publishing" or "Withheld" pill; email rows show "Unread", "Read" or "Archived".
  3. Click a "Report reply" row — Expect: the whole thread opens with "View report", the sender-check and publication pills, "Mark replied" and "Reply"; the row stops being bold.
  4. Click an "Event reply" row, then "View event" — Expect: the Events page opens on that event.
  5. Click "Replies" — Expect: only reply rows are listed.
  6. Click "Needs review" — Expect: only replies with the "Withheld" pill are listed.
  7. Click "Unmatched", then open an email — Expect: only emails are listed; the reader shows "Mark read" and "Archive".
  8. Click "Archived" — Expect: only archived emails are listed.
  9. Click a chip that holds nothing — Expect: its own empty message, for example "Nothing to review" / "Replies held back from a report chat or event show up here." on "Needs review", or "All caught up" on "Unread".
  10. Type a city org name in the search box — Expect: that org's reply rows are found; a search matching nothing shows "Nothing matches".
  11. On "Unread", click an unread reply — Expect: the row leaves the list, and the reader stays on that thread.
  12. On "Needs review", open a reply and click "Mark replied" — Expect: toast "Marked replied"; the row leaves the list, and the reader stays open with "Replied" in its header.
  13. With a reply open on "All", click "Unmatched" — Expect: the reader moves to the first unmatched email.

Regression

Outreach folder — [Admin]

  1. Click "Outreach" — Expect: chips "All", "Inbound", "Outbound" and "Needs attention", search box "Search org, subject, sender…", threads as before.
  2. Switch between "Outreach" and "Inbox" — Expect: the chip resets to "All" and the search box clears.

Handling an inbox email — [Admin]

  1. On "Inbox", open an unread email and click "Mark read" — Expect: toast "Marked read".
  2. Click "Archive" — Expect: toast "Archived"; the email is listed under "Archived".

Replying from the Inbox — [Admin]

  1. Open a reply row, type in the "Reply to …" box and click "Reply" — Expect: toast "Reply sent to "; the same thread under "Outreach" shows the reply.

Outreach actions update the Inbox — [Admin]

  1. On "Outreach", click "Mark replied" on a thread that has a city reply, then click "Inbox" — Expect: that reply row shows the new status without a reload.

Compose and threads opened from a report — [Admin]

  1. Click "Compose" and send a message — Expect: toast "Message sent to "; the page switches to "Outreach".
  2. On a report, click "View conversation →" — Expect: "Outreach" opens with that thread.

Not covered

  • "Load more" needs more than 25 inbox items, which staging does not hold.
  • The "Publish reply" button arrives in its own PR.

Base automatically changed from feat/mail-reply-verdict-badges to main September 23, 2026 22:24
# Conflicts:
#	apps/admin/src/features/inbox/inbox-views.tsx
#	apps/admin/src/features/mail/mail-page.tsx
@theobong
theobong merged commit 2f6e4eb into main Sep 23, 2026
1 check passed
@theobong
theobong deleted the feat/unified-mail-inbox branch September 23, 2026 22:31
@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

No actionable issues were identified, and the focused behavioral and type checks passed; the change is safe to merge.

What we checked:

  • Validated inbox-related features by running source-aware Inbox selection, unread-reply retention, stale-selection handling, pagination, and cache invalidation tests; all 10 assertions passed. T-Rex
  • Verified the admin application typechecks successfully and confirmed the backend feed contract exposes distinct email and reply sources, reply thread IDs, and unread filtering. T-Rex
  • Attempted authenticated browser interaction but the local API refused authentication requests at 127.0.0.1:18080, blocking further steps. T-Rex
  • Created and reviewed focused evidence artifacts for unified admin inbox testing, including scripts, browser capture data, videos, posters, and logs; browser logs showed net::ERR_CONNECTION_REFUSED when attempting session exchange. T-Rex

Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..."

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