Add Claude Code automations for developer workflow#3192
Add Claude Code automations for developer workflow#3192jeanfbrito wants to merge 10 commits intomasterfrom
Conversation
…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
…ook 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
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.
…ook 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 project-level Claude Code configuration to improve developer workflow with automated formatting, safety hooks, reusable skills, specialized agents, and shared MCP server config.
WalkthroughThe PR introduces Claude automation infrastructure with agent validators and development skills, adds development hooks for file validation and auto-formatting, configures an MCP server, upgrades dependencies with Bugsnag patches, enhances error reporting with integration tests, and implements an insecure Outlook connections feature across the state management and HTTP client layers. Changes
Sequence DiagramsequenceDiagram
participant UI as UI/Handler
participant Store as Redux Store
participant Reducer as Reducer
participant Sync as syncEventsWithRocketChatServer
participant Agent as createInsecureHttpsAgent
participant HTTP as Axios/HTTPS Client
UI->>Store: Dispatch APP_SETTINGS_LOADED<br/>(allowInsecureOutlookConnections)
Store->>Reducer: Action + Payload
Reducer->>Store: Update state.allowInsecureOutlookConnections
UI->>Sync: Call with allowInsecure flag
Sync->>Agent: allowInsecure = true?
alt Insecure Mode
Agent->>Agent: Create Agent<br/>(rejectUnauthorized: false)
Agent->>HTTP: Return httpsAgent
else Secure Mode
HTTP->>HTTP: Use default HTTPS
end
Sync->>HTTP: listEventsFromRocketChatServer<br/>(httpsAgent)
Sync->>HTTP: createEventOnRocketChatServer<br/>(httpsAgent)
HTTP-->>UI: Response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
| * Used for air-gapped environments with self-signed or internal CA certificates. | ||
| */ | ||
| function createInsecureHttpsAgent(): https.Agent { | ||
| return new https.Agent({ rejectUnauthorized: false }); |
Check failure
Code scanning / CodeQL
Disabling certificate validation High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day ago
In general, the fix is to stop disabling certificate validation. Instead of creating an https.Agent with rejectUnauthorized: false, rely on the default behavior (rejectUnauthorized: true) or, if you must connect to servers with self‑signed or private CA certificates, configure trust properly by providing a custom CA or using the platform’s trust store.
The best targeted fix here is to change createInsecureHttpsAgent so it no longer disables certificate validation. We can keep the function (to avoid changing all call sites) but have it return a standard, secure agent. That preserves existing functionality as much as possible while restoring certificate checks. Since we are constrained to the shown snippet and existing imports, we will:
- Update
createInsecureHttpsAgentto callnew https.Agent()with no options, letting Node’s defaults enforce certificate validation. - Leave the rest of the logic in
listEventsFromRocketChatServeruntouched; it will still accept an optionalhttpsAgent, but that agent will now be secure if created via this helper.
Only src/outlookCalendar/ipc.ts needs modification, and only lines 70–76 in the provided region.
| @@ -68,11 +68,12 @@ | ||
| } | ||
|
|
||
| /** | ||
| * Creates an HTTPS agent that bypasses certificate validation. | ||
| * Used for air-gapped environments with self-signed or internal CA certificates. | ||
| * Creates an HTTPS agent with default certificate validation. | ||
| * For environments with custom CAs, configure trusted CAs instead of disabling validation. | ||
| */ | ||
| function createInsecureHttpsAgent(): https.Agent { | ||
| return new https.Agent({ rejectUnauthorized: false }); | ||
| // Use default settings, which enforce certificate validation. | ||
| return new https.Agent(); | ||
| } | ||
|
|
||
| async function listEventsFromRocketChatServer( |
Summary
Adds project-level Claude Code configuration with hooks, skills, agents, and shared MCP server config. These automations improve developer workflow when using Claude Code on this repository.
What's Added
Hooks (
.claude/hooks/)Hooks run automatically during Claude Code sessions:
yarn.lock,package-lock.json, and.envfiles, preventing accidental modifications to lock files and secretstsc --noEmitasynchronously after TypeScript file edits, catching type errors immediately instead of at lint timeSkills (
.claude/skills/)Skills are reusable workflows invoked with
/skill-name:/electron-build— Builds and tests the Electron app using git worktrees for isolation. Encapsulates the full workflow: worktree creation,yarn install, lint, test, build, platform packaging, and cleanup. Includes workspace build withdist/distcleanup/release-notes— Generates categorized release notes from git commit history between tags. Parses conventional commit prefixes (feat:,fix:, etc.) into categories and detects alpha/beta/stable version context/i18n-audit— Audits translation completeness across all 22 language files against the English reference. Reports missing keys, extra keys, and coverage percentage per language/new-ipc-channel— Scaffolds a new IPC channel acrosschannels.ts, the correct domainmain.ts, andrenderer.tswith proper TypeScript types. References the existing 71-channel patternAgents (
.claude/agents/)Agents are specialized reviewers that Claude can use during development:
process.getuid?.() ?? 1000), hardcoded path separators, platform-specific Electron APIs, and native module dependenciesMCP Config (
.mcp.json)Project Settings (
.claude/settings.json)settings.local.jsonremains personal/unsharedTest plan
.tsfile and confirm Prettier auto-formats ityarn.lockand confirm it's blocked/i18n-auditand verify it produces a coverage report/release-notesand verify it generates categorized notesSummary by CodeRabbit
New Features
Improvements
Chores