Skip to content

feat(backoffice): an account's player page lists its chat messages - #439

Merged
raphoester merged 6 commits into
mainfrom
claude/backoffice-player-messages
Oct 20, 2026
Merged

raphoester merged 6 commits into
mainfrom
claude/backoffice-player-messages

Conversation

@raphoester

@raphoester raphoester commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Follows #437 (merged): the player page gets the same conversations view.

What

The player page of an account now shows what it said in the chat, the same way the report detail does since #437: "What Ana said". It shows her messages inside their conversations, three at a time, and "Show more conversations" loads the next three. Her lines are marked (line-theirs). An address gets no messages panel, because the chat keeps messages by account.

How

  • Conversation, TheirMessages, theirConversations.ts and chatPages.ts move from src/reports/ to src/chat/. Both pages use one copy.
  • The tags are optional (parties: Parties | undefined). The player page has no report, so it tags no line. The report page did not change.
  • keptOf moves into MessagePanel.tsx, its only user. It is about a report.
  • App's OpenPlayer keeps the player that is already open. Before, the player's own name in its messages opened the same player again and dropped its ledger row (last take, ban line, stats, address).

Checks

  • npm run lint, npm run build and npm test (135 tests, after merging main) pass in apps/backoffice.
  • New jsdom tests go through the player page with FakeAdmin. They check the conversations read by account id, with no tags, and that an address makes no call.
  • Local preview, before the merge of 091cc90 (backend + postgres + npm run dev, the recipe in apps/backoffice/CLAUDE.md): the list, a removed message struck through, the conversation around a message, Ana's own name keeps her page, and Bob's name opens his. The conversations view after the merge is covered by the tests only.
  • The OpenPlayer change in App has no test: App reads WhoAmI from the real client.

🤖 Generated with Claude Code

raphoester and others added 2 commits October 20, 2026 16:44
A report from a player's card names no message, so the operator could
not read what the player said. ListMessages takes an account id: that
account's messages alone, the cursors included. The report detail
lists them, newest first, and opens the conversation around each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The player page counted an account's messages and could not show
them. It now lists them as a report does, newest first, each with the
conversation around it. Conversation and TheirMessages move to
src/chat, which both pages use. Off a report there is no reporter, so
the tags are optional, and the player page tags no line. Opening the
player already open keeps its row: its own name in its messages opens
it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@raphoester
raphoester added this pull request to stack #440 October 20, 2026 15:11
raphoester and others added 2 commits October 20, 2026 17:22
Each message of the reported player came alone, its conversation
behind a click. The panel now reads the chat around each and shows
the conversations at once, three at a time. A message one already
holds needs none of its own, and two that touch join, so an exchange
is one conversation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ges' into claude/backoffice-player-messages

# Conflicts:
#	apps/backoffice/CLAUDE.md
#	apps/backoffice/src/chat/TheirMessages.tsx
Base automatically changed from claude/backoffice-reported-messages to main October 20, 2026 16:05
…yer-messages

# Conflicts:
#	apps/backoffice/CLAUDE.md
#	apps/backoffice/src/chat/Conversation.tsx
#	apps/backoffice/src/reports/MessagePanel.tsx
#	apps/backoffice/src/reports/ReportDetail.test.tsx
#	apps/backoffice/src/reports/TheirMessages.test.tsx
…yer-messages

# Conflicts:
#	apps/backoffice/CLAUDE.md
#	apps/backoffice/src/players/PlayersPage.test.tsx
@raphoester
raphoester merged commit 278b667 into main Oct 20, 2026
1 check 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