Fix review: H-L3-10 (a block folds a member's words only in the message list)
From mnema-talk v3.3.13, rendered on this site.
Fix: branch msch128/fix-h-l3-10, commit 2bc7f96b0 "fix: fold a blocked member's words on every surface, not only in the message list". Reviewed that commit only, in a clean temporary worktree (npm ci; removed afterwards). Nothing changed in the repository, nothing pushed.
Verdict: MERGE
The cause the finding and the refuter describe (the fold was a property of two list components)
is removed: one placeholder component, web/src/shared/components/BlockedFold.vue, wraps every
surface the finding and the refuter executed, and the decision stays in one place
(useBlocksStore().hides). The recorded test is a normal test and fails when the fix is reverted.
No gate is weakened, the public API change is additive, and no defect was found that has a
concrete failing scenario against the fix's own scope. The SHOULD-FIX items below are follow-ups,
not merge blockers.
Coverage of the finding's variants
| Variant (finding / refuter) | Fixed? | Evidence |
|---|---|---|
| "replied to" line (ReplyPreview, used by MessageRow and ThreadReply) | yes | blockedElsewhere.test.ts; own probe P1 |
| reply line live update on the blocked member's edit (markPreviewEdited) | yes | own probe P1: props changed to new text while blocked, still folded |
| search hit | yes | test |
| search thread-root snippet | yes, with a new user_id on chat.SearchRoot | test, integration test |
| forwarded quote | yes | test |
| pin list | yes (also hides the author line) | test |
| saved items | yes (note and remove button stay) | test |
| forum post card (title, excerpt, thumbnail, aria-label) | yes | test |
| title above an open forum post (ForumPostHeader) | yes | test |
| reminders list and due-reminder in-app notice / OS notification | yes, with a new author_id on later.MessageRef | test; laterNotices.ts uses the same text for the toast and platform.notify |
| PinNotices | not needed: shows the actor's name only | read |
| typing indicator | not changed: name only, no words | read |
| event comments (refuter: read only, "not messages") | no | own probe P6, see SHOULD-FIX 1 |
What I ran
npx vitest run src/chat/components/blockedElsewhere.test.tsplus the tests of every touched component (SearchResultItem, SearchResults, forum/components, PinnedMessages, SavedLaterPanel*, Forward, ChatAreaDm, ThreadSidebar, LaterDialog, MessageRow*): 24 files, 260 tests, all pass.- Revert check: restored the nine production files (ReplyPreview, ForwardedQuote, SearchResultItem, PinnedMessages, SavedEntry, LaterList, ForumPostCard, ForumPostHeader, laterNotices.ts) to the parent commit and ran blockedElsewhere.test.ts: 10 of 12 cases fail (the control and the not-blocked case pass), as the commit message says.
- Own probes (temporary test file, deleted), all inputs not in the tests:
- P1: reply line, original edited by the blocked member after mount (setProps with new text): stays folded.
- P2: Show on a reply line, then an edit by the blocked member: stays revealed (keyed by message id). Unblock then re-block in the same session: folded again (unblock clears the revealed set).
- P3: Show inside a selected search hit does not emit
select; Show inside a forum card (Enter keydown and click) does not open the post; after Show the words appear. Focus after Show in the card:document.activeElementis<body>. - P4: a search root without
user_id(older server): the root text is shown (no fold possible; graceful degradation, no error). - P5: server feature
blocksoff: nothing folds. - P6: an event comment by the blocked member: the words are rendered.
- Full vitest, 3 workers: 653 files passed, 2 skipped; 11874 tests passed, 18 expected fail, 96 skipped; no failure.
src/compat(response and request compatibility baselines): 1506 passed, 3 skipped.- Go:
go vet(with and without-tags=integration) on internal/chat/search, internal/later, internal/server: clean. Integration (real Postgres,-v, not skipped):TestSearchReplyHitsCarryRootSnippetsPASS,TestListingRemindersReadsTheirMessagesInOneQueryPASS. make openapi-check(document not stale): OK.make openapi-diff: "no breaking changes since v3.0.8".npm run contracts:check: OK.- ESLint on all touched web files (includes the import-zones rule and max-lines): clean.
vue-tscapp and tests configs: clean.scripts/check-english-only.mjs: clean.make complexity-check: exit 0.
Findings
SHOULD-FIX
Event comments are not folded.
web/src/events/components/EventComments.vue:127rendersc.contentwith no block check. Probe P6: a comment whoseuser.idis the blocked member shows its words in full. The finding did not claim this surface and the refuter excluded it ("comments, not messages"), so it is not a gap in this fix. My view: a member reading "You don't see messages from members you block" would count a comment under an event as a message of that member; the new doc list in doc/moderation.md enumerates the surfaces and does not name event comments, so the doc is accurate but the promise in settings is broader. Wrap the comment body inBlockedFold(the comment has an id anduser.id) in a follow-up, or name the exception in doc/moderation.md.Focus is lost after Show.
BlockedFold.vue:30-37: the Show button is replaced by the slot (v-if/v-else), so the focused element leaves the DOM and focus falls to<body>(probe P3). A keyboard or screen-reader user loses their place in the pin popover, saved list, forum list or the message list. This was already true for the oldBlockedMessageRowin the list (the row was swapped for aMessageRow), so it is not a regression there, but the fix spreads it to six more surfaces. Suggest: afterreveal, move focus to the revealed content (for example the first focusable element of the slot or a wrapper withtabindex="-1") onnextTick.Nested interactive content in two places. In
SearchResultItem.vuethe Show button sits insiderole="option"(the rootdiv, listbox driven by the search input through active-descendant), and inForumPostCard.vueinside anarticlewithrole="button". Children of an option are presentational to assistive technology, and an interactive element inside arole="button"is an axe "nested-interactive" violation; in search the button is reachable only by Tab or pointer, not by the arrow keys that drive the list. The fold itself works (the accessible name of the option or card no longer contains the words; the card'saria-labelis replaced by "Blocked message"). Functional click and Enter isolation is correct (click.stop,keydown.enter.stop; probe P3). Suggest a follow-up that lets Enter on a folded option reveal it, or moves the Show control outside the option/card role.
NOTE
Forum title filter. The forum search box (
useForumPosts.ts:130-132) is a server query. Typing a word lists a folded card whose title matches. This shows no words; it lets the blocker confirm, by their own query, that a folded post's title contains a word they typed. Same class as the global search hit count that doc/moderation.md now names ("a hit still counts in the number of results"). Not covered by the promise in my reading (the blocker searches, nothing is shown). Adding "and the forum filter" to that doc sentence would make it complete.Reminder push unfiltered. The server-side push of a due reminder carries the snippet (documented in doc/moderation.md by the fix). It is the blocker's own reminder on a message they could read when they set it. It does show words without a Show, and it is inconsistent with the decision to fold saved items, but it is a pushed copy of the blocker's own bookmark and the doc says so. Acceptable as documented; a later server change could send the generic text when the author is blocked.
Reveal state. One reveal path: Show adds the message id to the session's
revealedset (stores/blocks.ts); every surface keys by the original message id (reply previewid, quotemessage_id, search rootid, savedmessage_id, remindermessage.id, forum postid), so Show on one surface reveals that message everywhere and nothing else (test, probe P2). Reset: on reload (in-memory), onreset(), and on an unblock made in this tab (revealed.clear()). An unblock or re-block made on another device arrives asblock_updated, which only reloads the list and keeps the revealed set; pre-existing, minor. A later edit of a revealed message stays revealed (probe P2); consistent with "showing one message shows it everywhere until the page is reloaded" and with the previous list behaviour; I consider it intended.ForwardedQuote.vue:49keys the fold byquote.message_id ?? msg.id.message_idis optional inChatForwardQuote; if a server ever sent an available quote without it, Show would add the forwarding message's id to the revealed set. Harmless (that message is not by the blocked member unless it is folded anyway), noted only.Reminder row hides its due marker. When a reminder's message is folded,
LaterList.vuefolds the whole open button, including the channel name and the "Due" badge, so the blocker does not see that the reminder is due until Show. Design choice; the mark-done and snooze controls stay.omitemptyon auuid.UUID.internal/chat/search/search_roots.goandinternal/later/visibility.go:uuid.UUIDis a 16-byte array, soomitemptynever omits it. The fields are always sent. Harmless (both come frommessages.user_idthrough an inner join on users, never nil) and the OpenAPI marks them optional, which is what clients need.Surfaces outside the promise that keep a blocked member's name, not words: search hit header (name, avatar), forum card footer (name, avatar), poll voter names (
PollCard.vue:86), typing indicator, mention autocomplete, PinNotices. The promise is about messages; names are not folded in the list either (the folded row is placeholder-only, but the member list still shows them). Not covered in my reading.
Own sweep of web/src
Searched for every component rendering message content, snippets or titles (previewText,
.content, snippet) and for every platform.notify caller, and compared with the fix's list.
| Surface | State after the fix | Covered by the promise? |
|---|---|---|
| Notification centre | none exists beyond the mentions inbox | n/a |
Mentions inbox (MentionsInbox.vue:90) | not wrapped; server leaves blocked authors out (core.AuthorHiddenFrom) | yes, already met |
| Unread jump bar / divider | no text | n/a |
| Channel list preview lines | only DMs have previews; filtered client and server (stores/chat/dms.ts:242) | yes, already met |
| Thread list | no such surface; thread panel folds root and replies | yes, met |
| Member profile recent activity | UserProfileModal.vue renders no messages | n/a |
| Embeds and link previews | MessageEmbeds renders inside the message row or thread root (folded with it); forwarded content is text in ForwardedQuote (folded) | yes, met |
| Poll results voter names | names only | no (names) |
| Reactions tooltip | emoji and count only (ReactionBar.vue:69), no names | n/a |
| Mention autocomplete | member names only | no (names) |
| Mobile layouts | same components with responsive classes; no separate mobile surface | met |
| Print or export views | none in web/src | n/a |
| Desktop bridge / OS notifications | platform.notify has three callers: message notifications (blocked authors return early, stores/chat/events.ts:148), DM calls (blocked caller returns, stores/chat/dmCalls.ts:91), due reminders (folded text) | yes, met |
| Edit history dialog | reached from a message's menu, which a folded message does not offer | met |
| Admin report detail | moderator tool, shows reported content by design | no (moderation) |
| Event comments | not folded (SHOULD-FIX 1) | arguably yes |
| Wiki pages and history | not messages | no |
Other checks
- New response fields:
chat.SearchRoot.user_idandlater.MessageRef.author_idare added as optional properties in api/openapi.json (not inrequired);openapi-diffreports no breaking change; generated decoders accept their absence (!hasOwn(...) || isIdentifier(...)), so answers of an older server still decode (compat baselines pass); old clients decode withhasOwnon known keys only, so they ignore the new field. Privacy: the search root lives in the same channel as the hit the caller may read and already carries the author's username and display name; the reminder ref is rechecked for access on every read and already carries the author's name; message objects elsewhere already carryuser_id. No new information. - Server filtering: unchanged; the server still filters nothing for search and lists, as
core.BlockExistssays; doc/moderation.md now states that the client folds them and that hits still count. - Import zones:
shared/components/BlockedFold.vueimports onlystores/blocksand an icon; no feature module. ESLint import-zones rule passes. - Performance:
hides()is two Set lookups (idsis a computed Set;revealeda reactive Set, read only when the author is blocked). The fix adds one small component instance per wrapped surface (in the message list only for rows with a reply line or a forward). No concern for long lists. - Gates: no allowlist entry, no raised limit, no skipped test; the three
it.failsare flipped to normal tests. Touched files are well under 400 lines. English only. Commit typefix, no!. doc/moderation.md matches the new behaviour.
Not checked
- Real browser rendering and screen-reader output (jsdom only); the nested-interactive and focus
findings are from the DOM structure and
document.activeElement, not from an assistive technology run. - The desktop client repository (no change needed there by this commit; not opened).
- Server-side push payload contents (read from the doc, not run).
Second round: commit 85d0bb746
Reviewed only 85d0bb746 ("fix: fold event comments, keep focus after Show, and no Show nested in a search option or card"), on top of 2bc7f96b0, in a fresh temporary worktree (npm ci; removed afterwards). Nothing changed in the repository, nothing pushed.
Verdict: MERGE. All three SHOULD-FIX items are closed. One new SHOULD-FIX (a focus target in the wrong pane) and a few notes remain; none of them blocks the merge.
The three items
Event comments: closed.
EventComments.vuewraps the comment body inBlockedFold, keyed by the comment id andc.user.id. The delete dialog's excerpt says "Blocked message" while the comment is folded. Own probe: a comment by the blocked member containing a Markdown link is folded, and after Show focus lands on the link inside it. doc/moderation.md now names event comments.Focus after Show: closed, with one gap (SHOULD-FIX R2-1 below).
BlockedFoldrenders two hidden marker spans only in the instance where Show was pressed (shownHere).shared/lib/revealFocus.tsthen focuses, in this order:- the first focusable element between the markers;
- else a control around them;
- else the first revealed element, given
tabindex=-1.
When the whole row is replaced, it looks the row up by
data-msg-id/data-reply-id. Own probes:- Show in a reply line moves focus into that line (to its jump button).
- Show on a folded forum card moves focus to the card, which is a
role=buttonagain. - Show on an event comment moves focus to the first link of the comment.
Nested interactive roles: closed.
- Search: in
passivemode a hit has no button. "· Show" is visible text witharia-hidden, and the screen-reader-only sentence "Press Enter to show it." is read out.SearchModal.handleSelect(reached by Enter on the input or the list, and by a click) reveals a folded hit, or its folded thread root, instead of opening it. - Forum card: while folded it has no
role,tabindex,aria-labelor open handler (own probe: all three attributes absent; click and Enter on the card emit nothing). After Show it is the button again, and Enter opens the post (probe: oneselect).
- Search: in
"First Enter reveals, second opens": no trap
- Keyboard. Each Enter adds exactly one message id to the revealed set, so
hides()turns false for it and the next Enter makes progress. Selection does not move. Old servers send no rootuser_id, so a root is never "folded" there and needs no extra press. - Hit and root both folded. Own probe: 3 presses (reveal the hit, reveal the root, open). This is sensible, because each press shows something new, and it ends.
- Hit not folded, root folded. The author's test plus my reading: 2 presses (reveal the root, then open).
- Mouse and touch. Both go through the same
clickhandler on the option, with the same progression. Touch has no separate path;@mousedown.preventkeeps focus in the input. - Escape. Still closes the dialog at any point.
- Forum card. While folded, Show is the only control, a real button that Tab and touch reach,
so nothing traps there either. NOTE: the folded card keeps
cursor-pointerand its hover style, so a mouse user who clicks the card body gets no response and has to hit "Show". This is cosmetic.
Focus is not stolen
- Revealed elsewhere. Own probe: an input has focus and two mounted reply lines show message
m1.
reveal('m1')is called from elsewhere and both reply lines unfold. Focus stays on the input, becausefocusRevealedruns only insideshow()of the instance whose button was pressed. - Re-render after Show. After Show in instance c, I focused another element and changed c's props (an edit). Focus stayed where it was, because the markers remain but no focus call is repeated.
- Mounting already-revealed messages. Lists that re-render with revealed messages get no
markers and no focus call:
shownHereis per instance and starts false.
New findings
SHOULD-FIX R2-1: the row lookup can focus the wrong pane.
Where:
revealFocus.ts:29-33. When the marker is gone becauseBlockedMessageRowunmounted, focus goes todocument.querySelector('[data-msg-id=X], [data-reply-id=X]'), which is the first match in document order.When it happens: the thread root of a channel thread is shown twice, folded:
- in the channel list (
MessageRow/BlockedMessageRow,data-msg-id); - in the thread panel (
BlockedMessageRowcompact,data-msg-id; after Show,ThreadRootCardwithdata-reply-id).
When Show is pressed in the thread panel, both unfold, and focus goes to the channel list's row, which comes first in the DOM, not to the thread root card the user was in.
- in the channel list (
Evidence: a synthetic probe with a list element and a thread element carrying the same id;
focusRevealed(null, null, id)focused the list element. The full two-pane mount was not run; the scenario follows from both components carrying the root's id.Impact: a keyboard user is moved to the other pane, possibly to a row scrolled out of view (
preventScroll).Suggested fix: remember the placeholder's closest scroll container, or the
BlockedMessageRowroot's parent, before revealing, and search only inside it.
NOTE R2-2. revealFocus.ts:20-21 adds a focus:outline-hidden class and tabindex=-1 directly
to an element Vue manages. The next class patch of that element drops the class, while tabindex
stays. The only effect is a possible outline on a later script focus. Cosmetic.
NOTE R2-3. In search, revealing by Enter changes the active option's text, but nothing is
announced. The option is referenced by aria-activedescendant, and screen readers do not always
re-read it when its content changes. The sr-only sentence "Press Enter to show it." is also
keyboard-worded for mobile screen-reader users, who double-tap. A polite live region saying "Shown"
would close this. Minor.
i18n
- The new key
blocks.showWithEnteris added toen.jsonandde.json. These are the only two locale files inweb/src/i18n. npm run i18n:check(strict): 0 findings.- The German text of the hint uses the right pronoun for its noun.
What I ran (second round)
- Revert check. I put BlockedFold, SearchModal, SearchResultItem, ForumPostCard and
EventComments back to 2bc7f96b0 and ran
blockedElsewhere.test.tsandSearchModal.test.ts: 8 failed, 39 passed. That matches the commit message.- The 8 failures: search option, forum card ×2, forum title focus, event comment, focus in the pin list, row focus in the list, and the SearchModal reveal-then-open test.
- Own probes: S1, F1, F2, K1 and C1 above, in a temporary test file that I deleted afterwards.
- Full vitest, 3 workers: 653 files passed and 2 skipped; 11880 tests passed, 18 expected fail, 96 skipped; no failures.
- Checks on the touched files:
vue-tsc --noEmitfortsconfig.app.jsonandtsconfig.tests.jsonboth clean; ESLint clean;scripts/check-english-only.mjsclean. - Not run: a real browser or assistive technology. The focus and announcement findings come from jsdom and the DOM structure.