Files
summercms/.planning/phases/20-demo-instance-with-every-shared-plugin/20-06-SUMMARY.md

22 KiB

phase, plan, subsystem, tags, requires, provides, affects, actuals, plan_head_before, plan_head_after, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, coverage, duration, completed, status
phase plan subsystem tags requires provides affects actuals plan_head_before plan_head_after tech-stack key-files key-decisions patterns-established requirements-completed coverage duration completed status
20-demo-instance-with-every-shared-plugin 06 tests, sm-demo-app checks, vue-demo-app header
tests
vitest
testcontainers
playwright
livekit
moderation
chat
forum
check-all
uat
phase provides
20-01 MessageSaving and PostSaving seams, golem15.moderation Filter
phase provides
20-02 the demo host (contexts, policies, bootstrap, seed, reset, realtime guard)
phase provides
20-03 vue-chat-layer v0.1.0
phase provides
20-04 vue-forum-layer, vue-userfriends-layer and vue-chatvideo-layer v0.1.0
phase provides
20-05 the chat family live on demo.summercms.io with its own LiveKit
Unit and database tests for the phase's new code in the plugin, layer and app repos that own it (SC-4)
check-chat.cjs --two and --call; check-local chatlive and callmedia (two browsers, a DM call with fake media through the local LiveKit)
check-all.sh runs the chat family's plugin suites, the four layer suites and the two-browser checks
The live header: every site link on the left (menu entries, Chat, Forum, member links), only the language switcher and Log in/Log out on the right
phase-20 verification
tokens tasks commits
82300 8 0
8a3ac87abb 8a3ac87abb
added patterns
sm-moderation-plugin: github.com/testcontainers/testcontainers-go v0.44.0 and github.com/jackc/pgx/v5 v5.10.0 as test-only dependencies (the decided versions the other plugins pin)
Fake LiveKit RoomService for Go tests: an httptest server answering /twirp/livekit.RoomService/* with empty protobuf bodies, so chatvideo's real RoomServiceClient path runs
Nuxt composables tested outside Nuxt by stubbing the auto-imported globals (useState, useNuxtApp, useChatApi, ...) over a fresh state per test
Two-browser Playwright checks with --use-fake-ui-for-media-stream and --use-fake-device-for-media-stream against the local LiveKit
created modified
../sm-moderation-plugin/classes/filter_test.go
../sm-moderation-plugin/classes/filter_internal_test.go
../sm-moderation-plugin/models/settings_test.go
../sm-moderation-plugin/plugin_test.go
../sm-chat-plugin/saving_test.go
../sm-forum-plugin/saving_test.go
../sm-demo-app/moderation_test.go
../sm-demo-app/chat_test.go
../sm-demo-app/video_test.go
../sm-demo-app/seed_chat_test.go
../sm-demo-app/plugins/demo/chatbots_test.go
../sm-demo-app/plugins/demo/classes/chat_context_test.go
../vue-chat-layer/app/lib/chatEvents.test.ts
../vue-chat-layer/app/lib/chatFormat.test.ts
../vue-chat-layer/app/lib/chatText.test.ts
../vue-chat-layer/app/lib/chatUnread.test.ts
../vue-chat-layer/app/lib/realtime.test.ts
../vue-chat-layer/app/lib/linkEmbeds.test.ts
../vue-chat-layer/app/lib/slots.ts
../vue-chat-layer/tests/client.test.ts
../vue-chat-layer/tests/store.test.ts
../vue-chat-layer/tests/support/http.ts
../vue-chatvideo-layer/tests/videoClient.test.ts
../vue-chatvideo-layer/tests/useCall.test.ts
../sm-demo-app/vue-demo-app/app/utils/communityAuth.ts
../sm-demo-app/vue-demo-app/app/utils/communityAuth.test.ts
../sm-demo-app/vue-demo-app/app/components/SiteNav.vue
../sm-moderation-plugin/go.mod
../sm-moderation-plugin/README.md
../sm-demo-app/boot_test.go
../sm-demo-app/realtime_test.go
../sm-demo-app/reset_test.go
../sm-demo-app/scripts/check-chat.cjs
../sm-demo-app/scripts/check-local.sh
../sm-demo-app/scripts/check-all.sh
../sm-demo-app/README.md
../sm-demo-app/plugins/demo/content/ROADMAP.md
../vue-chat-layer/vitest.config.ts
../vue-chat-layer/app/components/Chat/Header.vue
../vue-chat-layer/README.md
../vue-chatvideo-layer/tests/callMachine.test.ts
../vue-chatvideo-layer/README.md
../vue-forum-layer/tests/client.test.ts
../vue-userfriends-layer/tests/client.test.ts
../sm-demo-app/vue-demo-app/app/plugins/auth.ts
../sm-demo-app/vue-demo-app/app/components/SiteHeader.vue
../sm-demo-app/vue-demo-app/app/assets/css/site.css
../sm-demo-app/vue-demo-app/i18n/locales/en.json
../sm-demo-app/vue-demo-app/i18n/locales/pl.json
Task 6 checkpoint: push. The tests found no bugs, so there were no fixes, no tags and no fix release; only branch pushes.
Task 8 round 1: the user approved the chat (and the DM video call) on the live demo, and asked for Chat and Forum in the header with every feature link on the left and only the language switcher and Log out on the right
Chat and Forum are header links in a local SiteNav, not seeded menu entries: MenuNav has no slot for app items, so the member links could not sit in its mobile panel, and seeded entries would have needed a new binary and demo:seed on rome. The fix shipped as a site-only redeploy.
Task 8 round 2: approved (the live header and the live check, including the DM video call)
The DM-only conversation-actions rule became a tested helper (dmActionsTarget) instead of a component mount: @vue/test-utils is in no lockfile
check-all.sh covers every repo the demo's chat family depends on, with overridable *_PLUGIN_DIR and *_LAYER_DIR checkouts
SC-1
SC-2
SC-3
SC-4
D-01
D-02
D-04
D-05
D-06
D-07
D-08
D-09
D-11
D-12
D-13
D-14
D-15
D-17
D-18
D-20
D-21
D-22
D-23
id description requirement verification human_judgment
D1 Banned words and links from the settings row reach the filter, the demo listeners and the chat and forum seams: 422 under content, title or body on every write path, nothing stored, list changes live, disabled passes D-17, D-18
kind ref status
unit ../sm-moderation-plugin/classes/filter_test.go#TestMatchWords, TestMatchLinks, TestParseList pass
kind ref status
integration ../sm-demo-app/moderation_test.go#TestDemoModeration pass
false
id description requirement verification human_judgment
D2 The pre-save seams are silent without listeners and refuse totally with one (no row, no post-save event, no publication); a plain listener error stays 500 D-18
kind ref status
integration ../sm-chat-plugin/saving_test.go#TestMessageSavingNoListener, TestMessageSavingRejects, TestMessageSavingOtherError pass
kind ref status
integration ../sm-forum-plugin/saving_test.go#TestPostSavingNoListener, TestPostSavingRejects pass
false
id description requirement verification human_judgment
D3 Moderation settings limits, the filter cache and message locale, and the plugin's boot D-17
kind ref status
unit ../sm-moderation-plugin/models/settings_test.go#TestSettingsLimits; classes/filter_internal_test.go#TestFilterCheckCache, TestViolationMessage pass
kind ref status
integration ../sm-moderation-plugin/plugin_test.go#TestBootPublishesFilter, TestFilterCheckDisabled, TestFilterCheckReload pass
false
id description requirement verification human_judgment
D4 Demo host: live membership, channel adapter, seeded-only channels, bootstrap JSON, members, DMs, moderator delete limited to channels, slash commands, DM video start against a fake RoomService, seed counts and idempotency, reset of every chat-family table, member-only realtime tokens, jwt.auth on every chat-family route D-05, D-06, D-07, D-08, D-09, D-11, D-12, D-22, D-23
kind ref status
integration ../sm-demo-app/chat_test.go, video_test.go#TestDemoVideoStart, seed_chat_test.go#TestSeedChat, reset_test.go#TestResetKeepsPlans, realtime_test.go#TestRealtimeMemberToken, boot_test.go#TestBootAllPlugins pass
kind ref status
unit ../sm-demo-app/plugins/demo/classes/chat_context_test.go, plugins/demo/chatbots_test.go#TestDemoCommands pass
false
id description requirement verification human_judgment
D5 Layers: bm's chat tests unchanged on the port, the client, the multi-channel store, link embeds, the call machine, the video client, useCall on a mocked Room, the forum and friends clients, the site's auth hooks D-01, D-02, D-04, D-05, D-13, D-14, D-15, D-21, D-23
kind ref status
unit pnpm test in vue-chat-layer (146), vue-chatvideo-layer (114), vue-forum-layer (12), vue-userfriends-layer (11), vue-demo-app (218) pass
false
id description requirement verification human_judgment
D6 Two browsers locally: a live #general message with reaction and typing; a DM call with fake media, remote video on both sides, mute seen across, the session ended after both leave; no call button in #general SC-2, D-11, D-13, D-23
kind ref status
e2e ../sm-demo-app/scripts/check-local.sh chatlive callmedia (check-chat.cjs --two, --call) pass
false
id description requirement verification human_judgment
D7 The phase gate, ending with check-live against the live demo SC-2, SC-3, SC-4
kind ref status
e2e ../sm-demo-app/scripts/check-all.sh --local (check-all: ok) pass
false
id description requirement verification human_judgment
D8 Two-browser chat and a DM video call on https://demo.summercms.io, and the header with every link on the left SC-2, SC-3
kind ref status
manual Task 8 UAT by the user: approved (after the header round) pass
true
about 3 h of work (2026-11-01 17:42Z to the header redeploy), with two checkpoints and one UAT round 2026-11-02 complete

Phase 20 Plan 06: unit tests for the chat family, two-browser checks and the live sign-off Summary

The phase's new code is covered by tests in the repos that own it: the moderation filter and settings, both pre-save seams, the demo host (membership, channels, DMs, moderator delete, slash commands, video start against a fake LiveKit RoomService, seed, reset, realtime), bm's chat tests running unchanged on vue-chat-layer next to new client, store and link-embed tests, the call machine and useCall on a mocked Room, and the forum, friends and site auth clients. Two browsers prove live chat and a DM call with fake media locally, check-all gates every suite and ends green against the live demo, and the user approved the live chat, DM call and a reworked header.

Test counts

Suite Before After
sm-moderation-plugin (Go top-level tests) 2 16
sm-chat-plugin (Go) 44 47
sm-forum-plugin (Go) 16 18
sm-demo-app ./... (Go) 27 47
vue-chat-layer (vitest) 6 146
vue-chatvideo-layer (vitest) 10 114
vue-forum-layer (node --test) 7 12
vue-userfriends-layer (node --test) 6 11
vue-demo-app (vitest) 209 218

Go counts are top-level test functions (go test -list); the Docker tests ran in every verify (PASS lines counted).

Tests per repository

  • sm-moderation-plugin:
    • classes: TestMatchWords, TestMatchWordsFirstAndEmpty, TestMatchLinks, TestMatchLinksInvalidEntries, TestParseList, TestFilterCheckCache and TestViolationMessage.
    • models: TestSettingsLimits, TestLinkEntry and TestSettingsModel.
    • root (testcontainers): TestBootPublishesFilter, TestFilterCheckDisabled and TestFilterCheckReload.
  • sm-chat-plugin: TestMessageSavingNoListener, TestMessageSavingRejects (send, reply, ReplyTo, edit; field empty, content or custom) and TestMessageSavingOtherError.
  • sm-forum-plugin: TestPostSavingNoListener and TestPostSavingRejects (thread, reply, edit; title, body or empty field; plain error 500).
  • sm-demo-app:
    • TestDemoModeration.
    • In chat_test.go: TestDemoChatContextMembership, TestDemoChannelAdapter, TestDemoChannelsSeededOnly, TestDemoChatBootstrap, TestDemoChatMembers, TestDemoDMs, TestDemoModeratorDelete and TestDemoCommands (HTTP).
    • TestDemoVideoStart, TestSeedChat and TestSeedChatWithoutVisitor.
    • Extended TestResetKeepsPlans and TestBootAllPlugins, and the new TestRealtimeMemberToken.
    • In plugins/demo/classes: TestDemoChatContextConstants, TestDemoChatContextMembershipHooks, TestDemoChatContextLoaders, TestDemoChatAccess, TestDemoForumAccess and TestDemoMembershipWithoutDatabase.
    • In plugins/demo: TestDemoCommands.
  • vue-chat-layer:
    • bm's chatEvents, chatFormat, chatText, chatUnread and realtime tests next to their ports (only the imports differ).
    • linkEmbeds.test.ts, tests/client.test.ts and tests/store.test.ts.
  • vue-chatvideo-layer: callMachine.test.ts (every event in every state), videoClient.test.ts and useCall.test.ts (vi.mock('livekit-client')).
  • vue-forum-layer, vue-userfriends-layer: every client method's refusal and answer, and the error bodies.
  • vue-demo-app: app/utils/communityAuth.test.ts. The existing app/lib/realtime.test.ts still passes through the re-export.

What TestDemoVideoStart recorded for a channel start. Seeded #general has 5 participants (4 personas plus the caller) against max_participants 4. A start there answers 422 "Conversation has too many participants for a video call". With 2 participants it answers 201, so the server has no conversation-type rule; calls are limited to DMs only by the UI (D-23). The DM start answers 201, then 200 with the same session on a second start and for the other side. The token claims (issuer, user id, room) verify with the test secret, and CreateRoom reached the fake Twirp RoomService exactly once with a bearer token.

Task commits

Task Repo Commit Message
1 sm-moderation-plugin 8a93cc8 test: word, phrase and link matching of the filter
1 sm-demo-app a660add test: moderation end to end through the chat and forum seams
2 sm-moderation-plugin 313d117 test: settings limits, filter cache and locale, boot publishes the filter
2 sm-chat-plugin 6539dd2 test: MessageSaving parity, refusals on every write path and other errors
2 sm-forum-plugin 13aa642 test: PostSaving parity and refusals on thread, reply and edit
3 sm-demo-app 08b7784 test: demo chat family
4 vue-chat-layer 764cb42 refactor: the DM-only conversation-actions rule as a helper
4 vue-chat-layer b6d3389 test: the SPA's chat tests on the port, client, store and link embeds
4 vue-chatvideo-layer 8222255 test: every call transition, the video client and useCall on a fake Room
4 vue-forum-layer 4780824 test: every forum client method's refusal and answer, error bodies
4 vue-userfriends-layer 6a5f6ce test: every friends client method's refusal and answer, error bodies
4 vue-demo-app 0c1a66b refactor: community auth hooks into app/utils
4 vue-demo-app ec45480 test: community auth hooks
5 sm-demo-app 9b9da38 test: two-browser chat and call checks; phase gate covers the chat family
5 sm-demo-app 3d86215 chore: bump vue-demo-app (community auth hooks and their tests)
5 sm-demo-app 71ff755 chore: sync the roadmap snapshot
6 — — checkpoint: push
7 all nine — branch pushes; check-all: ok
8 vue-demo-app deb809f feat: every site link on the left of the header, with Chat and Forum
8 sm-demo-app 2cd4640 chore: bump vue-demo-app (header: all links left, Chat and Forum)
8 — — site-only redeploy on rome; UAT: approved

Every repo was pushed with plain fast-forwards. git ls-remote origin equals local HEAD for each:

Repo Pushed head
sm-moderation-plugin 313d117
sm-chat-plugin 6539dd2
sm-forum-plugin 13aa642
vue-chat-layer b6d3389
vue-chatvideo-layer 8222255
vue-forum-layer 4780824
vue-userfriends-layer 6a5f6ce
vue-demo-app deb809f
sm-demo-app 2cd4640

No tags were created in this plan.

Checkpoint answers and the UAT

  • Task 6: push. No bugs were found, so there were no fixes and no fix release; only branch pushes.
  • Task 7: check-all.sh --local printed check-all: ok. It covered:
    • every suite: the app, the MCP-tagged app, sm-user, sm-journal, chat, forum and moderation with Docker, -short of chatchannels, chatbots, chatvideo, herald and userfriends, vitest in vue-demo-app and the four layers;
    • check-pins: ok (25 modules), build: ok release e50834496975, smoke: ok and check-deploy: ok;
    • check-local: ok back remote chatlive callmedia;
    • check-live: ok against https://demo.summercms.io.
  • Task 8, round 1: "chat itself approved, but it's missing in navbar … make all to the left, and on the right just language and logout."
    • Fix: SiteNav renders the main menu's entries (vue-menu-layer's MenuNavItem), then Chat and Forum for everyone, then My presentations, Friends and Security for members, in one list. The right side keeps only the language switcher and Log in or Log out.
    • Below 1180px every link is in the menu panel, so the member links are reachable on phones too. Phone spacing was tightened to fit 390px.
    • Checked with Playwright at 1280, 1440, 1024 and 390px, as visitor and member, in EN and PL. Also check-local tour chat back, smoke.sh, vue-demo-app's tests and build.
    • Released site-only after the user's "yes":
      • pushed deb809f and 2cd4640;
      • build: ok release f9fa556fd20e, smoke: ok;
      • rsynced only vue-demo-app/.output/ to site/.output.new, swapped it in (.output.prev kept) and restarted only summercms-demo-site (RUNNING, pid 1773325);
      • check-live: ok;
      • the anonymous live header shows Home, Journal, FAQ, Subscriptions, Chat, Forum (PL: Start, Blog, FAQ, Subskrypcje, Czat, Forum) on the left and EN/PL and Log in on the right.
    • The binary, config, migrations, demo:seed, nginx, Centrifugo and LiveKit were untouched. Site rollback: sudo mv site/.output site/.output.bad && sudo mv site/.output.prev site/.output && sudo supervisorctl restart summercms-demo-site.
  • Task 8, round 2: approved. This covers the live header and the live check, including the two-browser chat and the DM video call.

Deviations from Plan

  1. Slot helper instead of a component mount. @vue/test-utils is in no lockfile, so ChatHeader's inline DM-only v-if became dmActionsTarget (vue-chat-layer/app/lib/slots.ts, 764cb42, no behaviour change) and is tested in the store test. It is on vue-chat-layer main, untagged; the demo still pins v0.1.0.
  2. Where the filter tests landed. TestFilterCheckCache is an internal test in classes. The database tests (TestFilterCheckDisabled, TestFilterCheckReload) are in the plugin root's plugin_test.go with the sitemap-style harness, not in filter_test.go. Extra tests were added (listed above).
  3. Test-only dependencies. sm-moderation-plugin's go.mod gained testcontainers-go v0.44.0 and pgx v5.10.0, resolved offline with GOPROXY=off from the versions the other plugins already pin. The README Testing section names them.
  4. The ported realtime test. vue-chat-layer's realtime.test.ts is vue-demo-app's adapted copy of bm's test (a stubbed token route). The vitest config maps bm's @/api/http to tests/support/http.ts. The other four bm tests match bm's after describe (diff empty).
  5. Split chatvideo test file. The video-client part of callMachine.test.ts moved into a new videoClient.test.ts.
  6. Extra demo tests. TestSeedChatWithoutVisitor; TestDemoCommands exists in plugins/demo (the command objects) and in the root package (HTTP); TestBootAllPlugins checks jwt.auth on every chat-family route.
  7. Commits needed by the gate. The vue-demo-app pointer bump (3d86215) and a roadmap snapshot sync (71ff755) were committed in Task 5. build.sh release refuses a dirty tree and a stale snapshot, and the framework's ROADMAP had moved since plan 05.
  8. The check-back hook. The header rework kept the site-header__mine class on the member links and keeps the text out of template comments. scripts/check-back.cjs (also run by check-live) relies on it, so the live check works on the old and the new site alike.
  9. Header breakpoint. The panel takes over below 1180px rather than only below 768px, because nine links for a member do not fit on one row below that width.

Total deviations: 9. Impact on plan: none on the goal. No production behaviour changed except the header, which the user asked for in the UAT.

Notes

  • Banned-link prefix matching. A banned-link entry with a path matches by string prefix, so shop.example/promo also matches /promotions. That's what the README and the admin form say ("starts with"); the plan said "only below its path". It is not pinned by a test.
  • A stale snapshot reddens the gate. Any later commit to the framework ROADMAP turns check-all red at sync-roadmap --check until the demo's snapshot is synced and committed.
  • Leftover dev process. A nuxt dev from Oct 22 (pids 212159 and 212194) still runs in vue-demo-app, listening on no port. It was left alone, as instructed.
  • Phone header before this plan. At 390px the visitor's Polish header ("Zaloguj się") probably overflowed already; the header round fixed it along the way.

Known Stubs

None.

Threat Flags

None. The new surface is test code and check scripts. The scripts read the visitor's credentials only through check-local's existing .env helper and never print them; the header change adds links to existing pages.

Self-Check: PASSED

  • Commits exist on their remotes: sm-moderation-plugin 8a93cc8 and 313d117; sm-chat-plugin 6539dd2; sm-forum-plugin 13aa642; vue-chat-layer 764cb42 and b6d3389; vue-chatvideo-layer 8222255; vue-forum-layer 4780824; vue-userfriends-layer 6a5f6ce; vue-demo-app 0c1a66b, ec45480 and deb809f; sm-demo-app a660add, 08b7784, 9b9da38, 3d86215, 71ff755 and 2cd4640 (ls-remote heads above).
  • The key files listed above exist in their repos.
  • rome: summercms-demo-site RUNNING with site/.output (new) and site/.output.prev; check-live ok.