Skip to content

Fix: Accept Subject Alternative Names (SAN) when validating certificates for link previews#3243

Open
Ram-sah19 wants to merge 123 commits intoRocketChat:developfrom
Ram-sah19:fix-san-certificate-preview
Open

Fix: Accept Subject Alternative Names (SAN) when validating certificates for link previews#3243
Ram-sah19 wants to merge 123 commits intoRocketChat:developfrom
Ram-sah19:fix-san-certificate-preview

Conversation

@Ram-sah19
Copy link
Copy Markdown

@Ram-sah19 Ram-sah19 commented Mar 9, 2026

Description

This PR fixes an issue where link previews fail when a website's TLS certificate
contains the requested domain in the Subject Alternative Name (SAN) but not in
the Common Name (CN).

Modern TLS validation rules prioritize SAN entries over CN. The previous
validation logic relied only on the Common Name, which caused valid certificates
to be rejected when the requested hostname was present only in the SAN field.

Solution

Updated the certificate validation logic to:

  • Check the Subject Alternative Name (SAN) entries first
  • Accept the certificate if the requested hostname exists in SAN
  • Fall back to Common Name (CN) validation only when SAN is not present

This aligns the desktop client behavior with modern TLS validation practices
used by browsers.

Testing

Tested by triggering link previews for domains where the certificate contains
multiple Subject Alternative Names.

Steps:

  1. Enable link previews in the desktop client
  2. Send a message containing a URL whose domain exists in SAN but not in CN
  3. Verify that the preview renders without a certificate error

Related Issue

Fixes #2795

Summary by CodeRabbit

  • New Features

    • Open external links in your default browser
    • Automatic renderer crash recovery (clears session/cache and reloads)
  • Improvements

    • Stronger hostname validation for certificates
    • Adjusted unsupported-versions timing and per-server throttling
    • Enhanced video-call caching, prewarm, and Linux display-server troubleshooting
  • Documentation

    • Expanded setup, testing, release, and video-call guidance
  • Localization

    • Various translation updates and string refinements; one Swedish locale removed

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 9, 2026

Important

Review skipped

Too many files!

This PR contains 241 files, which is 91 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6f743b5-a005-4ba4-8bdd-3ae8d369c436

📥 Commits

Reviewing files that changed from the base of the PR and between f5ecf7e and 61d43d2.

⛔ Files ignored due to path filters (3)
  • .yarn/patches/@ewsjs-xhr-npm-2.0.2-77506b0a6c.patch is excluded by !**/.yarn/**
  • workspaces/desktop-release-action/dist/index.js is excluded by !**/dist/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (241)
  • .cursor/worktrees.json
  • .eslintignore
  • .eslintrc.json
  • .github/CONTRIBUTING.md
  • .github/ISSUE_TEMPLATE.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/build-release.yml
  • .github/workflows/powershell-lint.yml
  • .github/workflows/pull-request-build.yml
  • .github/workflows/validate-pr.yml
  • .gitignore
  • .prettierrc.mjs
  • AGENTS.md
  • CHANGELOG.md
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • LICENSE
  • README.md
  • alpha-app-update.yml
  • beta-app-update.yml
  • build/afterPack.js
  • build/entitlements.mac.plist
  • build/entitlements.mas.inherit.plist
  • build/entitlements.mas.plist
  • build/install-kms-cng-provider.ps1
  • build/installers/.gitkeep
  • build/linux/wrapper.sh
  • build/notarize.js
  • build/winSignKms.js
  • docs/alpha-release-process.md
  • docs/linux-display-server.md
  • docs/linux-wayland-bug-postmortem.md
  • docs/pexip-auth-credentials.md
  • docs/pre-release-process.md
  • docs/qa-alpha-update-testing.md
  • docs/supported-versions-flow.md
  • docs/video-call-screen-sharing.md
  • docs/video-call-window-flow.md
  • docs/video-call-window-management.md
  • docs/video-call-window-wgc-limitations.md
  • electron-builder.json
  • package.json
  • rollup.config.mjs
  • scripts/README.md
  • scripts/install-volta.sh
  • scripts/linux-test-appimage.sh
  • scripts/linux-test-deb.sh
  • scripts/release-tag.ts
  • src/app/PersistableValues.ts
  • src/app/actions.ts
  • src/app/main/app.main.spec.ts
  • src/app/main/app.ts
  • src/app/main/data.spec.ts
  • src/app/main/data.ts
  • src/app/reducers/screenCaptureFallbackForced.ts
  • src/app/selectors.ts
  • src/documentViewer/ipc.ts
  • src/downloads/actions.spec.ts
  • src/downloads/actions.ts
  • src/downloads/integration.spec.ts
  • src/downloads/main.spec.ts
  • src/downloads/main.ts
  • src/downloads/main/download-persistence.spec.ts
  • src/downloads/main/setup.ts
  • src/downloads/notifications.spec.ts
  • src/downloads/reducers/downloads.spec.ts
  • src/downloads/reducers/downloads.ts
  • src/errors.ts
  • src/errors/main.spec.ts
  • src/i18n/ar.i18n.json
  • src/i18n/de-DE.i18n.json
  • src/i18n/en.i18n.json
  • src/i18n/es.i18n.json
  • src/i18n/fi.i18n.json
  • src/i18n/fr.i18n.json
  • src/i18n/hu.i18n.json
  • src/i18n/it-IT.i18n.json
  • src/i18n/ja.i18n.json
  • src/i18n/nb-NO.i18n.json
  • src/i18n/nn.i18n.json
  • src/i18n/no.i18n.json
  • src/i18n/pl.i18n.json
  • src/i18n/pt-BR.i18n.json
  • src/i18n/resources.ts
  • src/i18n/ru.i18n.json
  • src/i18n/se.i18n.json
  • src/i18n/sv.i18n.json
  • src/i18n/tr-TR.i18n.json
  • src/i18n/uk-UA.i18n.json
  • src/i18n/zh-CN.i18n.json
  • src/i18n/zh-TW.i18n.json
  • src/i18n/zh.i18n.json
  • src/injected.ts
  • src/ipc/channels.ts
  • src/ipc/renderer.ts
  • src/jitsi/ipc.ts
  • src/logViewerWindow/LogEntry.tsx
  • src/logViewerWindow/constants.ts
  • src/logViewerWindow/ipc.ts
  • src/logViewerWindow/log-viewer-window.tsx
  • src/logViewerWindow/logViewerWindow.tsx
  • src/logViewerWindow/types.ts
  • src/logging/cleanup.ts
  • src/logging/context.ts
  • src/logging/dedup.ts
  • src/logging/fallback.ts
  • src/logging/index.ts
  • src/logging/preload.ts
  • src/logging/privacy.ts
  • src/logging/scopes.ts
  • src/logging/utils.ts
  • src/main.spec.ts
  • src/main.ts
  • src/navigation/main.ts
  • src/notifications/actions.ts
  • src/notifications/attentionDrawing.ts
  • src/notifications/common.ts
  • src/notifications/main.ts
  • src/notifications/preload.ts
  • src/outlookCalendar/AGENTS.md
  • src/outlookCalendar/errorClassification.ts
  • src/outlookCalendar/getOutlookEvents.spec.ts
  • src/outlookCalendar/getOutlookEvents.ts
  • src/outlookCalendar/ipc.ts
  • src/outlookCalendar/logger.ts
  • src/outlookCalendar/preload.ts
  • src/outlookCalendar/reducers/allowInsecureOutlookConnections.ts
  • src/outlookCalendar/reducers/outlookCalendarSyncInterval.ts
  • src/outlookCalendar/reducers/outlookCalendarSyncIntervalOverride.ts
  • src/outlookCalendar/type.ts
  • src/preload.ts
  • src/public/error.css
  • src/public/index.html
  • src/public/loading.css
  • src/public/log-viewer-window.html
  • src/public/main.css
  • src/public/video-call-window.html
  • src/rootWindow.ts
  • src/servers/common.ts
  • src/servers/preload/api.ts
  • src/servers/preload/gitCommitHash.ts
  • src/servers/preload/internalVideoChatWindow.ts
  • src/servers/preload/openExternal.ts
  • src/servers/preload/reloadServer.ts
  • src/servers/preload/themeAppearance.ts
  • src/servers/reducers.ts
  • src/servers/supportedVersions/main.main.spec.ts
  • src/servers/supportedVersions/main.ts
  • src/store/index.ts
  • src/store/rootReducer.ts
  • src/ui/actions.ts
  • src/ui/components/AboutDialog/index.tsx
  • src/ui/components/Dialog/hooks.ts
  • src/ui/components/OutlookCredentialsDialog/index.tsx
  • src/ui/components/ServerInfoContent.tsx
  • src/ui/components/ServerInfoModal/index.tsx
  • src/ui/components/ServersView/DocumentViewer.tsx
  • src/ui/components/ServersView/ServerPane.tsx
  • src/ui/components/ServersView/UnsupportedServer.tsx
  • src/ui/components/ServersView/index.tsx
  • src/ui/components/ServersView/styles.tsx
  • src/ui/components/SettingsView/DeveloperTab.tsx
  • src/ui/components/SettingsView/GeneralTab.tsx
  • src/ui/components/SettingsView/SettingsView.tsx
  • src/ui/components/SettingsView/features/AvailableBrowsers.tsx
  • src/ui/components/SettingsView/features/DebugLogging.tsx
  • src/ui/components/SettingsView/features/DetailedEventsLogging.tsx
  • src/ui/components/SettingsView/features/MenuBar.tsx
  • src/ui/components/SettingsView/features/OutlookCalendarSyncInterval.tsx
  • src/ui/components/SettingsView/features/ScreenCaptureFallback.tsx
  • src/ui/components/SettingsView/features/SideBar.tsx
  • src/ui/components/SettingsView/features/ThemeAppearance.tsx
  • src/ui/components/SettingsView/features/TransparentWindow.tsx
  • src/ui/components/SettingsView/features/VerboseOutlookLogging.tsx
  • src/ui/components/Shell/index.tsx
  • src/ui/components/Shell/styles.tsx
  • src/ui/components/SideBar/ServerButton.tsx
  • src/ui/components/SideBar/ServerInfoDropdown.tsx
  • src/ui/components/SideBar/index.tsx
  • src/ui/components/SupportedVersionDialog/index.tsx
  • src/ui/components/TopBar/index.tsx
  • src/ui/main/dialogs.ts
  • src/ui/main/dock.ts
  • src/ui/main/mediaPermissions.ts
  • src/ui/main/menuBar.ts
  • src/ui/main/rootWindow.spec.ts
  • src/ui/main/rootWindow.ts
  • src/ui/main/serverView/index.ts
  • src/ui/reducers/dialogs.ts
  • src/ui/reducers/isDebugLoggingEnabled.ts
  • src/ui/reducers/isDetailedEventsLoggingEnabled.ts
  • src/ui/reducers/isDeveloperModeEnabled.ts
  • src/ui/reducers/isMenuBarEnabled.spec.ts
  • src/ui/reducers/isSideBarEnabled.spec.ts
  • src/ui/reducers/isTransparentWindowEnabled.ts
  • src/ui/reducers/isVerboseOutlookLoggingEnabled.ts
  • src/ui/reducers/isVideoCallDevtoolsAutoOpenEnabled.ts
  • src/ui/reducers/isVideoCallScreenCaptureFallbackEnabled.ts
  • src/ui/reducers/userThemePreference.ts
  • src/ui/selectors.ts
  • src/ui/utils/platform.ts
  • src/updates/actions.ts
  • src/updates/common.ts
  • src/updates/main.spec.ts
  • src/updates/main.ts
  • src/updates/reducers.ts
  • src/urls.ts
  • src/videoCallWindow/ipc.ts
  • src/videoCallWindow/main/ipc.spec.ts
  • src/videoCallWindow/preload/index.ts
  • src/videoCallWindow/preload/jitsiBridge.ts
  • src/videoCallWindow/screenPicker/createScreenPicker.ts
  • src/videoCallWindow/screenPicker/index.ts
  • src/videoCallWindow/screenPicker/providers/InternalPickerProvider.ts
  • src/videoCallWindow/screenPicker/providers/PortalPickerProvider.ts
  • src/videoCallWindow/screenPicker/types.ts
  • src/videoCallWindow/screenSharePicker.tsx
  • src/videoCallWindow/screenSharePickerMount.tsx
  • src/videoCallWindow/video-call-window.ts
  • src/videoCallWindow/video-call-window.tsx
  • src/videoCallWindow/videoCallWindow.tsx
  • tsconfig.json
  • workspaces/desktop-release-action/.prettierrc.mjs
  • workspaces/desktop-release-action/action.yml
  • workspaces/desktop-release-action/package.json
  • workspaces/desktop-release-action/src/github.ts
  • workspaces/desktop-release-action/src/index.ts
  • workspaces/desktop-release-action/src/shell.ts
  • workspaces/desktop-release-action/src/types/js-yaml.d.ts
  • workspaces/desktop-release-action/src/windows.ts
  • workspaces/desktop-release-action/src/windows/certificates.ts
  • workspaces/desktop-release-action/src/windows/google-cloud.ts
  • workspaces/desktop-release-action/src/windows/index.ts
  • workspaces/desktop-release-action/src/windows/kms-provider.ts
  • workspaces/desktop-release-action/src/windows/msi-service-fix.ts
  • workspaces/desktop-release-action/src/windows/sign-packages.ts
  • workspaces/desktop-release-action/src/windows/signing-tools.ts
  • workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts
  • workspaces/desktop-release-action/src/windows/verify-signature.ts
  • workspaces/desktop-release-action/tsconfig.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds in-app external-link interception wired through a new IPC channel to main for safe opening; adds hostname validation against certificate SANs to accept previews; exposes openExternal in preload; adds renderer crash recovery; plus broad non-functional formatting, docs, i18n, and CI/config tweaks.

Changes

Cohort / File(s) Summary
External link handling & IPC
src/injected.ts, src/servers/preload/openExternal.ts, src/servers/preload/api.ts, src/ipc/channels.ts, src/main.ts
Injects a global anchor click handler, exposes window.RocketChatDesktop.openExternal(url), adds an open-external IPC channel and a main handler that validates and delegates to the OS opener.
Certificate hostname validation
src/navigation/main.ts
Adds isHostnameValid() using X509Certificate to validate hostname (SAN/CN) and early-accepts matches in the certificate-error handler; delays certificate serialization until after validation.
Renderer crash recovery
src/ui/main/rootWindow.ts
Registers render-process-gone handler to log the crash, clear session/cache data, reload the window, and log recovery errors.
Preload / Public API surface
src/servers/preload/api.ts, src/servers/preload/openExternal.ts
Preload API extended to include openExternal(url): Promise<void> and implemented the renderer→main invocation.
IPC typing
src/ipc/channels.ts
Added 'open-external': (url: string) => void to ChannelToArgsMap.
i18n changes
src/i18n/*
Multiple localization edits (Norwegian/Polish/Swedish), removal of se.i18n.json, and many EOF newline normalizations.
Docs & guides
docs/...
Expanded and clarified release, display-server, QA, supported-versions, and video-call documentation and diagrams.
HTML/CSS fixes
src/public/index.html, src/public/main.css, src/public/loading.css, src/public/video-call-window.html, src/public/error.css
Minor HTML/CSS formatting fixes including missing semicolon in :root and markup normalization.
Release action & CI fixes
workspaces/desktop-release-action/..., .github/workflows/powershell-lint.yml, alpha-app-update.yml, beta-app-update.yml
YAML key fixes, Prettier/tsconfig formatting, JAVA_HOME assignment, checksum guard added, and formatting adjustments across release-action scripts.
Repository formatting & misc docs
.eslintrc.json, .prettierrc.mjs, CHANGELOG.md, .github/*, scripts/README.md, etc.
Widespread non-functional formatting, lint/config tweaks, small doc text/spaces and README updates.
sequenceDiagram
    autonumber
    participant User
    participant Renderer
    participant Preload
    participant IPC as "IPC Renderer"
    participant Main
    participant Nav as "navigation/main"
    participant OS as "browserLauncher (openExternal)"

    User->>Renderer: Click anchor (http/https)
    Renderer->>Renderer: injected click handler inspects URL
    alt External URL
        Renderer->>Preload: window.RocketChatDesktop.openExternal(url)
        Preload->>IPC: invoke('open-external', url)
        IPC->>Main: IPC invoke 'open-external'
        Main->>Nav: isProtocolAllowed / hostname checks
        alt Allowed
            Main->>OS: openExternal(url)
            OS-->>Main: success
            Main-->>IPC: resolve
        else Disallowed
            Main-->>IPC: reject / no-op
        end
        IPC-->>Preload: promise result
        Preload-->>Renderer: resolves/rejects
    else Internal URL
        Renderer-->>User: allow default navigation
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Version 4.12.0 #3189 — touches src/injected.ts; related by changes to the injected script and in-page click/behavior handling.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes substantial formatting changes across numerous files (i18n, docs, configs, scripts) unrelated to the SAN certificate validation fix, representing significant out-of-scope modifications beyond the stated objective. Separate formatting-only changes into a dedicated PR. Keep this PR focused solely on the certificate validation logic updates in src/navigation/main.ts, src/main.ts, and related functional code.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly and specifically describes the main change: fixing certificate validation to accept Subject Alternative Names (SAN) for link previews, which directly addresses the core issue in the changeset.
Linked Issues check ✅ Passed The PR implements the primary objective from issue #2795: updating certificate validation to check SAN entries before CN, enabling proper validation of certificates where the hostname exists in SAN but not CN.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts (1)

92-104: ⚠️ Potential issue | 🟠 Major

Missing primary installer should still fail the action.

This new existsSync guard turns a broken latest.yml reference into a silent success. The caller in workspaces/desktop-release-action/src/windows/index.ts:70-82 treats checksum updating as a fail-fast step, so if yamlData.path is missing here we can still publish metadata whose top-level path/sha512 no longer matches any artifact. Please keep the existence check, but throw when the primary installer referenced by latest.yml is absent.

Suggested fix
     if (yamlData.path) {
       const mainFilePath = path.join(distPath, yamlData.path);
-      if (fs.existsSync(mainFilePath)) {
-        const mainChecksum = calculateSHA512(mainFilePath);
-        if (yamlData.sha512 !== mainChecksum) {
-          core.info(`Updating main installer ${yamlData.path}:`);
-          core.info(`  Old SHA512: ${yamlData.sha512}`);
-          core.info(`  New SHA512: ${mainChecksum}`);
-          yamlData.sha512 = mainChecksum;
-        }
-      }
+      if (!fs.existsSync(mainFilePath)) {
+        throw new Error(
+          `Primary installer referenced by latest.yml was not found: ${yamlData.path}`
+        );
+      }
+
+      const mainChecksum = calculateSHA512(mainFilePath);
+      if (yamlData.sha512 !== mainChecksum) {
+        core.info(`Updating main installer ${yamlData.path}:`);
+        core.info(`  Old SHA512: ${yamlData.sha512}`);
+        core.info(`  New SHA512: ${mainChecksum}`);
+        yamlData.sha512 = mainChecksum;
+      }
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts`
around lines 92 - 104, The current existsSync guard in update-yaml-checksums.ts
silently skips updating when the primary installer (yamlData.path) is missing;
instead keep the fs.existsSync check but throw an error (or call core.setFailed)
when the referenced mainFilePath does not exist so the action fails fast; locate
the block that reads yamlData.path and mainFilePath and replace the silent
branch with a failing branch that includes the missing path in the error
message, leaving calculateSHA512 and the checksum update logic unchanged.
🧹 Nitpick comments (6)
.cursor/worktrees.json (1)

2-2: Unrelated change in focused bug-fix PR.

This formatting change to a Cursor IDE configuration file is completely unrelated to the PR's stated objective of fixing TLS certificate validation for Subject Alternative Names. Consider keeping PRs focused on a single concern—this type of incidental formatting change could be saved for a dedicated cleanup PR.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.cursor/worktrees.json at line 2, The change introducing the
"setup-worktree": ["yarn install"] entry is unrelated to the TLS SAN bug fix;
remove or revert that JSON edit from this branch/commit (or move it into its own
cleanup commit/PR) so the PR remains focused—locate the .cursor/worktrees.json
modification that adds the "setup-worktree" key and undo it before merging.
scripts/README.md (2)

113-113: Consider clarifying the relationship between node.js/npm and Volta.

The phrasing "(or Volta - the script will install it automatically if needed)" might confuse readers. Consider rephrasing to make it clearer that Volta provides node.js and npm, for example: "node.js and npm (provided by Volta, which the script will install automatically if needed)".

📝 Suggested clarification
-- `node.js` and `npm` (or Volta - the script will install it automatically if needed)
+- `node.js` and `npm` (provided by Volta, which the script will install automatically if needed)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/README.md` at line 113, The README line "`node.js` and `npm` (or
Volta - the script will install it automatically if needed)" is ambiguous;
update that phrasing to clarify that Volta provides Node.js and npm and that the
script will install Volta if needed—for example, replace the text with
"`node.js` and `npm` (provided by Volta, which the script will install
automatically if needed)" so readers understand Volta supplies Node/npm rather
than being an alternative.

123-123: Consider splitting the long sentence for better readability.

The bullet point combines multiple pieces of information with a semicolon. Consider restructuring for clarity, such as splitting into separate sub-bullets or simplifying the sentence.

♻️ Suggested restructuring
-- **Volta** (if node.js/npm not found) - provides node.js and npm; Yarn is already bundled in the repository at `.yarn/releases/yarn-4.6.0.cjs`
+- **Volta** (if node.js/npm not found) - provides node.js and npm
+  - Yarn is already bundled in the repository at `.yarn/releases/yarn-4.6.0.cjs`

Or as a single clearer sentence:

-- **Volta** (if node.js/npm not found) - provides node.js and npm; Yarn is already bundled in the repository at `.yarn/releases/yarn-4.6.0.cjs`
+- **Volta** (if node.js/npm not found) - provides node.js and npm (Yarn is bundled in-repo at `.yarn/releases/yarn-4.6.0.cjs`)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/README.md` at line 123, Split the long Volta bullet into clearer
pieces: replace the single semicolon line referencing Volta, node.js/npm, and
Yarn with either two bullets (one stating Volta provides node.js and npm when
not found, and a second noting Yarn is bundled at
`.yarn/releases/yarn-4.6.0.cjs`) or a single simplified sentence that first
explains Volta’s role and then mentions the bundled Yarn path; update the bullet
that currently begins with "Volta" to this split or simplified form to improve
readability.
docs/supported-versions-flow.md (1)

136-136: Clarify blocking logic for error state.

The description "Block if fallback confirms unsupported; otherwise allow (uncertain data)" is ambiguous. Based on the code snippet from UnsupportedServer.tsx showing shouldBlock = isSupported === false && fetchState !== 'loading', the blocking occurs when isSupported === false regardless of whether it's from fresh data or fallback.

Consider rewording for clarity:

"error - Block if isSupported === false (fallback data indicates unsupported); allow if isSupported !== false (uncertain/unknown)"

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/supported-versions-flow.md` at line 136, Update the error-state label to
reflect the actual blocking logic used in UnsupportedServer.tsx: change the
Block2 text for the "error" transition so it states that blocking happens when
isSupported === false and otherwise allow (uncertain/unknown); reference the
CheckState -->|error| Block2 node and the shouldBlock / isSupported / fetchState
logic in UnsupportedServer.tsx when making the wording change.
docs/video-call-screen-sharing.md (2)

293-296: Add language identifier to fenced code block.

The code block should specify a language for syntax highlighting. Since this appears to be plain text showing cache behavior states, use text as the language identifier.

📝 Suggested fix
-```
+```text
 Cache hit within 3s → Return cached data
 Cache expired → Fetch new data (blocking)
 Window close → Schedule 60s cleanup timer

As per coding guidelines, markdownlint-cli2 rule MD040 requires fenced code blocks to have a language specified.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/video-call-screen-sharing.md` around lines 293 - 296, The fenced code
block containing the lines "Cache hit within 3s → Return cached data", "Cache
expired → Fetch new data (blocking)", and "Window close → Schedule 60s cleanup
timer" needs a language identifier to satisfy MD040; update the opening fence
(the triple backticks) to include the language token text (i.e., change ``` to
```text) so the block is explicitly marked as plain text for syntax highlighting
and linting.

307-311: Add language identifier to fenced code block.

The code block should specify a language for syntax highlighting. Use text as the language identifier for this plain text cache behavior description.

📝 Suggested fix
-```
+```text
 Cache exists → Return immediately (always instant)
 Cache stale → Background refresh (non-blocking)
 Window close → Keep cache (no cleanup timer)

As per coding guidelines, markdownlint-cli2 rule MD040 requires fenced code blocks to have a language specified.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/video-call-screen-sharing.md` around lines 307 - 311, The fenced code
block that contains the three lines starting with "Cache exists → Return
immediately" must include a language identifier for markdownlint rule MD040;
update that fenced block by changing the opening backticks from ``` to ```text
so the block reads as a 'text' code block (the block with the lines "Cache
exists → Return immediately (always instant)", "Cache stale → Background refresh
(non-blocking)", "Window close → Keep cache (no cleanup timer)").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Around line 125-130: The CHANGELOG contains a duplicated release section for
the 3.3.0 entry (the header line "#
[3.3.0](https://github.com/RocketChat/Rocket.Chat.Electron/compare/3.2.2...3.3.0)
(2021-06-17)" and its following "### Bug Fixes" list appears twice); remove the
redundant second 3.3.0 block so only one header and its associated bullet points
(the two i18n entries referencing commits cb07526 and 891b7b7) remain, ensuring
no other changelog entries are altered.

In `@docs/supported-versions-flow.md`:
- Line 119: Update the wording for the "Total wait per source" line to clarify
that the 4 seconds refers only to the delay time between retry attempts and does
not include the duration of the fetch attempts themselves; replace the existing
sentence with a clarified version such as: "Total wait per source: Up to 4
seconds (delay time only: 3 attempts with 2 waits × 2s delays between them)".
Ensure you modify the text that begins with "Total wait per source" so readers
understand fetch durations are excluded.

In `@src/injected.ts`:
- Around line 204-216: The origin check using startsWith is unsafe; replace the
startsWith comparison with a strict origin comparison by constructing a URL
object (new URL(link.href)) and comparing its origin to window.location.origin
(e.g., const linkOrigin = new URL(url).origin; if (linkOrigin ===
window.location.origin) return;), keeping the existing external-link branch that
calls event.preventDefault() and window.RocketChatDesktop?.openExternal(url);
ensure you handle any potential malformed URLs (e.g., guard with try/catch or
validate link.href) to avoid throwing when constructing the URL.

In `@src/ipc/channels.ts`:
- Line 134: The new 'open-external' IPC channel must be gated in the
main-process handler: update the handler that currently uses event.sender (the
code registering the 'open-external' handler) to validate the sender is a
trusted top-level renderer before calling shell.openExternal — e.g., confirm
event.frameId is the main frame (frameId === 0) and/or compare event.sender
(webContents) to the known trusted mainWindow.webContents or match against an
allowlist of origins (checking event.senderFrame.url) and reject otherwise;
alternatively, expose the capability only via a preload contextBridge API bound
to the trusted window. Ensure the handler returns an error or no-op for
untrusted senders rather than forwarding their URL requests.

In `@src/main.ts`:
- Around line 148-150: The IPC handler for 'open-external' forwards an arbitrary
URL to openExternal() without validation; update the handler (the
handle('open-external', ...) callback) to first validate the incoming url using
the existing isProtocolAllowed() helper (same approach used by
server-view/open-url-on-browser) and only call openExternal(url) if
isProtocolAllowed(url) returns true; if validation fails, do not call
openExternal and instead return/reject or log an error so disallowed protocols
cannot be launched from renderer code.

In `@src/navigation/main.ts`:
- Around line 74-78: The handler currently auto-accepts certificates whenever
isHostnameValid(certificate, host) returns true, which may accept certs with
other errors; update the certificate-error event handler to only call
callback(true) when the failure is specifically a hostname-mismatch error (e.g.,
error equals the hostname-related net error like
'net::ERR_CERT_COMMON_NAME_INVALID' or other hostname-specific error codes) AND
isHostnameValid(certificate, host) is true; for all other certificate errors,
leave the existing trust prompt/flow intact (do not call callback(true) and let
the existing path handle prompting or rejection). Ensure you reference the
certificate-error handler, the error parameter, isHostnameValid(certificate,
host), and the callback function when making the change.
- Around line 44-58: The isHostnameValid function currently does manual SAN/CN
matching; replace its logic to use Node's built-in RFC2818 checker: construct a
crypto.X509Certificate from the raw cert data (use certificate.data) and call
its checkHost(hostname) method, ensuring you only fall back to CN when
subjectAltName is entirely absent (which checkHost already handles), and thereby
gain wildcard and port-insensitive matching; update the isHostnameValid
signature to accept the same inputs but return the boolean result of
x509.checkHost(hostname).

In `@src/servers/preload/openExternal.ts`:
- Around line 3-4: The openExternal IPC call currently forwards a
renderer-controlled URL directly via invoke('open-external', url); add scheme
validation using the existing isProtocolAllowed(url) helper before invoking; if
isProtocolAllowed returns false, do not call invoke and instead reject/return a
resolved Promise (or no-op) to prevent unsafe schemes. Update the export
openExternal function to perform this check (using isProtocolAllowed) and only
call invoke('open-external', url) when validation passes.

In `@src/ui/main/rootWindow.ts`:
- Around line 519-529: The handler for 'render-process-gone' is clearing the
shared default session (calls to session.clearCache() and
session.clearStorageData()), which wipes app-wide cookies and storage; remove
those calls from the render-process-gone handler in rootWindow.ts and instead
recover the renderer by invoking browserWindow.webContents.reloadIgnoringCache()
(or browserWindow.webContents.reload() if reloadIgnoringCache is unavailable)
within the async callback for
browserWindow.webContents.on('render-process-gone', ...), leaving all
session/defaultSession state untouched.

In `@workspaces/desktop-release-action/action.yml`:
- Around line 60-62: The runs block currently specifies an unsupported runtime
("using: 'node12'"); update the runs.using value in the action metadata to a
supported runtime (e.g., "node20" or "node24") so the action will run on current
GitHub-hosted runners; locate the runs block with the existing using field and
replace node12 with node20 or node24 (keeping the main: 'dist/index.js' entry
unchanged).

In `@workspaces/desktop-release-action/src/windows/sign-packages.ts`:
- Around line 129-141: The loop currently calls
signBuiltPackages(path.dirname(file)) which re-scans the whole directory and
causes duplicate and cross-type signing; instead extract the per-file signing
logic from signBuiltPackages into a new function signFile(file: string) that
signs exactly that single artifact, update signPackageType to call signFile for
each matched file (preserving the original pattern scope) and update
signBuiltPackages to either delegate to signFile or be removed; ensure no
directory re-scan happens (remove path.dirname(file) calls) so each file is
processed only once.

---

Outside diff comments:
In `@workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts`:
- Around line 92-104: The current existsSync guard in update-yaml-checksums.ts
silently skips updating when the primary installer (yamlData.path) is missing;
instead keep the fs.existsSync check but throw an error (or call core.setFailed)
when the referenced mainFilePath does not exist so the action fails fast; locate
the block that reads yamlData.path and mainFilePath and replace the silent
branch with a failing branch that includes the missing path in the error
message, leaving calculateSHA512 and the checksum update logic unchanged.

---

Nitpick comments:
In @.cursor/worktrees.json:
- Line 2: The change introducing the "setup-worktree": ["yarn install"] entry is
unrelated to the TLS SAN bug fix; remove or revert that JSON edit from this
branch/commit (or move it into its own cleanup commit/PR) so the PR remains
focused—locate the .cursor/worktrees.json modification that adds the
"setup-worktree" key and undo it before merging.

In `@docs/supported-versions-flow.md`:
- Line 136: Update the error-state label to reflect the actual blocking logic
used in UnsupportedServer.tsx: change the Block2 text for the "error" transition
so it states that blocking happens when isSupported === false and otherwise
allow (uncertain/unknown); reference the CheckState -->|error| Block2 node and
the shouldBlock / isSupported / fetchState logic in UnsupportedServer.tsx when
making the wording change.

In `@docs/video-call-screen-sharing.md`:
- Around line 293-296: The fenced code block containing the lines "Cache hit
within 3s → Return cached data", "Cache expired → Fetch new data (blocking)",
and "Window close → Schedule 60s cleanup timer" needs a language identifier to
satisfy MD040; update the opening fence (the triple backticks) to include the
language token text (i.e., change ``` to ```text) so the block is explicitly
marked as plain text for syntax highlighting and linting.
- Around line 307-311: The fenced code block that contains the three lines
starting with "Cache exists → Return immediately" must include a language
identifier for markdownlint rule MD040; update that fenced block by changing the
opening backticks from ``` to ```text so the block reads as a 'text' code block
(the block with the lines "Cache exists → Return immediately (always instant)",
"Cache stale → Background refresh (non-blocking)", "Window close → Keep cache
(no cleanup timer)").

In `@scripts/README.md`:
- Line 113: The README line "`node.js` and `npm` (or Volta - the script will
install it automatically if needed)" is ambiguous; update that phrasing to
clarify that Volta provides Node.js and npm and that the script will install
Volta if needed—for example, replace the text with "`node.js` and `npm`
(provided by Volta, which the script will install automatically if needed)" so
readers understand Volta supplies Node/npm rather than being an alternative.
- Line 123: Split the long Volta bullet into clearer pieces: replace the single
semicolon line referencing Volta, node.js/npm, and Yarn with either two bullets
(one stating Volta provides node.js and npm when not found, and a second noting
Yarn is bundled at `.yarn/releases/yarn-4.6.0.cjs`) or a single simplified
sentence that first explains Volta’s role and then mentions the bundled Yarn
path; update the bullet that currently begins with "Volta" to this split or
simplified form to improve readability.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5555b640-9578-4f2d-a753-30d4f52d8594

📥 Commits

Reviewing files that changed from the base of the PR and between 49261f5 and 6d5fbe0.

⛔ Files ignored due to path filters (1)
  • workspaces/desktop-release-action/dist/index.js is excluded by !**/dist/**
📒 Files selected for processing (68)
  • .cursor/worktrees.json
  • .eslintrc.json
  • .github/CONTRIBUTING.md
  • .github/ISSUE_TEMPLATE.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/powershell-lint.yml
  • .prettierrc.mjs
  • CHANGELOG.md
  • CODE_OF_CONDUCT.md
  • alpha-app-update.yml
  • beta-app-update.yml
  • docs/alpha-release-process.md
  • docs/linux-display-server.md
  • docs/qa-alpha-update-testing.md
  • docs/supported-versions-flow.md
  • docs/video-call-screen-sharing.md
  • docs/video-call-window-flow.md
  • docs/video-call-window-management.md
  • docs/video-call-window-wgc-limitations.md
  • scripts/README.md
  • src/i18n/ar.i18n.json
  • src/i18n/de-DE.i18n.json
  • src/i18n/es.i18n.json
  • src/i18n/fi.i18n.json
  • src/i18n/fr.i18n.json
  • src/i18n/it-IT.i18n.json
  • src/i18n/ja.i18n.json
  • src/i18n/nb-NO.i18n.json
  • src/i18n/nn.i18n.json
  • src/i18n/no.i18n.json
  • src/i18n/pl.i18n.json
  • src/i18n/pt-BR.i18n.json
  • src/i18n/ru.i18n.json
  • src/i18n/se.i18n.json
  • src/i18n/sv.i18n.json
  • src/i18n/tr-TR.i18n.json
  • src/i18n/uk-UA.i18n.json
  • src/i18n/zh-CN.i18n.json
  • src/i18n/zh-TW.i18n.json
  • src/i18n/zh.i18n.json
  • src/injected.ts
  • src/ipc/channels.ts
  • src/main.ts
  • src/navigation/main.ts
  • src/outlookCalendar/AGENTS.md
  • src/public/error.css
  • src/public/index.html
  • src/public/loading.css
  • src/public/main.css
  • src/public/video-call-window.html
  • src/servers/preload/api.ts
  • src/servers/preload/openExternal.ts
  • src/ui/main/rootWindow.ts
  • tsconfig.json
  • workspaces/desktop-release-action/.prettierrc.mjs
  • workspaces/desktop-release-action/action.yml
  • workspaces/desktop-release-action/src/github.ts
  • workspaces/desktop-release-action/src/index.ts
  • workspaces/desktop-release-action/src/types/js-yaml.d.ts
  • workspaces/desktop-release-action/src/windows/certificates.ts
  • workspaces/desktop-release-action/src/windows/google-cloud.ts
  • workspaces/desktop-release-action/src/windows/kms-provider.ts
  • workspaces/desktop-release-action/src/windows/msi-service-fix.ts
  • workspaces/desktop-release-action/src/windows/sign-packages.ts
  • workspaces/desktop-release-action/src/windows/signing-tools.ts
  • workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts
  • workspaces/desktop-release-action/tsconfig.json
💤 Files with no reviewable changes (3)
  • src/i18n/se.i18n.json
  • src/public/error.css
  • .github/ISSUE_TEMPLATE/feature_request.md
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript strict mode enabled in TypeScript configuration
Use React functional components with hooks instead of class components
Follow FSA (Flux Standard Action) pattern for Redux actions
Use camelCase for file names and PascalCase for component file names
All code must pass ESLint and TypeScript checks
Write self-documenting code with clear naming; avoid unnecessary comments except for complex business logic or non-obvious decisions
Use Fuselage components from @rocket.chat/fuselage for all UI work and only create custom components when Fuselage doesn't provide what's needed
Check Theme.d.ts for valid color tokens when using Fuselage components
Use defensive coding with optional chaining and fallbacks for Linux-only APIs (process.getuid(), process.getgid(), process.geteuid(), process.getegid()) to ensure cross-platform compatibility across Windows, macOS, and Linux

Files:

  • workspaces/desktop-release-action/src/windows/kms-provider.ts
  • workspaces/desktop-release-action/src/index.ts
  • src/navigation/main.ts
  • src/ui/main/rootWindow.ts
  • workspaces/desktop-release-action/src/github.ts
  • src/servers/preload/api.ts
  • src/servers/preload/openExternal.ts
  • workspaces/desktop-release-action/src/windows/msi-service-fix.ts
  • src/main.ts
  • workspaces/desktop-release-action/src/windows/google-cloud.ts
  • workspaces/desktop-release-action/src/windows/sign-packages.ts
  • workspaces/desktop-release-action/src/types/js-yaml.d.ts
  • workspaces/desktop-release-action/src/windows/certificates.ts
  • src/ipc/channels.ts
  • workspaces/desktop-release-action/src/windows/signing-tools.ts
  • workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts
  • src/injected.ts
🧠 Learnings (19)
📚 Learning: 2026-03-06T19:31:11.433Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: src/outlookCalendar/AGENTS.md:0-0
Timestamp: 2026-03-06T19:31:11.433Z
Learning: Applies to src/outlookCalendar/**/*(!preload).ts?(x) : Always use the centralized logger from `logger.ts` (outlookLog, outlookDebug, outlookError, outlookWarn, outlookEventDetail) instead of console.log() for Outlook Calendar module logging

Applied to files:

  • src/outlookCalendar/AGENTS.md
📚 Learning: 2026-03-06T19:31:11.433Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: src/outlookCalendar/AGENTS.md:0-0
Timestamp: 2026-03-06T19:31:11.433Z
Learning: Applies to src/outlookCalendar/**/preload.ts : Keep preload.ts logging minimal since it cannot access the verbose logging toggle from Redux Store and all logs always appear

Applied to files:

  • src/outlookCalendar/AGENTS.md
📚 Learning: 2026-03-06T19:31:11.433Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: src/outlookCalendar/AGENTS.md:0-0
Timestamp: 2026-03-06T19:31:11.433Z
Learning: Applies to src/outlookCalendar/**/*.{ts,tsx} : Always use outlookError() for errors as it logs regardless of verbose mode settings, ensuring errors are always visible to users

Applied to files:

  • src/outlookCalendar/AGENTS.md
📚 Learning: 2026-03-06T19:31:11.433Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: src/outlookCalendar/AGENTS.md:0-0
Timestamp: 2026-03-06T19:31:11.433Z
Learning: Applies to src/outlookCalendar/**/*.{ts,tsx} : Use `createClassifiedError()` from `errorClassification.ts` for user-facing errors to provide error categorization, user-friendly messages, and structured error context

Applied to files:

  • src/outlookCalendar/AGENTS.md
📚 Learning: 2026-03-06T19:31:11.433Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: src/outlookCalendar/AGENTS.md:0-0
Timestamp: 2026-03-06T19:31:11.433Z
Learning: Verbose logging (outlookLog, outlookWarn, outlookDebug) should only output when the verbose logging toggle is enabled in Settings > Developer > Verbose Outlook Logging

Applied to files:

  • src/outlookCalendar/AGENTS.md
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Applies to **/*.{ts,tsx} : All code must pass ESLint and TypeScript checks

Applied to files:

  • .eslintrc.json
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript strict mode enabled in TypeScript configuration

Applied to files:

  • .eslintrc.json
  • .prettierrc.mjs
  • tsconfig.json
  • workspaces/desktop-release-action/.prettierrc.mjs
  • workspaces/desktop-release-action/tsconfig.json
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Applies to **/*.{ts,tsx} : Use camelCase for file names and PascalCase for component file names

Applied to files:

  • .eslintrc.json
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Applies to **/*.{spec,main.spec}.ts : Use `*.spec.ts` file naming for renderer process tests and `*.main.spec.ts` for main process tests

Applied to files:

  • .eslintrc.json
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Applies to **/*.{ts,tsx} : Follow FSA (Flux Standard Action) pattern for Redux actions

Applied to files:

  • .eslintrc.json
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Remove nested dist folder created by ncc bundler after building desktop-release-action with command `rm -rf workspaces/desktop-release-action/dist/dist`

Applied to files:

  • workspaces/desktop-release-action/src/index.ts
  • workspaces/desktop-release-action/action.yml
📚 Learning: 2026-02-23T17:21:22.132Z
Learnt from: SantamRC
Repo: RocketChat/Rocket.Chat.Electron PR: 3213
File: tsconfig.json:22-22
Timestamp: 2026-02-23T17:21:22.132Z
Learning: In the RocketChat/Rocket.Chat.Electron project, configuration files like `tsconfig.json` should maintain strict JSON compliance (no trailing commas) to ensure compatibility with various tooling and parsers in the development ecosystem, even though TypeScript itself accepts JSONC format.

Applied to files:

  • .prettierrc.mjs
  • workspaces/desktop-release-action/src/types/js-yaml.d.ts
  • workspaces/desktop-release-action/.prettierrc.mjs
  • alpha-app-update.yml
  • beta-app-update.yml
  • CHANGELOG.md
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Applies to **/*.{ts,tsx} : Use Fuselage components from `rocket.chat/fuselage` for all UI work and only create custom components when Fuselage doesn't provide what's needed

Applied to files:

  • src/public/main.css
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Applies to **/*.{ts,tsx} : Check `Theme.d.ts` for valid color tokens when using Fuselage components

Applied to files:

  • src/public/main.css
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Use two-phase Windows code signing: build packages without signing first (empty environment variables), then sign built packages using jsign with Google Cloud KMS to prevent MSI build failures from KMS CNG provider conflicts

Applied to files:

  • workspaces/desktop-release-action/src/windows/sign-packages.ts
  • workspaces/desktop-release-action/src/windows/signing-tools.ts
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Always verify library and framework usage by checking official documentation and TypeScript type definitions before using; for TypeScript check `.d.ts` files in `node_modules/package-name/dist/`

Applied to files:

  • workspaces/desktop-release-action/src/windows/sign-packages.ts
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Use root package.json commands for workspace builds with `yarn workspaces:build` instead of running `yarn build` directly in workspace directories

Applied to files:

  • .cursor/worktrees.json
📚 Learning: 2026-02-23T17:21:16.480Z
Learnt from: SantamRC
Repo: RocketChat/Rocket.Chat.Electron PR: 3213
File: tsconfig.json:22-22
Timestamp: 2026-02-23T17:21:16.480Z
Learning: In RocketChat/Rocket.Chat.Electron, ensure tsconfig.json files use strict JSON syntax with no trailing commas. Although TypeScript parses JSONC, many tools and parsers expect valid JSON, so configurations should avoid trailing commas to maintain compatibility across tooling.

Applied to files:

  • tsconfig.json
  • workspaces/desktop-release-action/tsconfig.json
📚 Learning: 2026-02-04T19:29:54.650Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-04T19:29:54.650Z
Learning: Include all Windows build architectures (x64, ia32, arm64) when building with electron-builder using `yarn electron-builder --x64 --ia32 --arm64 --win nsis`

Applied to files:

  • workspaces/desktop-release-action/src/windows/signing-tools.ts
🪛 ESLint
src/navigation/main.ts

[error] 44-44: Replace certificate:·Certificate,·hostname:·string with ⏎··certificate:·Certificate,⏎··hostname:·string⏎

(prettier/prettier)


[error] 48-50: Replace ⏎······.split(',·')⏎······ with .split(',·')

(prettier/prettier)

src/ui/main/rootWindow.ts

[error] 525-525: Use object destructuring.

(prefer-destructuring)

🪛 LanguageTool
CODE_OF_CONDUCT.md

[style] ~27-~27: Try using a synonym here to strengthen your wording.
Context: ...vances - Trolling, insulting/derogatory comments, and personal or political attacks - Pu...

(COMMENT_REMARK)

CHANGELOG.md

[uncategorized] ~25-~25: Did you mean Apple’s computer “Mac” (= trademark, capitalized)?
Context: ...5d53219e018)) - Missing entitlements on mac app ([#2191](https://github.com/RocketC...

(APPLE_PRODUCTS)


[uncategorized] ~53-~53: Did you mean the proper noun “Apple Silicon”?
Context: ...42d02a8890308f136f6f)) ### Features - apple silicon universal support ([#2170](https://gith...

(APPLE_PRODUCTS)


[grammar] ~211-~211: Ensure spelling is correct
Context: ...5) (2020-10-28) ### Bug Fixes - Apply TouchBar formatting button in focused message bo...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~279-~279: Use a hyphen to join words.
Context: ...cbc4a5857dcbd4e6e79b9)) - Embedded spell checking dictionaries ([#1523](https://g...

(QB_NEW_EN_HYPHEN)


[uncategorized] ~314-~314: The operating system from Apple is written “macOS”.
Context: ...8) (2020-03-01) ### Bug Fixes - Allow MacOS users to browse for spell checking dict...

(MAC_OS)


[grammar] ~314-~314: Use a hyphen to join words.
Context: ... - Allow MacOS users to browse for spell checking dictionaries ([3c75bfe](https:/...

(QB_NEW_EN_HYPHEN)


[uncategorized] ~334-~334: The operating system from Apple is written “macOS”.
Context: ...e91)) - Ignore Hunspell dictionaries on MacOS ([cccca77](https://github.com/RocketCha...

(MAC_OS)


[grammar] ~355-~355: Ensure spelling is correct
Context: ...ketChat/Rocket.Chat.Electron/pull/1447) TouchBar buttons ## 2.17...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[uncategorized] ~556-~556: The operating system from Apple is written “macOS”.
Context: ...- Main window destroyed when closing on MacOS ## 2.14.6 (2018...

(MAC_OS)


[uncategorized] ~689-~689: The operating system from Apple is written “macOS”.
Context: ...n/pull/880) Tray icon toggle crashes in MacOS - [#869](https://github.com/RocketChat/...

(MAC_OS)


[uncategorized] ~702-~702: The operating system from Apple is written “macOS”.
Context: ...visioning profiles and entitlements for MacOS builds ## 2.13....

(MAC_OS)


[uncategorized] ~708-~708: The operating system from Apple is written “macOS”.
Context: ... ## 2.13.1 (2018-08-30) Fixes for MacOS and Windows builds. <...

(MAC_OS)


[uncategorized] ~819-~819: The operating system from Apple is written “macOS”.
Context: ...Chat/Rocket.Chat.Electron/pull/597) Fix MacOS dmg build # 2.1...

(MAC_OS)


[uncategorized] ~882-~882: Did you mean Apple’s computer “Mac” (= trademark, capitalized)?
Context: ...ectron/pull/425) Make sure app quits on mac on update - [#426](https://github.com/R...

(APPLE_PRODUCTS)

docs/video-call-screen-sharing.md

[grammar] ~201-~201: Use a hyphen to join words.
Context: ...te detects your click - Calls the screen sharing API provided by the preload scri...

(QB_NEW_EN_HYPHEN)

docs/supported-versions-flow.md

[grammar] ~232-~232: Ensure spelling is correct
Context: ... (fetchState === 'error') - ✅ Generic builtin fallback (fetchState === 'error') **...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~585-~585: Ensure spelling is correct
Context: ...state, block if fallback data (cache or builtin) confirms unsupported version. 2. **Va...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.21.0)
CHANGELOG.md

[warning] 16-16: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 22-22: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 95-95: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 107-107: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 114-114: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 125-125: Multiple headings with the same content

(MD024, no-duplicate-heading)


[warning] 127-127: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 153-153: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 184-184: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 254-254: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 766-766: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 817-817: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 825-825: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


[warning] 874-874: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/video-call-screen-sharing.md

[warning] 293-293: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


[warning] 307-307: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (36)
.github/workflows/powershell-lint.yml (1)

37-48: Nice clarification on the analyzer exclusion.

Documenting why PSAvoidUsingWriteHost is excluded makes this CI rule easier to understand and maintain.

beta-app-update.yml (1)

5-5: LGTM! Correct YAML key syntax.

The fix from -channel: beta to channel: beta properly defines this as a key-value pair instead of a malformed list item, ensuring electron-builder correctly parses the update channel. Based on learnings, configuration files should maintain strict format compliance for tooling compatibility.

alpha-app-update.yml (1)

5-5: LGTM! Consistent YAML fix across update manifests.

The correction from -channel: alpha to channel: alpha aligns with the same fix applied to beta-app-update.yml, ensuring both update manifests use proper YAML key-value syntax. Based on learnings, configuration files should maintain strict format compliance for tooling compatibility.

scripts/README.md (4)

24-24: LGTM! Formatting improvements enhance readability.

The numbered list items and example headers are properly structured and make the documentation easier to scan.

Also applies to: 30-30, 71-71, 77-77, 83-83, 90-90, 95-95, 100-100


130-134: LGTM! The color-coded output documentation is now complete.

Adding the "Red: Errors" entry provides a comprehensive overview of all output types users will encounter.


23-37: Documentation accurately reflects the implementation.

The documented features for both install-volta.sh and linux-test-deb.sh align correctly with their implementations as confirmed by the provided code snippets:

  • Volta installation checks (PATH, $VOLTA_HOME, common location)
  • Command-line options (--skip-build, --skip-install, --skip-run)
  • Installation verification steps
  • App launch behavior

Also applies to: 62-108


114-114: Yarn version path is accurate and confirmed. The file .yarn/releases/yarn-4.6.0.cjs exists in the repository (2.7M, verified Mar 9 17:06). The documentation is correct.

src/i18n/es.i18n.json (1)

465-465: LGTM: EOF newline formatting.

Trailing newline addition follows POSIX conventions and maintains JSON validity.

src/i18n/nb-NO.i18n.json (1)

43-43: LGTM: EOF newline formatting.

Consistent with POSIX conventions for text files.

src/i18n/uk-UA.i18n.json (1)

268-268: LGTM: EOF newline formatting.

src/i18n/fi.i18n.json (1)

433-433: LGTM: EOF newline formatting.

src/i18n/nn.i18n.json (1)

43-43: LGTM: EOF newline formatting.

src/i18n/zh-CN.i18n.json (1)

316-316: LGTM: EOF newline formatting.

src/i18n/zh-TW.i18n.json (1)

236-236: LGTM: EOF newline formatting.

.github/PULL_REQUEST_TEMPLATE.md (1)

10-10: LGTM: Improved template readability.

The blank line enhances visual separation between the instruction comment block and the issue closing statement.

CODE_OF_CONDUCT.md (1)

17-32: LGTM! Formatting improvements for consistency.

The bullet marker standardization improves document consistency without altering any content or guidelines.

src/i18n/pt-BR.i18n.json (1)

470-470: LGTM! EOF newline normalization.

Adding a trailing newline at the end of the file follows standard conventions and improves Git diff handling.

src/i18n/de-DE.i18n.json (1)

435-435: LGTM! EOF newline normalization.

This change aligns with standard file formatting conventions and matches the pattern applied across other i18n files in this PR.

.github/CONTRIBUTING.md (1)

10-10: LGTM! Formatting enhancement for better readability.

The bold formatting helps emphasize the important note for potential contributors.

src/i18n/zh.i18n.json (1)

43-43: LGTM! EOF newline normalization.

Consistent EOF formatting across i18n resources.

src/i18n/tr-TR.i18n.json (1)

277-277: LGTM! EOF newline normalization.

This change maintains consistency with standard file formatting conventions.

src/i18n/ja.i18n.json (1)

259-259: LGTM! EOF newline normalization.

Consistent with the EOF formatting improvements across all i18n files in this PR.

tsconfig.json (1)

22-22: LGTM! No effective change.

The configuration remains functionally identical, and the file correctly maintains valid JSON syntax with no trailing commas.

src/public/main.css (1)

3-5: LGTM!

The CSS syntax fix is correct. The :root declaration block now properly terminates the custom property with a semicolon and closes the block with a brace.

src/i18n/it-IT.i18n.json (1)

43-43: LGTM!

Trailing newline normalization at EOF is a standard formatting practice that improves diff consistency.

src/i18n/fr.i18n.json (1)

434-434: LGTM!

EOF newline adjustment for formatting consistency.

src/i18n/ru.i18n.json (1)

437-437: LGTM!

EOF newline adjustment for formatting consistency.

workspaces/desktop-release-action/tsconfig.json (1)

19-19: LGTM!

The trailing comma removal ensures strict JSON compliance. Based on learnings: "tsconfig.json files should maintain strict JSON compliance (no trailing commas) to ensure compatibility with various tooling and parsers."

workspaces/desktop-release-action/src/types/js-yaml.d.ts (1)

1-1: LGTM!

Trailing newline adjustment for formatting consistency. The ambient module declaration is valid.

src/i18n/ar.i18n.json (1)

43-43: LGTM!

EOF newline adjustment for formatting consistency.

src/outlookCalendar/AGENTS.md (1)

8-14: LGTM!

Multi-line import formatting improves readability in the documentation example. All imported identifiers remain consistent with the logger module's exports.

workspaces/desktop-release-action/src/windows/signing-tools.ts (1)

45-53: Good call persisting JAVA_HOME into process.env.

Lines 45-53 now line up with the later ...process.env-based jsign invocations in workspaces/desktop-release-action/src/windows/index.ts, build/winSignKms.js, and workspaces/desktop-release-action/src/windows/sign-packages.ts, so Java stays discoverable after the Chocolatey install.

docs/supported-versions-flow.md (1)

473-473: LGTM! Proper URL encoding implementation.

The use of encodeURIComponent(JSON.stringify(...)) correctly handles special characters in JSON query parameters, preventing "Invalid query parameter" errors with older Rocket.Chat versions.

docs/video-call-window-flow.md (1)

32-36: LGTM! Clear architectural benefits.

The expanded list of key design decisions provides clear rationale for the vanilla JS approach, including the new "Cache pre-warming" benefit that aligns with the detailed flow documentation.

docs/video-call-window-management.md (2)

380-387: Excellent: Webview attribute ordering documented.

The code sample correctly emphasizes that src must be set last to trigger loading, with all other attributes configured first. This is a critical implementation detail that prevents race conditions and initialization issues.


116-118: Recovery delay values are consistent across documentation and implementation.

The flowchart entries (Attempt 1: 1s, Attempt 2: 2s, Attempt 3: 3s) match both the RECOVERY_DELAYS constant in the code (1000, 2000, 3000 milliseconds) and the Technical Implementation section descriptions. No action required.

Comment on lines 125 to +130
# [3.3.0](https://github.com/RocketChat/Rocket.Chat.Electron/compare/3.2.2...3.3.0) (2021-06-17)


### Bug Fixes

* **i18n:** Language update from LingoHub 🤖 ([#2042](https://github.com/RocketChat/Rocket.Chat.Electron/issues/2042)) ([cb07526](https://github.com/RocketChat/Rocket.Chat.Electron/commit/cb07526ed5f4831fd05458208561be8e81f5d218))
* **i18n:** Language update from LingoHub 🤖 ([#2047](https://github.com/RocketChat/Rocket.Chat.Electron/issues/2047)) ([891b7b7](https://github.com/RocketChat/Rocket.Chat.Electron/commit/891b7b70d9fb6382ca2070c1644669b3f38b17ef))


- **i18n:** Language update from LingoHub 🤖 ([#2042](https://github.com/RocketChat/Rocket.Chat.Electron/issues/2042)) ([cb07526](https://github.com/RocketChat/Rocket.Chat.Electron/commit/cb07526ed5f4831fd05458208561be8e81f5d218))
- **i18n:** Language update from LingoHub 🤖 ([#2047](https://github.com/RocketChat/Rocket.Chat.Electron/issues/2047)) ([891b7b7](https://github.com/RocketChat/Rocket.Chat.Electron/commit/891b7b70d9fb6382ca2070c1644669b3f38b17ef))
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.

⚠️ Potential issue | 🟡 Minor

Remove the duplicated 3.3.0 release block.

This second 3.3.0 section repeats the earlier release entry and makes the changelog ambiguous for readers and tooling. Keep only one copy of that release section.

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 125-125: Multiple headings with the same content

(MD024, no-duplicate-heading)


[warning] 127-127: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` around lines 125 - 130, The CHANGELOG contains a duplicated
release section for the 3.3.0 entry (the header line "#
[3.3.0](https://github.com/RocketChat/Rocket.Chat.Electron/compare/3.2.2...3.3.0)
(2021-06-17)" and its following "### Bug Fixes" list appears twice); remove the
redundant second 3.3.0 block so only one header and its associated bullet points
(the two i18n entries referencing commits cb07526 and 891b7b7) remain, ensuring
no other changelog entries are altered.

success: boolean;
mapping: Record<string, string>;
};
'open-external': (url: string) => void;
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.

⚠️ Potential issue | 🟠 Major

Privileged open-external needs sender gating.

Line 134 adds another main-process URL-opening capability. src/ipc/main.ts:29-42 currently forwards IPC handlers from event.sender without validating the frame or origin, so any renderer context that can reach this channel can ask the shell to open externally chosen URLs. Please keep this behind a trusted top-level renderer boundary before exposing it more broadly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ipc/channels.ts` at line 134, The new 'open-external' IPC channel must be
gated in the main-process handler: update the handler that currently uses
event.sender (the code registering the 'open-external' handler) to validate the
sender is a trusted top-level renderer before calling shell.openExternal — e.g.,
confirm event.frameId is the main frame (frameId === 0) and/or compare
event.sender (webContents) to the known trusted mainWindow.webContents or match
against an allowlist of origins (checking event.senderFrame.url) and reject
otherwise; alternatively, expose the capability only via a preload contextBridge
API bound to the trusted window. Ensure the handler returns an error or no-op
for untrusted senders rather than forwarding their URL requests.

Comment on lines +519 to +529
// Handle renderer process crashes
browserWindow.webContents.on(
'render-process-gone',
async (event, details) => {
console.error('Renderer process crashed:', details.reason);
try {
const session = browserWindow.webContents.session;
await session.clearCache();
await session.clearStorageData();
console.log('Cache cleared. Reloading window...');
browserWindow.reload();
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify the root window uses the default Electron session,
# then inspect other default-session consumers in the app.
sed -n '80,110p' src/ui/main/rootWindow.ts
rg -n -C2 --type ts "session\.defaultSession|partition:" src

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 4243


🏁 Script executed:

#!/bin/bash
sed -n '510,540p' src/ui/main/rootWindow.ts

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 992


🏁 Script executed:

#!/bin/bash
# Find ESLint config files
find . -maxdepth 2 -name ".eslintrc*" -o -name "eslint.config.*" | head -20

# Check if prefer-destructuring is mentioned
rg "prefer-destructuring" . --type json --type js -n

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 91


🏁 Script executed:

cat .eslintrc.json

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 1581


Avoid clearing the shared Electron session during renderer recovery.

This window uses the default session, so clearCache() and especially clearStorageData() wipe app-wide cookies, storage, and session-level state for other windows. Other subsystems depend on this session: spell-checking language configuration reads from session.defaultSession (src/spellChecking/main.ts), and NTLM credential domain allowlisting is set on session.defaultSession (src/app/main/app.ts). Clearing it here has unintended side effects across the entire application.

Use reloadIgnoringCache() instead, which recovers the renderer without destroying shared app state:

Suggested fix
-        const session = browserWindow.webContents.session;
-        await session.clearCache();
-        await session.clearStorageData();
-        console.log('Cache cleared. Reloading window...');
-        browserWindow.reload();
+        console.log('Reloading window after renderer crash...');
+        browserWindow.webContents.reloadIgnoringCache();
🧰 Tools
🪛 ESLint

[error] 525-525: Use object destructuring.

(prefer-destructuring)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/ui/main/rootWindow.ts` around lines 519 - 529, The handler for
'render-process-gone' is clearing the shared default session (calls to
session.clearCache() and session.clearStorageData()), which wipes app-wide
cookies and storage; remove those calls from the render-process-gone handler in
rootWindow.ts and instead recover the renderer by invoking
browserWindow.webContents.reloadIgnoringCache() (or
browserWindow.webContents.reload() if reloadIgnoringCache is unavailable) within
the async callback for browserWindow.webContents.on('render-process-gone', ...),
leaving all session/defaultSession state untouched.

Comment on lines 60 to +62
runs:
using: 'node12'
main: 'dist/index.js' No newline at end of file
main: 'dist/index.js'
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n workspaces/desktop-release-action/action.yml | head -70

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 2706


🌐 Web query:

GitHub Actions removed Node12 runner 2023 current supported versions

💡 Result:

  • Node12 was deprecated/removed in 2023: GitHub began enforcing Node16 instead of Node12 on June 14, 2023, and said Node12 would be removed from the runner “later in the summer.” [1]
  • Then Node16 began deprecation in favor of Node20 (announcement Sep 22, 2023; plan to move actions to Node20 by Spring 2024). [2]

Current supported runtimes for JavaScript actions (runs.using) in GitHub Actions

  • node20 and node24 are the supported runs.using values for JavaScript actions. [3]

What’s current on hosted runners (as of March 9, 2026)

  • GitHub is transitioning from Node20 → Node24: Node24 becomes the default starting June 2, 2026, with Node20 removable later in fall 2026 (opt-out env var available temporarily). [4]

Sources: [1] GitHub Changelog (2023-06-13) [2] GitHub Changelog (2023-09-22) [3] GitHub Docs: metadata syntax (runs.using supports node20/node24) [4] GitHub Changelog (2025-09-19, updated Feb 25, 2026)


Update the action runtime in this runs block.

Line 61 still uses node12, which GitHub removed from Actions runners in summer 2023. The action's JavaScript runtime metadata must specify node20 or node24 to run on current GitHub-hosted runners; no legacy Node versions are supported.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workspaces/desktop-release-action/action.yml` around lines 60 - 62, The runs
block currently specifies an unsupported runtime ("using: 'node12'"); update the
runs.using value in the action metadata to a supported runtime (e.g., "node20"
or "node24") so the action will run on current GitHub-hosted runners; locate the
runs block with the existing using field and replace node12 with node20 or
node24 (keeping the main: 'dist/index.js' entry unchanged).

Comment on lines 129 to 141
const files = glob.sync(pattern, {
cwd: distPath,
absolute: true
absolute: true,
});

if (files.length === 0) {
core.warning(`No ${description} found to sign`);
return;
}

for (const file of files) {
await signBuiltPackages(path.dirname(file));
}
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.

⚠️ Potential issue | 🟠 Major

Don't widen a pattern-specific signing pass into a full-directory signing pass.

Each loop iteration calls signBuiltPackages(path.dirname(file)), which re-scans and signs every .exe/.msi in that directory. With multiple matches, artifacts get processed repeatedly, and a *.exe call can also sign sibling .msi files.

♻️ Suggested direction
-  for (const file of files) {
-    await signBuiltPackages(path.dirname(file));
-  }
+  for (const file of files) {
+    await signFile(file);
+  }
const signFile = async (file: string): Promise<void> => {
  // Extract the existing per-file signing block from signBuiltPackages()
  // so signPackageType() keeps the caller's pattern semantics.
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workspaces/desktop-release-action/src/windows/sign-packages.ts` around lines
129 - 141, The loop currently calls signBuiltPackages(path.dirname(file)) which
re-scans the whole directory and causes duplicate and cross-type signing;
instead extract the per-file signing logic from signBuiltPackages into a new
function signFile(file: string) that signs exactly that single artifact, update
signPackageType to call signFile for each matched file (preserving the original
pattern scope) and update signBuiltPackages to either delegate to signFile or be
removed; ensure no directory re-scan happens (remove path.dirname(file) calls)
so each file is processed only once.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
src/navigation/main.ts (2)

44-59: ⚠️ Potential issue | 🟠 Major

Use X509Certificate.checkHost() instead of manual SAN/CN matching.

This helper still diverges from Chromium’s hostname validation: Line 51 only does exact string matches, Line 76 passes host so example.com:8443 will never match the certificate name, and the CN fallback on Line 58 still runs even when SAN is present. That can both reject valid certificates and accept ones Chromium would reject.

Suggested fix
+import { X509Certificate } from 'crypto';
 import type { Certificate } from 'electron';
 import { app } from 'electron';
 import i18next from 'i18next';
@@
 const isHostnameValid = (
   certificate: Certificate,
   hostname: string
 ): boolean => {
-  const san = certificate.subjectAltName;
-
-  if (san) {
-    const names = san.split(', ').map((s: string) => s.replace(/^DNS:/, ''));
-
-    if (names.includes(hostname)) {
-      return true;
-    }
-  }
-
-  const cn = certificate.subject?.CN;
-  return cn === hostname;
+  try {
+    return new X509Certificate(certificate.data).checkHost(hostname) !== undefined;
+  } catch {
+    return false;
+  }
 };
@@
-      const { host } = new URL(requestedUrl);
+      const { host, hostname } = new URL(requestedUrl);
@@
-      if (isHostnameValid(certificate, host)) {
+      if (isHostnameValid(certificate, hostname)) {
         callback(true);
         return;
       }

Also applies to: 75-79

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/navigation/main.ts` around lines 44 - 59, Replace the manual SAN/CN logic
in isHostnameValid with Node's X509Certificate.checkHost: construct an
X509Certificate from the existing Certificate object (import X509Certificate),
call checkHost with the host portion (strip any port from hostname) and return
that boolean; do not fall back to CN when SAN is present — rely solely on
checkHost so behavior matches Chromium/Node validation. Ensure the hostname
passed to checkHost omits the port (e.g., split on ':' for IPv4/host:port) and
update any other uses (the second occurrence noted) to use the same helper.

75-79: ⚠️ Potential issue | 🔴 Critical

Only bypass the trust prompt for hostname-mismatch errors.

certificate-error fires for every TLS validation failure, not just name mismatches. Because this branch returns before the trusted/not-trusted checks, Line 77 currently accepts expired, self-signed, or otherwise invalid certificates whenever the hostname helper returns true. Restrict this fast path to the hostname-mismatch error code only.

Suggested fix
-      if (isHostnameValid(certificate, hostname)) {
+      if (
+        error === 'net::ERR_CERT_COMMON_NAME_INVALID' &&
+        isHostnameValid(certificate, hostname)
+      ) {
         callback(true);
         return;
       }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/navigation/main.ts` around lines 75 - 79, The fast-path that calls
isHostnameValid(certificate, host) and immediately invokes callback(true) must
only run when the TLS error is a hostname-mismatch; update the certificate-error
handler to first check the error code/string (the error or errorCode parameter
passed into the handler) matches the hostname-mismatch token (e.g.
ERR_CERT_COMMON_NAME_INVALID / net::ERR_CERT_COMMON_NAME_INVALID) and only then
call isHostnameValid(...) and callback(true); otherwise fall through to the
existing trusted/not-trusted logic. Ensure you reference the existing
isHostnameValid function and the certificate-error handler where callback(true)
is currently returned early.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/main.ts`:
- Around line 148-152: The handler registered with handle('open-external')
currently logs the full renderer-supplied URL; instead, change the error logging
in that async callback (the block that calls isProtocolAllowed) to avoid
emitting the full URL—parse the incoming url to extract only the protocol (e.g.,
via new URL(url).protocol in a try/catch) and log a redacted message or the
protocol only (or a fixed string like "[blocked external URL]" / "[unparseable
URL]") when isProtocolAllowed returns false; update the console.error call
accordingly so only the protocol or a redacted notice is logged, not the full
url.

---

Duplicate comments:
In `@src/navigation/main.ts`:
- Around line 44-59: Replace the manual SAN/CN logic in isHostnameValid with
Node's X509Certificate.checkHost: construct an X509Certificate from the existing
Certificate object (import X509Certificate), call checkHost with the host
portion (strip any port from hostname) and return that boolean; do not fall back
to CN when SAN is present — rely solely on checkHost so behavior matches
Chromium/Node validation. Ensure the hostname passed to checkHost omits the port
(e.g., split on ':' for IPv4/host:port) and update any other uses (the second
occurrence noted) to use the same helper.
- Around line 75-79: The fast-path that calls isHostnameValid(certificate, host)
and immediately invokes callback(true) must only run when the TLS error is a
hostname-mismatch; update the certificate-error handler to first check the error
code/string (the error or errorCode parameter passed into the handler) matches
the hostname-mismatch token (e.g. ERR_CERT_COMMON_NAME_INVALID /
net::ERR_CERT_COMMON_NAME_INVALID) and only then call isHostnameValid(...) and
callback(true); otherwise fall through to the existing trusted/not-trusted
logic. Ensure you reference the existing isHostnameValid function and the
certificate-error handler where callback(true) is currently returned early.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aa17a697-e8fd-4922-8f4d-634ffe840f63

📥 Commits

Reviewing files that changed from the base of the PR and between 6d5fbe0 and 37652f3.

📒 Files selected for processing (5)
  • src/injected.ts
  • src/main.ts
  • src/navigation/main.ts
  • src/ui/main/rootWindow.ts
  • workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/injected.ts
  • src/ui/main/rootWindow.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript strict mode enabled in TypeScript configuration
Use React functional components with hooks instead of class components
Follow FSA (Flux Standard Action) pattern for Redux actions
Use camelCase for file names and PascalCase for component file names
All code must pass ESLint and TypeScript checks
Write self-documenting code with clear naming; avoid unnecessary comments except for complex business logic or non-obvious decisions
Use Fuselage components from @rocket.chat/fuselage for all UI work and only create custom components when Fuselage doesn't provide what's needed
Check Theme.d.ts for valid color tokens when using Fuselage components
Use defensive coding with optional chaining and fallbacks for Linux-only APIs (process.getuid(), process.getgid(), process.geteuid(), process.getegid()) to ensure cross-platform compatibility across Windows, macOS, and Linux

Files:

  • src/navigation/main.ts
  • src/main.ts
  • workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts
🔇 Additional comments (1)
workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts (1)

95-105: Good fail-fast on a broken primary installer reference.

Throwing here is the right trade-off: it prevents publishing a latest.yml whose top-level sha512 no longer describes a real artifact, and the surrounding action code already propagates this into a visible CI failure.

Comment on lines +148 to +152
handle('open-external', async (_webContents, url) => {
const { isProtocolAllowed } = await import('./navigation/main');
if (!(await isProtocolAllowed(url))) {
console.error('Blocked external URL:', url);
return;
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.

⚠️ Potential issue | 🟠 Major

Don't log the full blocked URL.

Line 151 writes a renderer-supplied URL verbatim to logs. Rejected mailto:, custom-scheme, or file URLs can carry email addresses, tokens, or local paths, so this turns blocked attempts into sensitive log entries. Log only the protocol or a redacted message instead.

Suggested fix
     if (!(await isProtocolAllowed(url))) {
-      console.error('Blocked external URL:', url);
+      console.warn('Blocked external URL with disallowed protocol');
       return;
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
handle('open-external', async (_webContents, url) => {
const { isProtocolAllowed } = await import('./navigation/main');
if (!(await isProtocolAllowed(url))) {
console.error('Blocked external URL:', url);
return;
handle('open-external', async (_webContents, url) => {
const { isProtocolAllowed } = await import('./navigation/main');
if (!(await isProtocolAllowed(url))) {
console.warn('Blocked external URL with disallowed protocol');
return;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/main.ts` around lines 148 - 152, The handler registered with
handle('open-external') currently logs the full renderer-supplied URL; instead,
change the error logging in that async callback (the block that calls
isProtocolAllowed) to avoid emitting the full URL—parse the incoming url to
extract only the protocol (e.g., via new URL(url).protocol in a try/catch) and
log a redacted message or the protocol only (or a fixed string like "[blocked
external URL]" / "[unparseable URL]") when isProtocolAllowed returns false;
update the console.error call accordingly so only the protocol or a redacted
notice is logged, not the full url.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/navigation/main.ts`:
- Around line 45-52: The helper is causing false negatives for bracketed IPv6
addresses because it re-parses the host string; update isHostnameValid (and the
similar helper around the 69-75 region) to accept and use the URL.hostname value
(the parsed hostname) for certificate matching instead of splitting hostname by
':'—i.e., pass the already-parsed hostname through to X509Certificate.checkHost
(use hostname directly, not cleanHost derived from host.split(':')[0]), and
reserve the original host string only for building the trust-store key where the
port is needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1f295a18-5312-42e0-965c-b3cbddaf1aef

📥 Commits

Reviewing files that changed from the base of the PR and between 37652f3 and 8cc86ab.

📒 Files selected for processing (2)
  • src/main.ts
  • src/navigation/main.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript strict mode enabled in TypeScript configuration
Use React functional components with hooks instead of class components
Follow FSA (Flux Standard Action) pattern for Redux actions
Use camelCase for file names and PascalCase for component file names
All code must pass ESLint and TypeScript checks
Write self-documenting code with clear naming; avoid unnecessary comments except for complex business logic or non-obvious decisions
Use Fuselage components from @rocket.chat/fuselage for all UI work and only create custom components when Fuselage doesn't provide what's needed
Check Theme.d.ts for valid color tokens when using Fuselage components
Use defensive coding with optional chaining and fallbacks for Linux-only APIs (process.getuid(), process.getgid(), process.geteuid(), process.getegid()) to ensure cross-platform compatibility across Windows, macOS, and Linux

Files:

  • src/navigation/main.ts
  • src/main.ts

Comment on lines +148 to +155
handle('open-external', async (_webContents, url) => {
const { isProtocolAllowed } = await import('./navigation/main');
if (!(await isProtocolAllowed(url))) {
console.warn('Blocked external URL with disallowed protocol');
return;
}
await openExternal(url);
});
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== open-external handler ==="
sed -n '148,155p' src/main.ts

echo
echo "=== ipc handle wrapper (sender validation) ==="
sed -n '29,42p' src/ipc/main.ts

echo
echo "=== preload bridge ==="
sed -n '1,40p' src/servers/preload/openExternal.ts

echo
echo "=== exposed API surface ==="
rg -n -C3 'RocketChatDesktop|openExternal' src/servers/preload/api.ts src/preload.ts

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 4634


Restrict this IPC capability to trusted senders.

isProtocolAllowed() only filters the URL. It does not verify who invoked it. The IPC handler at src/ipc/main.ts:29-42 accepts any sender without validation, and openExternal is exposed to page code through window.RocketChatDesktop.openExternal(), allowing any loaded server content to launch allowed external protocols without going through a trusted app-owned UI flow.

@Ram-sah19 Ram-sah19 changed the base branch from master to develop March 10, 2026 18:46
dougfabris and others added 24 commits March 11, 2026 01:03
…hat#3028)

* perf: Optimize server loading by deferring inactive webviews

* bump version

* remove duplicated code
)

* feat: Close video call window when Jitsi call is closed

* bump version

* only closes on fixed close html jitsi pages
Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Robot Lingohub

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
* create update channel selection

* fix select

* order channels name

* add translations

* fix lint
* updated electron-builder v26.0.3

* add flipFuses
…#3041)

* feat: support mapping users to exchange servers by domain

* fix: lint error

* chore: simplify and add version gate

* fix: update variable names

* fix version checking on develop versions

* make remember my credentials default true

* improve code

* bump version

* show outlook exchange url on server info panel

---------

Co-authored-by: Jean Brito <jeanfbrito@gmail.com>
jeanfbrito and others added 29 commits March 11, 2026 01:04
…etChat#3162)

* feat: Enhance Linux support for screen sharing and dependencies

- Added `xdg-desktop-portal` and `xdg-desktop-portal-gtk` as recommended dependencies in the Electron builder configuration for improved screen sharing functionality on Linux.
- Removed the ozone platform switch for `x11` in the Electron startup process and enabled PipeWire screen capture support for Wayland environments.
- Updated the display media request handler to utilize system picker for better user experience during screen sharing.

* chore: Bump version to 4.10.2 in package.json

* feat(videoCall): Implement screen sharing request handling and cleanup logic

- Added a timeout mechanism for screen sharing requests to prevent orphaned listeners.
- Introduced cleanup functions for screen sharing listeners and request states to enhance resource management.
- Improved IPC handling for screen sharing source responses, ensuring proper request tracking and error handling.
- Enhanced user experience by preventing concurrent screen sharing requests and managing listener cleanup effectively.

* fix(videoCall): Improve screen sharing timeout handling and listener cleanup

- Added validation to ensure the screen sharing timeout is only processed for the current request, preventing double-invocation.
- Enhanced cleanup logic to clear timeout references and invoke callbacks appropriately, improving resource management and user experience during screen sharing sessions.

* fix(videoCall): Refactor screen sharing listener cleanup and request completion handling

- Introduced `removeScreenSharingListenerOnly` to streamline listener removal and timeout clearing without altering the pending request state.
- Added `markScreenSharingComplete` to reset request states, allowing new screen sharing requests after completion.
- Enhanced existing cleanup logic to improve resource management and prevent concurrent screen sharing requests.

* feat(gpuFallback): Implement GPU crash detection and fallback mode for Linux

- Added a GPU crash handler to automatically switch to X11 mode if the GPU process crashes during startup.
- Introduced a persistent fallback mode setting to remember the user's choice across sessions.
- Enhanced the settings UI to allow users to control the display server mode, including options for auto-detect, force X11, or disable GPU.
- Updated the application to handle GPU fallback mode changes dynamically, improving user experience and stability on Linux systems.

* fix(app): Adjust crash count condition and preserve command-line arguments on relaunch

- Updated the crash detection logic to trigger fallback mode after exceeding the maximum crash count.
- Enhanced the relaunch functionality to preserve command-line arguments, ensuring user inputs are retained during application restarts.

* feat: Enhance Linux display server support and crash handling

- Added Wayland support to the Electron builder configuration, allowing for improved compatibility with modern Linux environments.
- Updated documentation to reflect auto-detection of display servers for Snap packages, enhancing user clarity.
- Refactored crash detection logic to use a more descriptive variable name and improved logging for better debugging during GPU fallback scenarios.

* refactor(app): Streamline GPU crash handling and fallback logic

- Simplified the GPU crash detection process by consolidating logic for tracking crash counts and managing fallback mode.
- Improved logging for better visibility during relaunch scenarios.
- Ensured that the application preserves command-line arguments when relaunching after a GPU crash.

* docs: Update Linux display server documentation and improve GPU crash recovery details

- Clarified the automatic GPU crash detection and recovery process in the documentation.
- Removed version-specific language for GPU crash recovery to streamline information.
- Enhanced the logging section with standard Chromium flags for better debugging.

* feat(scripts): Add installation and testing scripts for Linux

- Introduced `install-volta.sh` to automate the installation of Volta, ensuring node.js and npm are available for building the project.
- Added `linux-test-deb.sh` for building, installing, and running the Rocket.Chat Desktop .deb package, with options to skip build, install, or run steps.
- Created a README.md to document the usage and functionality of the new scripts, enhancing developer experience and automation for testing on Linux.

* refactor(scripts): Improve error handling in installation and dependency management

- Updated `install-volta.sh` to handle installation errors more gracefully by checking the success of the Volta installation command.
- Enhanced `linux-test-deb.sh` to streamline dependency installation checks and provide clearer error messages if installation fails.
- Refactored the package installation logic to handle dependency issues more effectively, ensuring smoother installation processes.

* feat(linux): Enhance Wayland and X11 support for GPU handling

- Implemented auto-detection of Wayland sessions and added logic to relaunch the app with X11 fallback for stability.
- Updated GPU fallback mode to include 'wayland' as a valid option, allowing users to specify their preferred display server.
- Improved logging for GPU crash handling and display server mode selection, enhancing debugging and user experience on Linux.
- Adjusted screen sharing request handling to utilize XDG portal on Wayland sessions, improving compatibility with modern desktop environments.

* feat(videoCall): Introduce screen picker functionality for enhanced screen sharing

- Implemented a new screen picker system to handle display media requests, improving user experience during screen sharing.
- Created internal and portal picker providers to support different environments, including Linux Wayland and X11.
- Enhanced IPC handling for screen sharing requests, ensuring proper state management and preventing concurrent requests.
- Added initialization and cleanup logic for the screen picker, streamlining resource management and improving performance.

* refactor(videoCall): Improve screen sharing request handling and listener management

- Refactored the internal picker handler to enhance state management during screen sharing requests, preventing concurrent requests and ensuring proper cleanup.
- Improved error handling for screen sharing source validation, including better logging for unavailable sources and request timeouts.
- Streamlined the listener setup and removal process, enhancing resource management and overall performance during screen sharing operations.

* refactor(videoCall): Enhance webview handler setup and error management

- Refactored the setup of webview handlers to use lazy loading for the screen picker module, improving performance and preventing blocking during webview initialization.
- Improved error handling in the display media request handler, ensuring that errors are logged without disrupting the webview loading process.
- Updated the internal picker provider to streamline the handling of display media requests, particularly for Linux environments.

* refactor(gpuFallback): Extend valid fallback modes and improve type safety

- Updated the GPU fallback mode validation to include 'wayland' as a valid option, enhancing compatibility with modern Linux environments.
- Improved type safety in the reducer by refining the type checks for fallback modes, ensuring better error handling and maintainability.

* refactor(gpuFallback): Improve fallback mode handling in reducer

- Updated the GPU fallback mode reducer to return the current state if the provided fallback mode is invalid, enhancing stability and preventing unintended state changes.
- This change ensures that only valid fallback modes are accepted, improving overall type safety and error handling.

* refactor(videoCall): Update display media request handling for improved platform compatibility

- Enhanced comments in the IPC and PortalPickerProvider files to clarify the behavior of the display media request handler across different platforms, particularly focusing on macOS and Linux/Wayland.
- Adjusted the handling of the XDG portal picker to ensure it returns a valid source or an empty array, improving robustness in source selection during screen sharing.

* refactor(config): Clean up whitespace and improve logging consistency

- Removed unnecessary whitespace in rollup configuration and video call window files for better readability.
- Consolidated console log statements in the app setup to enhance clarity and maintain consistency in logging format.
- Improved import organization in screen picker files to follow a more structured format.

* fix(build): Update electron-builder command to include appimage target

- Modified the build command in the pull request workflow to include 'appimage' as a target alongside 'snap' and 'deb', enhancing the packaging options for Linux distributions.

* feat(build): Add AppImage support to pull request workflow

- Updated the pull request build workflow to include the AppImage target in the S3 upload command, expanding the packaging options for Linux distributions.

* fix(build): Correct AppImage file extension in pull request workflow

- Updated the file extension for AppImage in the S3 upload command from '.AppImage' to '.appimage' to ensure proper handling of the file format during the build process.

* fix(build): Add AppImage pattern to pull request workflow file matching

- Updated the file matching patterns in the pull request build workflow to include the AppImage file extension, ensuring proper identification and handling of AppImage artifacts during the build process.

* feat(scripts): Add Linux AppImage testing script

- Introduced a new script for testing the Rocket.Chat Linux AppImage, which includes steps for building, making the AppImage executable, and running it.
- The script provides options to skip build, installation, and execution, along with informative logging for each step.
- Enhanced the relaunch functionality in the app to support AppImage, ensuring reliable relaunch behavior.

* refactor(gpuFallback): Simplify GPU fallback handling and improve logging

- Removed unnecessary session type checks for Wayland, streamlining the logic for determining X11 fallback needs.
- Updated logging messages for clarity when relaunching the app with X11.
- Adjusted the order of GPU crash handler setup to catch early failures more effectively.

* refactor(gpuFallback): Enhance Wayland handling and logging for X11 fallback

- Introduced a check for Wayland sessions in handleLinuxDisplayServer to default to XWayland for stability, addressing potential GPU issues on virtual machines.
- Updated logging messages to clarify the use of XWayland when a Wayland session is detected, improving user guidance on display server settings.
- Removed redundant Wayland session checks from performElectronStartup, streamlining the GPU fallback logic.

* feat(wayland): Enable native Wayland support by default

Use native Wayland when available instead of forcing X11 fallback.
The GPU crash handler will automatically switch to X11 if issues occur.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Address PR review comments

- Remove X11 forcing on Wayland in linux-test-deb.sh (use native Wayland)
- Fix console.log formatting with JSON.stringify in src/main.ts
- Fix misleading success message in test scripts when app exits early
- Remove unnecessary `as any` type assertion in InternalPickerProvider.ts

* fix(linux): Enforce X11 mode on Wayland sessions

Always use X11 (XWayland) on Wayland sessions for stability.
The app automatically relaunches with --ozone-platform=x11
when a Wayland session is detected.

* feat(wayland): Enable native Wayland support by default

Use native Wayland when available instead of forcing X11 fallback.
The GPU crash handler will automatically switch to X11 if issues occur.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(linux): Add proactive GPU detection with X11 fallback

- Remove sentinel file system (crash counting, timing windows)
- Add gpu-info-update listener to detect GPU issues early
- Check gpu_compositing and webgl status for disabled/unavailable states
- Relaunch with --disable-gpu --ozone-platform=x11 when GPU is broken
- Simplify crash handler to immediately trigger fallback on GPU crash

* fix(ci): Fix AppImage upload and PR comment updates

- Fix case sensitivity: rocketchat-*.appimage → rocketchat-*.AppImage
  (AWS CLI on Linux is case-sensitive, file wasn't being uploaded)
- Fix sticky comment header to use simple identifier instead of markdown
- Remove redundant recreate/append flags (defaults work correctly)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
- Updated the bundle version in electron-builder.json from 25110 to 26010.
- Incremented the application version in package.json from 4.10.2 to 4.11.0.
- Updated copyright year in LICENSE and package.json from 2025 to 2026.
* feat: Enhance Linux display server detection and fallback logic

- Updated the Linux display server configuration to automatically detect Wayland sessions and fallback to X11 if necessary, preventing crashes during initialization.
- Improved documentation to clarify the automatic detection process and added troubleshooting information for Ubuntu 22.04 LTS users experiencing segfaults.
- Introduced unit tests for the platform detection logic to ensure correct behavior across various session types and manual overrides.

* test: Update logging tests for platform detection

- Refactored logging tests in `app.main.spec.ts` to validate JSON structure of log messages for Wayland and X11 sessions.
- Removed outdated tests for session type handling and improved assertions for log data properties.
- Enhanced clarity in test descriptions to reflect the updated logging behavior during Electron startup.

* refactor(tests): Remove redundant JSON parsing checks in platform detection tests

- Eliminated unnecessary assertions for JSON parsing in the logging tests for Wayland and X11 sessions in `app.main.spec.ts`.
- Streamlined test cases to focus on validating the structure of log data without redundant error handling, enhancing clarity and maintainability.

* fix(linux): add wrapper script to prevent Wayland/X11 crashes (RocketChat#3154)

The app.commandLine.appendSwitch() approach doesn't work because Chromium
initializes before Electron JavaScript runs.

Fix by package type:
- deb/rpm/tar.gz: Wrapper script runs BEFORE binary, detects display server
- Snap: Set allowNativeWayland=false to force X11 via electron-builder
- Flatpak/AppImage: Use electron-builder launcher with X11 fallback

Wrapper script detection logic:
- If XDG_SESSION_TYPE != wayland: force X11
- If WAYLAND_DISPLAY is empty: force X11
- If Wayland socket doesn't exist: force X11
- Otherwise: use native Wayland

Validated on:
- Fedora 42 physical (GTX 1660 Ti) - Wayland native
- Ubuntu 22.04 physical (GTX 1660 Ti) - X11 session
- Fedora 42 VM (no GPU)
- Ubuntu 22.04 VM (no GPU)

All 5 test scenarios pass with fix vs SEGFAULT without.

Closes RocketChat#3154

* docs: add Fedora 42 test results to postmortem

* fix: add Wayland socket existence check and address review feedback

- Add fs.statSync check to verify Wayland socket actually exists
- Add 'socket-not-found' reason when socket is missing
- Remove placeholder dates from timeline in postmortem
- Add tests for socket existence checking

* fix: address review feedback

- Add tests for ELECTRON_OZONE_PLATFORM_HINT env var override
- Fix Snap docs: Auto-detect → Force X11 (allowNativeWayland: false)
- Fix date: January 2025 → January 2026
- Add 'The Solution That Actually Worked' section to postmortem

* chore: bump version to 4.11.1 in package.json

* chore: update Snap configuration to use core22 base

* fix: use defensive coding for Linux-only APIs (VSCode pattern)

Use optional chaining with fallback for process.getuid() instead of
mocking in tests. This is the pattern used by VSCode for cross-platform
compatibility.

Changes:
- app.ts: process.getuid() → process.getuid?.() ?? 1000
- Remove process.getuid mocking from tests (no longer needed)
- Update CLAUDE.md with VSCode pattern and source attribution

* fix: address CodeRabbit review comments

- Fix timeline dates in post-mortem from 2025 to 2026
- Remove incorrect mock of ../actions with electronBuilderJsonInformation
  (electronBuilderJsonInformation is exported from app.ts, not ../actions)

* fix: correct post-mortem completion date from 2025 to 2026
…e validity (RocketChat#3175)

* fix: apply Electron fuses before signing to preserve Windows signature validity

Fixes RocketChat#3174

The Windows executable was showing 'signed but invalid' because fuses were
being applied after signing, which modifies the binary and invalidates
the signature.

Changes:
- Move fuse application from afterSign to afterPack (before signing)
- Add signature verification after each signing step
- Build fails if any signature is invalid

Per Electron docs: fuses must be flipped 'at package time before you
code sign your app' so the OS can verify signature integrity.

* fix: address code review feedback and enable release workflow for PR testing

- Fix backslash escaping in PowerShell command (CodeQL)
- Fix clearTimeout -> clearInterval for setInterval timer
- Use fs.existsSync instead of glob.sync for exact paths
- Temporarily enable build-release workflow for PR testing

* fix: use electron-builder's proven PowerShell signature verification approach

Based on electron-builder's windowsExecutableCodeSignatureVerifier.ts:
- Use -LiteralPath instead of -FilePath (handles paths literally)
- Only escape single quotes (double them)
- Use chcp 65001 for UTF-8 encoding
- Use -NonInteractive -InputFormat None flags
- Check Status === 0 (JSON serialized enum) or 'Valid' for compatibility

Reference: electron-builder/packages/electron-updater/src/windowsExecutableCodeSignatureVerifier.ts

* chore: remove temporary PR trigger from build-release workflow
* feat: Enable alpha release channel support

- Add semver check to prevent showing "downgrades" as updates
- Mark prerelease versions (alpha/beta) as prerelease on GitHub
- Change development branch from 'develop' to 'dev' in workflows
- Add release-tag.ts script for creating release tags
- Add alpha release process documentation

* fix: correct git push command for tags in release-tag script

Use refs/tags/ prefix instead of invalid 'git push origin tag --' syntax.

* chore: Bump version numbers for release

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0-alpha.1.
* chore(theme): transparency mode not removing background of server view (RocketChat#3156)

* Language update from Lingohub 🤖 (RocketChat#3165)

Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>

* feat: Implement user theme preference settings  (RocketChat#3160)

* feat: Implement user theme preference settings and remove legacy theme appearance handling

- Introduced a new `ThemeAppearance` component to manage user theme preferences, allowing selection between 'auto', 'light', and 'dark' themes.
- Updated state management to include `userThemePreference`, replacing the previous `themeAppearance` handling.
- Removed deprecated theme appearance logic from various components and files, streamlining the codebase.
- Added internationalization support for theme appearance settings across multiple languages.
- Enhanced the UI to reflect user-selected theme preferences dynamically.

* fix(i18n): Correct Norwegian translation for theme appearance description

* fix(theme): Validate theme preference values before dispatching

- Updated the `handleChangeTheme` function to include validation for theme preference values, ensuring only 'auto', 'light', or 'dark' are accepted. This change prevents invalid values from being dispatched, enhancing the robustness of the theme management logic.

* refactor(DocumentViewer): Update theme management to utilize Redux state for user preferences

- Replaced the use of `useDarkMode` with Redux selectors to determine the theme based on user preferences and machine theme.
- Enhanced theme logic to support 'auto', 'light', and 'dark' settings, improving the flexibility and responsiveness of the theme management in the DocumentViewer component.

* refactor(DocumentViewer): Simplify theme management by removing Redux dependencies

- Eliminated the use of Redux selectors for theme management in the DocumentViewer component, replacing it with a static 'tint' background and default color settings.
- Streamlined the component's code by removing unnecessary theme logic, enhancing readability and maintainability.

* chore: Clean up code by removing unnecessary blank lines in ThemeAppearance, TransparentWindow, and userThemePreference files

* fix: Address PR review comments and restore API compatibility

- Remove trailing blank lines from ThemeAppearance.tsx, TransparentWindow.tsx, and userThemePreference.ts
- Restore setUserThemeAppearance as no-op function for backwards compatibility with @rocket.chat/desktop-api interface

* fix: resolve 91 security vulnerabilities in dependencies (RocketChat#3173)

* fix: resolve 91 security vulnerabilities in dependencies

- Update axios 1.6.4 -> 1.13.2 (SSRF, DoS, credential leakage)
- Update electron-updater 5.3.0 -> 6.3.9 (code signing bypass)
- Update rollup 4.9.6 -> 4.32.0 (DOM clobbering XSS)
- Update glob 11.0.3 -> 11.1.0 in workspace (command injection)
- Add resolutions for transitive dependencies:
  - cross-spawn, braces, ws, follow-redirects
  - form-data, tar-fs, undici
- Add comprehensive security remediation documentation

* docs: fix markdown lint - add language specifier to code block

* chore: Remove security documentation from repository

Security vulnerability remediation documentation kept locally for reference.

* fix: Issues in German translation (RocketChat#3155)

* chore: Upgrade Electron and Node.js versions, update README and packa… (RocketChat#3179)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* chore: Update @types/node version in package.json and yarn.lock

- Upgraded @types/node from version 16.18.69 to 25.0.10 in both package.json and yarn.lock to ensure compatibility with the latest TypeScript features and improvements.

* chore: Enable alpha releases (RocketChat#3180)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* docs: Add alpha release process documentation

- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases.
- Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.

* chore: Update architecture support and Node.js version requirements

- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats.
- Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.

* chore: Change develop branch to dev for release workflow

Update build-release workflow and desktop-release-action to use 'dev'
branch instead of 'develop' for development releases.

* chore: Update versioning and add release tag script

- Bumped version in package.json to 4.12.0.alpha.1.
- Added scripts/release-tag.ts for automated release tagging.
- Updated .eslintignore to exclude the new scripts directory.

* chore: Correct version format in package.json

- Updated version format in package.json from "4.12.0.alpha.1" to "4.12.0-alpha.1" for consistency.

* chore: Update all workflows to use dev branch instead of develop

- validate-pr.yml: Add dev to PR target branches
- powershell-lint.yml: Change develop to dev
- pull-request-build.yml: Change develop to dev

* fix: Normalize tags for consistent comparison in release-tag script

Strip leading 'v' prefix when comparing tags to handle both v-prefixed
and non-prefixed tag formats consistently.

* chore: Increment bundle version in electron-builder.json to 26012

* chore: Address nitpick comments in release-tag script

- Add comment explaining why /scripts is excluded from eslint
- Return null on exec error to distinguish from empty output
- Add warning when git tag list fails
- Use -- separator in git commands for safety

* fix: Add jsign to GITHUB_PATH in Windows CI setup

The jsign tool was being installed but not added to PATH for subsequent
steps. This caused the "Verify tools" step to fail with "jsign not found".

* chore: Bump version to 4.12.0-alpha.2

- Updated version in package.json to 4.12.0-alpha.2
- Incremented bundleVersion in electron-builder.json to 26013

* docs: Add QA testing guide for alpha channel updates

* docs: Rename alpha docs to pre-release and fix workflow concurrency

- Rename alpha-release-process.md to pre-release-process.md
- Add beta release documentation
- Add detailed channel switching instructions
- Fix concurrency group using github.ref instead of github.head_ref
  (github.head_ref is empty for push events, causing tag builds to cancel)

* fix: address code review feedback for 4.12.0 release

- Fix duplicate 'settings' key in ja.i18n.json breaking JSON parsing
- Fix extra space before comma in de-DE.i18n.json
- Add theme value validation in userThemePreference reducer
- Add Windows-safe release:tag:win script variant
- Update Volta yarn version to match packageManager (4.6.0)
- Add fallback jsign discovery in CI workflow
- Fix pre-release terminology consistency in docs
- Use execFileSync for shell safety in release-tag.ts
- Improve README sentence structure variety

* fix: address additional code review feedback

- Remove duplicate tag push in release-tag.ts (would fail on second attempt)
- Fix duplicate content and malformed code block in pre-release docs
- Add missing Windows architectures (ia32, arm64) to PR build workflow
- Add exit 1 after jsign Write-Error for fail-fast behavior

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>
…cketChat#3187)

* chore(theme): transparency mode not removing background of server view (RocketChat#3156)

* Language update from Lingohub 🤖 (RocketChat#3165)

Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>

* feat: Implement user theme preference settings  (RocketChat#3160)

* feat: Implement user theme preference settings and remove legacy theme appearance handling

- Introduced a new `ThemeAppearance` component to manage user theme preferences, allowing selection between 'auto', 'light', and 'dark' themes.
- Updated state management to include `userThemePreference`, replacing the previous `themeAppearance` handling.
- Removed deprecated theme appearance logic from various components and files, streamlining the codebase.
- Added internationalization support for theme appearance settings across multiple languages.
- Enhanced the UI to reflect user-selected theme preferences dynamically.

* fix(i18n): Correct Norwegian translation for theme appearance description

* fix(theme): Validate theme preference values before dispatching

- Updated the `handleChangeTheme` function to include validation for theme preference values, ensuring only 'auto', 'light', or 'dark' are accepted. This change prevents invalid values from being dispatched, enhancing the robustness of the theme management logic.

* refactor(DocumentViewer): Update theme management to utilize Redux state for user preferences

- Replaced the use of `useDarkMode` with Redux selectors to determine the theme based on user preferences and machine theme.
- Enhanced theme logic to support 'auto', 'light', and 'dark' settings, improving the flexibility and responsiveness of the theme management in the DocumentViewer component.

* refactor(DocumentViewer): Simplify theme management by removing Redux dependencies

- Eliminated the use of Redux selectors for theme management in the DocumentViewer component, replacing it with a static 'tint' background and default color settings.
- Streamlined the component's code by removing unnecessary theme logic, enhancing readability and maintainability.

* chore: Clean up code by removing unnecessary blank lines in ThemeAppearance, TransparentWindow, and userThemePreference files

* fix: Address PR review comments and restore API compatibility

- Remove trailing blank lines from ThemeAppearance.tsx, TransparentWindow.tsx, and userThemePreference.ts
- Restore setUserThemeAppearance as no-op function for backwards compatibility with @rocket.chat/desktop-api interface

* fix: resolve 91 security vulnerabilities in dependencies (RocketChat#3173)

* fix: resolve 91 security vulnerabilities in dependencies

- Update axios 1.6.4 -> 1.13.2 (SSRF, DoS, credential leakage)
- Update electron-updater 5.3.0 -> 6.3.9 (code signing bypass)
- Update rollup 4.9.6 -> 4.32.0 (DOM clobbering XSS)
- Update glob 11.0.3 -> 11.1.0 in workspace (command injection)
- Add resolutions for transitive dependencies:
  - cross-spawn, braces, ws, follow-redirects
  - form-data, tar-fs, undici
- Add comprehensive security remediation documentation

* docs: fix markdown lint - add language specifier to code block

* chore: Remove security documentation from repository

Security vulnerability remediation documentation kept locally for reference.

* fix: Issues in German translation (RocketChat#3155)

* chore: Upgrade Electron and Node.js versions, update README and packa… (RocketChat#3179)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* chore: Update @types/node version in package.json and yarn.lock

- Upgraded @types/node from version 16.18.69 to 25.0.10 in both package.json and yarn.lock to ensure compatibility with the latest TypeScript features and improvements.

* chore: Enable alpha releases (RocketChat#3180)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* docs: Add alpha release process documentation

- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases.
- Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.

* chore: Update architecture support and Node.js version requirements

- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats.
- Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.

* chore: Change develop branch to dev for release workflow

Update build-release workflow and desktop-release-action to use 'dev'
branch instead of 'develop' for development releases.

* chore: Update versioning and add release tag script

- Bumped version in package.json to 4.12.0.alpha.1.
- Added scripts/release-tag.ts for automated release tagging.
- Updated .eslintignore to exclude the new scripts directory.

* chore: Correct version format in package.json

- Updated version format in package.json from "4.12.0.alpha.1" to "4.12.0-alpha.1" for consistency.

* chore: Update all workflows to use dev branch instead of develop

- validate-pr.yml: Add dev to PR target branches
- powershell-lint.yml: Change develop to dev
- pull-request-build.yml: Change develop to dev

* fix: Normalize tags for consistent comparison in release-tag script

Strip leading 'v' prefix when comparing tags to handle both v-prefixed
and non-prefixed tag formats consistently.

* chore: Increment bundle version in electron-builder.json to 26012

* chore: Address nitpick comments in release-tag script

- Add comment explaining why /scripts is excluded from eslint
- Return null on exec error to distinguish from empty output
- Add warning when git tag list fails
- Use -- separator in git commands for safety

* fix: Add jsign to GITHUB_PATH in Windows CI setup

The jsign tool was being installed but not added to PATH for subsequent
steps. This caused the "Verify tools" step to fail with "jsign not found".

* chore: Bump version to 4.12.0-alpha.2

- Updated version in package.json to 4.12.0-alpha.2
- Incremented bundleVersion in electron-builder.json to 26013

* docs: Add QA testing guide for alpha channel updates

* docs: Rename alpha docs to pre-release and fix workflow concurrency

- Rename alpha-release-process.md to pre-release-process.md
- Add beta release documentation
- Add detailed channel switching instructions
- Fix concurrency group using github.ref instead of github.head_ref
  (github.head_ref is empty for push events, causing tag builds to cancel)

* feat(outlook): add @ewsjs/xhr debugging patches

Add comprehensive NTLM authentication debugging to @ewsjs/xhr library:

- patches-src/ directory structure for maintainable patches
- Enhanced ntlmProvider.ts with detailed NTLM handshake logging
- Enhanced xhrApi.ts with HTTP request/response debugging
- Yarn patch resolution for @ewsjs/xhr@2.0.2
- apply-patches.sh script for regenerating patches

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): add type definitions for calendar sync

Add error-related type definitions to support error classification:

- ErrorSource: exchange, rocket_chat, desktop_app, network, authentication, configuration
- ErrorSeverity: low, medium, high, critical
- OutlookCalendarError: full error object with context
- ErrorClassification: pattern matching result type

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): add error classification system

Add comprehensive error classification for Outlook calendar sync:

- Pattern-based error detection for Exchange, Rocket.Chat, and desktop errors
- Automatic severity and source classification
- User-friendly error messages with suggested actions
- Structured logging format for debugging
- Support for NTLM auth, network, SSL, and credential errors

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): enhance calendar sync with debugging and mutex

* test(outlook): add tests for getOutlookEvents

* feat(outlook): add logging infrastructure for calendar debugging

* chore: fix linting issues for Outlook calendar debugging

- Exclude patches-src/ from eslint (not part of main build)
- Fix has-credentials handler return type to match expected signature

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: address CodeRabbit review issues for Outlook calendar

- Fix console transport recursion by using originalConsole in writeFn
- Fix infinite recursion in redactObject using destructuring
- Remove NTLM Type 3 message logging (contains credentials)
- Fix queued sync promises never resolving by tracking resolve/reject
- Fix unhandled async errors in preload using .then().catch()
- Accept HTTP 2xx status codes instead of only 200
- Fix URL validation to check pathname instead of full URL
- Update tests to match actual implementation behavior

* feat(settings): add Developer tab with verbose Outlook logging toggle

- Add Developer tab in Settings (only visible when developer mode enabled)
- Add verbose Outlook logging toggle to control [OutlookCalendar] console output
- Add colored console output for better visibility on dark themes
- Redirect to General tab when developer mode disabled while on Developer tab
- Create centralized logger (outlookLog, outlookError, etc.) in src/outlookCalendar/logger.ts
- Convert all direct console.log calls to use centralized logger
- Fix infinite recursion bug in patches (verboseLog calling itself)
- Add AGENTS.md documentation files for knowledge management
- Use theme-aware colors for Settings UI text

* fix(ci): remove conflicting patch-package patch for @ewsjs/xhr

The @ewsjs/xhr package is already patched via Yarn's patch protocol
(.yarn/patches/). The patch-package patch was accidentally added and
conflicts with the already-applied Yarn patch, causing CI failures.

* docs: add patching mechanism documentation to AGENTS.md

Clarify that @ewsjs/xhr uses Yarn patch protocol (.yarn/patches/)
while patch-package (patches/) is only for other packages.
This prevents accidental CI breakage from conflicting patches.

* fix: address CodeRabbit review comments

- logger.ts: Use shared prefix constants instead of duplicating strings
- getOutlookEvents.ts: Replace Promise.reject() with throw statements
- getOutlookEvents.ts: Route console.error through outlookError
- ipc.ts: Route all console.* through outlookLog/outlookWarn/outlookError
- ipc.ts: Replace Promise.reject(e) with throw e
- AGENTS.md: Fix markdown formatting and update versions

* fix(outlook): address CodeRabbit review issues

- Add JSDoc to syncEventsWithRocketChatServer documenting sync coalescing
- Remove isSyncInProgress check in initial sync (let queue handle it)
- Remove logging implementation details test (tested console.log colors)

* chore: remove unused patches-src directory

The debugging code in patches-src/ was never applied - only the minimal
bug fix in .yarn/patches/ is used. Removing dead code to avoid confusion.

* fix: address all code review issues from PR RocketChat#3187 review

CRITICAL fixes:
- Support multi-server sync state (Map instead of globals)
- Fix Promise<Promise<boolean>> return type
- Use JSON.stringify for safe string escaping in executeJavaScript

MAJOR fixes:
- Add RocketChat calendar event types for type safety
- CRUD operations now return {success, error?} instead of swallowing errors
- Replace sync fs.appendFileSync with async fs.promises.appendFile
- Add useId() and htmlFor for accessibility in ThemeAppearance
- Apply privacy redaction to all transports (not just file)

MINOR fixes:
- Extract magic numbers to named constants
- Extract duplicate buildEwsPathname helper function
- Remove unused _context parameter from classifyError
- Remove fire-and-forget connectivity test calls
- Add originalConsole fallback in preload logging
- Optimize getComponentContext to skip stack trace for log/info/debug
- Fix email regex typo: [A-Z|a-z] -> [A-Za-z]
- Fix double timestamp in createClassifiedError
- Replace inline style with Fuselage pt prop

* fix(outlook): fix race condition in sync queue processing

Changed 'if' to 'while' loop to ensure all queued syncs are processed.
Previously, syncs queued while lastSync.run() was executing would be lost
because the queue was cleared before processing started.

* fix: address additional code review issues

- Fix pool exhaustion bug in context.ts: add overflow counter fallback
  when availableServerIds is depleted, emit warning with diagnostics
- Fix PII leak in ipc.ts error logging: move sensitive fields (subject,
  responseData) to verbose-only outlookLog calls at 5 locations
- Fix silent failure in performSync: throw error instead of silent
  return when eventsOnRocketChatServer fetch fails

* fix(logging): add captureComponentStack parameter to getLogContext

Allows callers to opt into stack-based component detection by passing
captureComponentStack=true, while preserving default behavior.

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…Chat#3186)

* chore(theme): transparency mode not removing background of server view (RocketChat#3156)

* Language update from Lingohub 🤖 (RocketChat#3165)

Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>

* feat: Implement user theme preference settings  (RocketChat#3160)

* feat: Implement user theme preference settings and remove legacy theme appearance handling

- Introduced a new `ThemeAppearance` component to manage user theme preferences, allowing selection between 'auto', 'light', and 'dark' themes.
- Updated state management to include `userThemePreference`, replacing the previous `themeAppearance` handling.
- Removed deprecated theme appearance logic from various components and files, streamlining the codebase.
- Added internationalization support for theme appearance settings across multiple languages.
- Enhanced the UI to reflect user-selected theme preferences dynamically.

* fix(i18n): Correct Norwegian translation for theme appearance description

* fix(theme): Validate theme preference values before dispatching

- Updated the `handleChangeTheme` function to include validation for theme preference values, ensuring only 'auto', 'light', or 'dark' are accepted. This change prevents invalid values from being dispatched, enhancing the robustness of the theme management logic.

* refactor(DocumentViewer): Update theme management to utilize Redux state for user preferences

- Replaced the use of `useDarkMode` with Redux selectors to determine the theme based on user preferences and machine theme.
- Enhanced theme logic to support 'auto', 'light', and 'dark' settings, improving the flexibility and responsiveness of the theme management in the DocumentViewer component.

* refactor(DocumentViewer): Simplify theme management by removing Redux dependencies

- Eliminated the use of Redux selectors for theme management in the DocumentViewer component, replacing it with a static 'tint' background and default color settings.
- Streamlined the component's code by removing unnecessary theme logic, enhancing readability and maintainability.

* chore: Clean up code by removing unnecessary blank lines in ThemeAppearance, TransparentWindow, and userThemePreference files

* fix: Address PR review comments and restore API compatibility

- Remove trailing blank lines from ThemeAppearance.tsx, TransparentWindow.tsx, and userThemePreference.ts
- Restore setUserThemeAppearance as no-op function for backwards compatibility with @rocket.chat/desktop-api interface

* fix: resolve 91 security vulnerabilities in dependencies (RocketChat#3173)

* fix: resolve 91 security vulnerabilities in dependencies

- Update axios 1.6.4 -> 1.13.2 (SSRF, DoS, credential leakage)
- Update electron-updater 5.3.0 -> 6.3.9 (code signing bypass)
- Update rollup 4.9.6 -> 4.32.0 (DOM clobbering XSS)
- Update glob 11.0.3 -> 11.1.0 in workspace (command injection)
- Add resolutions for transitive dependencies:
  - cross-spawn, braces, ws, follow-redirects
  - form-data, tar-fs, undici
- Add comprehensive security remediation documentation

* docs: fix markdown lint - add language specifier to code block

* chore: Remove security documentation from repository

Security vulnerability remediation documentation kept locally for reference.

* fix: Issues in German translation (RocketChat#3155)

* chore: Upgrade Electron and Node.js versions, update README and packa… (RocketChat#3179)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* chore: Update @types/node version in package.json and yarn.lock

- Upgraded @types/node from version 16.18.69 to 25.0.10 in both package.json and yarn.lock to ensure compatibility with the latest TypeScript features and improvements.

* chore: Enable alpha releases (RocketChat#3180)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* docs: Add alpha release process documentation

- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases.
- Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.

* chore: Update architecture support and Node.js version requirements

- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats.
- Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.

* chore: Change develop branch to dev for release workflow

Update build-release workflow and desktop-release-action to use 'dev'
branch instead of 'develop' for development releases.

* chore: Update versioning and add release tag script

- Bumped version in package.json to 4.12.0.alpha.1.
- Added scripts/release-tag.ts for automated release tagging.
- Updated .eslintignore to exclude the new scripts directory.

* chore: Correct version format in package.json

- Updated version format in package.json from "4.12.0.alpha.1" to "4.12.0-alpha.1" for consistency.

* chore: Update all workflows to use dev branch instead of develop

- validate-pr.yml: Add dev to PR target branches
- powershell-lint.yml: Change develop to dev
- pull-request-build.yml: Change develop to dev

* fix: Normalize tags for consistent comparison in release-tag script

Strip leading 'v' prefix when comparing tags to handle both v-prefixed
and non-prefixed tag formats consistently.

* chore: Increment bundle version in electron-builder.json to 26012

* chore: Address nitpick comments in release-tag script

- Add comment explaining why /scripts is excluded from eslint
- Return null on exec error to distinguish from empty output
- Add warning when git tag list fails
- Use -- separator in git commands for safety

* fix: Add jsign to GITHUB_PATH in Windows CI setup

The jsign tool was being installed but not added to PATH for subsequent
steps. This caused the "Verify tools" step to fail with "jsign not found".

* chore: Bump version to 4.12.0-alpha.2

- Updated version in package.json to 4.12.0-alpha.2
- Incremented bundleVersion in electron-builder.json to 26013

* docs: Add QA testing guide for alpha channel updates

* docs: Rename alpha docs to pre-release and fix workflow concurrency

- Rename alpha-release-process.md to pre-release-process.md
- Add beta release documentation
- Add detailed channel switching instructions
- Fix concurrency group using github.ref instead of github.head_ref
  (github.head_ref is empty for push events, causing tag builds to cancel)

* feat(logging): add scoped logging infrastructure

* feat(log-viewer): add log viewer window and components

* build: add log viewer window build configuration

* feat: integrate logging and log viewer into app lifecycle

* feat: add log viewer IPC channels and menu item

* feat: add i18n translations and fix UI color tokens

* chore: add logging dependencies and fix type error

* fix: address code review feedback

- Add 'silly' log level to LogLevel type for electron-log compatibility
- Fix duplicate server IDs by using overflow counter instead of MAX_SERVER_ID
- Reset startInProgress flag when retry count exceeded in preload
- Add statLog to log viewer preload API
- Use contextIsolation and preload script for log viewer window security
- Replace direct ipcRenderer usage with window.logViewerAPI in renderer

* revert: restore log viewer window settings and add architecture guidelines

- Revert nodeIntegration/contextIsolation changes that broke log viewer
- Add CLAUDE.md guidelines to prevent destructive architecture changes
- Document that existing code patterns exist for specific reasons

* fix: address code review feedback from CodeRabbit

This commit addresses three major review comments:

1. Remove unused preload script for log viewer window
   - The preload.ts was built but never wired to the BrowserWindow
   - Current implementation uses nodeIntegration: true and contextIsolation: false
   - Removed unused build entry from rollup.config.mjs
   - Deleted unused src/logViewerWindow/preload.ts file

2. Guard programmatic scrolls to prevent disabling auto-scroll
   - Added isAutoScrollingRef to track programmatic vs user-initiated scrolls
   - Set flag before calling scrollToIndex and reset after
   - handleScroll now returns early if scroll is programmatic
   - Prevents auto-scroll from being disabled when virtuosoRef.scrollToIndex triggers onScroll

3. Don't swallow startup failures - exit after logging
   - Changed start().catch(console.error) to properly log error and exit
   - Uses logger.error for structured logging
   - Calls app.exit(1) to prevent partial initialization
   - Prevents app running in broken state after critical failures

4. Add error handling to log viewer menu item
   - Wrapped openLogViewer click handler in try-catch
   - Matches pattern used by videoCallDevTools menu item
   - Logs errors to console for debugging

* fix(log-viewer): guard against non-positive limits in getLastNEntries

Return empty content when limit <= 0 to prevent undefined behavior
from negative slice indices.

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>
…ketChat#3206)

* fix: guard store functions against pre-initialization calls on macOS Tahoe

On macOS 26.x (Tahoe), the IPC call to retrieve the server URL is slower
than on earlier macOS versions, causing the preload to retry with a 1-second
delay. During this window the RC webapp loads and calls
`window.RocketChatDesktop.setTitle()` and `setUserPresenceDetection()`, which
internally invoke `dispatch()` and `listen()` from the Redux store before
`createRendererReduxStore()` has completed. Since `reduxStore` is still
`undefined`, accessing `.dispatch` or `.subscribe` throws a TypeError that
propagates back through contextBridge into the React tree, crashing the app
with "The application GUI just crashed".

Fix: add null guards to `dispatch`, `dispatchSingle`, `dispatchLocal`,
`watch`, and `listen` so they silently no-op instead of throwing when the
store is not yet initialized. The webapp reactively re-fires these calls
once the app is fully ready, so no state is permanently lost.

Also guard `request()` to reject immediately with a clear error rather than
returning a hung Promise that never resolves, preventing potential memory
leaks if `createNotification()` is called before store init.

Simplify the `getInternalVideoChatWindowEnabled` selector as a drive-by.

* fix: add safeSelect for preload context and guard getInternalVideoChatWindowEnabled

select() has no null guard by design — it crashes loudly if called before
store initialization, which is correct for the main process where the store
is always ready before any select() call.

Add safeSelect() for preload contexts where the store may not yet be
initialized. Unlike select(), it returns T | undefined and TypeScript
enforces that callers handle the undefined case.

Use safeSelect in getInternalVideoChatWindowEnabled() with an explicit
?? false fallback, so early calls before store init return false (safe
default) instead of crashing or silently returning undefined-as-boolean.
…e it (RocketChat#3205)

* fix: improve screen share picker cancellation reliability

- Remove redundant dialog.close() call inside onclose handler in Dialog
  hooks (close event fires after dialog is already closed, making the
  call a no-op per WHATWG spec)
- Add safety-net IPC cancellation in ScreenSharePicker: track whether a
  response was sent per picker session; if visible transitions false
  without a response having been sent, send null cancellation as fallback.
  This covers all dismissal paths (click-outside, ESC, programmatic close)
  regardless of the Dialog close event chain

* fix: resolve screen share picker stuck after dismissal

Three compounding bugs caused the screen sharing button to become
permanently unresponsive after the user dismissed the picker by
clicking outside the dialog:

1. handleClose firing after handleShare — when handleShare called
   setVisible(false), the useDialog useEffect triggered dialog.close()
   which synchronously fired onclose → handleClose. Since handleClose
   had no guard, it sent a null cancellation immediately after the real
   sourceId, consuming the ipcMain.once listener with null and leaving
   Jitsi's getDisplayMedia callback unresolved on the next attempt.
   Fix: added responseSentRef.current guard at the top of handleClose.

2. isScreenSharingRequestPending cleared after cb() — Jitsi calls
   getDisplayMedia again synchronously inside the setDisplayMediaRequest-
   Handler callback, re-entering createInternalPickerHandler while
   isScreenSharingRequestPending was still true, permanently blocking
   subsequent requests. Fix: moved markScreenSharingComplete() before
   cb() in both the response listener and the timeout handler.

3. Dual ipcMain.once race in open-screen-picker handler — the jitsiBridge
   IPC path registered its own relay listener without clearing any active
   listener from createInternalPickerHandler first. Fix: call
   cleanupScreenSharingListener() before registering the relay.

Also adds "Open System Preferences" link to the screen recording
permission denied callout, consistent with the microphone permission UX.
Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
* chore: remove package-lock.json in favor of yarn.lock

This project uses Yarn as its package manager. Having both
package-lock.json and yarn.lock tracked causes conflicts and
breaks npx/npm tooling due to devEngines format differences.

* chore: anchor package-lock.json ignore to repository root
* fix: Bugsnag network connections even with errors reporting disabled (#3190)

* fix: disable Bugsnag auto session tracking to prevent unwanted network connections

Adds autoTrackSessions: false to Bugsnag.start() configuration to prevent
the SDK from automatically connecting to sessions.bugsnag.com on initialization.
This fixes issues in air-gapped networks where the connection attempt triggers
certificate error dialogs even when telemetry is disabled.

Also upgrades @bugsnag/js from v7.22.3 to v8.8.1.

* test: add integration tests for Bugsnag network behavior

- Use nock to intercept real HTTP requests from Bugsnag SDK
- Verify no network calls when reporting is disabled
- Verify sessions are sent when reporting is enabled
- Use Object.defineProperty for env var mocking
- Skip tests on Windows due to Jest module mocking issues

* Version 4.12.1-alpha.1

* feat: add admin setting to bypass SSL certificate validation for Outlook calendar

Add `allowInsecureOutlookConnections` setting for air-gapped environments
where Exchange servers use self-signed or internal CA certificates.

Configurable via overridden-settings.json:
{ "allowInsecureOutlookConnections": true }

Changes:
- Add new reducer for the setting (defaults to false)
- Apply setting to both Exchange (XhrApi) and Rocket.Chat (axios) connections
- Reuse single HTTPS agent per sync for better performance
- Fix missing await on createEventOnRocketChatServer call

* Version 4.12.1-alpha.2

* chore: patch @ewsjs/xhr to stop overwriting request errors

* lock file

* fix: make allowInsecureOutlookConnections override-only setting

The setting was being persisted to config.json, which meant once set to
true it would stay true even after removing from overridden-settings.json.

Changes:
- Remove from PersistableValues type and migrations
- Remove from selectPersistableValues selector
- Explicitly read from override files on each app start
- Accept case-insensitive "true" values for robustness
- Always defaults to false when key is missing

This ensures admins have full control over the setting in air-gapped
environments where remote debugging is not possible.

* feat: add admin setting to bypass SSL certificate validation for Outlook calendar (#3191)

* feat: add admin setting to bypass SSL certificate validation for Outlook calendar

Add `allowInsecureOutlookConnections` setting for air-gapped environments
where Exchange servers use self-signed or internal CA certificates.

Configurable via overridden-settings.json:
{ "allowInsecureOutlookConnections": true }

Changes:
- Add new reducer for the setting (defaults to false)
- Apply setting to both Exchange (XhrApi) and Rocket.Chat (axios) connections
- Reuse single HTTPS agent per sync for better performance
- Fix missing await on createEventOnRocketChatServer call

* Version 4.12.1-alpha.2

* chore: patch @ewsjs/xhr to stop overwriting request errors

* lock file

* fix: make allowInsecureOutlookConnections override-only setting

The setting was being persisted to config.json, which meant once set to
true it would stay true even after removing from overridden-settings.json.

Changes:
- Remove from PersistableValues type and migrations
- Remove from selectPersistableValues selector
- Explicitly read from override files on each app start
- Accept case-insensitive "true" values for robustness
- Always defaults to false when key is missing

This ensures admins have full control over the setting in air-gapped
environments where remote debugging is not possible.

---------

Co-authored-by: Pierre Lehnen <pierre.lehnen@rocket.chat>

* Add configurable Outlook calendar sync interval (#3198)

* feat: add configurable Outlook calendar sync interval (1-60 min)

Adds a user-editable sync interval setting to Settings > General,
with admin override support via overridden-settings.json. Uses a
nullable override pattern (number | null) to cleanly separate admin
overrides from persisted user preferences, preventing contamination.
Includes debounced runtime restart of the sync task on changes.

* chore: bump version to 4.12.1-alpha.3, improve sync interval change handling

Increases debounce to 10s, triggers an immediate sync before
rescheduling, and adds a log message when the interval changes.

* fix: clean up sync state when credentials are cleared or app shuts down

Prevents stale credentials from being used by the debounced interval
restart callback. Clears timers, nulls module-level state, and
unsubscribes the interval watcher on credential clear and shutdown.

* feat: Add outlook detailed logs toggle (#3199)

* feat: Add Exchange/EWS debugging patches and error classification (#3187)

* chore(theme): transparency mode not removing background of server view (#3156)

* Language update from Lingohub 🤖 (#3165)

Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>

* feat: Implement user theme preference settings  (#3160)

* feat: Implement user theme preference settings and remove legacy theme appearance handling

- Introduced a new `ThemeAppearance` component to manage user theme preferences, allowing selection between 'auto', 'light', and 'dark' themes.
- Updated state management to include `userThemePreference`, replacing the previous `themeAppearance` handling.
- Removed deprecated theme appearance logic from various components and files, streamlining the codebase.
- Added internationalization support for theme appearance settings across multiple languages.
- Enhanced the UI to reflect user-selected theme preferences dynamically.

* fix(i18n): Correct Norwegian translation for theme appearance description

* fix(theme): Validate theme preference values before dispatching

- Updated the `handleChangeTheme` function to include validation for theme preference values, ensuring only 'auto', 'light', or 'dark' are accepted. This change prevents invalid values from being dispatched, enhancing the robustness of the theme management logic.

* refactor(DocumentViewer): Update theme management to utilize Redux state for user preferences

- Replaced the use of `useDarkMode` with Redux selectors to determine the theme based on user preferences and machine theme.
- Enhanced theme logic to support 'auto', 'light', and 'dark' settings, improving the flexibility and responsiveness of the theme management in the DocumentViewer component.

* refactor(DocumentViewer): Simplify theme management by removing Redux dependencies

- Eliminated the use of Redux selectors for theme management in the DocumentViewer component, replacing it with a static 'tint' background and default color settings.
- Streamlined the component's code by removing unnecessary theme logic, enhancing readability and maintainability.

* chore: Clean up code by removing unnecessary blank lines in ThemeAppearance, TransparentWindow, and userThemePreference files

* fix: Address PR review comments and restore API compatibility

- Remove trailing blank lines from ThemeAppearance.tsx, TransparentWindow.tsx, and userThemePreference.ts
- Restore setUserThemeAppearance as no-op function for backwards compatibility with @rocket.chat/desktop-api interface

* fix: resolve 91 security vulnerabilities in dependencies (#3173)

* fix: resolve 91 security vulnerabilities in dependencies

- Update axios 1.6.4 -> 1.13.2 (SSRF, DoS, credential leakage)
- Update electron-updater 5.3.0 -> 6.3.9 (code signing bypass)
- Update rollup 4.9.6 -> 4.32.0 (DOM clobbering XSS)
- Update glob 11.0.3 -> 11.1.0 in workspace (command injection)
- Add resolutions for transitive dependencies:
  - cross-spawn, braces, ws, follow-redirects
  - form-data, tar-fs, undici
- Add comprehensive security remediation documentation

* docs: fix markdown lint - add language specifier to code block

* chore: Remove security documentation from repository

Security vulnerability remediation documentation kept locally for reference.

* fix: Issues in German translation (#3155)

* chore: Upgrade Electron and Node.js versions, update README and packa… (#3179)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* chore: Update @types/node version in package.json and yarn.lock

- Upgraded @types/node from version 16.18.69 to 25.0.10 in both package.json and yarn.lock to ensure compatibility with the latest TypeScript features and improvements.

* chore: Enable alpha releases (#3180)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* docs: Add alpha release process documentation

- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases.
- Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.

* chore: Update architecture support and Node.js version requirements

- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats.
- Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.

* chore: Change develop branch to dev for release workflow

Update build-release workflow and desktop-release-action to use 'dev'
branch instead of 'develop' for development releases.

* chore: Update versioning and add release tag script

- Bumped version in package.json to 4.12.0.alpha.1.
- Added scripts/release-tag.ts for automated release tagging.
- Updated .eslintignore to exclude the new scripts directory.

* chore: Correct version format in package.json

- Updated version format in package.json from "4.12.0.alpha.1" to "4.12.0-alpha.1" for consistency.

* chore: Update all workflows to use dev branch instead of develop

- validate-pr.yml: Add dev to PR target branches
- powershell-lint.yml: Change develop to dev
- pull-request-build.yml: Change develop to dev

* fix: Normalize tags for consistent comparison in release-tag script

Strip leading 'v' prefix when comparing tags to handle both v-prefixed
and non-prefixed tag formats consistently.

* chore: Increment bundle version in electron-builder.json to 26012

* chore: Address nitpick comments in release-tag script

- Add comment explaining why /scripts is excluded from eslint
- Return null on exec error to distinguish from empty output
- Add warning when git tag list fails
- Use -- separator in git commands for safety

* fix: Add jsign to GITHUB_PATH in Windows CI setup

The jsign tool was being installed but not added to PATH for subsequent
steps. This caused the "Verify tools" step to fail with "jsign not found".

* chore: Bump version to 4.12.0-alpha.2

- Updated version in package.json to 4.12.0-alpha.2
- Incremented bundleVersion in electron-builder.json to 26013

* docs: Add QA testing guide for alpha channel updates

* docs: Rename alpha docs to pre-release and fix workflow concurrency

- Rename alpha-release-process.md to pre-release-process.md
- Add beta release documentation
- Add detailed channel switching instructions
- Fix concurrency group using github.ref instead of github.head_ref
  (github.head_ref is empty for push events, causing tag builds to cancel)

* feat(outlook): add @ewsjs/xhr debugging patches

Add comprehensive NTLM authentication debugging to @ewsjs/xhr library:

- patches-src/ directory structure for maintainable patches
- Enhanced ntlmProvider.ts with detailed NTLM handshake logging
- Enhanced xhrApi.ts with HTTP request/response debugging
- Yarn patch resolution for @ewsjs/xhr@2.0.2
- apply-patches.sh script for regenerating patches

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): add type definitions for calendar sync

Add error-related type definitions to support error classification:

- ErrorSource: exchange, rocket_chat, desktop_app, network, authentication, configuration
- ErrorSeverity: low, medium, high, critical
- OutlookCalendarError: full error object with context
- ErrorClassification: pattern matching result type

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): add error classification system

Add comprehensive error classification for Outlook calendar sync:

- Pattern-based error detection for Exchange, Rocket.Chat, and desktop errors
- Automatic severity and source classification
- User-friendly error messages with suggested actions
- Structured logging format for debugging
- Support for NTLM auth, network, SSL, and credential errors

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): enhance calendar sync with debugging and mutex

* test(outlook): add tests for getOutlookEvents

* feat(outlook): add logging infrastructure for calendar debugging

* chore: fix linting issues for Outlook calendar debugging

- Exclude patches-src/ from eslint (not part of main build)
- Fix has-credentials handler return type to match expected signature

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: address CodeRabbit review issues for Outlook calendar

- Fix console transport recursion by using originalConsole in writeFn
- Fix infinite recursion in redactObject using destructuring
- Remove NTLM Type 3 message logging (contains credentials)
- Fix queued sync promises never resolving by tracking resolve/reject
- Fix unhandled async errors in preload using .then().catch()
- Accept HTTP 2xx status codes instead of only 200
- Fix URL validation to check pathname instead of full URL
- Update tests to match actual implementation behavior

* feat(settings): add Developer tab with verbose Outlook logging toggle

- Add Developer tab in Settings (only visible when developer mode enabled)
- Add verbose Outlook logging toggle to control [OutlookCalendar] console output
- Add colored console output for better visibility on dark themes
- Redirect to General tab when developer mode disabled while on Developer tab
- Create centralized logger (outlookLog, outlookError, etc.) in src/outlookCalendar/logger.ts
- Convert all direct console.log calls to use centralized logger
- Fix infinite recursion bug in patches (verboseLog calling itself)
- Add AGENTS.md documentation files for knowledge management
- Use theme-aware colors for Settings UI text

* fix(ci): remove conflicting patch-package patch for @ewsjs/xhr

The @ewsjs/xhr package is already patched via Yarn's patch protocol
(.yarn/patches/). The patch-package patch was accidentally added and
conflicts with the already-applied Yarn patch, causing CI failures.

* docs: add patching mechanism documentation to AGENTS.md

Clarify that @ewsjs/xhr uses Yarn patch protocol (.yarn/patches/)
while patch-package (patches/) is only for other packages.
This prevents accidental CI breakage from conflicting patches.

* fix: address CodeRabbit review comments

- logger.ts: Use shared prefix constants instead of duplicating strings
- getOutlookEvents.ts: Replace Promise.reject() with throw statements
- getOutlookEvents.ts: Route console.error through outlookError
- ipc.ts: Route all console.* through outlookLog/outlookWarn/outlookError
- ipc.ts: Replace Promise.reject(e) with throw e
- AGENTS.md: Fix markdown formatting and update versions

* fix(outlook): address CodeRabbit review issues

- Add JSDoc to syncEventsWithRocketChatServer documenting sync coalescing
- Remove isSyncInProgress check in initial sync (let queue handle it)
- Remove logging implementation details test (tested console.log colors)

* chore: remove unused patches-src directory

The debugging code in patches-src/ was never applied - only the minimal
bug fix in .yarn/patches/ is used. Removing dead code to avoid confusion.

* fix: address all code review issues from PR #3187 review

CRITICAL fixes:
- Support multi-server sync state (Map instead of globals)
- Fix Promise<Promise<boolean>> return type
- Use JSON.stringify for safe string escaping in executeJavaScript

MAJOR fixes:
- Add RocketChat calendar event types for type safety
- CRUD operations now return {success, error?} instead of swallowing errors
- Replace sync fs.appendFileSync with async fs.promises.appendFile
- Add useId() and htmlFor for accessibility in ThemeAppearance
- Apply privacy redaction to all transports (not just file)

MINOR fixes:
- Extract magic numbers to named constants
- Extract duplicate buildEwsPathname helper function
- Remove unused _context parameter from classifyError
- Remove fire-and-forget connectivity test calls
- Add originalConsole fallback in preload logging
- Optimize getComponentContext to skip stack trace for log/info/debug
- Fix email regex typo: [A-Z|a-z] -> [A-Za-z]
- Fix double timestamp in createClassifiedError
- Replace inline style with Fuselage pt prop

* fix(outlook): fix race condition in sync queue processing

Changed 'if' to 'while' loop to ensure all queued syncs are processed.
Previously, syncs queued while lastSync.run() was executing would be lost
because the queue was cleared before processing started.

* fix: address additional code review issues

- Fix pool exhaustion bug in context.ts: add overflow counter fallback
  when availableServerIds is depleted, emit warning with diagnostics
- Fix PII leak in ipc.ts error logging: move sensitive fields (subject,
  responseData) to verbose-only outlookLog calls at 5 locations
- Fix silent failure in performSync: throw error instead of silent
  return when eventsOnRocketChatServer fetch fails

* fix(logging): add captureComponentStack parameter to getLogContext

Allows callers to opt into stack-based component detection by passing
captureComponentStack=true, while preserving default behavior.

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat: Add scoped logging infrastructure and log viewer window (#3186)

* chore(theme): transparency mode not removing background of server view (#3156)

* Language update from Lingohub 🤖 (#3165)

Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>

* feat: Implement user theme preference settings  (#3160)

* feat: Implement user theme preference settings and remove legacy theme appearance handling

- Introduced a new `ThemeAppearance` component to manage user theme preferences, allowing selection between 'auto', 'light', and 'dark' themes.
- Updated state management to include `userThemePreference`, replacing the previous `themeAppearance` handling.
- Removed deprecated theme appearance logic from various components and files, streamlining the codebase.
- Added internationalization support for theme appearance settings across multiple languages.
- Enhanced the UI to reflect user-selected theme preferences dynamically.

* fix(i18n): Correct Norwegian translation for theme appearance description

* fix(theme): Validate theme preference values before dispatching

- Updated the `handleChangeTheme` function to include validation for theme preference values, ensuring only 'auto', 'light', or 'dark' are accepted. This change prevents invalid values from being dispatched, enhancing the robustness of the theme management logic.

* refactor(DocumentViewer): Update theme management to utilize Redux state for user preferences

- Replaced the use of `useDarkMode` with Redux selectors to determine the theme based on user preferences and machine theme.
- Enhanced theme logic to support 'auto', 'light', and 'dark' settings, improving the flexibility and responsiveness of the theme management in the DocumentViewer component.

* refactor(DocumentViewer): Simplify theme management by removing Redux dependencies

- Eliminated the use of Redux selectors for theme management in the DocumentViewer component, replacing it with a static 'tint' background and default color settings.
- Streamlined the component's code by removing unnecessary theme logic, enhancing readability and maintainability.

* chore: Clean up code by removing unnecessary blank lines in ThemeAppearance, TransparentWindow, and userThemePreference files

* fix: Address PR review comments and restore API compatibility

- Remove trailing blank lines from ThemeAppearance.tsx, TransparentWindow.tsx, and userThemePreference.ts
- Restore setUserThemeAppearance as no-op function for backwards compatibility with @rocket.chat/desktop-api interface

* fix: resolve 91 security vulnerabilities in dependencies (#3173)

* fix: resolve 91 security vulnerabilities in dependencies

- Update axios 1.6.4 -> 1.13.2 (SSRF, DoS, credential leakage)
- Update electron-updater 5.3.0 -> 6.3.9 (code signing bypass)
- Update rollup 4.9.6 -> 4.32.0 (DOM clobbering XSS)
- Update glob 11.0.3 -> 11.1.0 in workspace (command injection)
- Add resolutions for transitive dependencies:
  - cross-spawn, braces, ws, follow-redirects
  - form-data, tar-fs, undici
- Add comprehensive security remediation documentation

* docs: fix markdown lint - add language specifier to code block

* chore: Remove security documentation from repository

Security vulnerability remediation documentation kept locally for reference.

* fix: Issues in German translation (#3155)

* chore: Upgrade Electron and Node.js versions, update README and packa… (#3179)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* chore: Update @types/node version in package.json and yarn.lock

- Upgraded @types/node from version 16.18.69 to 25.0.10 in both package.json and yarn.lock to ensure compatibility with the latest TypeScript features and improvements.

* chore: Enable alpha releases (#3180)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* docs: Add alpha release process documentation

- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases.
- Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.

* chore: Update architecture support and Node.js version requirements

- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats.
- Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.

* chore: Change develop branch to dev for release workflow

Update build-release workflow and desktop-release-action to use 'dev'
branch instead of 'develop' for development releases.

* chore: Update versioning and add release tag script

- Bumped version in package.json to 4.12.0.alpha.1.
- Added scripts/release-tag.ts for automated release tagging.
- Updated .eslintignore to exclude the new scripts directory.

* chore: Correct version format in package.json

- Updated version format in package.json from "4.12.0.alpha.1" to "4.12.0-alpha.1" for consistency.

* chore: Update all workflows to use dev branch instead of develop

- validate-pr.yml: Add dev to PR target branches
- powershell-lint.yml: Change develop to dev
- pull-request-build.yml: Change develop to dev

* fix: Normalize tags for consistent comparison in release-tag script

Strip leading 'v' prefix when comparing tags to handle both v-prefixed
and non-prefixed tag formats consistently.

* chore: Increment bundle version in electron-builder.json to 26012

* chore: Address nitpick comments in release-tag script

- Add comment explaining why /scripts is excluded from eslint
- Return null on exec error to distinguish from empty output
- Add warning when git tag list fails
- Use -- separator in git commands for safety

* fix: Add jsign to GITHUB_PATH in Windows CI setup

The jsign tool was being installed but not added to PATH for subsequent
steps. This caused the "Verify tools" step to fail with "jsign not found".

* chore: Bump version to 4.12.0-alpha.2

- Updated version in package.json to 4.12.0-alpha.2
- Incremented bundleVersion in electron-builder.json to 26013

* docs: Add QA testing guide for alpha channel updates

* docs: Rename alpha docs to pre-release and fix workflow concurrency

- Rename alpha-release-process.md to pre-release-process.md
- Add beta release documentation
- Add detailed channel switching instructions
- Fix concurrency group using github.ref instead of github.head_ref
  (github.head_ref is empty for push events, causing tag builds to cancel)

* feat(logging): add scoped logging infrastructure

* feat(log-viewer): add log viewer window and components

* build: add log viewer window build configuration

* feat: integrate logging and log viewer into app lifecycle

* feat: add log viewer IPC channels and menu item

* feat: add i18n translations and fix UI color tokens

* chore: add logging dependencies and fix type error

* fix: address code review feedback

- Add 'silly' log level to LogLevel type for electron-log compatibility
- Fix duplicate server IDs by using overflow counter instead of MAX_SERVER_ID
- Reset startInProgress flag when retry count exceeded in preload
- Add statLog to log viewer preload API
- Use contextIsolation and preload script for log viewer window security
- Replace direct ipcRenderer usage with window.logViewerAPI in renderer

* revert: restore log viewer window settings and add architecture guidelines

- Revert nodeIntegration/contextIsolation changes that broke log viewer
- Add CLAUDE.md guidelines to prevent destructive architecture changes
- Document that existing code patterns exist for specific reasons

* fix: address code review feedback from CodeRabbit

This commit addresses three major review comments:

1. Remove unused preload script for log viewer window
   - The preload.ts was built but never wired to the BrowserWindow
   - Current implementation uses nodeIntegration: true and contextIsolation: false
   - Removed unused build entry from rollup.config.mjs
   - Deleted unused src/logViewerWindow/preload.ts file

2. Guard programmatic scrolls to prevent disabling auto-scroll
   - Added isAutoScrollingRef to track programmatic vs user-initiated scrolls
   - Set flag before calling scrollToIndex and reset after
   - handleScroll now returns early if scroll is programmatic
   - Prevents auto-scroll from being disabled when virtuosoRef.scrollToIndex triggers onScroll

3. Don't swallow startup failures - exit after logging
   - Changed start().catch(console.error) to properly log error and exit
   - Uses logger.error for structured logging
   - Calls app.exit(1) to prevent partial initialization
   - Prevents app running in broken state after critical failures

4. Add error handling to log viewer menu item
   - Wrapped openLogViewer click handler in try-catch
   - Matches pattern used by videoCallDevTools menu item
   - Logs errors to console for debugging

* fix(log-viewer): guard against non-positive limits in getLastNEntries

Return empty content when limit <= 0 to prevent undefined behavior
from negative slice indices.

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>

* fix: call stopOutlookCalendarSync on app quit

Ensures all sync timers and debounce timers are properly cleaned up
when the application shuts down, preventing sync operations during
shutdown.

* fix: improve logging system security and log viewer context filtering

- Protect active log files from cleanup deletion
- Add IPC rate limiting to prevent renderer process flooding
- Restrict log file permissions to owner-only access
- Add context sanitization to error classification (passwords/tokens only)
- Remove ANSI color codes from OutlookCalendar logger prefixes
- Fix log viewer context filter to use structured tag matching instead of substring search

* feat: add detailed events logging toggle for Outlook calendar sync

Add a new toggle in Settings > Developer to log full event data exchanged
between Exchange and Rocket.Chat during calendar sync. When enabled, logs
raw Exchange appointments, CRUD payloads/responses, event comparisons,
and sync summaries for diagnosing sync issues.

* fix: address PR review feedback

- Fix regex precedence in error classification so 'timeout' doesn't match too broadly
- Add lang="en" to log viewer HTML for accessibility
- Add circular reference guard to redactObject to prevent stack overflow
- Update AGENTS.md with missing outlookDebug/outlookEventDetail imports

* fix: address second round of PR review feedback

- Narrow SSL/TLS regex to match specific error codes instead of broad substrings
- Make sanitizeContext recursive to redact nested sensitive keys
- Align multi-line JSON context with box-drawing prefix in error logs
- Preserve original case in custom path segments in buildEwsPathname

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* Version 4.12.1-alpha.4

* fix: log viewer Windows compatibility and Outlook logging in production (#3203)

- Handle CRLF line endings from Windows log files (split on \r?\n)
- Fix regex to allow variable whitespace between bracket groups
- Change outlookLog/outlookDebug/outlookEventDetail to console.info
  so they reach the file transport in production (info threshold)
  instead of being silently dropped as debug level
- Fix Outlook preload console.log calls to console.info (same issue)
- Fix app startup completion log to console.info

* Version 4.12.1-alpha.5

* fix: always send endTime and busy fields in calendar sync payload (#3204)

Remove server version gate (>= 7.5.0) that conditionally included endTime and busy fields when syncing Outlook calendar events to Rocket.Chat server. The gate was failing for some customers because server.version was not populated in the Redux store, causing these fields to be silently dropped from create/update payloads regardless of actual server version.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* Version 4.12.1-alpha.6

* Merge master into dev — bring bug fixes to dev branch (#3215)

* feat: Add Exchange/EWS debugging patches and error classification (#3187)

* chore(theme): transparency mode not removing background of server view (#3156)

* Language update from Lingohub 🤖 (#3165)

Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>

* feat: Implement user theme preference settings  (#3160)

* feat: Implement user theme preference settings and remove legacy theme appearance handling

- Introduced a new `ThemeAppearance` component to manage user theme preferences, allowing selection between 'auto', 'light', and 'dark' themes.
- Updated state management to include `userThemePreference`, replacing the previous `themeAppearance` handling.
- Removed deprecated theme appearance logic from various components and files, streamlining the codebase.
- Added internationalization support for theme appearance settings across multiple languages.
- Enhanced the UI to reflect user-selected theme preferences dynamically.

* fix(i18n): Correct Norwegian translation for theme appearance description

* fix(theme): Validate theme preference values before dispatching

- Updated the `handleChangeTheme` function to include validation for theme preference values, ensuring only 'auto', 'light', or 'dark' are accepted. This change prevents invalid values from being dispatched, enhancing the robustness of the theme management logic.

* refactor(DocumentViewer): Update theme management to utilize Redux state for user preferences

- Replaced the use of `useDarkMode` with Redux selectors to determine the theme based on user preferences and machine theme.
- Enhanced theme logic to support 'auto', 'light', and 'dark' settings, improving the flexibility and responsiveness of the theme management in the DocumentViewer component.

* refactor(DocumentViewer): Simplify theme management by removing Redux dependencies

- Eliminated the use of Redux selectors for theme management in the DocumentViewer component, replacing it with a static 'tint' background and default color settings.
- Streamlined the component's code by removing unnecessary theme logic, enhancing readability and maintainability.

* chore: Clean up code by removing unnecessary blank lines in ThemeAppearance, TransparentWindow, and userThemePreference files

* fix: Address PR review comments and restore API compatibility

- Remove trailing blank lines from ThemeAppearance.tsx, TransparentWindow.tsx, and userThemePreference.ts
- Restore setUserThemeAppearance as no-op function for backwards compatibility with @rocket.chat/desktop-api interface

* fix: resolve 91 security vulnerabilities in dependencies (#3173)

* fix: resolve 91 security vulnerabilities in dependencies

- Update axios 1.6.4 -> 1.13.2 (SSRF, DoS, credential leakage)
- Update electron-updater 5.3.0 -> 6.3.9 (code signing bypass)
- Update rollup 4.9.6 -> 4.32.0 (DOM clobbering XSS)
- Update glob 11.0.3 -> 11.1.0 in workspace (command injection)
- Add resolutions for transitive dependencies:
  - cross-spawn, braces, ws, follow-redirects
  - form-data, tar-fs, undici
- Add comprehensive security remediation documentation

* docs: fix markdown lint - add language specifier to code block

* chore: Remove security documentation from repository

Security vulnerability remediation documentation kept locally for reference.

* fix: Issues in German translation (#3155)

* chore: Upgrade Electron and Node.js versions, update README and packa… (#3179)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* chore: Update @types/node version in package.json and yarn.lock

- Upgraded @types/node from version 16.18.69 to 25.0.10 in both package.json and yarn.lock to ensure compatibility with the latest TypeScript features and improvements.

* chore: Enable alpha releases (#3180)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* docs: Add alpha release process documentation

- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases.
- Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.

* chore: Update architecture support and Node.js version requirements

- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats.
- Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.

* chore: Change develop branch to dev for release workflow

Update build-release workflow and desktop-release-action to use 'dev'
branch instead of 'develop' for development releases.

* chore: Update versioning and add release tag script

- Bumped version in package.json to 4.12.0.alpha.1.
- Added scripts/release-tag.ts for automated release tagging.
- Updated .eslintignore to exclude the new scripts directory.

* chore: Correct version format in package.json

- Updated version format in package.json from "4.12.0.alpha.1" to "4.12.0-alpha.1" for consistency.

* chore: Update all workflows to use dev branch instead of develop

- validate-pr.yml: Add dev to PR target branches
- powershell-lint.yml: Change develop to dev
- pull-request-build.yml: Change develop to dev

* fix: Normalize tags for consistent comparison in release-tag script

Strip leading 'v' prefix when comparing tags to handle both v-prefixed
and non-prefixed tag formats consistently.

* chore: Increment bundle version in electron-builder.json to 26012

* chore: Address nitpick comments in release-tag script

- Add comment explaining why /scripts is excluded from eslint
- Return null on exec error to distinguish from empty output
- Add warning when git tag list fails
- Use -- separator in git commands for safety

* fix: Add jsign to GITHUB_PATH in Windows CI setup

The jsign tool was being installed but not added to PATH for subsequent
steps. This caused the "Verify tools" step to fail with "jsign not found".

* chore: Bump version to 4.12.0-alpha.2

- Updated version in package.json to 4.12.0-alpha.2
- Incremented bundleVersion in electron-builder.json to 26013

* docs: Add QA testing guide for alpha channel updates

* docs: Rename alpha docs to pre-release and fix workflow concurrency

- Rename alpha-release-process.md to pre-release-process.md
- Add beta release documentation
- Add detailed channel switching instructions
- Fix concurrency group using github.ref instead of github.head_ref
  (github.head_ref is empty for push events, causing tag builds to cancel)

* feat(outlook): add @ewsjs/xhr debugging patches

Add comprehensive NTLM authentication debugging to @ewsjs/xhr library:

- patches-src/ directory structure for maintainable patches
- Enhanced ntlmProvider.ts with detailed NTLM handshake logging
- Enhanced xhrApi.ts with HTTP request/response debugging
- Yarn patch resolution for @ewsjs/xhr@2.0.2
- apply-patches.sh script for regenerating patches

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): add type definitions for calendar sync

Add error-related type definitions to support error classification:

- ErrorSource: exchange, rocket_chat, desktop_app, network, authentication, configuration
- ErrorSeverity: low, medium, high, critical
- OutlookCalendarError: full error object with context
- ErrorClassification: pattern matching result type

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): add error classification system

Add comprehensive error classification for Outlook calendar sync:

- Pattern-based error detection for Exchange, Rocket.Chat, and desktop errors
- Automatic severity and source classification
- User-friendly error messages with suggested actions
- Structured logging format for debugging
- Support for NTLM auth, network, SSL, and credential errors

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat(outlook): enhance calendar sync with debugging and mutex

* test(outlook): add tests for getOutlookEvents

* feat(outlook): add logging infrastructure for calendar debugging

* chore: fix linting issues for Outlook calendar debugging

- Exclude patches-src/ from eslint (not part of main build)
- Fix has-credentials handler return type to match expected signature

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-Claude)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: address CodeRabbit review issues for Outlook calendar

- Fix console transport recursion by using originalConsole in writeFn
- Fix infinite recursion in redactObject using destructuring
- Remove NTLM Type 3 message logging (contains credentials)
- Fix queued sync promises never resolving by tracking resolve/reject
- Fix unhandled async errors in preload using .then().catch()
- Accept HTTP 2xx status codes instead of only 200
- Fix URL validation to check pathname instead of full URL
- Update tests to match actual implementation behavior

* feat(settings): add Developer tab with verbose Outlook logging toggle

- Add Developer tab in Settings (only visible when developer mode enabled)
- Add verbose Outlook logging toggle to control [OutlookCalendar] console output
- Add colored console output for better visibility on dark themes
- Redirect to General tab when developer mode disabled while on Developer tab
- Create centralized logger (outlookLog, outlookError, etc.) in src/outlookCalendar/logger.ts
- Convert all direct console.log calls to use centralized logger
- Fix infinite recursion bug in patches (verboseLog calling itself)
- Add AGENTS.md documentation files for knowledge management
- Use theme-aware colors for Settings UI text

* fix(ci): remove conflicting patch-package patch for @ewsjs/xhr

The @ewsjs/xhr package is already patched via Yarn's patch protocol
(.yarn/patches/). The patch-package patch was accidentally added and
conflicts with the already-applied Yarn patch, causing CI failures.

* docs: add patching mechanism documentation to AGENTS.md

Clarify that @ewsjs/xhr uses Yarn patch protocol (.yarn/patches/)
while patch-package (patches/) is only for other packages.
This prevents accidental CI breakage from conflicting patches.

* fix: address CodeRabbit review comments

- logger.ts: Use shared prefix constants instead of duplicating strings
- getOutlookEvents.ts: Replace Promise.reject() with throw statements
- getOutlookEvents.ts: Route console.error through outlookError
- ipc.ts: Route all console.* through outlookLog/outlookWarn/outlookError
- ipc.ts: Replace Promise.reject(e) with throw e
- AGENTS.md: Fix markdown formatting and update versions

* fix(outlook): address CodeRabbit review issues

- Add JSDoc to syncEventsWithRocketChatServer documenting sync coalescing
- Remove isSyncInProgress check in initial sync (let queue handle it)
- Remove logging implementation details test (tested console.log colors)

* chore: remove unused patches-src directory

The debugging code in patches-src/ was never applied - only the minimal
bug fix in .yarn/patches/ is used. Removing dead code to avoid confusion.

* fix: address all code review issues from PR #3187 review

CRITICAL fixes:
- Support multi-server sync state (Map instead of globals)
- Fix Promise<Promise<boolean>> return type
- Use JSON.stringify for safe string escaping in executeJavaScript

MAJOR fixes:
- Add RocketChat calendar event types for type safety
- CRUD operations now return {success, error?} instead of swallowing errors
- Replace sync fs.appendFileSync with async fs.promises.appendFile
- Add useId() and htmlFor for accessibility in ThemeAppearance
- Apply privacy redaction to all transports (not just file)

MINOR fixes:
- Extract magic numbers to named constants
- Extract duplicate buildEwsPathname helper function
- Remove unused _context parameter from classifyError
- Remove fire-and-forget connectivity test calls
- Add originalConsole fallback in preload logging
- Optimize getComponentContext to skip stack trace for log/info/debug
- Fix email regex typo: [A-Z|a-z] -> [A-Za-z]
- Fix double timestamp in createClassifiedError
- Replace inline style with Fuselage pt prop

* fix(outlook): fix race condition in sync queue processing

Changed 'if' to 'while' loop to ensure all queued syncs are processed.
Previously, syncs queued while lastSync.run() was executing would be lost
because the queue was cleared before processing started.

* fix: address additional code review issues

- Fix pool exhaustion bug in context.ts: add overflow counter fallback
  when availableServerIds is depleted, emit warning with diagnostics
- Fix PII leak in ipc.ts error logging: move sensitive fields (subject,
  responseData) to verbose-only outlookLog calls at 5 locations
- Fix silent failure in performSync: throw error instead of silent
  return when eventsOnRocketChatServer fetch fails

* fix(logging): add captureComponentStack parameter to getLogContext

Allows callers to opt into stack-based component detection by passing
captureComponentStack=true, while preserving default behavior.

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat: Add scoped logging infrastructure and log viewer window (#3186)

* chore(theme): transparency mode not removing background of server view (#3156)

* Language update from Lingohub 🤖 (#3165)

Project Name: Rocket.Chat.Electron
Project Link: https://app.lingohub.com/project/pr_1Ag2Vlx6MWNt-16038/branches/prb_16rm9BiWK53b-4144
User: Lingohub Robot

Easy language translations with Lingohub 🚀

Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>

* feat: Implement user theme preference settings  (#3160)

* feat: Implement user theme preference settings and remove legacy theme appearance handling

- Introduced a new `ThemeAppearance` component to manage user theme preferences, allowing selection between 'auto', 'light', and 'dark' themes.
- Updated state management to include `userThemePreference`, replacing the previous `themeAppearance` handling.
- Removed deprecated theme appearance logic from various components and files, streamlining the codebase.
- Added internationalization support for theme appearance settings across multiple languages.
- Enhanced the UI to reflect user-selected theme preferences dynamically.

* fix(i18n): Correct Norwegian translation for theme appearance description

* fix(theme): Validate theme preference values before dispatching

- Updated the `handleChangeTheme` function to include validation for theme preference values, ensuring only 'auto', 'light', or 'dark' are accepted. This change prevents invalid values from being dispatched, enhancing the robustness of the theme management logic.

* refactor(DocumentViewer): Update theme management to utilize Redux state for user preferences

- Replaced the use of `useDarkMode` with Redux selectors to determine the theme based on user preferences and machine theme.
- Enhanced theme logic to support 'auto', 'light', and 'dark' settings, improving the flexibility and responsiveness of the theme management in the DocumentViewer component.

* refactor(DocumentViewer): Simplify theme management by removing Redux dependencies

- Eliminated the use of Redux selectors for theme management in the DocumentViewer component, replacing it with a static 'tint' background and default color settings.
- Streamlined the component's code by removing unnecessary theme logic, enhancing readability and maintainability.

* chore: Clean up code by removing unnecessary blank lines in ThemeAppearance, TransparentWindow, and userThemePreference files

* fix: Address PR review comments and restore API compatibility

- Remove trailing blank lines from ThemeAppearance.tsx, TransparentWindow.tsx, and userThemePreference.ts
- Restore setUserThemeAppearance as no-op function for backwards compatibility with @rocket.chat/desktop-api interface

* fix: resolve 91 security vulnerabilities in dependencies (#3173)

* fix: resolve 91 security vulnerabilities in dependencies

- Update axios 1.6.4 -> 1.13.2 (SSRF, DoS, credential leakage)
- Update electron-updater 5.3.0 -> 6.3.9 (code signing bypass)
- Update rollup 4.9.6 -> 4.32.0 (DOM clobbering XSS)
- Update glob 11.0.3 -> 11.1.0 in workspace (command injection)
- Add resolutions for transitive dependencies:
  - cross-spawn, braces, ws, follow-redirects
  - form-data, tar-fs, undici
- Add comprehensive security remediation documentation

* docs: fix markdown lint - add language specifier to code block

* chore: Remove security documentation from repository

Security vulnerability remediation documentation kept locally for reference.

* fix: Issues in German translation (#3155)

* chore: Upgrade Electron and Node.js versions, update README and packa… (#3179)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* chore: Update @types/node version in package.json and yarn.lock

- Upgraded @types/node from version 16.18.69 to 25.0.10 in both package.json and yarn.lock to ensure compatibility with the latest TypeScript features and improvements.

* chore: Enable alpha releases (#3180)

* chore: Upgrade Electron and Node.js versions, update README and package configurations

- Updated Electron dependency from version 39.2.5 to 40.0.0 in package.json and yarn.lock.
- Bumped Node.js version requirements in package.json and devEngines to >=24.11.1.
- Revised README.md to reflect new supported platforms and minimum version requirements.
- Removed deprecated tests related to ELECTRON_OZONE_PLATFORM_HINT in app.main.spec.ts.
- Enhanced documentation for development prerequisites and troubleshooting sections.

* chore: Bump version numbers in configuration files

- Updated the bundle version in electron-builder.json from 26010 to 26011.
- Incremented the application version in package.json from 4.11.1 to 4.12.0.

* docs: Update README to reflect new platform support and installation formats

- Revised the supported platforms section to include additional architectures and installation formats for Windows, macOS, and Linux.
- Updated download links for Microsoft Store and Mac App Store, ensuring accurate access to application sources.

* docs: Revise README layout for download links

- Updated the formatting of download links for Microsoft Store, Mac App Store, and Snap Store to improve visual presentation and accessibility.
- Changed from a div-based layout to a paragraph-based layout with adjusted image sizes for better responsiveness.

* docs: Add alpha release process documentation

- Introduced a new document detailing the alpha release process for the Rocket.Chat Desktop app, including channel definitions, versioning guidelines, and steps for creating and publishing alpha releases.
- Included instructions for users to opt into the alpha channel and troubleshooting tips for common issues.

* chore: Update architecture support and Node.js version requirements

- Added 'arm64' architecture support to the build targets in electron-builder.json for NSIS, MSI, and ZIP formats.
- Lowered the minimum Node.js version requirement in package.json from >=24.11.1 to >=20.0.0 for better compatibility.

* chore: Change develop branch to dev for release workflow

Update build-release workflow and desktop-release-action to use 'dev'
branch instead of 'develop' for development releases.

* chore: Update versioning and add release tag script

- Bumped version in package.json to 4.12.0.alpha.1.
- Added scripts/release-tag.ts for automated release tagging.
- Updated .eslintignore to exclude the new scripts directory.

* chore: Correct version format in package.json

- Updated version format in package.json from "4.12.0.alpha.1" to "4.12.0-alpha.1" for consistency.

* chore: Update all workflows to use dev branch instead of develop

- validate-pr.yml: Add dev to PR target branches
- powershell-lint.yml: Change develop to dev
- pull-request-build.yml: Change develop to dev

* fix: Normalize tags for consistent comparison in release-tag script

Strip leading 'v' prefix when comparing tags to handle both v-prefixed
and non-prefixed tag formats consistently.

* chore: Increment bundle version in electron-builder.json to 26012

* chore: Address nitpick comments in release-tag script

- Add comment explaining why /scripts is excluded from eslint
- Return null on exec error to distinguish from empty output
- Add warning when git tag list fails
- Use -- separator in git commands for safety

* fix: Add jsign to GITHUB_PATH in Windows CI setup

The jsign tool was being installed but not added to PATH for subsequent
steps. This caused the "Verify tools" step to fail with "jsign not found".

* chore: Bump version to 4.12.0-alpha.2

- Updated version in package.json to 4.12.0-alpha.2
- Incremented bundleVersion in electron-builder.json to 26013

* docs: Add QA testing guide for alpha channel updates

* docs: Rename alpha docs to pre-release and fix workflow concurrency

- Rename alpha-release-process.md to pre-release-process.md
- Add beta release documentation
- Add detailed channel switching instructions
- Fix concurrency group using github.ref instead of github.head_ref
  (github.head_ref is empty for push events, causing tag builds to cancel)

* feat(logging): add scoped logging infrastructure

* feat(log-viewer): add log viewer window and components

* build: add log viewer window build configuration

* feat: integrate logging and log viewer into app lifecycle

* feat: add log viewer IPC channels and menu item

* feat: add i18n translations and fix UI color tokens

* chore: add logging dependencies and fix type error

* fix: address code review feedback

- Add 'silly' log level to LogLevel type for electron-log compatibility
- Fix duplicate server IDs by using overflow counter instead of MAX_SERVER_ID
- Reset startInProgress flag when retry count exceeded in preload
- Add statLog to log viewer preload API
- Use contextIsolation and preload script for log viewer window security
- Replace direct ipcRenderer usage with window.logViewerAPI in renderer

* revert: restore log viewer window settings and add architecture guidelines

- Revert nodeIntegration/contextIsolation changes that broke log viewer
- Add CLAUDE.md guidelines to prevent destructive architecture changes
- Document that existing code patterns exist for specific reasons

* fix: address code review feedback from CodeRabbit

This commit addresses three major review comments:

1. Remove unused preload script for log viewer window
   - The preload.ts was built but never wired to the BrowserWindow
   - Current implementation uses nodeIntegration: true and contextIsolation: false
   - Removed unused build entry from rollup.config.mjs
   - Deleted unused src/logViewerWindow/preload.ts file

2. Guard programmatic scrolls to prevent disabling auto-scroll
   - Added isAutoScrollingRef to track programmatic vs user-initiated scrolls
   - Set flag before calling scrollToIndex and reset after
   - handleScroll now returns early if scroll is programmatic
   - Prevents auto-scroll from being disabled when virtuosoRef.scrollToIndex triggers onScroll

3. Don't swallow startup failures - exit after logging
   - Changed start().catch(console.error) to properly log error and exit
   - Uses logger.error for structured logging
   - Calls app.exit(1) to prevent partial initialization
   - Prevents app running in broken state after critical failures

4. Add error handling to log viewer menu item
   - Wrapped openLogViewer click handler in try-catch
   - Matches pattern used by videoCallDevTools menu item
   - Logs errors to console for debugging

* fix(log-viewer): guard against non-positive limits in getLastNEntries

Return empty content when limit <= 0 to prevent undefined behavior
from negative slice indices.

---------

Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: lingohub[bot] <69908207+lingohub[bot]@users.noreply.github.com>
Co-authored-by: Max Lee <max@themoep.de>

* fix: Add safe guards to prevent The application GUI just crashed (#3206)

* fix: guard store functions against pre-initialization calls on macOS Tahoe

On macOS 26.x (Tahoe), the IPC call to retrieve the server URL is slower
than on earlier macOS versions, causing the preload to retry with a 1-second
delay. During this window the RC webapp loads and calls
`window.RocketChatDesktop.setTitle()` and `setUserPresenceDetection()`, which
internally invoke `dispatch()` and `listen()` from the Redux store before
`createRendererReduxStore()` has completed. Since `reduxStore` is still
`undefined`, accessing `.dispatch` or `.subscribe` throws a TypeError that
propagates back through contextBridge into the React tree, crashing the app
with "The application GUI just crashed".

…
i18n: correct Polish gender, Norwegian sentence case, and translation typo
@Ram-sah19 Ram-sah19 force-pushed the fix-san-certificate-preview branch from f5ecf7e to 61d43d2 Compare March 10, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Previews trigger error message when certificate Subject Alternative Name is not Common Name