Skip to content

Keep a thread with a withheld city reply in Needs review (#138) - #115

Merged
theobong merged 2 commits into
mainfrom
fix/withheld-reply-stays-in-review
Sep 24, 2026
Merged

theobong merged 2 commits into
mainfrom
fix/withheld-reply-stays-in-review

Conversation

@theobong

Copy link
Copy Markdown
Member

Part of civfix/issue-tracker#138

What changed

A mail thread with a city reply that was held back from the public chat now stays under "Needs review" until an operator publishes that reply or clicks "Mark replied". A later verified city reply, an operator's own reply, or publishing a different held-back reply no longer takes it out. "Mark replied" keeps the held-back reply dismissed, and a city reply whose text was all cut is recorded once. Admin.

Before you start

  • Where: staging (admin.civfix.dev) after the main push
  • Sign in as: operator
  • Size: 378 counted lines, 205 of them tests: one rule settles the thread, and every path that used to take a held-back reply out of review (a later city reply, an operator reply, publishing one of two) moves to it together, so no path is left broken

Verify

Staging cannot receive a city's email reply, so no screen can put a thread under "Needs review" there; "Not covered" says how it was checked.

Regression

Replying on a mail thread — [Admin]

  1. Open "Mail", stay on "Outreach" and open a thread with no held-back reply.
  2. Type a message in the "Reply to …" box and click "Reply" — Expect: toast "Reply sent to "; the status pill in the open thread reads "Replied".
  3. Click "Mark replied" — Expect: toast "Marked replied"; the pill still reads "Replied".

Threads that need attention — [Admin]

  1. On "Outreach", choose "Needs attention" — Expect: the list loads as before.

Replies waiting for review — [Admin]

  1. Click "Inbox", then "Needs review" — Expect: the list loads as before, or reads "Nothing to review" when nothing is held back.

Not covered

  • A city reply arriving by email. Checked by the automated suites: after a held-back reply, a later verified reply on a report or an event thread, an operator reply, or publishing one of two held-back replies leaves the thread under review; after "Mark replied", a later reply leaves it replied; a reply whose text was all cut flags the thread and is recorded once, even when its processing is retried.

@theobong
theobong merged commit 2193570 into main Sep 24, 2026
3 checks passed
@theobong
theobong deleted the fix/withheld-reply-stays-in-review branch September 24, 2026 01:16
@greptile-apps

greptile-apps Bot commented Sep 24, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

Safe to merge: the reviewed settlement paths preserve review status correctly and create the stripped-reply audit record once.

What we checked:

  • Ran the PostgreSQL mail-repository integration coverage with PostgreSQL required; all 14 checks passed. T-Rex
  • Added and ran a focused PostgreSQL check that concurrently settled inbound and operator replies while a withheld reply remained unresolved, and re-driven stripped-reply settlement to confirm the thread remained in review, effects advanced once, and exactly one audit row was stored. T-Rex
  • Reviewed the settlement artifacts: the before-settlement suite output, the authored concurrency test source, and the after-settlement test output; confirmed that the authored test was removed from the working tree after execution and no production code was modified. T-Rex

Reviews (1) · Last reviewed commit: "Settle an operator reply by the review r..."

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