Skip to content

Add setting to hide call join/leave timeline messages (#705) - #1641

Open
AsmitBhardwaj wants to merge 2 commits into
SableClient:devfrom
AsmitBhardwaj:fix-705-hide-call-events
Open

Add setting to hide call join/leave timeline messages (#705)#1641
AsmitBhardwaj wants to merge 2 commits into
SableClient:devfrom
AsmitBhardwaj:fix-705-hide-call-events

Conversation

@AsmitBhardwaj

@AsmitBhardwaj AsmitBhardwaj commented Aug 5, 2026

Copy link
Copy Markdown

Description

This PR adds a setting to let users hide "X joined the call" / "X ended the call"
timeline messages, addressing the issue where active rooms with frequent calls
get their message history buried under repeated call notifications.

Added a new hideCallEvents boolean setting (false by default, so existing
behavior is unchanged unless a user opts in). It follows the same pattern as
the existing hideMembershipEvents setting:

  • src/app/state/settings.ts — new setting + default value
  • src/app/hooks/timeline/useTimelineRendererContext.ts — added to TimelineRendererSettings
  • src/app/hooks/timeline/useProcessedTimeline.ts — filters GroupCallMemberPrefix events out of the processed timeline when the setting is on
  • src/app/hooks/timeline/useTimelineEventRenderer.tsx — early-return guard in the GroupCallMemberPrefix render handler
  • src/app/features/room/RoomTimeline.tsx — reads the setting and passes it to both hooks above
  • src/app/features/settings/general/General.tsx — new toggle: Settings → General → Messages → "Hide Call Join/Leave Messages"

Manually tested: reproduced the original bug (a 2-minute test call produced 9
separate timeline messages), then verified the toggle suppresses new call
messages when on, and that toggling back off restores them.

Fixes #705

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

I used AI to assist me in correcting some of my code and making sure everything is foolproof.

Copilot AI lite review requested due to automatic review settings August 5, 2026 05:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new hideCallEvents options are currently introduced as required in shared hook APIs, which will break existing callers/tests that don’t pass the flag and should be made backward-compatible (plus minor formatting fixes).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Adds a new user setting (hideCallEvents) to suppress frequent group call join/leave timeline entries so chat history isn’t drowned out in active rooms, while keeping default behavior unchanged unless opted in.

Changes:

  • Introduces hideCallEvents to settings state with a default of false.
  • Threads the new flag through timeline renderer context and room timeline wiring.
  • Filters GroupCallMemberPrefix events from the processed timeline and adds a renderer guard; exposes a new toggle in Settings → General → Messages.
File summaries
File Description
src/app/state/settings.ts Adds hideCallEvents to settings interface + defaults.
src/app/hooks/timeline/useTimelineRendererContext.ts Reads hideCallEvents from settings and includes it in renderer context settings.
src/app/hooks/timeline/useProcessedTimeline.ts Adds an option to filter out GroupCallMemberPrefix events when enabled.
src/app/hooks/timeline/useTimelineEventRenderer.tsx Adds a guard to skip rendering call join/leave events when enabled.
src/app/features/room/RoomTimeline.tsx Plumbs hideCallEvents into timeline visibility logic and processed timeline hook options.
src/app/features/settings/general/General.tsx Adds UI toggle “Hide Call Join/Leave Messages”.
Review details

Suppressed comments (2)

src/app/hooks/timeline/useTimelineEventRenderer.tsx:383

  • Default hideCallEvents when destructuring settings so callers that omit it keep the existing behavior (show call events).
    hideCallEvents,

src/app/hooks/timeline/useProcessedTimeline.ts:602

  • If hideCallEvents is optional, it should be defaulted during destructuring so downstream processing always receives a boolean.
  hideCallEvents,
  • Files reviewed: 6/7 changed files
  • Comments generated: 6
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

hideMemberInReadOnly: boolean;
isReadOnly: boolean;
hideMembershipEvents: boolean;
hideCallEvents: boolean;
mxUserId: string | null;
readUptoEventId: string | undefined;
hideMembershipEvents: boolean;
hideCallEvents: boolean;
);
},
[EventType.GroupCallMemberPrefix]: (mEventId, mEvent, item, timelineSet, collapse) => {
if(hideCallEvents) return null;
hideMemberInReadOnly: boolean;
isReadOnly: boolean;
hideMembershipEvents: boolean;
hideCallEvents:boolean;
settingsAtom,
'hideMembershipEvents'
);
const[hideCallEvents, setHideCallEvents] = useSetting(settingsAtom, 'hideCallEvents');
if (!membershipChanged && hideNickAvatarEvents) continue;
}

if (type === (EventType.GroupCallMemberPrefix as string) && hideCallEvents) continue;
@eleboucher

Copy link
Copy Markdown
Member

Please use pnpm and no npm

@eleboucher eleboucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use pnpm

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.

Ability to disable "Joined the call" and "Ended the call" messages.

3 participants