Skip to content

feat: downtime, what each character did between sessions (slice 25) - #26

Merged
dannyclarkdev merged 2 commits into
mainfrom
feat/downtime-slice-25
Sep 13, 2026
Merged

dannyclarkdev merged 2 commits into
mainfrom
feat/downtime-slice-25

Conversation

@dannyclarkdev

Copy link
Copy Markdown
Owner

What

Slice 25 of the P3 queue: downtime tracking.

  • downtime_activities: what a character did between sessions, a cost in days, an optional Markdown note, the session it happened around, and an optional start date in the world's calendar stored as three columns under GameDateCast. The end date is computed through Reckoning::add() and the row prints the range. Days are summed on every read, never stored.
  • Gated by the character's own gate: DowntimeActivity::scopeVisibleTo() is a whereIn over Entity::visibleTo(), so a GM-only character's rows never load for a player. The session link is loaded separately through GameSession::visibleTo().
  • DowntimeActivityPolicy: a player writes on their own PC, a GM on anyone, and editing follows the character rather than the author.
  • Downtime\Log is one component in three places: the character's page (a PC always, an NPC once it has a row), the session's page, and /downtime with a total per character. The date picker is the session form's, checked against the calendar the same way, and absent without a calendar.
  • The round trip: a new downtime section with both links remapped, the reader refusing a row whose character the file does not carry, and a "Downtime" section on the character's vault page.
  • The demo world has three rows in the fortnight between sessions 1 and 2.

Checks

  • 12 new tests. Full suite: 1434 tests, 1433 passing, 1 skipped. Larastan and Pint clean.
  • Browser pass from both seats, recorded in docs/plans/2026-09-13-feat-downtime-plan.md.

downtime_activities is a list per character: what they did, how many days it
cost, an optional Markdown note, the session it happened around, and, when
the campaign has a calendar, the day in the world it began, from which the
page prints the range it covered through Reckoning::add(). The days are
summed on every read, per character and for the campaign, and never stored.

A row is visible to whoever may see the character: scopeVisibleTo() is a
whereIn over Entity::visibleTo(), with no second switch. A player writes
their own PC's rows and a GM writes anyone's, the rule EntityPolicy::update()
already spells, and editing follows the character rather than the author.

Downtime\Log is one component on the character's page, the session's page,
and /downtime. The section travels in the export with both links remapped,
and lands on the character's page in the vault. The demo world has three
rows in the fortnight between the first two sessions.
@dannyclarkdev
dannyclarkdev merged commit d91c712 into main Sep 13, 2026
2 checks passed
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