Support afp:// links and open them with system handler#3246
Support afp:// links and open them with system handler#3246Ram-sah19 wants to merge 126 commits intoRocketChat:developfrom
Conversation
|
Important Review skippedToo many files! This PR contains 241 files, which is 91 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (241)
You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds 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
Sequence Diagram(s)mermaid Renderer->>Preload: intercept link click (cross-origin/http(s)/afp) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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 | 🟠 MajorKeep
openExternaloff the public page API.
window.RocketChatDesktopis visible to the remote server page. Exposing a genericopenExternal(url)here gives any workspace script/XSS a privileged system-launch primitive; because the main-process allowlist auto-allowshttp:,https:, andmailto:, 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 | 🟡 MinorAlign the documented state shape with the actual
Servertype.This section introduces
supportedVersionsValidatedAt, but the example object still usessupportedVersionsData. The providedsrc/servers/common.ts:4-32snippet defines the field assupportedVersions, 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 | 🟡 MinorMake the
errorpath branch explicitly in the diagram.Line 136 says the
errorstate only blocks when fallback data definitively proves the server is unsupported, but the graph still routeserrorto a single block node. That makes the diagram contradict the rule it is documenting. Please split theerrorbranch 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-goneevents warrant cache clearing. Thedetails.reasoncan 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 toprocess.env.PATH, and Chocolatey documentsrefreshenv/Update-SessionEnvironmentas refreshing the current shell session. Since theserefreshenvcalls run through@actions/exec, I'm inferring they don't persist back into this Node process, so the durable behavior here comes from the explicitcore.addPath()/JAVA_HOMEupdates. That makes the extraprocess.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
⛔ Files ignored due to path filters (1)
workspaces/desktop-release-action/dist/index.jsis 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.mjsCHANGELOG.mdCODE_OF_CONDUCT.mdalpha-app-update.ymlbeta-app-update.ymldocs/alpha-release-process.mddocs/linux-display-server.mddocs/qa-alpha-update-testing.mddocs/supported-versions-flow.mddocs/video-call-screen-sharing.mddocs/video-call-window-flow.mddocs/video-call-window-management.mddocs/video-call-window-wgc-limitations.mdscripts/README.mdsrc/i18n/ar.i18n.jsonsrc/i18n/de-DE.i18n.jsonsrc/i18n/es.i18n.jsonsrc/i18n/fi.i18n.jsonsrc/i18n/fr.i18n.jsonsrc/i18n/it-IT.i18n.jsonsrc/i18n/ja.i18n.jsonsrc/i18n/nb-NO.i18n.jsonsrc/i18n/nn.i18n.jsonsrc/i18n/no.i18n.jsonsrc/i18n/pl.i18n.jsonsrc/i18n/pt-BR.i18n.jsonsrc/i18n/ru.i18n.jsonsrc/i18n/se.i18n.jsonsrc/i18n/sv.i18n.jsonsrc/i18n/tr-TR.i18n.jsonsrc/i18n/uk-UA.i18n.jsonsrc/i18n/zh-CN.i18n.jsonsrc/i18n/zh-TW.i18n.jsonsrc/i18n/zh.i18n.jsonsrc/injected.tssrc/ipc/channels.tssrc/main.tssrc/navigation/main.tssrc/outlookCalendar/AGENTS.mdsrc/public/error.csssrc/public/index.htmlsrc/public/loading.csssrc/public/main.csssrc/public/video-call-window.htmlsrc/servers/preload/api.tssrc/servers/preload/openExternal.tssrc/ui/main/rootWindow.tstsconfig.jsonworkspaces/desktop-release-action/.prettierrc.mjsworkspaces/desktop-release-action/action.ymlworkspaces/desktop-release-action/src/github.tsworkspaces/desktop-release-action/src/index.tsworkspaces/desktop-release-action/src/types/js-yaml.d.tsworkspaces/desktop-release-action/src/windows/certificates.tsworkspaces/desktop-release-action/src/windows/google-cloud.tsworkspaces/desktop-release-action/src/windows/kms-provider.tsworkspaces/desktop-release-action/src/windows/msi-service-fix.tsworkspaces/desktop-release-action/src/windows/sign-packages.tsworkspaces/desktop-release-action/src/windows/signing-tools.tsworkspaces/desktop-release-action/src/windows/update-yaml-checksums.tsworkspaces/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/fuselagefor all UI work and only create custom components when Fuselage doesn't provide what's needed
CheckTheme.d.tsfor 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.tsworkspaces/desktop-release-action/src/github.tsworkspaces/desktop-release-action/src/windows/msi-service-fix.tssrc/servers/preload/openExternal.tssrc/navigation/main.tsworkspaces/desktop-release-action/src/windows/certificates.tsworkspaces/desktop-release-action/src/windows/kms-provider.tsworkspaces/desktop-release-action/src/types/js-yaml.d.tssrc/servers/preload/api.tssrc/injected.tsworkspaces/desktop-release-action/src/index.tsworkspaces/desktop-release-action/src/windows/sign-packages.tssrc/ui/main/rootWindow.tsworkspaces/desktop-release-action/src/windows/signing-tools.tsworkspaces/desktop-release-action/src/windows/google-cloud.tsworkspaces/desktop-release-action/src/windows/update-yaml-checksums.tssrc/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.mdbeta-app-update.ymlalpha-app-update.ymlworkspaces/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.jsonworkspaces/desktop-release-action/.prettierrc.mjs.prettierrc.mjsworkspaces/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.jsonworkspaces/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.tsworkspaces/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/execargument arrays.Passing the
gcloudflags 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. Restoringchannelas 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.
| | 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 | |
There was a problem hiding this comment.
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.
| ``` | ||
| 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) | ||
| ``` |
There was a problem hiding this comment.
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.
| ### Instant Screen Picker | ||
|
|
||
| - Cache pre-warmed when video call loads | ||
| - First open shows sources immediately | ||
| - No loading spinner or empty state |
There was a problem hiding this comment.
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.
| 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) |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
🧩 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/srcRepository: 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.tsRepository: 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.
There was a problem hiding this comment.
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 | 🟡 MinorMissing translation for
noUrlkey.The English locale adds a new
videoCall.error.noUrlkey (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
localstoragepreserves auth tokens). However, the listener is still registered unconditionally. IfshowRootWindow()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
📒 Files selected for processing (5)
src/i18n/en.i18n.jsonsrc/i18n/pl.i18n.jsonsrc/main.tssrc/navigation/main.tssrc/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/fuselagefor all UI work and only create custom components when Fuselage doesn't provide what's needed
CheckTheme.d.tsfor 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.tssrc/ui/main/rootWindow.ts
🔇 Additional comments (6)
src/i18n/en.i18n.json (1)
415-416: LGTM!The new
videoCall.error.noUrlkey is correctly placed undervideoCall.errorand matches the consumption pattern invideo-call-window.tswhere it's used ast('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
trustedCertificatesandnotTrustedCertificates, 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.
|
Thanks for the review! I’ve addressed the latest feedback and pushed the updates. Please let me know if anything else needs adjustment. |
…hat#3028) * perf: Optimize server loading by deferring inactive webviews * bump version * remove duplicated code
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
…3046) * fix open zoom app from link * bump
…#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>
* 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
393c571 to
74a81ea
Compare
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
afp://linkFixes
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Style