P14d: guest display names for players
- Players set a display name in the session panel ("Your name"); it persists
(sessionStore.guestName) and is sent via a new `setName` message on join + edit.
- Server stores the name per connection and uses it in the roster + chat; the roster
entry now also carries the player's character, so the GM sees "Alice · Lia".
- Realtime e2e: a player names themselves and the GM's roster/share update to match.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,11 @@ test('GM hosts a session; a player on another device sees live combat', async ({
|
||||
await player.getByRole('button', { name: 'Open session panel' }).click();
|
||||
await expect(player.getByText(/Who's here \(2\)/)).toBeVisible(); // host + player visible to everyone
|
||||
|
||||
// Guest name: the player names themselves; the GM's roster updates (share button is per-name).
|
||||
await player.getByLabel('Your display name').fill('Alice');
|
||||
await player.getByLabel('Your display name').blur();
|
||||
await expect(gm.getByRole('button', { name: 'Share with Alice' })).toBeVisible({ timeout: 8000 });
|
||||
|
||||
// Chat: a GM table message reaches the player; the player's reply reaches the GM.
|
||||
await gm.getByLabel('Chat message').fill('Welcome adventurers');
|
||||
await gm.getByRole('button', { name: 'Send' }).click();
|
||||
|
||||
Reference in New Issue
Block a user