Skip to content

Support afp:// links and open them with system handler#3246

Open
Ram-sah19 wants to merge 126 commits intoRocketChat:developfrom
Ram-sah19:feat-support-afp-links
Open

Support afp:// links and open them with system handler#3246
Ram-sah19 wants to merge 126 commits intoRocketChat:developfrom
Ram-sah19:feat-support-afp-links

Conversation

@Ram-sah19
Copy link
Copy Markdown

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

Description

Adds support for afp:// links in the desktop client.

Previously AFP links were opened in the browser. With this change,
AFP links are passed to the system handler using openExternal,
allowing macOS to open them in Finder.

Testing

  1. Send a message containing an afp:// link
  2. Click the link
  3. Verify Finder opens the network path

Fixes

Summary by CodeRabbit

  • New Features

    • Open external links from the app with protocol validation.
    • Automatic renderer-crash recovery that clears caches and reloads.
  • Bug Fixes

    • Fixed YAML/JSON formatting issues (including Chinese locale) and added a missing video-call "no URL" message.
    • Minor config/template formatting fixes.
  • Documentation

    • Expanded video call, alpha release, QA testing docs and scripts README.
  • Style

    • Widespread formatting and translation updates; Swedish localization removed, various locales adjusted.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 10, 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: c8eb2689-9b9b-4841-9643-d93a685537ca

📥 Commits

Reviewing files that changed from the base of the PR and between 393c571 and 74a81ea.

⛔ 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 renderer click interception and a new IPC flow to open external URLs, main-process URL/protocol validation, certificate hostname validation for bypass decisions, and a renderer crash recovery handler. Also includes widespread formatting/documentation edits and multiple i18n updates (including Swedish removal and new Norwegian keys).

Changes

Cohort / File(s) Summary
External URL handling (IPC & preload)
src/injected.ts, src/ipc/channels.ts, src/main.ts, src/servers/preload/openExternal.ts, src/servers/preload/api.ts
Adds global click interception in renderer(s), new open-external IPC channel and handler, protocol/URL validation in main, and a preload helper exposing openExternal to renderers.
Certificate validation / navigation
src/navigation/main.ts
Adds X509Certificate-based hostname validation and updates certificate-error logic to allow bypass on CN mismatch when hostname validates.
Renderer crash recovery / window management
src/ui/main/rootWindow.ts
Registers a one-time render-process-gone listener to log reason, clear caches/storage, attempt reload, and surface recovery errors.
Video call & window docs (flow, screen sharing, management)
docs/video-call-screen-sharing.md, docs/video-call-window-management.md, docs/video-call-window-flow.md, docs/video-call-window-wgc-limitations.md
Expands screen-share stale-while-revalidate flow, background refresh, validation cache, URL retry/backoff, lifecycle and recovery flows; includes formatting and snippet refinements.
Supported-versions & release docs
docs/supported-versions-flow.md, docs/alpha-release-process.md, docs/qa-alpha-update-testing.md
Documents new field supportedVersionsValidatedAt, updates blocking/throttle semantics and wait times, and adjusts release-process notes and CI channel mentions.
Documentation & templates/markdown
.github/CONTRIBUTING.md, .github/PULL_REQUEST_TEMPLATE.md, .github/ISSUE_TEMPLATE.md, .github/ISSUE_TEMPLATE/feature_request.md, CHANGELOG.md, CODE_OF_CONDUCT.md, scripts/README.md, .github/workflows/powershell-lint.yml, alpha-app-update.yml, beta-app-update.yml
Formatting, minor content tweaks (template checklist additions, YAML key fixes, list marker changes), expanded README content, and general markdown reflow.
i18n additions, removals, and edits
src/i18n/*.i18n.json (notable: src/i18n/no.i18n.json, src/i18n/pl.i18n.json, src/i18n/en.i18n.json, src/i18n/sv.i18n.json, src/i18n/se.i18n.json, others)
Trailing newline normalization across many locales, removal of src/i18n/se.i18n.json, added Norwegian keys for screenshare and video call error, Polish string fixes and minor translation edits, English addition of videoCall.loading.error.noUrl.
UI static assets (HTML/CSS) formatting
src/public/index.html, src/public/video-call-window.html, src/public/main.css, src/public/loading.css, src/public/error.css
Whitespace/indentation and minor markup/CSS formatting changes; no functional behavior changes.
Prettier / ESLint / config formatting
.eslintrc.json, .prettierrc.mjs, workspaces/desktop-release-action/.prettierrc.mjs, .cursor/worktrees.json, tsconfig.json, workspaces/desktop-release-action/tsconfig.json
Formatting-only edits to config files (reflow, quoting, trailing commas); no logic changes.
Release action & Windows tooling
workspaces/desktop-release-action/src/... (e.g., github.ts, index.ts, windows/certificates.ts, windows/google-cloud.ts, windows/kms-provider.ts, windows/msi-service-fix.ts, windows/sign-packages.ts, windows/signing-tools.ts, windows/update-yaml-checksums.ts)
Mostly reflow/formatting; functional tweaks include setupGoogleCloudAuth returning credentialsPath, installJsign validating/setting JAVA_HOME, and updateWindowsYamlChecksums throwing when primary installer missing.
Render-injected duplication & public API exposure
src/injected.ts, src/servers/preload/api.ts, src/servers/preload/openExternal.ts
Global click handler inserted in two start-flow locations; exposes openExternal on preload API and Window.RocketChatDesktop.
Other minor fixes
src/i18n/zh-CN.i18n.json, various src/i18n/*.i18n.json
Fix stray brace in zh-CN, multiple EOF newline fixes, and small translation/formatting updates across locales.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Renderer
participant Preload
participant IPC as IPC Renderer
participant Main
participant Shell as Shell/OpenExternal

Renderer->>Preload: intercept link click (cross-origin/http(s)/afp)
Preload->>IPC: invoke('open-external', url)
IPC->>Main: 'open-external' handler receives url
Main->>Main: dynamically import isProtocolAllowed; validate URL & protocol
alt protocol allowed and URL valid
Main->>Shell: openExternal(url)
Shell-->>Main: success
else invalid or disallowed
Main-->>IPC: reject/throw
end

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main feature being added: support for afp:// links with system handler integration.
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 (3)
src/servers/preload/api.ts (1)

46-52: ⚠️ Potential issue | 🟠 Major

Keep openExternal off the public page API.

window.RocketChatDesktop is visible to the remote server page. Exposing a generic openExternal(url) here gives any workspace script/XSS a privileged system-launch primitive; because the main-process allowlist auto-allows http:, https:, and mailto:, it can open external browsers/apps without a user click. The AFP fix only needs app-owned code to invoke this, so please keep this bridge private or require a trusted user gesture.

Also applies to: 61-98

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

In `@src/servers/preload/api.ts` around lines 46 - 52, The public API type
ExtendedIRocketChatDesktop must not expose openExternal because
window.RocketChatDesktop is accessible to remote pages; remove openExternal from
the exported ExtendedIRocketChatDesktop declaration and from anything that
populates window.RocketChatDesktop, and instead implement openExternal as a
private preload/main-process-only bridge (or require an explicit trusted user
gesture) so only app-owned code can call it; update any references to
openExternal (the symbol name) to use the new private/internal API surface and
keep dispatchCustomNotification and closeCustomNotification on the public API if
needed.
docs/supported-versions-flow.md (2)

242-279: ⚠️ Potential issue | 🟡 Minor

Align the documented state shape with the actual Server type.

This section introduces supportedVersionsValidatedAt, but the example object still uses supportedVersionsData. The provided src/servers/common.ts:4-32 snippet defines the field as supportedVersions, so the doc currently describes a state shape that does not exist in code.

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

In `@docs/supported-versions-flow.md` around lines 242 - 279, The docs show a
per-server state field named supportedVersionsData but the code uses
supportedVersions; update the example and text to match the actual Server type
by replacing supportedVersionsData with supportedVersions everywhere (including
the example object and any explanatory bullets), keep the new
supportedVersionsValidatedAt field as described, and ensure any references to
fetching state (supportedVersionsFetchState), isSupportedVersion and the
30-minute throttle text remain consistent with the supportedVersions naming;
also verify the localStorage example keys/values align with the Server shape if
they reference the same fields.

132-141: ⚠️ Potential issue | 🟡 Minor

Make the error path branch explicitly in the diagram.

Line 136 says the error state only blocks when fallback data definitively proves the server is unsupported, but the graph still routes error to a single block node. That makes the diagram contradict the rule it is documenting. Please split the error branch into “fallback confirms unsupported → block” and “uncertain fallback → allow.”

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

In `@docs/supported-versions-flow.md` around lines 132 - 141, The diagram routes
CheckState:error to a single Block2 node but the doc text requires two outcomes;
split the error branch into two distinct nodes (e.g., BlockErrorConfirm and
AllowErrorUncertain) and update the edges from CheckState so CheckState
-->|error, fallback confirms unsupported| BlockErrorConfirm["❌
BLOCK<br/>Fallback confirms unsupported"] and CheckState -->|error, fallback
uncertain| AllowErrorUncertain["✅ ALLOW<br/>Fallback uncertain, allow"]. Also
add appropriate style entries (e.g., style BlockErrorConfirm fill:`#ffcdd2` and
style AllowErrorUncertain fill:`#c8e6c9`) and remove or repurpose the original
Block2 node to avoid contradiction.
🧹 Nitpick comments (2)
src/ui/main/rootWindow.ts (1)

526-527: Consider crash reason before clearing cache.

Not all render-process-gone events warrant cache clearing. The details.reason can indicate OOM, crashed, killed, or clean-exit scenarios. Only some of these (e.g., crashed) may benefit from cache clearing.

♻️ Proposed improvement: Only clear cache for actual crashes
     async (_event, details) => {
       console.error('Renderer process crashed:', details.reason);
+      // Only attempt recovery for actual crashes, not clean exits
+      if (details.reason === 'clean-exit' || details.reason === 'killed') {
+        return;
+      }
       try {
         const { session } = browserWindow.webContents;
         await session.clearCache();
-        await session.clearStorageData();
         console.log('Cache cleared. Reloading window...');
         browserWindow.reload();
🤖 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 526 - 527, The current
render-process-gone handler unconditionally calls session.clearCache() and
session.clearStorageData(); change it to inspect the handler's details.reason
and only clear cache/storage when the reason indicates an actual crash (e.g.,
details.reason === 'crashed' and optionally 'oom' if desired), otherwise skip
clearing for 'clean-exit' or 'killed' cases; update the branch in the
render-process-gone listener (referencing the details variable and the
session.clearCache / session.clearStorageData calls) and add a
processLogger/info log that records details.reason when you decide not to clear
to aid debugging.
workspaces/desktop-release-action/src/windows/signing-tools.ts (1)

26-28: Use one environment update path here.

@actions/core.addPath() already prepends to process.env.PATH, and Chocolatey documents refreshenv/Update-SessionEnvironment as refreshing the current shell session. Since these refreshenv calls run through @actions/exec, I'm inferring they don't persist back into this Node process, so the durable behavior here comes from the explicit core.addPath() / JAVA_HOME updates. That makes the extra process.env.PATH = ... writes redundant and leaves duplicated PATH entries in both functions. (raw.githubusercontent.com)

♻️ Suggested cleanup
   // Add to PATH
   core.addPath(binPath);
-  process.env.PATH = `${binPath};${process.env.PATH}`;
 
   // Store the full path for electron-builder
   core.exportVariable('SIGNTOOL_PATH', signtoolPath.trim());
@@
-  // Refresh environment to pick up Java
-  await exec.exec('refreshenv');
-
   // Verify Java installation and add to PATH
   const javaHomeCmd = `powershell -Command "[System.Environment]::GetEnvironmentVariable('JAVA_HOME', 'Machine')"`;
   const javaHome = await runAndBuffer(javaHomeCmd);
@@
     core.info(`Java found at: ${javaHome.trim()}`);
     const javaBinPath = path.join(javaHome.trim(), 'bin');
     core.addPath(javaBinPath);
-    process.env.PATH = `${javaBinPath};${process.env.PATH}`;
     process.env.JAVA_HOME = javaHome.trim();
   } else {
     throw new Error('Java installation not found or JAVA_HOME not set');
   }
@@
-  // Refresh environment variables to pick up PATH changes from jsign
-  await exec.exec('refreshenv');
-
   // Add jsign to PATH
   const jsignPath = 'C:\\ProgramData\\chocolatey\\lib\\jsign\\tools';
   core.addPath(jsignPath);
-  process.env.PATH = `${jsignPath};${process.env.PATH}`;

Also applies to: 38-39, 50-53, 61-67

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

In `@workspaces/desktop-release-action/src/windows/signing-tools.ts` around lines
26 - 28, The code is redundantly modifying PATH by both calling
core.addPath(binPath) and directly assigning process.env.PATH; remove the manual
process.env.PATH = `${binPath};${process.env.PATH}` assignments and rely solely
on core.addPath(binPath) (and use core.exportVariable or core.setSecret for
JAVA_HOME where applicable) so PATH is updated once and avoids duplicate
entries; apply the same cleanup to the other occurrences that modify
process.env.PATH (the blocks around lines referenced in the review).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/supported-versions-flow.md`:
- Around line 565-571: The "Offline + cache" scenario row in the markdown table
still shows a time of "~10s" which is inconsistent with Scenario 3's detailed
retry description; update the time cell for the "Offline + cache" (table row
label "Offline + cache") from "~10s" to "~12s" so it matches the three
cloud-attempt total in the Scenario 3 description.

In `@docs/video-call-screen-sharing.md`:
- Around line 279-287: Update the "Promise Deduplication" section to narrow the
claim to the no-cache path: clarify that only cold starts (when no cached
sources exist) will deduplicate and cause new requests to wait for an in-flight
fetch, whereas requests that find cached sources return immediately; reference
the section title "Promise Deduplication" and the behavior around "cached
sources" / "cold start" when editing the wording.
- Around line 293-311: The two unlabeled fenced code blocks containing the cache
flow text (the block with "Cache hit within 3s → Return cached data / Cache
expired → Fetch new data (blocking) / Window close → Schedule 60s cleanup timer"
and the block with "Cache exists → Return immediately (always instant) / Cache
stale → Background refresh (non-blocking) / Window close → Keep cache (no
cleanup timer)") should be marked with a language for syntax highlighting;
change the opening fences from ``` to ```text for both blocks so MD040 is
satisfied and rendering is consistent.
- Around line 461-465: The "Instant Screen Picker" section overstates behavior;
change the second bullet ("First open shows sources immediately") to a qualified
statement reflecting the documented cold-start path — e.g., "First open usually
shows sources immediately when prewarming has completed" or "First open shows
sources immediately when prewarm has completed; otherwise the picker may wait
for the initial system call" — and ensure the revised bullet references
prewarming so it aligns with the earlier cold-start description in the doc.

In `@docs/video-call-window-management.md`:
- Around line 305-307: Update the three list items labeled "Attempt 1", "Attempt
2", and "Attempt 3" so the compound time modifiers are hyphenated: change "1
second delay" to "1-second delay", "2 second delay" to "2-second delay", and "3
second delay" to "3-second delay" within those lines in the docs.

In `@src/i18n/no.i18n.json`:
- Around line 387-388: The English reference catalog is missing the new public
i18n key videoCall.error.noUrl which is used in videoCallWindow (see
video-call-window.ts around the error handling in the videoCall error block);
add the key "videoCall.error.noUrl" with an appropriate English message to the
reference locale file (en.i18n.json) so the key exists for all locales and no
fallback to hardcoded text occurs.

In `@src/i18n/pl.i18n.json`:
- Line 213: Fix the typo in the Polish translation value for the "announcement"
key: replace "Hjuston, mamy problem" with the correct proper noun "Houston, mamy
problem" so the error banner shows the correct spelling; locate the
"announcement" entry in pl.i18n.json and update its string value accordingly.

In `@src/main.ts`:
- Around line 148-155: Parse the incoming URL once at the top of the
open-external handler (wrap new URL(url) in try/catch and return/log on parse
error) before calling isProtocolAllowed to avoid uncaught exceptions; after
isProtocolAllowed returns true, check the parsed URL.protocol and, for
non-http/https schemes (e.g. afp:, mailto:, custom schemes), call
shell.openExternal(parsed.href) instead of the app's
openExternal(selectedBrowser) so the OS handler is used; keep using
openExternal(...) only for http/https links. Reference: the open-external
handler, isProtocolAllowed, openExternal, and use shell.openExternal for
non-HTTP(S).

In `@src/navigation/main.ts`:
- Around line 68-79: The CN-mismatch auto-bypass currently short-circuits before
checking persisted decisions, causing previously rejected or pinned host+cert
entries to be ignored; move the block that tests error ===
'net::ERR_CERT_COMMON_NAME_INVALID' && isHostnameValid(certificate, hostname)
(and the callback(true) return) to after the existing trusted/not-trusted
lookups that use host + serializeCertificate(certificate) so that stored user
decisions (pinned certs or explicit rejections) are evaluated first and win
before any automatic CN bypass is applied.

In `@src/ui/main/rootWindow.ts`:
- Around line 519-534: Replace the destructive crash-recovery logic in the
'render-process-gone' handler (registered on browserWindow.webContents in
showRootWindow) so it uses the selective clearing helper
clearWebviewStorageKeepingLoginData() (from src/servers/cache.ts) or call
session.clearStorageData({ storages: [...] }) with the same storages whitelist
to preserve Meteor.loginToken / Meteor.userId instead of clearing everything;
also ensure the listener is only registered once by adding a guard (e.g., a
module-level boolean or checking
webContents.listenerCount('render-process-gone')) before calling
browserWindow.webContents.on to avoid duplicate handlers if showRootWindow is
invoked again.

In `@workspaces/desktop-release-action/src/index.ts`:
- Line 32: The call to disableSpotlightIndexing() can throw and should not abort
the release; wrap the call to disableSpotlightIndexing() in a try-catch (or
modify disableSpotlightIndexing() itself to catch known failures) so that any
error from running `sudo mdutil -a -i off` is caught, logged (e.g., console.warn
or existing logger) with context, and then ignored so packaging proceeds; ensure
the catch only suppresses expected/permission errors and still rethrows
unexpected critical errors if needed.

---

Outside diff comments:
In `@docs/supported-versions-flow.md`:
- Around line 242-279: The docs show a per-server state field named
supportedVersionsData but the code uses supportedVersions; update the example
and text to match the actual Server type by replacing supportedVersionsData with
supportedVersions everywhere (including the example object and any explanatory
bullets), keep the new supportedVersionsValidatedAt field as described, and
ensure any references to fetching state (supportedVersionsFetchState),
isSupportedVersion and the 30-minute throttle text remain consistent with the
supportedVersions naming; also verify the localStorage example keys/values align
with the Server shape if they reference the same fields.
- Around line 132-141: The diagram routes CheckState:error to a single Block2
node but the doc text requires two outcomes; split the error branch into two
distinct nodes (e.g., BlockErrorConfirm and AllowErrorUncertain) and update the
edges from CheckState so CheckState -->|error, fallback confirms unsupported|
BlockErrorConfirm["❌ BLOCK<br/>Fallback confirms unsupported"] and CheckState
-->|error, fallback uncertain| AllowErrorUncertain["✅ ALLOW<br/>Fallback
uncertain, allow"]. Also add appropriate style entries (e.g., style
BlockErrorConfirm fill:`#ffcdd2` and style AllowErrorUncertain fill:`#c8e6c9`) and
remove or repurpose the original Block2 node to avoid contradiction.

In `@src/servers/preload/api.ts`:
- Around line 46-52: The public API type ExtendedIRocketChatDesktop must not
expose openExternal because window.RocketChatDesktop is accessible to remote
pages; remove openExternal from the exported ExtendedIRocketChatDesktop
declaration and from anything that populates window.RocketChatDesktop, and
instead implement openExternal as a private preload/main-process-only bridge (or
require an explicit trusted user gesture) so only app-owned code can call it;
update any references to openExternal (the symbol name) to use the new
private/internal API surface and keep dispatchCustomNotification and
closeCustomNotification on the public API if needed.

---

Nitpick comments:
In `@src/ui/main/rootWindow.ts`:
- Around line 526-527: The current render-process-gone handler unconditionally
calls session.clearCache() and session.clearStorageData(); change it to inspect
the handler's details.reason and only clear cache/storage when the reason
indicates an actual crash (e.g., details.reason === 'crashed' and optionally
'oom' if desired), otherwise skip clearing for 'clean-exit' or 'killed' cases;
update the branch in the render-process-gone listener (referencing the details
variable and the session.clearCache / session.clearStorageData calls) and add a
processLogger/info log that records details.reason when you decide not to clear
to aid debugging.

In `@workspaces/desktop-release-action/src/windows/signing-tools.ts`:
- Around line 26-28: The code is redundantly modifying PATH by both calling
core.addPath(binPath) and directly assigning process.env.PATH; remove the manual
process.env.PATH = `${binPath};${process.env.PATH}` assignments and rely solely
on core.addPath(binPath) (and use core.exportVariable or core.setSecret for
JAVA_HOME where applicable) so PATH is updated once and avoids duplicate
entries; apply the same cleanup to the other occurrences that modify
process.env.PATH (the blocks around lines referenced in the review).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3a60d8a9-43d5-40cd-ab3c-4c57d960659e

📥 Commits

Reviewing files that changed from the base of the PR and between 49261f5 and 5e8d105.

⛔ 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/public/error.css
  • src/i18n/se.i18n.json
  • .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:

  • src/ipc/channels.ts
  • workspaces/desktop-release-action/src/github.ts
  • workspaces/desktop-release-action/src/windows/msi-service-fix.ts
  • src/servers/preload/openExternal.ts
  • src/navigation/main.ts
  • workspaces/desktop-release-action/src/windows/certificates.ts
  • workspaces/desktop-release-action/src/windows/kms-provider.ts
  • workspaces/desktop-release-action/src/types/js-yaml.d.ts
  • src/servers/preload/api.ts
  • src/injected.ts
  • workspaces/desktop-release-action/src/index.ts
  • workspaces/desktop-release-action/src/windows/sign-packages.ts
  • src/ui/main/rootWindow.ts
  • workspaces/desktop-release-action/src/windows/signing-tools.ts
  • workspaces/desktop-release-action/src/windows/google-cloud.ts
  • workspaces/desktop-release-action/src/windows/update-yaml-checksums.ts
  • src/main.ts
🧠 Learnings (19)
📚 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: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:

  • CHANGELOG.md
  • beta-app-update.yml
  • alpha-app-update.yml
  • workspaces/desktop-release-action/.prettierrc.mjs
  • .prettierrc.mjs
📚 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: Applies to **/*.{ts,tsx} : Use TypeScript strict mode enabled in TypeScript configuration

Applied to files:

  • tsconfig.json
  • .eslintrc.json
  • workspaces/desktop-release-action/.prettierrc.mjs
  • .prettierrc.mjs
  • workspaces/desktop-release-action/tsconfig.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: 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 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/action.yml
📚 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-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: 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
🪛 LanguageTool
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)


[grammar] ~49-~49: Ensure spelling is correct
Context: .....3.5.6) (2021-09-23) ### Bug Fixes - Jitisi opening on browser ([#2180](https://git...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[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)


[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)


[grammar] ~321-~321: Use a hyphen to join words.
Context: ....7) (2020-02-11) ### Bug Fixes - Spell checking dictionaries files encoded as U...

(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] ~340-~340: Use a hyphen to join words.
Context: ...20-02-04) ### Bug Fixes - Broken spell checking dictionary selection ([c11600c]...

(QB_NEW_EN_HYPHEN)


[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] ~564-~564: The operating system from Apple is written “macOS”.
Context: ...ying why some permissions are needed in MacOS - Fix servers.json path resolution <a ...

(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/supported-versions-flow.md

[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)

docs/video-call-window-management.md

[grammar] ~305-~305: Use a hyphen to join words.
Context: ... Attempt 1: Simple webview reload (1 second delay) 2. Attempt 2: Recreate...

(QB_NEW_EN_HYPHEN)


[grammar] ~306-~306: Use a hyphen to join words.
Context: ...t 2**: Recreate webview with same URL (2 second delay) 3. Attempt 3: Full rei...

(QB_NEW_EN_HYPHEN)


[grammar] ~307-~307: Use a hyphen to join words.
Context: ...*: Full reinitialization from scratch (3 second delay) 4. Final: Show manual ...

(QB_NEW_EN_HYPHEN)

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)

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)

🪛 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 (22)
workspaces/desktop-release-action/src/windows/msi-service-fix.ts (1)

17-19: Looks good.

This wrap keeps the PowerShell invocation readable without changing behavior.

workspaces/desktop-release-action/src/github.ts (3)

156-159: LGTM: Improved function signature readability.

The multi-line parameter formatting improves readability for these function signatures. The changes are purely cosmetic with no behavioral impact.

Also applies to: 177-180


189-192: LGTM: Improved code formatting.

The multi-line formatting of the sorting callback and log messages improves readability. The added spacing enhances visual organization. No behavioral changes.

Also applies to: 196-203


156-212: Note: Formatting changes unrelated to PR objective.

This file contains only cosmetic formatting improvements (multi-line parameters, callbacks, and log messages). While these changes improve readability, they appear unrelated to the PR's stated objective of adding afp:// link support in the desktop client. This is likely incidental cleanup from an auto-formatter, which is perfectly fine.

workspaces/desktop-release-action/src/windows/google-cloud.ts (2)

11-13: No actionable change.

These are formatting-only wraps; behavior is unchanged.

Also applies to: 41-43, 46-49


52-56: Good switch to @actions/exec argument arrays.

Passing the gcloud flags as discrete args is safer here and avoids quoting/splitting issues when the temp credentials path contains spaces on Windows.

Also applies to: 62-67

src/public/index.html (1)

3-12: No concerns. Formatting-only HTML change with no behavior delta.

workspaces/desktop-release-action/.prettierrc.mjs (1)

5-6: No concerns. This is a style-only config rewrite; the effective Prettier setting stays the same.

src/outlookCalendar/AGENTS.md (1)

8-14: No concerns. Documentation example was only reformatted.

workspaces/desktop-release-action/src/index.ts (1)

74-74: No concerns. The remaining edits in this file are line wrapping/spacing only.

Also applies to: 77-79, 83-83, 107-107, 110-112, 116-116, 119-119

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

32-32: No concerns. Markdown-only spacing cleanup.

Also applies to: 47-47, 57-57, 70-70, 80-80, 115-115, 125-125, 136-136, 138-138, 144-144, 146-146, 153-153, 155-155, 165-165, 172-172, 174-174, 182-182, 184-184

tsconfig.json (1)

22-22: No concerns. This change keeps the root TypeScript config valid and unchanged in behavior.

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

19-19: Nice cleanup. Removing the trailing comma keeps this file valid JSON for non-TypeScript tooling too.

Based on learnings: "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."

beta-app-update.yml (1)

5-5: Good fix. Restoring channel as a top-level key should make the update manifest shape parse as intended.

src/public/main.css (1)

4-5: LGTM! Formatting improvement.

The semicolon after the CSS variable declaration improves consistency, and the closing brace alignment is cleaner.

CODE_OF_CONDUCT.md (1)

17-32: LGTM! Markdown formatting consistency.

Standardizing bullet markers to - improves consistency throughout the document.

src/public/loading.css (1)

34-36: LGTM! Formatting adjustment.

The multi-line formatting of the selector is a reasonable style choice for readability.

.github/ISSUE_TEMPLATE.md (1)

19-22: LGTM! Helpful template improvements.

The new checklist items encourage better issue reporting by prompting users to test with the latest version and verify reproducibility.

CHANGELOG.md (1)

5-1098: LGTM! Formatting consistency improvements.

The bullet formatting changes improve markdown consistency throughout the changelog. The static analysis hints are mostly pedantic style suggestions that don't affect functionality.

docs/qa-alpha-update-testing.md (1)

56-65: LGTM! Table formatting improvement.

The table alignment and spacing changes enhance readability without altering the content.

workspaces/desktop-release-action/src/windows/kms-provider.ts (1)

8-26: LGTM! Formatting improvements.

The multi-line formatting of function calls and error messages improves readability and maintains consistency with TypeScript best practices.

workspaces/desktop-release-action/src/windows/sign-packages.ts (1)

14-142: LGTM! Formatting consistency improvements.

The spacing adjustments, multi-line formatting, and trailing commas improve code readability while preserving all functional behavior of the signing workflow.

Comment on lines +565 to +571
| Scenario | Server | Cloud | Cache | Builtin | Result | Time |
| ------------------ | ------ | ----- | ----- | ------- | ---------------------------- | ---- |
| Fast network | ✓ | - | - | - | Allow/Block based on data | ~1s |
| Slow server | ✗ | ✓ | - | - | Allow/Block based on data | ~7s |
| Offline + cache | ✗ | ✗ | ✓ | - | ALLOW (uncertain) | ~10s |
| Offline + no cache | ✗ | ✗ | ✗ | ✓ | Allow/Block based on builtin | ~12s |
| Airgapped | ✓ | ✗ | - | - | Allow/Block (Cloud skipped) | ~1s |
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

Update the offline-with-cache summary time to match Scenario 3.

Line 569 still says ~10s, but Scenario 3 now includes three cloud attempts and totals ~12 seconds at Lines 335-347. Keeping both values will confuse readers about the retry budget.

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

In `@docs/supported-versions-flow.md` around lines 565 - 571, The "Offline +
cache" scenario row in the markdown table still shows a time of "~10s" which is
inconsistent with Scenario 3's detailed retry description; update the time cell
for the "Offline + cache" (table row label "Offline + cache") from "~10s" to
"~12s" so it matches the three cloud-attempt total in the Scenario 3
description.

Comment on lines 293 to 311
```
Cache hit within 3s → Return cached data
Cache expired → Fetch new data (blocking)
Window close → Schedule 60s cleanup timer
```

**Problems:**

- Empty state possible if cache expired
- Blocking fetch when cache expired
- Complex cleanup logic

### Current Approach (Stale-While-Revalidate)

```
Cache exists → Return immediately (always instant)
Cache stale → Background refresh (non-blocking)
Window close → Keep cache (no cleanup timer)
```
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

Add languages to these fenced code blocks.

The blocks at Lines 293 and 307 are unlabeled, which trips MD040 and makes syntax highlighting inconsistent in rendered docs. text would be enough here.

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[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)

🤖 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 - 311, The two unlabeled
fenced code blocks containing the cache flow text (the block with "Cache hit
within 3s → Return cached data / Cache expired → Fetch new data (blocking) /
Window close → Schedule 60s cleanup timer" and the block with "Cache exists →
Return immediately (always instant) / Cache stale → Background refresh
(non-blocking) / Window close → Keep cache (no cleanup timer)") should be marked
with a language for syntax highlighting; change the opening fences from ``` to
```text for both blocks so MD040 is satisfied and rendering is consistent.

Comment on lines 461 to 465
### Instant Screen Picker

- Cache pre-warmed when video call loads
- First open shows sources immediately
- No loading spinner or empty state
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

Avoid guaranteeing instant first-open behavior.

“First open shows sources immediately” is stronger than the rest of the doc supports. The same page still documents a cold-start path at Lines 323-328 where the picker waits for the initial system call if prewarming has not finished yet. “Usually” or “when prewarm completed” would be more accurate.

🤖 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 461 - 465, The "Instant
Screen Picker" section overstates behavior; change the second bullet ("First
open shows sources immediately") to a qualified statement reflecting the
documented cold-start path — e.g., "First open usually shows sources immediately
when prewarming has completed" or "First open shows sources immediately when
prewarm has completed; otherwise the picker may wait for the initial system
call" — and ensure the revised bullet references prewarming so it aligns with
the earlier cold-start description in the doc.

Comment on lines 305 to 307
1. **Attempt 1**: Simple webview reload (1 second delay)
2. **Attempt 2**: Recreate webview with same URL (2 second delay)
3. **Attempt 3**: Full reinitialization from scratch (3 second delay)
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

Hyphenate the compound time modifiers.

Use 1-second, 2-second, and 3-second here.

🧰 Tools
🪛 LanguageTool

[grammar] ~305-~305: Use a hyphen to join words.
Context: ... Attempt 1: Simple webview reload (1 second delay) 2. Attempt 2: Recreate...

(QB_NEW_EN_HYPHEN)


[grammar] ~306-~306: Use a hyphen to join words.
Context: ...t 2**: Recreate webview with same URL (2 second delay) 3. Attempt 3: Full rei...

(QB_NEW_EN_HYPHEN)


[grammar] ~307-~307: Use a hyphen to join words.
Context: ...*: Full reinitialization from scratch (3 second delay) 4. Final: Show manual ...

(QB_NEW_EN_HYPHEN)

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

In `@docs/video-call-window-management.md` around lines 305 - 307, Update the
three list items labeled "Attempt 1", "Attempt 2", and "Attempt 3" so the
compound time modifiers are hyphenated: change "1 second delay" to "1-second
delay", "2 second delay" to "2-second delay", and "3 second delay" to "3-second
delay" within those lines in the docs.


case 'darwin':
await disableSpotlightIndexing();
await disableSpotlightIndexing();
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 "Inspecting macOS release helpers..."
rg -n -C 6 '\bdisableSpotlightIndexing\b|\bpackOnMacOS\b' workspaces/desktop-release-action/src

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 3403


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Inspecting shell.ts run() implementation..."
cat -n workspaces/desktop-release-action/src/shell.ts

Repository: RocketChat/Rocket.Chat.Electron

Length of output: 2083


Ensure disableSpotlightIndexing() doesn't block macOS releases if Spotlight control fails.

The helper at line 32 will throw if sudo mdutil -a -i off exits with a non-zero code (permission denied, unavailable on runner, etc.), causing the entire release workflow to abort before packaging starts. If disabling Spotlight is best-effort, this should catch and log the error instead of propagating it. Consider wrapping the call with try-catch or making disableSpotlightIndexing() handle expected failures internally.

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

In `@workspaces/desktop-release-action/src/index.ts` at line 32, The call to
disableSpotlightIndexing() can throw and should not abort the release; wrap the
call to disableSpotlightIndexing() in a try-catch (or modify
disableSpotlightIndexing() itself to catch known failures) so that any error
from running `sudo mdutil -a -i off` is caught, logged (e.g., console.warn or
existing logger) with context, and then ignored so packaging proceeds; ensure
the catch only suppresses expected/permission errors and still rethrows
unexpected critical errors if needed.

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.

Caution

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

⚠️ Outside diff range comments (1)
src/i18n/pl.i18n.json (1)

211-218: ⚠️ Potential issue | 🟡 Minor

Missing translation for noUrl key.

The English locale adds a new videoCall.error.noUrl key (used in video-call-window.ts), but the Polish translation is missing this entry. While i18next will fall back to the English default, consider adding the Polish translation for consistency.

🌐 Suggested addition
       "maxRetriesReached": "Nie udało się załadować po wielu próbach",
-      "reload": "Przeładuj połączenie wideo"
+      "reload": "Przeładuj połączenie wideo",
+      "noUrl": "Nie podano adresu URL połączenia wideo"
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/i18n/pl.i18n.json` around lines 211 - 218, The Polish i18n file is
missing the videoCall.error.noUrl key added in English and used in
video-call-window.ts; add a "noUrl" entry under the existing "error" object in
the Polish locale (same nesting as "title", "announcement", etc.) with an
appropriate Polish translation so i18next no longer falls back to English
(ensure the key is exactly "noUrl" to match usage in videoCall.error.noUrl).
🧹 Nitpick comments (1)
src/ui/main/rootWindow.ts (1)

519-544: Guard against duplicate crash handler registration.

The selective storage clearing has been correctly implemented (excluding localstorage preserves auth tokens). However, the listener is still registered unconditionally. If showRootWindow() were called more than once, multiple handlers would fire on crash, causing redundant reloads and potential race conditions.

♻️ Proposed fix: Add registration guard
+let crashHandlerRegistered = false;
+
 export const showRootWindow = async (): Promise<void> => {
   const browserWindow = await getRootWindow();

   // Handle renderer process crashes
+  if (!crashHandlerRegistered) {
+    crashHandlerRegistered = true;
     browserWindow.webContents.on(
       'render-process-gone',
       async (_event, details) => {
         console.error('Renderer process crashed:', details.reason);
         try {
           const { session } = browserWindow.webContents;
           await session.clearCache();
           await session.clearStorageData({
             storages: [
               'cookies',
               'indexdb',
               'filesystem',
               'shadercache',
               'websql',
               'serviceworkers',
               'cachestorage',
             ],
           });
           console.log('Cache cleared. Reloading window...');
           browserWindow.reload();
         } catch (error) {
           console.error('Failed to recover from crash:', error);
         }
       }
     );
+  }
🤖 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 - 544, The render-process-gone
listener on browserWindow.webContents is registered unconditionally inside
showRootWindow(), which causes duplicate handlers if showRootWindow() is called
multiple times; fix by guarding registration: add a module-level flag (e.g.,
renderProcessGoneHandlerRegistered) or use webContents.once for a one-time
listener when attaching to the 'render-process-gone' event, set the flag when
you attach, and reset/clear the flag when the BrowserWindow is closed (listen to
browserWindow.on('closed', ...)) so future showRootWindow() calls can
re-register safely; ensure you reference the existing
browserWindow.webContents.on('render-process-gone', ...) registration point when
applying this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/i18n/pl.i18n.json`:
- Around line 211-218: The Polish i18n file is missing the videoCall.error.noUrl
key added in English and used in video-call-window.ts; add a "noUrl" entry under
the existing "error" object in the Polish locale (same nesting as "title",
"announcement", etc.) with an appropriate Polish translation so i18next no
longer falls back to English (ensure the key is exactly "noUrl" to match usage
in videoCall.error.noUrl).

---

Nitpick comments:
In `@src/ui/main/rootWindow.ts`:
- Around line 519-544: The render-process-gone listener on
browserWindow.webContents is registered unconditionally inside showRootWindow(),
which causes duplicate handlers if showRootWindow() is called multiple times;
fix by guarding registration: add a module-level flag (e.g.,
renderProcessGoneHandlerRegistered) or use webContents.once for a one-time
listener when attaching to the 'render-process-gone' event, set the flag when
you attach, and reset/clear the flag when the BrowserWindow is closed (listen to
browserWindow.on('closed', ...)) so future showRootWindow() calls can
re-register safely; ensure you reference the existing
browserWindow.webContents.on('render-process-gone', ...) registration point when
applying this change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 352cad07-6c9d-4c2b-bef1-7a54939a9016

📥 Commits

Reviewing files that changed from the base of the PR and between 5e8d105 and 5f234ab.

📒 Files selected for processing (5)
  • src/i18n/en.i18n.json
  • src/i18n/pl.i18n.json
  • src/main.ts
  • src/navigation/main.ts
  • src/ui/main/rootWindow.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/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/ui/main/rootWindow.ts
🔇 Additional comments (6)
src/i18n/en.i18n.json (1)

415-416: LGTM!

The new videoCall.error.noUrl key is correctly placed under videoCall.error and matches the consumption pattern in video-call-window.ts where it's used as t('videoCall.error.noUrl', 'No video call URL provided').

src/i18n/pl.i18n.json (3)

30-30: LGTM!

Grammar correction looks appropriate — using lowercase and the proper feminine adjectival form "eksperymentalna" to agree with the implied noun.


101-103: LGTM!

Correct use of genitive case forms ("mikrofonu", "kamery") which is grammatically required in Polish when describing "access to X".


202-202: Typo fix applied.

The "Hjuston" → "Houston" correction has been addressed.

src/navigation/main.ts (2)

97-104: LGTM! Past review concern has been addressed.

The hostname mismatch bypass now correctly executes after checking both trustedCertificates and notTrustedCertificates, ensuring persisted user decisions take precedence over the automatic bypass.


45-55: LGTM! Proper use of Node.js crypto for hostname validation.

The X509Certificate.checkHost() API is the correct approach for validating certificate subject/SAN against a hostname. The defensive try/catch ensures malformed certificates don't crash the handler.

@Ram-sah19
Copy link
Copy Markdown
Author

Thanks for the review! I’ve addressed the latest feedback and pushed the updates. Please let me know if anything else needs adjustment.

@Ram-sah19 Ram-sah19 changed the base branch from master to develop March 10, 2026 19:36
dougfabris and others added 24 commits March 11, 2026 01:22
…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:24
* 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 feat-support-afp-links branch from 393c571 to 74a81ea Compare March 10, 2026 19:55
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.