rubyforgood / rubyforgood/awbw

Build the person + per-record activity timeline (maybe on PaperTrail?)

Open
#2,362 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

not-ready
Dominant language
Ruby
Stars
15
Forks
26
Avg merge
12h 42m
Merged PRs (30d)
242

Description

🤖 From Claude:

Background

PR #2245 makes PaperTrail the source of record-change activity and adds an indexed versions.subject_person_id populated across the registration cluster, money/membership models, and the person cluster (Person/Affiliation/Address/ContactMethod/Asset; Organization/Discount tracked but unscoped). It does not build the timeline itself — that's this issue.

Goal

Build the real activity timeline as a chronological interleave of three sources, each doing what it's best at:

  • PaperTrail — record changes (create/update/destroy, incl. deleted records)
  • Notifications — communications, read directly (not versioned)
  • Ahoy — visits + page/views (PaperTrail can't produce these)

Scope

  1. Person timeline — single indexed sweep PaperTrail::Version.where(subject_person_id: person.id).order(:created_at), merged with the person's Notifications and Ahoy visit/view events. Extend Analytics::PersonTimeline (already interleaves sources).
  2. Per-record timeline — a record's own versions plus its children's (query by item_type/item_id for the record + its dependent children). E.g. a registration timeline = the registration + its attendance entries, checklist completions, org links, CE regs, allocations, comments.
  3. Deleted-record viewer — versions persist after deletion but nothing surfaces them today (the Change Log partial reads a live record.versions). Add a view that queries the versions table directly.
  4. Presenter — render each version as a human line (event + changed fields + whodunnit); derive semantic labels where useful (see #2249 for User auth labels).

Then (separate cleanup, after this lands)

  • Retire the redundant Ahoy lifecycle/mutation tracking (AhoyTrackable) once PaperTrail fully covers it. Keep Ahoy's visit/view tracking — that's the piece only Ahoy does.

Related

  • Foundation: #2245
  • User semantic auth events: #2249

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Analytics::PersonTimeline and the existing Change Log partial, then review foundation PR #2245 and semantic auth events in #2249. The work is done when person and per-record timelines interleave PaperTrail, Notifications, and Ahoy events, deleted records are viewable from versions, and each version has a human-readable presenter.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
analytics, backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.