fix: track entry count manually in unpack_vsix - #4
Open
airdropia wants to merge 23 commits into
Open
Conversation
zip crate v2.4.2 returns 0 from archive.len() for archives with >10000 entries, so the early size check never triggers. Add manual entry_count counter inside the for loop to properly reject oversized VSIX files.
Extension installs fail with ENOPRO because the web extension manager resolves the installed extension manifest through the sidex-asset:// scheme (converted from file:// via uriToBrowserUri), but no IFileSystemProvider was registered for that scheme. Register a TauriFileSystemProvider for sidex-asset and teach its toPath() to decode the percent-encoded path so manifest reads route through the Rust backend.
…nsion installs - Use extensionLocation.toString() instead of fsPath in extHostExtensionService to preserve URI scheme and encoding when resolving extension paths. - Make TauriFileSystemProvider.toPath() robust to both percent-encoded and raw Windows drive letter paths (e.g. /c:/Users/...). - Register sidex-asset scheme in web.main.ts so the file system provider can handle extension manifest reads. Fixes: ENOPRO error when installing extensions from VS Code marketplace (Prettier, etc.) because the extension manager was trying to read sidex-asset:// URIs with raw Windows paths that weren't handled.
- Fix local extension icon loading: use vscode-file:// scheme instead of sidex-asset:// for img tags to avoid mixed-content errors in HTTPS Tauri webviews. Icons now load correctly from file:// paths. - Fix marketplace platform filtering: add target platform extraction from gallery query (filterType 9) and pass to Open VSX search. Filter results by target platform to prefer win32-x64 builds on Windows instead of alpine-arm64 or other incompatible platforms. - Update searchOpenVsx signature to accept optional targetPlatform param. Fixes: Prettier/Codex icon not showing, Codex download failing with wrong platform (alpine-arm64 instead of win32-x64)
- Update ExtensionManagementServerService to detect Tauri environment and register a local extension management server using WebExtensionManagementService - This enables CONTEXT_HAS_LOCAL_SERVER context key to be true - Un-hides extension UI features: 'Install from VSIX', local extension actions, etc. - File operations route through the existing TauriFileSystemProvider
- Create TauriExtensionManagementService that delegates to native Tauri commands (install_extension, uninstall_extension) - Update ExtensionManagementServerService to use Tauri service for local extension management in Tauri builds - This enables proper VSIX installation from file dialog - Fixes 'Error: unsupported' when installing extensions from VSIX
airdropia
force-pushed
the
feat/bundle-node
branch
from
August 15, 2026 19:51
f40a7b8 to
621fddd
Compare
- Override VSIX install command to use native Tauri install_extension command instead of web-only extension management service - This fixes 'Error: unsupported' when installing extensions from .vsix files - Shows proper success/failure notifications to user
VSIX install (extensions.contribution.ts): - Root cause: ServicesAccessor is invalidated as soon as an async handler yields (returns its first Promise). See invokeFunction() in instantiationService.ts which sets _done=true in the finally block, which runs when the async fn returns its first Promise. - Fix: Move accessor.get() calls BEFORE the first await. CMD window flash (extension_platform.rs): - Root cause: read_node_version() and is_usable_node() called node --version without CREATE_NO_WINDOW, causing a brief CMD window to appear on every startup check. - Fix: Add creation_flags(0x0800_0000) to both functions. CMD window flash (extension_wasm.rs): - LspServerProcess::spawn() also missing CREATE_NO_WINDOW. - Fix: Add creation_flags(0x0800_0000) to suppress flash.
- creation_flags() is a trait method from std::os::windows::process::CommandExt - Without the import, Rust errors E0599: no method named 'creation_flags' - Import added inside #[cfg(windows)] blocks in read_node_version and is_usable_node
Root cause: SideX has two independent extension systems: - Rust backend scans %USERPROFILE%\.sidex\extensions folders and loads them into the Node extension host (works: log shows 'Connected - 1 extensions' for kilo-code) - Frontend workbench scans extensions.json (VS Code web metadata model) via WebExtensionsScannerService -> always returns 0 user extensions because Rust never writes extensions.json This made the Extensions panel show 'Installed: 0' and the activity bar icon/views missing even though the extension host was running the extension. Fix: in ExtensionService._scanWebExtensions, when running under Tauri, enumerate user extensions via the native Rust command list_installed_extensions, read each extension's package.json, and build IExtensionDescription entries so the workbench UI (Extensions panel, activity bar, views, commands) recognizes them.
…tocol, guard stalled downloads Three regressions reported after v0.2.9: 1. Kilo Code (installed from VSIX) did not appear in the Installed list. The Rust install_extension command extracts the VSIX into the user extensions folder but never updates the VS Code extensions.json metadata model that the workbench Installed list reads. After a VSIX install we now register the extracted folder via WebExtensionsScannerService.addExtension so it shows up without a restart (same path the marketplace flow uses). 2. Extension icons (activity bar + Installed list) did not render: vscode-file:// URLs produce ERR_UNKNOWN_URL_SCHEME, and the previous sidex-asset:// custom scheme is blocked as mixed content because the WebView runs over HTTPS (useHttpsScheme: true). uriToBrowserUri and the extension icon resolver now emit Tauri's built-in asset protocol (https://asset.localhost/<encoded>) which serves over HTTPS with scope \C:\Users\Admin/** covering the extensions dir. 3. Marketplace installs (e.g. OpenAI Codex) could spin forever on 'installing' when the VSIX download stalled: the Rust download client had a 900s per-attempt timeout, and the frontend await had no ceiling. Reduced the per-attempt timeout to 300s, added gzip/ brotli + a 1GiB safety cap in the downloader, and race the Tauri invoke against a 10-minute frontend timeout that surfaces a clear error instead of an endless spinner.
Kilo Code's activity bar view container ID 'kilo-code.SidebarProvider' contains a dot, which the strict regex ^[a-z0-9_-]+$ rejected. This caused isValidViewsContainer to fail, so the view container was never registered and the activity bar icon never appeared even though the extension host loaded the extension. Relax the regex to allow dots, matching VS Code's own permissive view container ID handling.
…their activity bar icons appear Root cause: Kilo Code is a Node-only extension (has 'main' but no 'browser' entry and no 'extensionKind'). deduceExtensionKind returns ['workspace'] only, and pickRunningLocation finds no matching host kind for a locally installed workspace extension, so it returned null. The extension was then filtered out of the registry in _resolveAndProcessExtensions (filterByExtensionHostKind), never added via registry.deltaExtensions, and its declarative contributions (contributes.viewsContainers / contributes.views) were never processed by _doHandleExtensionPoints. Result: the activity bar view container was never registered and the Kilo icon never appeared, even though the Rust/Node extension host loaded the extension and synced its commands. Fix: in Tauri mode, when a locally installed extension matches no host kind, assign it LocalWebWorker purely so it enters the extension registry and its contributions are processed. createExtensionHost already returns null for LocalWebWorker in Tauri mode, so no web worker is spawned and the Rust/Node extension host remains the sole executor (no double activation).
…kEditor to window API Root cause: Kilo Code's gatherEditorContext() calls vscode.window.visibleNotebookEditors.map(...) without optional chaining. The extension host bridge (host.cjs) never defined visibleNotebookEditors on the window object, so it was undefined and .map() threw 'Cannot read properties of undefined (reading map)' — surfacing as 'Failed to send Prompt' in the Kilo sidebar. Fix: expose visibleNotebookEditors (empty array) and activeNotebookEditor (undefined) on the window API, matching VS Code's contract for a host with no notebook support. SideX has no notebook editors, so empty/undefined is the correct value. Bump version to 0.2.13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix zip crate v2.4.2 bug where archive.len() returns 0 for archives with >10000 entries. The early size check never triggered, so added manual entry_count counter inside the for loop.