Skip to content

Keep Flyde imports working after file moves#260

Open
nexiumbiz-debug wants to merge 1 commit into
flydelabs:mainfrom
nexiumbiz-debug:codex/fix-moved-flow-imports
Open

Keep Flyde imports working after file moves#260
nexiumbiz-debug wants to merge 1 commit into
flydelabs:mainfrom
nexiumbiz-debug:codex/fix-moved-flow-imports

Conversation

@nexiumbiz-debug
Copy link
Copy Markdown

@nexiumbiz-debug nexiumbiz-debug commented May 9, 2026

/claim #112

Summary

  • Register a VS Code onDidRenameFiles handler for Flyde projects.
  • Rewrite local source.type: file references in .flyde files when an imported .flyde, .flyde.ts, or .flyde.js file moves.
  • Handle both single-file moves and folder moves, including nested inline visual nodes.
  • Add focused regression coverage for file and folder move path updates.

Demo

Before the fix, a flow that imported ./components/child.flyde would keep that stale path after the imported file was moved, so the import stopped resolving.

After the fix, the VS Code rename handler updates the importing .flyde file during the move. The focused regression covers this scenario:

flows/main.flyde imports ./components/child.flyde
rename ./components/child.flyde -> ./shared/child.flyde
main.flyde source path is rewritten to ./shared/child.flyde

The same path-rewrite logic also covers folder moves, including nested inline visual nodes.

Verification

  • corepack pnpm --filter flyde-vscode compile
  • ./vscode/node_modules/.bin/mocha.CMD --ui tdd ./vscode/out/test/flyde-file-renames.test.js
  • git diff --check

Transparency note: implementation prepared with AI-assisted coding and verified with the commands above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant