* fix: address plugin bridge review comments from PR #9889
- rename plugin-ui-* IPC channels to plugins.ui* for naming consistency
- add sender validation to plugins.uiPromptResult handler
- use invokePluginBridgeMethod for getBridgeMetrics (adds it to PluginInvokeMethod)
- use window.main.plugins.executePluginMainAction in root.tsx instead of direct import
- use servicesProxy instead of servicesNodeImpl in plugin window entry
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: address Copilot review comments on plugin bridge PR
- Remove getBridgeMetrics from PluginInvokeMethod since it is handled
by the main process directly and has no case in invokePluginMethod()
- Route getBridgeMetrics in preload via ipcRenderer.invoke directly
- Use plugins.executePluginMainAction in root.tsx to respect the
INSOMNIA_ENABLE_PLUGIN_BRIDGE rollback switch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feedback
* fix: normalize plugin IPC channel naming and complete HandleChannels
Rename plugin-invoke → plugins.invoke to match the plugins.* dot-notation
used by all other plugin IPC channels introduced in PR #9889.
Also add the missing plugin handle channels to the HandleChannels type
union in electron.ts (getBridgeMetrics, hasRequestHooks, hasResponseHooks,
applyRequestHooks, applyResponseHooks).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* use invoke helper
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: reduce output verbosity for local dev and AI agent workflows
- Set npm loglevel=warn to suppress install/run progress noise
- Switch Playwright local reporter from list to dot (less output per test, CI unchanged)
- Add scripts/setup.sh for one-time local git config (compact log, short status)
- Document setup script in AGENTS.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: remove loglevel=warn and alias suggestions
- Revert loglevel=warn from .npmrc — too broad, suppresses CI output
- Remove shell alias suggestions from setup.sh — out of scope for a repo script
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: replace setup.sh with command output guidance in AGENTS.md
Removes setup.sh in favour of explicit quiet-command guidance that
benefits all agents (Claude, Copilot, Codex) without requiring a
one-time setup step.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: add cx semantic code navigation guidance to AGENTS.md
cx gives agents a cost ladder (overview → symbols → definition → read)
that reduces file reads for all agents that read AGENTS.md — complementary
to CodeGraph which is Claude Code-specific.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* plan pass 2
* answer questions
* add tests
* theme tests
* more tests
* feat: move plugin loading/execution to hidden BrowserWindow (Phase 1)
All plugin API calls (getThemes, getPlugins, getActivePlugins, reloadPlugins,
getRequestActions, getRequestGroupActions, getWorkspaceActions, getDocumentActions)
are now routed through a dedicated hidden BrowserWindow with nodeIntegration:true
instead of running directly in the renderer.
IPC relay: renderer → ipcMain.handle → plugin window webContents → ipcRenderer.send
back to main → resolve renderer promise via pending-request map with 30s timeout.
Renderer-side callers updated to use window.main.plugins.* bridge.
Two new esbuild entry points added (plugin-window, plugin-window-preload).
Dev build threshold updated from 3 to 6 to account for all contexts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feedback
* feat: route plugin action execution through hidden BrowserWindow bridge
Add executeAction IPC method so all four plugin action dropdowns (request,
requestGroup, workspace, document) dispatch through the plugin window
instead of running context modules directly in the renderer.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: route template tag listing and action execution through plugin bridge
Bridge getTemplateTags() and runTemplateTagAction() so code-editor,
one-line-editor, and tag-editor no longer import from plugins/index
or plugins/context/store in the renderer.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: complete Phase 1 — all plugin execution routed through hidden BrowserWindow
Bridge template tags (getTemplateTags, runTemplateTagAction), bundle plugin
listing (getBundlePlugins), and elevated plugin actions (executePluginMainAction)
so no renderer code calls plugin index or context modules directly for execution.
Remaining renderer plugin imports are intentional: applyColorScheme/getColorScheme
(DOM utilities) and createPlugin (filesystem scaffolding), neither of which is
plugin execution.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* update plan
* fix: initialize plugin window services and add Phase 1a E2E test
- Create database.plugin-window.ts IPC proxy so the plugin window
reads from the main process NeDB connection instead of opening a
second one
- Initialize database + services in entry.plugin-window.ts before
sending plugin-window-ready, fixing the silent "Service not
initialized" crash that was masked by unawaited promises
- Add isMainWindow fallback to the page fixture so firstWindow()
racing to return the hidden plugin window doesn't break other tests
- Add plugin-bridge.test.ts: E2E test that writes a requestAction
plugin, reloads via the bridge, and verifies the action appears in
the request dropdown
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix lint
* fix: only send plugin-window-ready after successful initialization
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix assertion
* add found
* better
* fix: stabilize hidden window smoke flows
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: bridge request and response hooks through the plugin window
Moves requestHooks and responseHooks execution into the hidden plugin
window via the IPC bridge. The default-headers built-in runs in the
renderer (no IPC). A cached hasRequestHooks/hasResponseHooks check in
the main process avoids any plugin window round-trip per request when no
user plugins have hooks registered.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: handle non-renderer processes in plugin hook functions
_applyRequestPluginHooks and _applyResponsePluginHooks now use
window.main.plugins.* IPC only in the Electron renderer. In the main
process (OAuth2 token exchange via get-token.ts) and Node.js CLI
(insomnia-inso), they fall back to loading plugins directly via
plugins.getRequestHooks/getResponseHooks. This fixes:
- inso CLI: "window is not defined" in all run collection/test commands
- Electron: OAuth2 token exchange failing with "no access token provided"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix unit test
* fix: increase findMainWindow timeout and skip plugin window by title
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: defer plugin window creation until after main window loads
Playwright's firstWindow() was racing with the plugin window and
sometimes returning it instead of the main app window. By deferring
createPluginWindow() to did-finish-load on the main window, the plugin
window is guaranteed to not exist yet when firstWindow() resolves.
Removes the findMainWindow polling fallback from the test fixture.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: replace any[] cast in nunjucks context menu with narrow ContextMenuTag type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: safely stringify non-Error rejections in response hook error handler
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: bridge plugin UI calls (alert/dialog/prompt/clipboard) from plugin window to main renderer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix test
* docs
* add tests and observability
* docs
* feat: implement invokePluginMethod for plugin communication and add tests
* document switch
* fix test
* fix: move plugin killswitch from preload to renderer to prevent packaged app crash
The preload was statically importing invokePluginMethod which pulled the
entire plugin system (network stack, NeDB, plugin contexts) into the
preload bundle. In production the bundle is built fresh from source,
causing a module-level crash before window.main is set — breaking the
critical backup smoke test with "Cannot read properties of undefined
(reading 'secretStorage')".
Move the INSOMNIA_ENABLE_PLUGIN_BRIDGE killswitch into a new
renderer-bridge.ts module that lives in the Vite renderer bundle where
those deps already exist. The preload now always uses IPC for all plugin
calls. All window.main.plugins.* call sites updated to use the bridge.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: eslint autofix import ordering
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(Migration): enhance migration summary with total projects count and improve UI feedback
* fix(Migration): clarify update instructions and improve user messaging
* style(ManualCommitForm): adjust text sizes for improved readability
* style(StagingModal): adjust layout and spacing for improved UI consistency
* fix(ManualCommitForm): update clipboard text to include 'cd' command for easier navigation
* fix(ProjectSettingsForm): update repository path copy functionality and add option to open in file system
* fix(ManualCommitForm): enhance file system interaction with tooltips for better user guidance
* fix(ProjectSettingsForm): add tooltip for 'Open in file system' button to enhance user guidance
* fix(GitProjectSyncDropdown): add 'Open folder' action to sync dropdown for easier access to repository path
* fix(Component): display relative path of current issue in modal for better context
* fix(git-service): count only successfully migrated projects in totalProjects
* fix(project-settings-form): platform-aware shell quoting for cd command
* fix(git-project-staging-modal): platform-aware shell quoting for cd command
* fix(project-settings-form): update aria-label to reflect cd command clipboard content
* fix(git-project-staging-modal): update aria-label to reflect shell command clipboard content
* fix(ManualCommitForm): replace tooltip with dialog for enhanced information display
* fix(MigrationView): update migrated count calculation to reflect total projects
---------
Co-authored-by: James Gatz <jamesgatzos@gmail.com>
* feat: add mechanism to flush newer DB workspaces to disk during downgrade
* feat: implement effective Git repository ID handling for project connections
* feat: enhance Git repository ID handling for improved project queries and updates
* Fix style issue that file list in the middle of commit modal is collapsed
* fix: update links to Git Sync documentation in staging modal and project settings form
* squash
* re add comments
* fix process fork
* update base line 18 left
* revert
* check cert url without node
* fix handlerId
* exclude url matches cert host from scope
* fix rebase
* Git server for smoke test
* Try to solve flaky test
* feat: remove unused Git hook samples and add Credentials tab functionality
- Deleted various sample Git hook scripts from the git-server fixture, including post-update, pre-applypatch, pre-commit, pre-merge-commit, pre-push, pre-rebase, pre-receive, prepare-commit-msg, push-to-checkout, sendemail-validate, and update hooks.
- Introduced a new PreferencesCredentialsTab class to manage Git credentials within the Insomnia Preferences.
- Updated the PreferencesPage to include the new Credentials tab for Git credentials management.
- Enhanced the ProjectPage with a method to create a Git Sync project, including branch creation and switching.
- Added comprehensive tests for Git Sync functionality, including creating branches, committing changes, and merging branches.
- Updated UI components to support new features, including data-testid attributes for better testability.
Co-authored-by: Copilot <copilot@github.com>
* feat: update path import and add Git sync tests
* revert package.json
* Update package.json
* feat: add new dependencies for Git HTTP mock server and related utilities
* refactor: remove commented-out code in addAccessTokenGitCredential function
* fix: update export tests to use toHaveLength for file count assertions
---------
Co-authored-by: Copilot <copilot@github.com>
* move sync code to main
* improve sync tests
* update plan
* test: reset cloud sync smoke state
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* guard against bad test env
* fix skill
* remove new test
* udpate plan
* with proxy
* checkpoint
* move files
* autofix
* update plan
* make all sync bridge async
* fix window imports
* refactor: move main-only sync helpers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix lint
* move chunkArray tests
* smaller interfaces
* move store under vcs
* move cloud-sync to main
* create a second vcs for pull operations
* added a invoke wrapper to remove error prefixes
* rebase error
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* initial support for canonical repo output (#9739)
* Feat/git repo output sync queue (#9790)
* feat: implement SyncQueue for serial async task processing
* refactor: enhance repo file watcher for improved sync and error handling
- Replace NeDB client with a unified disk client for all file operations.
- Introduce a serial queue to manage sync tasks and prevent race conditions.
- Implement content-hash deduplication to avoid unnecessary file imports.
- Add problem tracking for YAML files with conflicts or parse errors.
- Streamline watcher start/stop logic and improve notification handling.
- Ensure immediate DB→FS flush before git operations to maintain consistency.
- Enhance import logic to handle workspace deletions and renames effectively.
* refactor: simplify projectRoutableFSClient by removing unused parameters and consolidating logic
* feat: add git.db-synced event listener for revalidation in Root component
* feat: add button to open local repository folder in ProjectSettingsForm
* refactor: remove unused GitProjectNeDBClient
* refactor: update imports to use services for workspace and workspaceMeta
* refactor: update models usage to services in git repo migration and project settings form
* refactor: streamline file watcher initialization and import process
* feat: ensure immediate processing of pending debounced imports in RepoFileWatcher
* refactor: improve file rename handling in RepoFileWatcher to prevent data loss
* feat: enhance RepoFileWatcher to track last written hash and sync mtime for improved file management
* refactor: remove unused parameters from upsertDocs in RepoFileWatcher for cleaner code
* fix revalidator (#9826)
* fix: handle detached HEAD during rebase in getCurrentBranch method (#9843)
* fix: handle detached HEAD during rebase in getCurrentBranch method
* fix: add return type to getCurrentBranch method
* fix: refresh ui after sync (#9848)
* fix: (git cli)skip flush problematic files (#9846)
* fix: skip flush problematic files
* fix
* feat: (git cli)ux for invalide status (#9836)
* feat: ux for invalide status
* update ux
* fix
* fix
* add tab warning
* del log
* feat(Git Sync): Handle non-origin remotes (#9833)
* feat(git): detect non-origin branch tracking and guard sync operations
- Add getBranchTrackingRemote(), getRemoteUrl(), getBranchRemoteInfo() to GitVCS
- Add getBranchRemoteInfo IPC endpoint with BranchRemoteInfo interface
- Add assertBranchOnOrigin() guard to push, pull, fetch, commitAndPush
- canPushLoader returns { canPush: false } for non-origin branches
- Add unit tests for remote detection methods
* feat(git): add support for non-origin branch tracking and display warnings in UI
* Show local git repo path [INS-2315] (#9858)
* Update the style of local git folder path in project setting modal
* Add Git CLI tip in commit changes modal
* Repo Migration flow [INS-2256] (#9824)
* initial support for canonical repo output (#9739)
* feat: enhance git repository migration with concurrency guard and symlink handling
* feat: enhance git repository migration with config sanitization and file overwrite handling
* feat: implement repo migration version tracking and improve migration idempotency
* feat: add runAllGitRepoMigrations function and migration view for Git projects
Co-authored-by: Copilot <copilot@github.com>
* fix: reset initial migration status to 'default' in MigrationView component
* refactor: simplify MigrationView component and update navigation logic
* refactor: remove legacy directory structure migration from loadGitRepository function
* feat: enhance runAllGitRepoMigrations to return logs and improve error handling in MigrationView
* feat: update runAllGitRepoMigrations to return detailed logs and failed projects; enhance MigrationView to handle migration results
* feat: optimize runAllGitRepoMigrations by batch-fetching git repositories and improving project filtering
* feat: introduce CURRENT_MIGRATION_VERSION constant for migration tracking and update references in git-repo-migration and router
* feat: handle failed projects in runAllGitRepoMigrations by converting them to local projects
Co-authored-by: Copilot <copilot@github.com>
* feat: integrate CURRENT_MIGRATION_VERSION for migration tracking and update router logic to handle migration screen visibility
* feat: reorder import statements in ProjectSettingsForm for consistency
* feat: update MigrationStatus type and related logic for better error handling
* feat: enhance migration logging with detailed error stack and include CURRENT_MIGRATION_VERSION in logs
* feat: simplify migration logging messages for clarity and consistency
* feat: improve migration check logic to prioritize version stamp over disk layout
* feat: add tests for migrateRepoStructureIfNeeded function to ensure migration logic correctness
* feat: update migration logic to re-run when old git/ directory exists, ensuring correct migration handling
* test: update migration tests to ensure directory existence checks are accurate
* refactor: remove redundant useEffect for localStorage in Component
* feat: enhance path validation in runAllGitRepoMigrations to prevent path traversal vulnerabilities
* feat: enhance path handling in migration functions to prevent directory traversal vulnerabilities
* feat: enhance directory traversal protection in moveDirectoryContents function
---------
Co-authored-by: James Gatz <jamesgatzos@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
* fix: Delete old folders (#9867)
* refactor: remove unused migration version handling from localStorage
* fix: update directory removal logic to handle non-empty directories
---------
Co-authored-by: Curry Yang <163384738+CurryYangxx@users.noreply.github.com>
Co-authored-by: yaoweiprc <6896642+yaoweiprc@users.noreply.github.com>
Co-authored-by: Pavlos Koutoglou <pkoutoglou@gmail.com>
Co-authored-by: Copilot <copilot@github.com>