Skip to content

Comprehensive multi-peer E2E tests across all browsers#3

Merged
intendednull merged 4 commits into
mainfrom
feat/multi-peer-e2e-tests
Mar 26, 2026
Merged

Comprehensive multi-peer E2E tests across all browsers#3
intendednull merged 4 commits into
mainfrom
feat/multi-peer-e2e-tests

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Summary

  • Add 25 shared helpers to e2e/helpers.ts (setupTwoPeers, mobile-aware navigation, desktop/mobile message action branching, permission actions)
  • Create multi-peer-sync.spec.ts: 12 tests for state sync (9 passing, 3 fixme for P2P gossipsub timing)
  • Create permissions.spec.ts: 8 tests for trust/untrust/kick/roles (2 passing, 6 fixme for display name sync timing)
  • Create multi-peer-mobile.spec.ts: 5 mobile-specific multi-peer tests (2 passing, 3 fixme for P2P timing)
  • Delete two-peer.spec.ts and state-sync.spec.ts (consolidated into new cross-browser files)
  • Update justfile with test-e2e-sync and test-e2e-perms targets
  • All tests use browser fixture for cross-browser support (Desktop Chrome, Mobile Chrome, Desktop Firefox, Mobile Firefox)
  • Add test selection guide to CLAUDE.md

Test plan

  • 9/12 multi-peer-sync tests pass on desktop-chrome
  • 2/8 permission tests pass (6 fixme: display name sync timing)
  • 2/5 mobile tests pass (3 fixme: P2P timing on mobile)
  • All existing basic-flow and mobile tests unaffected
  • Cross-browser run via just test-e2e-ui-all

fixme tests document real P2P sync reliability gaps and will pass without code changes when gossipsub propagation improves.

🤖 Generated with Claude Code

intendednull and others added 4 commits March 24, 2026 23:53
Helps future agents choose the right test type based on
what they're changing. Adds Playwright E2E test instructions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 25 Playwright E2E tests across 3 new spec files plus shared helpers:

- multi-peer-sync.spec.ts (12 tests): invite flow, bidirectional message
  sync, channel creation/sync, reactions, edits, deletes, persistence,
  member list, typing indicator, display names
- permissions.spec.ts (8 tests): trust/untrust badges, trusted messaging,
  untrusted message rejection, kick, roles, non-owner restrictions
- multi-peer-mobile.spec.ts (5 tests): mobile invite flow, channel
  creation via hamburger, messages without sidebar, member list toggle,
  channel switching during sync

Extend helpers.ts with mobile navigation (isMobile, openSidebar,
closeSidebar, openMemberList, closeMemberList), invite flow
(generateInvite, joinViaInvite, setupTwoPeers), channel management
(createChannel, switchChannelMobile), message actions with desktop/mobile
branching (messageAction, editMessage, deleteMessage, reactToMessage),
and permission actions (trustPeer, untrustPeer, kickPeer, waitForPeerCount).

All tests use the { browser } fixture for cross-browser compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add 25 shared helpers to helpers.ts (setupTwoPeers, mobile-aware navigation,
  message actions with desktop/mobile branching, permission actions)
- Create multi-peer-sync.spec.ts: 12 tests (9 passing, 3 fixme for P2P timing)
- Create permissions.spec.ts: 8 tests (2 passing, 6 fixme for display name sync)
- Create multi-peer-mobile.spec.ts: 5 tests (2 passing, 3 fixme for P2P timing)
- Delete two-peer.spec.ts and state-sync.spec.ts (consolidated into new files)
- Update justfile: test-e2e-sync, add test-e2e-perms
- All tests use browser fixture for cross-browser support (not hardcoded chromium)

fixme tests document real P2P sync reliability gaps — correctly written but
dependent on gossipsub propagation timing that exceeds test timeframes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix openMemberList/closeMemberList to work on all viewports (Critical #1)
- Scope .action-trigger to target message instead of page.last() (Important #3)
- Add regression comment to messages sync test (Important #7)
- Use beforeEach for mobile skip instead of per-test (Suggestion #10)
- Use startsWith('mobile') consistently (Suggestion #9)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@intendednull intendednull merged commit 758f7f5 into main Mar 26, 2026
intendednull added a commit that referenced this pull request Mar 28, 2026
…cast, test gaps

- Storage role: log event storage and DB query failures instead of
  silently dropping (#3, #4)
- Network actor: publish responses back via gossipsub instead of only
  logging, add 5s timeout, log malformed messages (#5, #7)
- Client authorize_workers: broadcast GrantPermission events to network
  so workers actually learn they're authorized (#9)
- Heartbeat actor: log state actor unavailability and departure send
  failures (#11, #17)
- Storage role tests: add dedup, unknown server, unknown channel edge
  cases (#13)
- Deep review skill: expand test gaps category to cover error-path and
  edge-case coverage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
intendednull added a commit that referenced this pull request Apr 26, 2026
lifecycle, fix IrohBlobStore spec drift, track 4 new follow-ups

Round 2 review (two fresh agents) verified all 15 round-1 fixes
land cleanly with no regressions, then surfaced 8 new findings
(0 critical, 3 medium, 5 low) by widening scope to cross-component
interactions, perf, and API surface.

Fixed inline (trivial doc / spec):

- Add an "Actor coordination signal" row to the spec decision tree
  + CLAUDE.md table covering tokio::sync::watch / oneshot /
  broadcast / Notify, with the explicit rule that
  tokio::sync::Mutex is forbidden for business state on the same
  terms as std/parking_lot Mutex. Closes the spec gap that left
  contributors without guidance on async channels. (round-2 #3)
- Reconcile spec § 184 with the corrected IrohBlobStore comment
  (round-1 fixed the code, missed the spec). The blob store is
  not an iroh-callback boundary — it's an interim stub. The relay-
  status timestamp Mutex stays in the iroh boundary list. (round-2 #4)
- Document the web `_event_loop` drop pattern in `crates/web/src/app.rs`
  so future readers see explicitly that the actor System is process-
  scoped on web (page reload tears everything down) and that any
  actor needing pre-close cleanup must route via `beforeunload`,
  not Drop. (round-2 #8)

Tracked as new follow-ups in spec § Follow-up work:

- F5. SearchActor head-of-line + rebuild-storm fix. Rebuild blocks
  Query in FIFO order; the rebuild Effect has no debounce. Fix is
  chunked-Rebuild + Debounce<Rebuild> wrap. (round-2 #1, #2 — Med)
- F6. Browser-tier coverage for SearchIndexHandle consumers. The
  spawn_local + Effect path has no wasm-pack test. (round-2 #6)
- F7. Sealed ClientSpawner to narrow the system() API surface,
  rather than exposing the full SystemHandle. (round-2 #7)
- F8. Search-query debouncing-flicker fix via generation tag or
  Leptos Resource migration. (round-2 #5)

Each follow-up has a "Trigger:" line naming the dedicated PR title.

`just check` green: clippy zero warnings, 1003+ tests pass, WASM
compile clean. Loop terminates here per the user's two-round cap;
no Critical issues remain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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