Quotes: rename body, add author + standout, preserve original submission - #2314
Merged
Conversation
Preserve the untouched submission separately from the published quote so curating what's shown never loses what was received, and give staff a "standout" flag (with an admin-only filter) to surface the best quotes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Align Quote with the other author models: rename the `quote` column to `body`, adopt AuthorCreditable, and add an optional `author` (Person). Most quotes come from participants who aren't people in the DB, so the free-text `speaker_name` stays as the legacy fallback and remains searchable alongside the linked author's name and the quote body. Also renames the earlier `original_quote` column to `original_body` for consistency with the new body name. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d by Complete the AuthorCreditable adoption for quotes: - Add nullable created_by / updated_by (User) associations, set on the quotes controller create/update. - Surface the admin credit-preference selector, note, and warning on the quote form (mirrors the other author forms), and permit the param. - List quotes on the author-credit divergences page: add Quote to the query allowlist and make the query tolerate models with no created_by (quotes may have none), so the legacy speaker_name section can retire free-text credits into linked people. Keyword search already matches the linked author name and speaker_name, so no separate author filter box is added. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
marked this pull request as ready for review
August 22, 2026 11:30
Revert the divergences integration for quotes: remove Quote from the query allowlist (restoring the query to its prior state) and drop the now-dangling admin credit-preference selector from the quote form, since its whole purpose is the divergences reconciliation flow. Quotes keep the author link, the searchable legacy speaker_name, and the created_by/updated_by columns; only the divergences surfacing is removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add sector/category checkbox toggles to the quote form (mirroring the workshop and community-news forms) and persist them via the shared TagAssignable concern — save the quote first, then assign taggings, since the polymorphic CategorizableItem requires a persisted parent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a data-driven "Source" dropdown to the quotes index that filters by the polymorphic quotable_type (Workshop, Workshop log, Report, …), with options built from the sources that actually exist. Also add an admin-gated "Quotes" back-link on the quote show page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
added a commit
that referenced
this pull request
Aug 22, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
added a commit
that referenced
this pull request
Aug 22, 2026
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
maebeale
added a commit
that referenced
this pull request
Aug 22, 2026
* Add StaffTag: internal admin-only tagging for people Staff tags are admin-curated, internal labels for talent pipelines, rosters, and outreach (e.g. potential future trainers, cohort candidates). Modeled on the TopicSubscription shape but kept separate so these sensitive, never-public designations can't leak into any comms/export flow. - StaffTag + polymorphic StaffTagging join + StaffTaggable concern (Person) - Admin-only CRUD (mirrors category_types) with archive/unarchive - Assign on the person form; filter the people index by staff tag Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add StaffTag specs, docs, and feature-catalog entry Model/join/policy/decorator/request specs (incl. person form assignment, people-index filter, archived-tag preservation, and admin gating), the Features & tips seed entry, and AGENTS.md model/concern catalog updates. Tailwind class order normalized on touched views. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * StaffTags UI polish: reorder person form, green Active pill, precompute index counts - Person form: workshop settings now render below the staff tags section - Staff tags index: Active status pill is green (was reading as a red error), tag names/checkboxes use neutral styling instead of the rose identity color - Precompute people-tagged counts in one grouped query (no COUNT per row) The /people index itself has no staff-tag N+1: tags aren't rendered per row, only used by the filter (one dropdown query + one JOIN when applied). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * StaffTags: cocoon chip picker on person form + index cleanup Person form: replace the checkbox grid with a sectors/age-ranges-style chip picker — a '➕ Add staff tag' button reveals a dropdown of the active tags not yet applied, each chip removable. Backed by staff_taggings nested attributes; created_by is stamped from Current.user so the audit survives the switch away from the hand-rolled sync. Staff tags index: tag name links straight to the edit screen; dropped the per-row Edit/Archive buttons (archive/unarchive now live on the edit form). The 'People tagged' count already deep-links to the filtered people index with the tag pre-selected in the filter dropdown (result_src carries the query string; the select reads the same param). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * StaffTags: use admin (blue) styling instead of the rose domain tint Person-form staff tags panel goes back to the admin-only bg-blue-100 treatment; staff tags index inner card is a clean white card on the blue admin wrapper. Removes the now-unused :staff_tags rose entry from DomainTheme. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * StaffTags: surface created_by/updated_by and track updated_by on taggings - Show/edit pages render the shared audit_info (created/updated by + Ahoy link) - StaffTag show lists each tagging with who applied it and when - StaffTagging gains updated_by (stamped from Current.user alongside created_by) Note: all models are already Ahoy-tracked via ApplicationRecord, so the audit partial's activity link resolves for these too — no opt-in needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Seed the canonical StaffTags in all environments Add StaffTag::SEED (the pipeline/roster/outreach tags we've been building around) and seed them idempotently in db/seeds.rb via find_or_create_by_name! so it never overwrites an admin's edits. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * StaffTags: published/Publishable language instead of archived; trim comments - StaffTag uses the Publishable concern (published boolean) like sectors and categories; drops archived_at, the archive/unarchive actions/routes, and the bespoke scopes. Managed via a published visibility flag on the edit form. - Status reads Published/Unpublished; pickers offer published tags, an already-applied unpublished tag stays on its chip. - Pare back the explanatory comments across the staff-tag code to the few load-bearing 'why' lines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Show StaffTags in admin-only sections on the Tags and Taggings pages Both /tags and /taggings gain an admin-only Staff tags section (blue admin styling) listing published tags as chips that deep-link to the filtered people roster. Gated by StaffTagPolicy — the relation scope returns none for anyone but super-admins, so the section is invisible to public visitors. Kept it a link-out to the existing people filter rather than wiring a Person-only case into TaggingSearchService. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add adaptive eyebrow back links to the people roster from staff-tag entry points The people index now renders a back link that adapts to where the roster was opened from — the staff tags index (← Staff tags), a tag's detail page (← <tag name>), or the Tags/Taggings browse sections — via a return_to param on each originating link. Also trims the staff tags index subtitle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Staff tag form: move the Visibility box to the right, matching the quotes form Two-column md:grid-cols-4 layout — name/description on the left, the published visibility panel on the right instead of stacked full-width below. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Staff tag form: staff-tag-specific published hint Add a staff_tag_published visibility definition (Offered in the tag pickers / admin-only either way) instead of the generic 'Visible to signed-in users' copy, which was misleading for these admin-only tags. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Strip explanatory comments from the staff-tag code Remove the restating comments (relation_scope note, grouped-query note, model headers, the eyebrow/collection notes) per the default-to-no-comment style. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Move StaffTag seed data out of the model into db/seeds.rb Inline the starter-tag hash where it's seeded rather than as a model constant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Staff tag pages: left ← Staff tags back-arrow eyebrow Move the back-to-index link to a left-aligned '← Staff tags' arrow on the show/edit/new pages (was a right-aligned Home/Staff tags/… cluster), matching the people-index back-nav. Keep the page's own action (Edit / View) on the right. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Regenerate schema.rb after rebasing onto the quotes migrations (#2314) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 suggested review level: 5 Inspect 🔬 renames a load-bearing column (
quote→body), adopts AuthorCreditable, and adds sector/category tagging across models/controllers/views/seedsWhat
Column rename
quote→bodyeverywhere (model, decorator, controllers, nested report/workshop-log forms, seeds, search, order clauses).Preserved original submission
original_bodycolumn that keeps the participant's original text after edits; backfills lazily on next save (no data migration).Author on quotes (AuthorCreditable)
AuthorCreditableand adds an optionalauthor(Person), matching the other author models.speaker_namestays as the legacy free-text fallback (vialegacy_author_name_columns).created_by/updated_by(User), set on create/update.speaker_namereframed as the fallback.Sectors & categories
TagAssignableconcern (save first, then assign), since the polymorphicCategorizableItemneeds a persisted parent.Standout flag
standoutboolean: blue box in the form (like Visibility), admin-only filter on the index, yellow badge on index/show/tags grid.Index & navigation
quotable_item_quotes.quotable_type.Notes
TaggingSearchService) orders quotes by:bodypost-rename;QuoteDecorator#title/#detailstill resolve there.🤖 Generated with Claude Code