Skip to content

fix(talk): preset signaling mode for Talk v23.0.2+, remove unused initial state#1689

Open
ShGKme wants to merge 2 commits into
mainfrom
fix/new-capabilities
Open

fix(talk): preset signaling mode for Talk v23.0.2+, remove unused initial state#1689
ShGKme wants to merge 2 commits into
mainfrom
fix/new-capabilities

Conversation

@ShGKme
Copy link
Copy Markdown
Contributor

@ShGKme ShGKme commented Mar 11, 2026

☑️ Resolves

  • Follow-up: fix(initial-state): Reduce initial state data to improve desktop client functionality spreed#17279
  • Remove the unused initial state on the Talk v24's frontend:
    • Replaced on the frontend with old Talk/circles/guiests capabilities:
      • call_enabled, federation_enabled, start_conversations, circles_enabled, guests_accounts_enabled, read_status_privacy, typing_privacy, attachment_folder, attachment_folder_free_space
      • Available on Talk v17 or earlier => supports connecting to an old server
    • Replaced on the frontend with new Talk v23.0.2 capabilities ...
      • ... and may have a reasonable default fallback: grid_videos_limit, grid_videos_limit_enforced
      • ... and may have a local state: play_sounds
      • ... and have no fallback, but not critical: sip_dialin_info, enable_matterbridge
  • Use new Talk v23.0.2 capability for signaling_mode initial state
    • Fallback is needed for older servers. To be added in another PR.

@ShGKme ShGKme added this to the 🪴 Next Release milestone Mar 11, 2026
@ShGKme ShGKme requested a review from nickvergessen March 11, 2026 15:14
@ShGKme ShGKme self-assigned this Mar 11, 2026
@ShGKme ShGKme added the bug Something isn't working label Mar 11, 2026
@ShGKme ShGKme changed the title fix(talk): support play sound settings and other new v23 capabilities fix(talk): support play sound settings and new v23 capabilities Mar 11, 2026
@ShGKme ShGKme requested a review from DorraJaouad March 11, 2026 15:19
Comment thread src/shared/setupWebPage.js Outdated
grid_videos_limit_enforced: capabilities?.spreed?.config?.call?.['grid-limit-enforced'] ?? false,
federation_enabled: capabilities?.spreed?.config?.federation?.enabled,
// default_permissions - MISSED (!)
default_permissions: capabilities?.spreed?.config?.permissions?.default ?? 502, // Attendee::PERMISSIONS_MAX_DEFAULT & ~Attendee::PERMISSIONS_LOBBY_IGNORE
Copy link
Copy Markdown
Member

@nickvergessen nickvergessen Mar 11, 2026

Choose a reason for hiding this comment

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

Only with react-permission feature (34+, but then this config is also there), otherwise 246

Suggested change
default_permissions: capabilities?.spreed?.config?.permissions?.default ?? 502, // Attendee::PERMISSIONS_MAX_DEFAULT & ~Attendee::PERMISSIONS_LOBBY_IGNORE
default_permissions: capabilities?.spreed?.config?.permissions?.default ?? 246, // Attendee::PERMISSIONS_MAX_DEFAULT & ~Attendee::PERMISSIONS_LOBBY_IGNORE

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

502=111110110
246=011110110

Since it is a bitmap, doesn't it mean having an extra permission doesn't hurt in older versions and just unused?

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.

As mentioned, in the permissions editor we use this:
https://github.com/nextcloud/spreed/blob/cbe7046a20e9b5d1ed47d26bcdfe99b9def158dd/src/components/PermissionsEditor/PermissionsEditor.vue#L198-L210

Also the API will 400 on a request when you set 502 as permission, because it does not match the constraint int<0, 255>

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.

We can use capabilities?.spreed?.features?.includes('react-permission') maybe to define if bitmap change is known to server

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since frontend doesn't use the initial state anymore, and there is fallback on frontend checking for react-permissions, we don't need this initial state on Talk Desktop.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reworked PR. All the removed from the frontend initial state is not needed on Talk Desktop at all (because it is not used anymore). Including the discussed default_permissions

To support old servers, a fallback is needed on the frontend side - in progress.

@ShGKme ShGKme added the high label Apr 2, 2026
@ShGKme ShGKme marked this pull request as draft April 18, 2026 11:18
@ShGKme ShGKme changed the title fix(talk): support play sound settings and new v23 capabilities fix(talk): preset signaling mode for Talk v23.0.2+, remove unused initial state Apr 18, 2026
ShGKme added 2 commits April 18, 2026 13:30
Removed in Talk 24

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
@ShGKme ShGKme force-pushed the fix/new-capabilities branch from 0fa40ee to c98ee5e Compare April 18, 2026 11:30
@ShGKme
Copy link
Copy Markdown
Contributor Author

ShGKme commented Apr 18, 2026

PR is reworked completely. See the new title and description.

@ShGKme ShGKme marked this pull request as ready for review April 18, 2026 11:31
Copy link
Copy Markdown
Contributor

@Antreesy Antreesy left a comment

Choose a reason for hiding this comment

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

Looks OK

@Antreesy
Copy link
Copy Markdown
Contributor

Antreesy commented Apr 20, 2026

Ah no wait, initial state is still used at least here on stable33, so you can't compile it against this PR:

rg -n '\bloadState\s*\(' --glob '*.{js,ts,vue}'

stores/settings.ts
36:     const readStatusPrivacy = ref<PRIVACY_KEYS>(loadState('spreed', 'read_status_privacy', PRIVACY.PRIVATE))
37:     const typingStatusPrivacy = ref<PRIVACY_KEYS>(loadState('spreed', 'typing_privacy', PRIVACY.PRIVATE))
52:     const attachmentFolder = ref<string>(loadState('spreed', 'attachment_folder', ''))
53:     const attachmentFolderFreeSpace = ref<number>(loadState('spreed', 'attachment_folder_free_space', 0))

stores/actor.ts
142:            if (!loadState('spreed', 'circles_enabled', false)) {

stores/sounds.js
19:     shouldPlaySounds = loadState('spreed', 'play_sounds', false)
24:             shouldPlaySounds = loadState('spreed', 'play_sounds', false)

components/PermissionsEditor/PermissionsEditor.vue
170:                    return loadState(
                                'spreed',
                                'default_permissions',
                                PERMISSIONS.MAX_DEFAULT & ~PERMISSIONS.LOBBY_IGNORE,
                        )

components/LeftSidebar/LeftSidebar.vue
952:                            if (loadState('spreed', 'signaling_mode') !== 'internal') {

components/LeftSidebar/SearchConversationsResults/SearchConversationsResults.vue
39:const isCirclesEnabled = loadState('spreed', 'circles_enabled')

components/RightSidebar/Participants/ParticipantsSearchResults.vue
105:const isCirclesEnabled = loadState('spreed', 'circles_enabled')

components/CallView/Grid/VideosGrid.vue
187:const videosCap = parseInt(loadState('spreed', 'grid_videos_limit'), 10) || 0
188:const videosCapEnforced = loadState('spreed', 'grid_videos_limit_enforced') || false

components/ConversationSettings/ListableSettings.vue
72:                     isGuestsAccountsEnabled: loadState('spreed', 'guests_accounts_enabled'),

components/ConversationSettings/ConversationSettingsDialog.vue
151:const matterbridgeEnabled = loadState('spreed', 'enable_matterbridge')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants