Skip to content
Open
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0c838ee
feat(editor): Implement dynamic type loading for TS/JS autocompletion
Oct 2, 2025
8806b2d
ethers autocompletion
Oct 7, 2025
1e726b2
wip: dynamic loading from cdn
Oct 7, 2025
d384c14
bug fix
Oct 7, 2025
4917605
temp: enable dynamic import and autocompletion for ethers and viem li…
Oct 8, 2025
b978632
temp: version 0.1 - viem/chains underline
Oct 9, 2025
1384e87
temp: viem, ethers, lodash, axios
Oct 9, 2025
90a6701
wip: add comments for reviewer
Oct 9, 2025
71b58e7
update explaination
Oct 9, 2025
2596dee
fix(script-runner): robustly transform imports for runtime execution
hsy822 Oct 14, 2025
493da3f
feat(editor): Implement dynamic type loading and intelligent script t…
hsy822 Oct 15, 2025
13dfd65
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Oct 28, 2025
02f9065
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Oct 29, 2025
cdaa3d1
fix(script-runner): Correctly transform imports for runtime execution
hsy822 Oct 29, 2025
6782fc9
fix(script-runner): Separate static and dynamic imports in transforma…
hsy822 Oct 29, 2025
26bac4f
Add toast notifications for JS/TS type loading
hsy822 Nov 3, 2025
056dfeb
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Nov 4, 2025
b3d88e9
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Nov 27, 2025
5bab38b
feat: fix type loading bug
hsy822 Nov 27, 2025
6074f7f
lint
hsy822 Nov 27, 2025
d9772a3
fix hardhat import
hsy822 Nov 27, 2025
69362ed
lint
hsy822 Nov 27, 2025
9db69e1
remove notification
hsy822 Nov 27, 2025
1c0cd3c
rollback handleTypeScriptDependenciesOf
hsy822 Nov 27, 2025
5a24eae
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Dec 1, 2025
247d89f
fixed bug and set e2e test
hsy822 Dec 1, 2025
4d8a71e
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Dec 1, 2025
c566c6e
disabled test
hsy822 Dec 1, 2025
9b53f0e
rollback handleTypeScriptDependenciesOf
hsy822 Dec 2, 2025
5e0fa6e
lint
hsy822 Dec 2, 2025
f67b878
added guard for onchange func
hsy822 Dec 2, 2025
b9a5cf2
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Dec 3, 2025
63b22a7
Merge branch 'master' into feature/editor-dynamic-type-loading
hsy822 Dec 4, 2025
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
default: ""
run_file_tests_keyword:
type: enum
enum: ["", "ai_panel", "ballot", "ballot_0_4_14", "blockchain", "bottom-bar", "circom", "code_format", "compile_run_widget", "compiler_api", "contract_flattener", "contract_verification", "debugger", "defaultLayout", "deploy_vefiry", "dgit_github", "dgit_local", "editor", "editorHoverContext", "editorReferences", "editor_error_marker", "editor_line_text", "eip1153", "eip7702", "environment-account", "erc721", "etherscan_api", "expandAllFolders", "fileExplorer", "fileManager_api", "file_decorator", "file_explorer_context_menu", "file_explorer_dragdrop", "file_explorer_multiselect", "generalSettings", "gist", "homeTab", "importFromGithub", "layout", "learneth", "libraryDeployment", "matomo-bot-detection", "matomo-consent", "mcp_all_resources", "mcp_all_tools", "mcp_server_complete", "mcp_server_connection", "mcp_server_lifecycle", "mcp_workflow_integration", "metamask", "migrateFileSystem", "noir", "pinned_contracts", "pluginManager", "plugin_api", "providers", "proxy_oz_v4", "proxy_oz_v5", "proxy_oz_v5_non_shanghai_runtime", "publishContract", "quickDapp_metamask", "recorder", "remixd", "runAndDeploy", "script-runner", "search", "signingMessage", "sol2uml", "solidityImport", "solidityUnittests", "specialFunctions", "staticAnalysis", "stressEditor", "template_exp_modal", "terminal", "toggle_panels", "transactionExecution", "txListener", "uniswap_v4_core", "url", "usingWebWorker", "verticalIconsPanel", "vm_state", "vyper_api", "walkthrough", "workspace", "workspace_git"]
enum: ["", "ai_panel", "ballot", "ballot_0_4_14", "blockchain", "bottom-bar", "circom", "code_format", "compile_run_widget", "compiler_api", "contract_flattener", "contract_verification", "debugger", "defaultLayout", "deploy_vefiry", "dgit_github", "dgit_local", "editor", "editorHoverContext", "editorReferences", "editor_autocomplete", "editor_error_marker", "editor_line_text", "eip1153", "eip7702", "environment-account", "erc721", "etherscan_api", "expandAllFolders", "fileExplorer", "fileManager_api", "file_decorator", "file_explorer_context_menu", "file_explorer_dragdrop", "file_explorer_multiselect", "generalSettings", "gist", "homeTab", "importFromGithub", "layout", "learneth", "libraryDeployment", "matomo-bot-detection", "matomo-consent", "mcp_all_resources", "mcp_all_tools", "mcp_server_complete", "mcp_server_connection", "mcp_server_lifecycle", "mcp_workflow_integration", "metamask", "migrateFileSystem", "noir", "pinned_contracts", "pluginManager", "plugin_api", "providers", "proxy_oz_v4", "proxy_oz_v5", "proxy_oz_v5_non_shanghai_runtime", "publishContract", "quickDapp_metamask", "recorder", "remixd", "runAndDeploy", "script-runner", "search", "signingMessage", "sol2uml", "solidityImport", "solidityUnittests", "specialFunctions", "staticAnalysis", "stressEditor", "template_exp_modal", "terminal", "toggle_panels", "transactionExecution", "txListener", "uniswap_v4_core", "url", "usingWebWorker", "verticalIconsPanel", "vm_state", "vyper_api", "walkthrough", "workspace", "workspace_git"]
default: ""
run_flaky_tests:
type: boolean
Expand Down
94 changes: 94 additions & 0 deletions apps/remix-ide-e2e/src/tests/editor_autocomplete.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
'use strict'

import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'

module.exports = {
'@disabled': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done, 'http://127.0.0.1:8080', true)
},

'Should load external types (axios) and show autocomplete #group1': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('filePanel')
.addFile('scripts/test_axios.ts', { content: testAxiosScript })
.openFile('scripts/test_axios.ts')
.waitForElementVisible('#editorView', 20000)
.pause(15000)
.execute(function () {
const win = window as any
if (!win.monaco || !win.monaco.editor) return false

const editors = win.monaco.editor.getEditors()
const activeEditor = editors.find((e: any) => {
const model = e.getModel()
return model && model.uri.toString().includes('test_axios.ts')
})

if (activeEditor) {
activeEditor.focus()
const model = activeEditor.getModel()
const lastLine = model.getLineCount()
const lastCol = model.getLineMaxColumn(lastLine)
activeEditor.setPosition({ lineNumber: lastLine, column: lastCol })
activeEditor.trigger('keyboard', 'type', { text: "\naxios" })
activeEditor.trigger('keyboard', 'type', { text: "." })
activeEditor.trigger('keyboard', 'editor.action.triggerSuggest', {})
return true
}
return false
})
.pause(2000)
.waitForElementVisible('.suggest-widget', 15000)
.waitForElementVisible('.monaco-list-row', 5000)
.waitForElementContainsText('.suggest-widget', 'get', 5000)
.waitForElementContainsText('.suggest-widget', 'create', 5000)
},

'Should provide autocomplete for local imports #group1': function (browser: NightwatchBrowser) {
browser
.addFile('scripts/localLib.ts', { content: localLibScript })
.addFile('scripts/localConsumer.ts', { content: localConsumerScript })
.openFile('scripts/localConsumer.ts')
.waitForElementVisible('#editorView', 20000)
.pause(2000)
.execute(function () {
const win = window as any
if (!win.monaco) return false
const editors = win.monaco.editor.getEditors()
const activeEditor = editors.find((e: any) => {
const model = e.getModel()
return model && model.uri.toString().includes('localConsumer.ts')
})

if (activeEditor) {
activeEditor.focus()
const model = activeEditor.getModel()
const lastLine = model.getLineCount()
const lastCol = model.getLineMaxColumn(lastLine)
activeEditor.setPosition({ lineNumber: lastLine, column: lastCol })
activeEditor.trigger('keyboard', 'type', { text: "\nHelper" })
activeEditor.trigger('keyboard', 'type', { text: "." })
activeEditor.trigger('keyboard', 'editor.action.triggerSuggest', {})
return true
}
return false
})
.pause(2000)
.waitForElementVisible('.suggest-widget', 15000)
.waitForElementVisible('.monaco-list-row', 5000)
.waitForElementContainsText('.suggest-widget', 'myLocalFunction', 5000)
}
}

const testAxiosScript = `
import axios from 'axios';
// Test Start`

const localLibScript = `
export const myLocalFunction = () => { return "Local"; }`

const localConsumerScript = `
import * as Helper from './localLib';
// Test Start`
Loading