fix: resolve 10 E2E bugs + add desktop Playwright tests#21
Merged
wesbillman merged 4 commits intomainfrom Mar 10, 2026
Merged
Conversation
Bug 1 (critical): create_channel MCP tool now uses REST POST /api/channels instead of Nostr kind:40 event that relay ignored Bug 2 (critical): send_message routed through REST instead of WebSocket, eliminating ~5min timeout/disconnect failures Bug 3 (critical): set_canvas now includes both 'channel' and 'e' tags so desktop subscriptions receive canvas updates Bug 4 (medium): list_channels visibility filter now applied in SQL query Bug 5 (medium): thread reply counters fixed — INSERT IGNORE ensures parent/ root thread_metadata rows exist before incrementing reply_count Bug 6 (medium): workflow SendMessage action implemented via REST POST to relay instead of being a no-op stub Bug 7 (low): documented intentional NIP-29 permission asymmetry between update_channel (admin) and set_topic/set_purpose (any member) Bug 8 (low): set_profile now accepts 'about' field for agent bios Bug 9 (build): removed cfg gate on derive_pubkey_from_username so release builds compile Bug 10 (pre-existing): API token auth implemented — relay now intercepts sprout_ tokens for both WebSocket (NIP-42) and REST (Bearer) paths, hashes and verifies against api_tokens table
…ntegration New test files: - channels.spec.ts (8 tests): sidebar display, channel creation, switching, empty state, channel types - messaging.spec.ts (9 tests): send/receive, input clearing, Enter key, cross-channel independence, DM messaging, day dividers - integration.spec.ts (8 tests): relay-backed channel creation, multi-user message delivery, DM channels, forum display, channel independence Updated playwright.config.ts to include new test files in smoke and integration projects. All 24 smoke tests pass (8 channels + 9 messaging + 7 original).
…flow auth Crossfire review (codex, 3/10) identified four issues. Addressed: 1. Author identity in read paths: REST-created messages are relay-signed with the real sender in a p tag. Added effective_author_bytes() helper and applied it in list_messages and get_thread responses so pubkey reflects the actual sender, not the relay. 2. Bug 8 end-to-end: added 'about' column to users table (migration), updated DB layer with dynamic SET builder, relay handler accepts and persists the field, get_profile returns it. 3. Workflow SendMessage auth: now checks SPROUT_API_TOKEN first (Bearer), falls back to SPROUT_RELAY_PUBKEY (X-Pubkey). Documented production limitation with TODO(WF-07). 4. MCP send_message: kind parameter now passed through to REST body instead of being silently dropped after the WS-to-REST migration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all 10 bugs discovered during multi-agent E2E testing and adds comprehensive desktop Playwright e2e tests.
Bug Fixes (10/10)
create_channelMCP sent Nostr event instead of RESTPOST /api/channelssend_messageWebSocket died after ~5minset_canvasmissingetag (invisible to desktop)["e", channelId]taglist_channelsvisibility filter ignoredget_threadreturnedtotal_replies: 0send_messagewas a no-op stubset_profilemissingaboutfield#[cfg(...)]fromderive_pubkey_from_usernamesprout_tokens beforeverify_auth_event()for both WS + RESTDesktop Playwright E2E Tests
channels.spec.tsmessaging.spec.tsintegration.spec.tsResults: 24/24 smoke ✅ · 16/17 integration ✅ (1 pre-existing flaky scroll test in
stream.spec.ts)Crossfire Review Fixes
Addressed codex review feedback:
effective_author_bytes()resolves relay-signed messages to real sender in list/thread responsesSPROUT_API_TOKENBearer token for production, falls back toX-Pubkeyfor devFiles Changed
Testing
cargo check --workspace✅cargo check --release✅pnpm build(desktop) ✅