Sync standalone Custom Code Files (ENG-12383)#24
Merged
sbis04 merged 2 commits intoJun 24, 2026
Conversation
The extension only tracked custom functions/actions/widgets via the three
barrel files, so standalone Custom Code Files (generated flat under
lib/custom_code/<name>.dart) classified as OTHER and were never pushed.
Add a CODE_FILE ('C') type that classifies any *.dart directly under
lib/custom_code/ (excluding the actions/widgets/functions subfolders and
index.dart) and scan that directory non-recursively when building the
manifest. A code file's identifier is its basename including .dart, matching
the server's FFCustomCodeFile.identifier.name. Renames of code files are
blocked like other custom code, and they are tracked (no "won't sync" warning)
and pushed by basename via the existing wire file map.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LmtfBu7w6GTyDUa2j2gKWR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes ENG-12383
Companion extension PR: FlutterFlow/flutterflow#7516.
Custom Code Files (FF's standalone
.dartfiles atlib/custom_code/<name>.dart) couldn't be synced from the extension — only functions/actions/widgets. The extension had no concept of them:CodeTypewas A/W/F/D/O only, and the manifest was built solely from the three barrels, so a code file classified asOTHER→ not tracked → not pushed.Changes
CodeType.CODE_FILE = 'C'.buildCustomCodeManifestalso scanslib/custom_code/(non-recursive) for top-level*.dartfiles (excludingindex.dart), registering each as a code file withidentifierName= basename incl..dart.classifyRelativePath: a path exactlylib/custom_code/<name>.dart(no deeper segment, notindex.dart) → CODE_FILE; theactions//widgets//functions/subdirs are unaffected.'C', basename (incl..dart) as both the zip entry and fileMap key; the server matchesFFCustomCodeFile.identifier.name.Verified empirically (dev project
customcodetest-zh0bi3): code files are always flat atlib/custom_code/<name>.dartin both legacy and folder-organized projects (panel folder is display-only), so path-based discovery is correct in both modes.Tests: jest 36/36, mocha 29 passing, tsc + eslint clean. New fixtures + classify/manifest/edit-tracked/rename-blocked tests.
'C'entry (falls into the custom-function branch).