Skip to content

Fix moved local Flyde imports#271

Open
Catnap7 wants to merge 2 commits into
flydelabs:mainfrom
Catnap7:codex/fix-flyde-moved-imports
Open

Fix moved local Flyde imports#271
Catnap7 wants to merge 2 commits into
flydelabs:mainfrom
Catnap7:codex/fix-flyde-moved-imports

Conversation

@Catnap7
Copy link
Copy Markdown

@Catnap7 Catnap7 commented May 22, 2026

Summary

Fixes #112 by updating local .flyde file imports when VS Code reports a file or folder rename/move.

When an imported flow moves, the extension now scans workspace .flyde files, deserializes them, rewrites file-backed source.data paths (and legacy imports entries), and saves the updated flow with the new relative path.

/claim #112

Demo

The behavior is covered by the focused test cases in vscode/src/update-flyde-import-paths.test.ts:

  • imported flow file move: ./Child.flyde -> ../shared/Child.flyde
  • containing folder move: ./nested/Child.flyde -> ../shared/nested/Child.flyde
  • parent flow move: child imports stay pointed at their original files from the new parent location
  • package/custom sources are left untouched

Verification

  • npx --yes pnpm@10.12.4 --dir vscode run compile-tests
  • npx --yes pnpm@10.12.4 --dir vscode exec mocha out/update-flyde-import-paths.test.js --ui tdd --timeout 60000

@Catnap7
Copy link
Copy Markdown
Author

Catnap7 commented May 22, 2026

Quick CI note: Build, Test, Lint is currently waiting for maintainer approval on this first-time-contributor PR. The separate visual-tests.yml run appears to fail before running any project code with No event triggers defined in on, so I don't think that one is caused by this change.

The focused local verification from the PR body still passes:

  • npx --yes pnpm@10.12.4 --dir vscode run compile-tests
  • npx --yes pnpm@10.12.4 --dir vscode exec mocha out/update-flyde-import-paths.test.js --ui tdd --timeout 60000

@Catnap7 Catnap7 force-pushed the codex/fix-flyde-moved-imports branch from 1ace7ef to 69f4bb9 Compare May 22, 2026 18:34
@Catnap7
Copy link
Copy Markdown
Author

Catnap7 commented May 22, 2026

Follow-up: I also made the intentionally disabled visual regression workflow syntactically valid by adding a manual-only workflow_dispatch trigger. The automatic PR trigger remains commented out, but GitHub no longer reports the workflow file itself as invalid on this PR. The remaining Build, Test, Lint check is still waiting for first-time contributor approval.

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.

Broken imports after moving files

1 participant