Skip to content

Offer every commentable record in the "Log it against" picker - #2555

Merged
maebeale merged 1 commit into
mainfrom
maebeale/log-missing-registrations
Sep 24, 2026
Merged

maebeale merged 1 commit into
mainfrom
maebeale/log-missing-registrations

Conversation

@maebeale

@maebeale maebeale commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 5 Inspect 🔬 adds comment associations to 5 models plus a new shared service and aggregator/picker changes

Staff couldn't find all associated items in the "Log it against" dropdown, so this pr brings in more records.

Admins can now log a note or communication against any record a person is tied to — the "Log it against" composer had drifted to a curated subset, so form submissions, affiliations, staff tags, reports, and the workshop/story records a person is credited on couldn't be filed against even though the feed's "Attached to" filter already listed them.

What is the goal of this PR and why is this important?

  • The composer picker only offered a handful of record types, so notes/communications about the rest had nowhere to hang.
  • It now offers the complete set the feed can carry, matching the "Attached to" filter.

How did you approach the change?

  • One source of truth. The picker, the feed aggregator (PersonCommentAggregator), and the label helpers must agree or a filed note silently vanishes from the feed. Routed the non-obvious "credited to a person" logic through a new shared PORO (PersonCreditedRecords) so they can't drift.
  • Made the missing records commentable. Reports and the workshop family were communication-only; added the has_many :comments, as: :commentable wiring the other targets already had (Report covers MonthlyReport via STI).
  • Labels/links/chips for each new type, plus a reports domain color (already safelisted).

Anything else to add?

  • Red-green throughout; feed specs (49), the five models' specs (303), and DomainTheme all pass, lint clean.
  • Note for reviewers: the picker lists every credited record individually, so a prolific facilitator gets a long <select> — grouping is a possible follow-up, not done here.

🤖 Generated with Claude Code

  • Adds a Features & tips (/features) entry so admins can discover the expanded picker.

The composer's target list had drifted from what a person's feed can
actually carry: form submissions, affiliations, staff tags, and the
reports/workshops/stories a person is credited on were all missing, so
admins couldn't file a note or communication against them even though the
"Attached to" filter already recognized those types.

Route the picker, the feed aggregator, and the label helpers through one
shared source of truth (PersonCreditedRecords) so the three lists can't
drift again, and give the previously comment-less records (reports and the
workshop family) the commentable wiring the other targets already had.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@maebeale
maebeale marked this pull request as ready for review September 21, 2026 02:31
@maebeale maebeale changed the title Offer every commentable record in the "Log it against" picker JM: Offer every commentable record in the "Log it against" picker Sep 21, 2026
@maebeale
maebeale requested a review from jmilljr24 September 21, 2026 02:45
@maebeale maebeale changed the title JM: Offer every commentable record in the "Log it against" picker Offer every commentable record in the "Log it against" picker Sep 24, 2026
@maebeale
maebeale merged commit 5d61790 into main Sep 24, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/log-missing-registrations branch September 24, 2026 05:06
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