Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7931dab
Added a resolver test for merging Original file hashes
Fikitti Mar 14, 2026
a5ac8cd
Create partner-issue.md
jmavescodex-arch Mar 17, 2026
e3dd2f0
Merge branch 'main' into 696-add-resolver-test-for-mergeoriginalfiles…
BenjaminScholtens Mar 17, 2026
5ce9b11
Merge pull request #748 from genesis-ai-dev/696-add-resolver-test-for…
BenjaminScholtens Mar 17, 2026
76a0f9e
add safeExecuteSmartEditCommand (#768)
BenjaminScholtens Mar 18, 2026
cad833d
Update version to 0.23.0 and increment schema version to 16 in SQLite…
BenjaminScholtens Mar 18, 2026
e73f4a7
fix: suppress requiredExtensions ratchet when codex-editor pin is active
JonahBraun Mar 11, 2026
911f8fb
test: re-enable MetadataManager suite and add pin-aware ratchet tests
JonahBraun Mar 11, 2026
103e05d
fix: update ratchet suppression to use pinnedExtensions map schema
JonahBraun Mar 11, 2026
6a647a5
Retry on empty-content read in readExistingFileOrThrowWithFs
JonahBraun Mar 12, 2026
bd2e93f
Use readJsonFromDiskWithRetry in retainValidations=true test
JonahBraun Mar 12, 2026
de2aae1
feat: implement ratchet suppression for version pins in MetadataManager
JonahBraun Mar 17, 2026
e202cab
Use full VS Code extension IDs in pinnedExtensions schema
JonahBraun Mar 18, 2026
0452c79
Bump version to 0.24.0
JonahBraun Mar 18, 2026
f39aaab
Merge branch 'merge-sql-and-git-overhaul' into 750-collect-stats-on-u…
LeviXIII Mar 19, 2026
0abe26f
- Update syncManager test.
LeviXIII Mar 19, 2026
358700e
- Add posthog information
LeviXIII Mar 19, 2026
c808e40
- Add posthog js for screen recording.
LeviXIII Mar 19, 2026
4810021
Add CI workflows for VSIX GitHub Releases
JonahBraun Mar 19, 2026
e92c597
- Add option to disable session recording.
LeviXIII Mar 20, 2026
22c3957
- Adjust distinctId to user's email (their unique id).
LeviXIII Mar 20, 2026
ae1905b
- Obfuscate sensitive text on the screen when session recording in po…
LeviXIII Mar 20, 2026
9f5fd56
- Add exception handling to project.
LeviXIII Mar 23, 2026
5ff5dbb
Revert "Add CI workflows for VSIX GitHub Releases"
JonahBraun Mar 23, 2026
20d0b4c
Add pinnedExtensions to canonical ProjectMetadata type
JonahBraun Mar 23, 2026
fab7833
Simplify pinnedExtensions schema to version + url only
JonahBraun Mar 23, 2026
8e095ac
- Only record on the main webview windows.
LeviXIII Mar 23, 2026
512062f
Fix inconsistent pin-checking and eliminate redundant metadata read
JonahBraun Mar 23, 2026
eedad18
- Update capture exception handler on node side in telemetry.ts.
LeviXIII Mar 23, 2026
455a602
Merge pull request #739 from genesis-ai-dev/fix/pin-aware-ratchet-sup…
BenjaminScholtens Mar 23, 2026
fd05336
- Set session recording to false by default.
LeviXIII Mar 23, 2026
f8ab179
Merge branch 'main' into 750-collect-stats-on-user-and-machine
LeviXIII Mar 23, 2026
fc85dac
Merge branch 'dev' into 750-collect-stats-on-user-and-machine
LeviXIII Mar 31, 2026
1d03530
- Fix residual errors from merge conflicts.
LeviXIII Mar 31, 2026
a022db6
- Add posthog capture events for fallback tools being used.
LeviXIII Mar 31, 2026
df4cc93
Merge branch 'dev' into 750-collect-stats-on-user-and-machine
LeviXIII Mar 31, 2026
1373970
- Make a command to toggle posthog on or off (good for dev).
LeviXIII Mar 31, 2026
6cd9ec5
Merge branch '750-collect-stats-on-user-and-machine' of https://githu…
LeviXIII Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/partner-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Partner issue
about: Issues reported by partners via support
title: "[Partner] "
labels: partner-issue
assignees: ''
---

**Partner:**

**Help Scout conversation URL:**

**Priority:** P1 / P2 / P3

**Category:** Bug / Performance / Onboarding / Other

**What they reported:**

**Steps to reproduce:**

**Expected vs. actual behavior:**

**Partner impact (how many affected, what it cost them):**
20 changes: 19 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/genesis-ai-dev/codex-editor"
},
"license": "MIT",
"version": "0.22.0",
"version": "0.24.0",
"engines": {
"node": ">=18.0.0",
"vscode": "^1.78.0"
Expand Down Expand Up @@ -203,6 +203,11 @@
"title": "Advanced Tool Settings",
"category": "Codex Editor"
},
{
"command": "codex-editor-extension.toggleTelemetry",
"title": "Toggle Telemetry (PostHog)",
"category": "Codex Editor"
},
{
"command": "codex-editor-extension.forceReindex",
"title": "Force Reindex",
Expand Down Expand Up @@ -892,6 +897,18 @@
"default": "",
"description": "Limits context building to specified books. Leave empty to include all. We recommend to leave empty for best results."
},
"codex-editor-extension.telemetryEnabled": {
"title": "Enable Telemetry",
"type": "boolean",
"default": true,
"description": "When enabled, anonymous usage telemetry and error reports are sent via PostHog to help improve the editor."
},
"codex-editor-extension.sessionRecordingEnabled": {
"title": "Session Recording",
"type": "boolean",
"default": false,
"description": "When enabled, session replays are buffered locally and only sent when an error occurs, to help diagnose issues."
},
"codex-editor-extension.debugMode": {
"title": "Debugging Mode",
"type": "boolean",
Expand Down Expand Up @@ -1133,6 +1150,7 @@
"pdf-parse": "^1.1.1",
"pdfjs-dist": "4.0.379",
"pnpm": "^8.15.5",
"posthog-node": "^5.21.2",
"proc-log": "^5.0.0",
"react-wordcloud": "^1.2.7",
"sax": "^1.4.1",
Expand Down
20 changes: 20 additions & 0 deletions src/activationHelpers/contextAware/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,5 +364,25 @@ export async function registerCommands(context: vscode.ExtensionContext) {
testProjectLoadingPerformanceCommand,
migrateAudioFilesCommand,

vscode.commands.registerCommand(
"codex-editor-extension.toggleTelemetry",
async () => {
const config = vscode.workspace.getConfiguration("codex-editor-extension");
const current = config.get<boolean>("telemetryEnabled", true);
const next = !current;

await config.update("telemetryEnabled", next, vscode.ConfigurationTarget.Global);

const label = next ? "enabled" : "disabled";
const action = await vscode.window.showInformationMessage(
`Telemetry has been ${label}. Reload the window to apply the change.`,
"Reload Window"
);

if (action === "Reload Window") {
await vscode.commands.executeCommand("workbench.action.reloadWindow");
}
}
),
);
}
5 changes: 4 additions & 1 deletion src/cellLabelImporter/cellLabelImporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { matchCellLabels } from "./matcher";
import { copyToTempStorage, getColumnHeaders } from "./utils";
import { updateCellLabels } from "./updater";
import { getNonce } from "../utils/getNonce";
import { getPostHogWebviewScript } from "../utils/telemetry";
import { safePostMessageToPanel } from "../utils/webviewUtils";

const DEBUG_CELL_LABEL_IMPORTER = false;
Expand Down Expand Up @@ -122,7 +123,8 @@ async function getHtmlForCellLabelImporterView(
img-src ${webview.cspSource} https: data:;
style-src ${webview.cspSource} 'unsafe-inline';
script-src 'nonce-${nonce}';
font-src ${webview.cspSource};">
font-src ${webview.cspSource};
connect-src https://*.posthog.com https://*.i.posthog.com;">
<link href="${styleResetUri}" rel="stylesheet">
<link href="${codiconsUri}" rel="stylesheet">

Expand All @@ -136,6 +138,7 @@ async function getHtmlForCellLabelImporterView(
</head>
<body>
<div id="root"></div>
${getPostHogWebviewScript(nonce, "CellLabelImporter")}
<script nonce="${nonce}" src="${scriptUri}"></script>
</body>
</html>`;
Expand Down
5 changes: 4 additions & 1 deletion src/codexMigrationTool/codexMigrationTool.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as vscode from "vscode";
import * as path from "path";
import { getNonce } from "../utils/getNonce";
import { getPostHogWebviewScript } from "../utils/telemetry";
import { safePostMessageToPanel } from "../utils/webviewUtils";
import { matchMigrationCells } from "./matcher";
import { applyMigrationToTargetFile } from "./updater";
Expand Down Expand Up @@ -50,7 +51,8 @@ async function getHtmlForCodexMigrationToolView(
img-src ${webview.cspSource} https: data:;
style-src ${webview.cspSource} 'unsafe-inline';
script-src 'nonce-${nonce}';
font-src ${webview.cspSource};">
font-src ${webview.cspSource};
connect-src https://*.posthog.com https://*.i.posthog.com;">
<link href="${styleResetUri}" rel="stylesheet">
<link href="${codiconsUri}" rel="stylesheet">
<script nonce="${nonce}">
Expand All @@ -59,6 +61,7 @@ async function getHtmlForCodexMigrationToolView(
</head>
<body>
<div id="root"></div>
${getPostHogWebviewScript(nonce, "CodexMigrationTool")}
<script nonce="${nonce}" src="${scriptUri}"></script>
</body>
</html>`;
Expand Down
2 changes: 2 additions & 0 deletions src/copilotSettings/copilotSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as vscode from "vscode";
import { callLLM } from "../utils/llmUtils";
import { CompletionConfig } from "@/utils/llmUtils";
import { MetadataManager } from "../utils/metadataManager";
import { getPostHogWebviewScript } from "../utils/telemetry";

interface ProjectLanguage {
tag: string;
Expand Down Expand Up @@ -68,6 +69,7 @@ export async function openSystemMessageEditor() {
</head>
<body>
<div id="root"></div>
${getPostHogWebviewScript(nonce, "CopilotSettings")}
<script nonce="${nonce}" src="${scriptUri}"></script>
</body>
</html>`;
Expand Down
37 changes: 36 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ import { initializeAudioMerger } from "./utils/audioMerger";
import { initializeAudioExtractor } from "./utils/audioExtractor";
import { initializeAudioExporter } from "./exportHandler/audioExporter";
import { checkTools, getUnavailableTools } from "./utils/toolsManager";
import { initToolPreferences, setNativeGitAvailable, getGitToolMode, getSqliteToolMode } from "./utils/toolPreferences";
import { initToolPreferences, setNativeGitAvailable, getGitToolMode, getSqliteToolMode, getAudioToolMode } from "./utils/toolPreferences";
import { downloadFFmpeg } from "./utils/ffmpegManager";
import { MissingToolsWarningProvider } from "./providers/MissingToolsWarning/MissingToolsWarningProvider";
import { cleanupOrphanedProjectFiles } from "./utils/fileUtils";
import { initTelemetry, shutdownTelemetry, captureException, captureEvent } from "./utils/telemetry";
// markUserAsUpdatedInRemoteList is now called in performProjectUpdate before window reload
import * as fs from "fs";
import * as os from "os";
Expand Down Expand Up @@ -337,6 +338,18 @@ export async function activate(context: vscode.ExtensionContext) {
// Continue with activation even if splash screen fails
}

initTelemetry();

process.on("uncaughtException", (error) => {
console.error("[Extension] Uncaught exception:", error);
captureException(error, { source: "uncaughtException" });
});

process.on("unhandledRejection", (reason) => {
console.error("[Extension] Unhandled rejection:", reason);
captureException(reason, { source: "unhandledRejection" });
});

let stepStart = activationStart;

try {
Expand Down Expand Up @@ -402,6 +415,13 @@ export async function activate(context: vscode.ExtensionContext) {
const gitMode = getGitToolMode();
const effectiveBackend = gitMode === "builtin" ? "isomorphic-git (forced)" : gitAvailable ? "dugite (native)" : "isomorphic-git (no binary)";
console.log(`[codex] Git backend mode: ${gitMode}, effective: ${effectiveBackend}`);
if (!gitAvailable || gitMode === "builtin") {
captureEvent("tool_fallback_used", {
tool: "git",
reason: gitMode === "builtin" ? "user_preference_builtin" : "binary_unavailable",
mode: gitMode,
});
}
stepStart = finishRealtimeStep();

// If metadata.json is missing but the workspace has a .git with a remote,
Expand Down Expand Up @@ -505,6 +525,11 @@ export async function activate(context: vscode.ExtensionContext) {
await initFts5Sqlite(context);
const reason = sqliteMode === "builtin" ? "user preference" : "native unavailable";
console.log(`[SQLite] fts5-sql-bundle (WASM) initialized (${reason})`);
captureEvent("tool_fallback_used", {
tool: "sqlite",
reason: sqliteMode === "builtin" ? "user_preference_builtin" : "native_load_failed",
mode: sqliteMode,
});
} catch (fallbackError: any) {
if (!nativeLoaded) {
console.error("[SQLite] Both native and fts5 fallback failed:", fallbackError?.message || fallbackError);
Expand Down Expand Up @@ -550,6 +575,14 @@ export async function activate(context: vscode.ExtensionContext) {
`[Extension] Tools status — git: ${ok(toolCheckResult.git)}, sqlite: ${ok(toolCheckResult.sqlite)}, ffmpeg: ${ok(toolCheckResult.ffmpeg)}`
);

if (!toolCheckResult.ffmpeg) {
captureEvent("tool_fallback_used", {
tool: "audio",
reason: "ffmpeg_unavailable",
mode: getAudioToolMode(),
});
}

// When offline, non-critical tools (git, audio) being unavailable is
// expected and not actionable -- skip the blocking warning panel.
const hasCriticalMissing = !toolCheckResult.sqlite;
Expand Down Expand Up @@ -1534,6 +1567,8 @@ export async function deactivate() {
currentStepTimer = null;
}

await shutdownTelemetry();

// Close the index manager's database connection and clear the global reference
try {
const { clearSQLiteIndexManager } = await import(
Expand Down
2 changes: 2 additions & 0 deletions src/globalProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CodexCellEditorProvider } from "./providers/codexCellEditorProvider/cod
import { CustomWebviewProvider } from "./providers/parallelPassagesWebview/customParallelPassagesWebviewProvider";
import { GlobalContentType, GlobalMessage } from "../types";
import { getNonce } from "./utils/getNonce";
import { getPostHogWebviewScript } from "./utils/telemetry";
import { safePostMessageToView } from "./utils/webviewUtils";


Expand Down Expand Up @@ -137,6 +138,7 @@ export abstract class BaseWebviewProvider implements vscode.WebviewViewProvider
</head>
<body>
<div id="root"></div>
${getPostHogWebviewScript(nonce, this.getScriptPath()[0])}
<script nonce="${nonce}" src="${scriptUri}"></script>
</body>
</html>`;
Expand Down
2 changes: 1 addition & 1 deletion src/projectManager/utils/merge/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function mergeProjectSwap(
* Merges originalFilesHashes registries from base, ours, and theirs.
* Union by hash: combine all entries. For same hash, merge referencedBy and originalNames.
*/
function mergeOriginalFilesHashes(
export function mergeOriginalFilesHashes(
base: { version?: number; files?: Record<string, any>; fileNameToHash?: Record<string, string> } | undefined,
ours: { version?: number; files?: Record<string, any>; fileNameToHash?: Record<string, string> } | undefined,
theirs: { version?: number; files?: Record<string, any>; fileNameToHash?: Record<string, string> } | undefined
Expand Down
10 changes: 10 additions & 0 deletions src/providers/MissingToolsWarning/MissingToolsWarningProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { safePostMessageToPanel } from "../../utils/webviewUtils";
import type { ToolCheckResult } from "../../utils/toolsManager";
import { getAudioToolMode, getGitToolMode, getSqliteToolMode } from "../../utils/toolPreferences";
import { resetRetryCount } from "../../utils/binaryIntegrityUtils";
import { captureEvent } from "../../utils/telemetry";
import type {
MessagesToMissingToolsWarning,
MessagesFromMissingToolsWarning,
Expand Down Expand Up @@ -274,6 +275,9 @@ export class MissingToolsWarningProvider {
const { setAudioToolMode } = await import("../../utils/toolPreferences");
const current = getAudioToolMode();
const next = current === "auto" ? "builtin" : "auto";
if (next === "builtin") {
captureEvent("tool_fallback_used", { tool: "audio", reason: "user_chose_fallback", mode: next });
}
await setAudioToolMode(next);

const { checkTools } = await import("../../utils/toolsManager");
Expand All @@ -292,6 +296,9 @@ export class MissingToolsWarningProvider {
const { setGitToolMode } = await import("../../utils/toolPreferences");
const current = getGitToolMode();
const next = current === "auto" ? "builtin" : "auto";
if (next === "builtin") {
captureEvent("tool_fallback_used", { tool: "git", reason: "user_chose_fallback", mode: next });
}
await setGitToolMode(next);

const { checkTools } = await import("../../utils/toolsManager");
Expand Down Expand Up @@ -324,6 +331,9 @@ export class MissingToolsWarningProvider {
const { setSqliteToolMode } = await import("../../utils/toolPreferences");
const current = getSqliteToolMode();
const next = current === "auto" ? "builtin" : "auto";
if (next === "builtin") {
captureEvent("tool_fallback_used", { tool: "sqlite", reason: "user_chose_fallback", mode: next });
}

// If switching to the WASM fallback, ensure it's initialized
if (next === "builtin") {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/SplashScreen/SplashScreenProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class SplashScreenProvider {
return getWebviewHtml(webview, { extensionUri: this._extensionUri } as vscode.ExtensionContext, {
title: "Codex Editor Loading",
scriptPath: ["SplashScreen", "index.js"],
csp: `default-src 'none'; style-src ${webview.cspSource} 'unsafe-inline'; script-src 'nonce-\${nonce}' 'strict-dynamic' https://static.cloudflareinsights.com; worker-src ${webview.cspSource} blob:; connect-src https://*.vscode-cdn.net https://*.frontierrnd.com; img-src ${webview.cspSource} https: data:; font-src ${webview.cspSource}; media-src ${webview.cspSource} https: blob:;`,
csp: `default-src 'none'; style-src ${webview.cspSource} 'unsafe-inline'; script-src 'nonce-\${nonce}' 'strict-dynamic' https://static.cloudflareinsights.com; worker-src ${webview.cspSource} blob:; connect-src https://*.vscode-cdn.net https://*.frontierrnd.com https://*.posthog.com https://*.i.posthog.com; img-src ${webview.cspSource} https: data:; font-src ${webview.cspSource}; media-src ${webview.cspSource} https: blob:;`,
initialData: { timings: this._timings, syncDetails: this._syncDetails },
inlineStyles: `
body { margin: 0; padding: 0; height: 100vh; width: 100vw; overflow: hidden; background-color: var(--vscode-editor-background); color: var(--vscode-foreground); font-family: var(--vscode-font-family); }
Expand Down
2 changes: 1 addition & 1 deletion src/providers/VideoPlayer/VideoPlayerProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class VideoPlayerProvider
return getWebviewHtml(webview, this.context, {
title: "Codex Video Player",
scriptPath: ["VideoPlayer", "index.js"],
csp: `default-src 'none'; style-src ${webview.cspSource} 'unsafe-inline'; script-src 'nonce-\${nonce}' https://static.cloudflareinsights.com; connect-src https://*.vscode-cdn.net https://*.frontierrnd.com; worker-src ${webview.cspSource}; img-src ${webview.cspSource} https:; font-src ${webview.cspSource};`
csp: `default-src 'none'; style-src ${webview.cspSource} 'unsafe-inline'; script-src 'nonce-\${nonce}' https://static.cloudflareinsights.com; connect-src https://*.vscode-cdn.net https://*.frontierrnd.com https://*.posthog.com https://*.i.posthog.com; worker-src ${webview.cspSource}; img-src ${webview.cspSource} https:; font-src ${webview.cspSource};`
});
}
}
Loading
Loading