Introduce shared port state, refactor file manager and update commands/views#1
Introduce shared port state, refactor file manager and update commands/views#1daleka wants to merge 37 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f1e1dd456
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -25,13 +25,6 @@ | |||
| }, | |||
| { | |||
| "command": "mpytools.compileAndMount", | |||
There was a problem hiding this comment.
Use the registered compile command ID in contributes
This contribution now advertises mpytools.compileAndMount, but the extension only registers mpytools.compileAndRun (see registerCompileAndRunCommand in src/compileAndRun.ts). In this state, invoking the contributed “Compile PY → MPY and mount” command from the Command Palette or a keybinding will fail with a missing-command error, breaking the primary compile/upload workflow unless users happen to use the status-bar button.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 562213be76
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function delay(ms: number): Promise<void> { | ||
| return new Promise(resolve => setTimeout(resolve, ms)); | ||
| const connectTarget = port === 'auto' ? 'auto' : port; | ||
| await execPromise(`mpremote connect ${connectTarget} exec "import main; print('__MPY_READY__')"`); |
There was a problem hiding this comment.
Avoid aborting Compile&Run on main import precheck
The new preflight await execPromise(...) in openTerminalAndRunMain will reject when main.py is missing or raises during import, which now aborts mpytools.compileAndRun before the terminal ... + repl command is sent. In that failure path users lose the interactive recovery flow and the Compile&Run status bar item can remain in its spinning state because the reset logic in registerCompileAndRunCommand is after this awaited call. Handle this precheck failure as non-fatal (or guard with try/finally) so the command can still recover cleanly.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dce4278c56
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }, | ||
| { | ||
| "command": "mpytools.compileAndMount", |
There was a problem hiding this comment.
Drop stale connect command or register it again
package.json still contributes mpytools.connect, but after the conflict-resolution changes in src/extension.ts there is no registerCommand('mpytools.connect', ...) implementation anymore. Invoking that contributed command from the Command Palette now results in a missing-command error, which breaks a visible user entry point for connecting to a device.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Lines 35 to 37 in 8838ad8
This commit exposes mpytools.openMicroPythonProject, mpytools.openInExplorer, and mpytools.saveAllDirty in contributes.commands, but there is no matching vscode.commands.registerCommand(...) for any of them in src at this revision. Invoking these entries from the Command Palette will throw a missing-command error, so users see visible actions that cannot run.
Lines 109 to 111 in 8838ad8
The file explorer context menu binds folder refresh to mpytoolsFileExplorer.refreshFolder, but src/fileManager.ts only registers mpytoolsFileExplorer.refresh and mpytoolsFileExplorer.refreshDevice. As a result, clicking “Refresh folder” on a device folder fails with a missing-command error and the advertised folder-level refresh path is broken.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Lines 35 to 47 in bc3255a
package.json now contributes mpytools.openMicroPythonProject, mpytools.openInExplorer, mpytools.saveAllDirty, and mpytoolsFileExplorer.refreshFolder, but none of these IDs are registered in the active extension code (src/extension.ts/src/fileManager.ts only register other command names). In this state, Command Palette entries and the folder context-menu action will raise VS Code “command not found” errors when invoked, so visible UI actions are broken for users.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a093fb5ceb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "types": [ | ||
| "node", | ||
| "vscode" |
There was a problem hiding this comment.
Restore mocha types in TypeScript config
Restricting compilerOptions.types to only node and vscode removes the Mocha global typings from the build, but test sources in this repo use global suite/test (for example src/test/extension.test.ts). Because npm run compile runs tsc -p ./, this change can make the default compile step fail with missing-name errors unless mocha is added back to types (or tests are excluded).
Useful? React with 👍 / 👎.
| await new Promise(resolve => setTimeout(resolve, 1500)); | ||
| mpyOutputChannel.appendLine('⚙️ Sending Ctrl-C to ensure REPL prompt is ready'); | ||
| debugTerminal.sendText('\x03', false); |
There was a problem hiding this comment.
Avoid sending Ctrl-C before REPL startup is confirmed
The new flow unconditionally sends \x03 after a fixed 1.5s delay, so on slower devices/ports this can interrupt the just-started mpremote connect ... repl process before the REPL is actually ready. In that case the subsequent import main; main.run() is no longer guaranteed to run in the device REPL, causing intermittent Compile&Run failures. This should wait for readiness (or avoid forced Ctrl-C) instead of using a fixed timer.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Line 47 in 9a97a98
mpytoolsFileExplorer.refreshFolder is contributed and exposed in the folder context menu, but registerFileManager only registers mpytoolsFileExplorer.refresh and mpytoolsFileExplorer.refreshDevice; there is no registerCommand('mpytoolsFileExplorer.refreshFolder', ...) in src/fileManager.ts (repo-wide rg over src). Selecting that menu action will therefore fail at runtime with a missing-command error instead of refreshing the folder.
Line 35 in 9a97a98
mpytools.openMicroPythonProject, mpytools.openInExplorer, and mpytools.saveAllDirty are still advertised in contributes.commands, but there are no matching registerCommand(...) handlers for these IDs anywhere under src (checked with rg). Invoking these Command Palette entries will produce missing-command errors, so users are presented with actions that cannot execute.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Line 35 in 343b4e4
This commit leaves several contributed commands without any registerCommand handler (mpytools.openMicroPythonProject, mpytools.openInExplorer, mpytools.saveAllDirty, and mpytoolsFileExplorer.refreshFolder), so they appear in the Command Palette/context menu but fail at runtime with a missing-command error. I checked the registrations in src/extension.ts, src/saveProject.ts, and src/fileManager.ts, and none of these IDs are implemented there.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed237b3866
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "preLaunchTask": "compile" | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
Restore valid JSONC structure in launch config
The edited launch.json has mismatched closing brackets/braces, so VS Code cannot parse this debug configuration. In practice, the “Run Extension” launch target becomes unavailable (or the file is ignored), which breaks the standard F5 extension-host workflow for contributors.
Useful? React with 👍 / 👎.
| fs.writeFileSync(tempPyFile, wrapperCode, 'utf-8'); | ||
|
|
||
| try { | ||
| await execPromise(`mpy-cross "${tempPyFile}" -o "${outPath}"`); |
There was a problem hiding this comment.
Compile asset wrappers with device bytecode flags
This new asset path invokes mpy-cross without the compatibility flags used for normal .py compilation (e.g., bytecode/arch/small-int settings), so generated *_asset.mpy files can be incompatible with the connected firmware. On devices whose MicroPython bytecode version differs from the host mpy-cross default, importing these wrapped assets will fail even though regular modules were compiled correctly.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 156f091877
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const withoutExt = ext ? relativeFromSrc.slice(0, -ext.length) : relativeFromSrc; | ||
| const assetRelative = `${withoutExt}.mpy`; |
There was a problem hiding this comment.
Preserve unique output names for wrapped non-Python assets
getAssetOutputPath drops the original extension before appending .mpy, so files like src/config.py and src/config.json both target mpy/config.mpy. During Compile&Run, whichever file is processed last overwrites the other output, which can either erase the compiled Python module or the wrapped asset and cause imports/runtime behavior to break on-device for projects that share a basename across .py and non-.py files.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ab7f11f10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else { | ||
| // Копіюємо файли, що не мають розширення .py | ||
| if (!fs.existsSync(outPath)) { | ||
| copyWithMkDir(filePath, outPath); | ||
| copiedNonPyCount++; | ||
| logAndScroll(` 🔹 Copied (new): ${shortName}`); | ||
| } else { | ||
| if (!areFilesIdentical(filePath, outPath)) { | ||
| copyWithMkDir(filePath, outPath); | ||
| copiedNonPyCount++; | ||
| logAndScroll(` 🔹 Replaced (updated): ${shortName}`); | ||
| } else { | ||
| logAndScroll(` 🔹 Skipped (identical ${extName}): ${shortName}`); | ||
| const outAssetPath = getAssetOutputPath(filePath, srcPath, mpyPath); | ||
| const shouldWrap = needsAssetRecompile(filePath, outAssetPath); | ||
|
|
||
| if (shouldWrap) { |
There was a problem hiding this comment.
Keep non-Python assets present in compiled deployments
In compile mode, every non-.py source now goes through the asset-wrapper path and no raw file copy path remains, so files like config.json, templates, binaries, and even prebuilt .mpy libraries are no longer deployed under their original on-device names. This breaks projects that access assets via open(...) or rely on third-party .mpy modules, because Compile&Run uploads only wrapper outputs instead of the original files.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33b31b992d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fs.mkdirSync(path.dirname(outPath), { recursive: true }); | ||
|
|
||
| const moduleBaseName = path.basename(filePath, path.extname(filePath)); | ||
| const constantName = moduleBaseName.toUpperCase().replace(/[^A-Z0-9]/g, '_') || 'ASSET'; |
There was a problem hiding this comment.
Prefix generated asset constant names for digit-leading files
The generated constantName can start with a digit because it is derived directly from the asset basename; for files like src/404.html, wrapper code emits identifiers such as 404 / 404_B64, which are invalid Python names and cause mpy-cross to fail for that asset. This breaks Compile&Run for projects that include non-Python files whose names begin with numbers, so the identifier needs a guaranteed leading letter/underscore.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd9c0966e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const workspaceRoot = path.dirname(srcPath); | ||
| return path.join(workspaceRoot, 'temp', wrapperRelativePath); |
There was a problem hiding this comment.
Generate wrappers outside the workspace temp folder
getAssetWrapperPyPath hardcodes generated wrapper output to ${workspaceRoot}/temp/..., and the compile flow writes there unconditionally, so projects that already use a temp/ tree can have real files silently overwritten during Compile&Run (for example temp/config.py). This introduces avoidable data loss/noisy diffs in user workspaces; wrapper files should be written to an extension-owned temp location instead of a fixed workspace path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Line 109 in 28168df
The context menu now contributes mpytoolsFileExplorer.refreshFolder for device-folder items, but there is no matching vscode.commands.registerCommand('mpytoolsFileExplorer.refreshFolder', ...) in the extension (only refresh and refreshDevice are registered in src/fileManager.ts). In this state, clicking Refresh folder on a device directory triggers a command-not-found error instead of reloading that node.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 343e666acc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (currentMethod !== 'none' || shouldWrapNonPy) { | ||
| copyPath = os.platform() === 'win32' ? `${mpyPath}\\.` : `${mpyPath}/.`; |
There was a problem hiding this comment.
Clear stale mpy outputs before no-compilation upload
When shouldWrapNonPy is enabled, uploads always use mpyPath (currentMethod !== 'none' || shouldWrapNonPy), including the No Compilation path. In that mode the code only updates changed files in mpy/ and never removes existing artifacts from earlier compiled runs, so stale/deleted .mpy modules are re-uploaded and can still be imported on-device. This makes switching from compiled mode to no-compilation mode run outdated code unless mpy/ is cleaned first.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 372ac45b5f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const withoutExt = ext ? relativeFromSrc.slice(0, -ext.length) : relativeFromSrc; | ||
| return path.join(mpyPath, `${withoutExt}.py`); |
There was a problem hiding this comment.
Keep wrapped asset outputs from clobbering .py modules
In the No Compilation + Wrap non-.py files path, getAssetPyOutputPath drops the source extension before appending .py, so src/config.py and src/config.json both target mpy/config.py. During the same run, the raw .py copy and the wrapped asset race to the same destination, so one file overwrites the other (or the wrapper is skipped if mtimes make it look unchanged), which can silently replace a real module with asset wrapper code and break imports/runtime behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d757b4d9e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const sourceStat = fs.statSync(sourceFilePath); | ||
| const outStat = fs.statSync(outputPath); | ||
| return sourceStat.mtime > outStat.mtime; |
There was a problem hiding this comment.
Rebuild non-.py outputs when timestamps are equal
The new needsFileCopy gate now relies only on sourceStat.mtime > outStat.mtime, so a changed source file is skipped whenever mtimes are equal (common on coarse 1-second timestamp filesystems) or the source timestamp is preserved during copy/checkout. In those cases Compile & Run uploads stale wrapped/raw asset files from mpy/, even though the source content changed. The previous logic compared file contents for non-.py copies, so this is a regression in deployment correctness.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3664ea9a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const activePortForSettings = getLastUsedPort(); | ||
| const savedPortForSettings = context.workspaceState.get<string>(compileSettingsPortKey); | ||
| const requiresSelectionForPort = savedPortForSettings !== activePortForSettings; | ||
| let currentMethod = context.workspaceState.get<string>(compileMethodSettingKey) ?? getSelectedMethod(); |
There was a problem hiding this comment.
Honor manual compilation method changes
currentMethod now prefers context.workspaceState over getSelectedMethod(), but the mpytools.selectCompilationMethod command (in src/extension.ts) only updates the in-memory selection and never updates workspaceState. After the first compile stores mpytools.compileMethod, using Settings → “Select Compilation Method” no longer affects later runs unless a port change forces re-selection, so users can unknowingly keep compiling with the old optimization mode.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Line 35 in 1dc4cca
The extension still contributes command IDs that have no registerCommand handler (mpytools.openMicroPythonProject, mpytools.openInExplorer, mpytools.saveAllDirty, and mpytoolsFileExplorer.refreshFolder), so invoking them from the Command Palette or folder context menu now throws a "command not found" error. I verified registrations in src/extension.ts, src/fileManager.ts, src/saveProject.ts, and src/compileAndRun.ts and none of these IDs are implemented.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7be354453
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Для режиму "No Compilation": просто підключаємося без відправки main.run() | ||
| debugTerminal.sendText(`mpremote connect ${finalPort} exec "import main" + repl`); | ||
| } | ||
| await openTerminalAndRunMain(finalPort, debugTerminal); |
There was a problem hiding this comment.
Keep No Compilation launch from requiring main.run()
Calling openTerminalAndRunMain unconditionally here now applies the main.run() sequence even when the user selected No Compilation. In this mode, projects that rely on import main side effects (and do not define run) will now fail with AttributeError after upload, whereas the previous No Compilation branch only imported main and opened REPL. Please keep a separate no-compilation launch path (or guard main.run() by mode) so this option continues to work for script-style main.py files.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Line 35 in a2b5b9d
package.json now contributes mpytools.openMicroPythonProject (and adjacent mpytools.openInExplorer / mpytools.saveAllDirty) to the Command Palette, but there is no matching vscode.commands.registerCommand(...) for these IDs in src (the activation path only registers commands like mpytools.saveProject, mpytools.installDependencies, mpytools.selectPort, etc.). Invoking these contributed commands will throw a missing-command error for users, so these entries should be wired up or removed.
Line 109 in a2b5b9d
The view context menu advertises mpytoolsFileExplorer.refreshFolder for folder items, but src/fileManager.ts registers only mpytoolsFileExplorer.refresh and mpytoolsFileExplorer.refreshDevice. As a result, clicking “Refresh folder” on a device folder triggers a missing-command failure instead of refreshing the subtree.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Line 35 in 0688491
package.json contributes mpytools.openMicroPythonProject, mpytools.openInExplorer, and mpytools.saveAllDirty, but this commit does not register handlers for those IDs anywhere in src (the registered IDs in extension.ts, saveProject.ts, and compileAndRun.ts are different). As a result, these commands appear in the Command Palette but fail with a missing-command error when invoked.
Line 47 in 0688491
The extension contributes mpytoolsFileExplorer.refreshFolder to both contributes.commands and the folder context menu, but registerFileManager only registers mpytoolsFileExplorer.refresh and mpytoolsFileExplorer.refreshDevice. Right-clicking a folder and choosing refresh therefore triggers a missing-command error instead of reloading that node.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Motivation
Description
src/sharedState.tsprovidingsetSelectedPortandgetSelectedPortand switch modules to use it instead of global variables.src/extension.tsto register the file manager, dependency/save/compile commands, add status bar items, improve device info fetching and change how the selected port is stored (now usessetSelectedPort).src/fileManager.tsto read the selected port via the shared state, normalize remote paths withgetRemoteFilePath, and show aSelect Porttree item when no port is chosen.package.jsonto rename views/containers/commands and update command titles/icons, and remove lingering merge conflict markers.Testing
npm run compileto build TypeScript and it completed successfully.npm run lint(ESLint) and it passed without errors.npm test(VS Code test harness) and the automated tests completed successfully.Codex Task