Commit graph

1939 commits

Author SHA1 Message Date
Joe
2e6f909a71 Fix syncback process to handle directory paths and class transitions in clean mode
- Resolved an issue where syncback failed for projects with `$path` pointing to single files by ensuring only directory paths are scanned for orphans.
- Implemented a function to create missing directories in clean mode, allowing restoration of deleted directories.
- Enhanced class transition handling in clean mode to allow recoverable transitions between Folder and Script types.
- Updated logging and error handling to improve clarity during the syncback process.
2026-02-01 19:27:53 -06:00
Joe
fe1ac1dd95 Fix bugs in syncback process and enhance error handling
- Resolved issues with nested orphan file removal, ensuring that both top-level and nested orphan files are correctly handled.
- Improved directory removal logic to gracefully handle cases where directories may have already been removed, preventing crashes.
- Enhanced the path scanning algorithm to accurately collect all source directories defined in the project, addressing missing paths in the syncback process.
- Updated logging to provide clearer debug information during directory scanning and error handling in the syncback operations.
2026-02-01 19:14:12 -06:00
Joe
4a66eff938 Add comprehensive syncback roundtrip and clean mode stress tests
- Completed the implementation of roundtrip tests to validate the syncback process, ensuring that building a project, syncing back, and rebuilding produces semantically identical outputs.
- Created a new utility module for roundtrip testing, including functions for running builds and asserting directory equality.
- Developed clean mode stress tests to verify that syncing back to a dirty directory yields identical results to syncing back to a fresh directory, covering various mutation scenarios.
- Updated existing test modules to incorporate new test cases and ensure consistency in handling standalone scripts transitioning to directory format when children are added.
2026-02-01 19:01:42 -06:00
Joe
17d250f26a Add comprehensive Lua plugin stress testing plan
- Introduced a new testing plan for comprehensive Lua plugin stress tests, covering edge cases, large-scale scenarios, and abuse testing.
- Detailed todos for creating various test modules, including diff, apply, reify, property handling, encoding, and integration tests.
- Emphasized the importance of testing for concurrent workflows and error recovery in the plugin architecture.
2026-02-01 18:43:45 -06:00
Joe
b95b28179f Update LocalScript references in syncback format transition tests
- Changed references from `init.client.luau` to `init.local.luau` in the test for directory LocalScript to accurately reflect the script type being tested.
- Updated assertions to match the new file naming convention, ensuring consistency in the test's expectations for standalone files.
2026-02-01 18:35:22 -06:00
Joe
c08f701f0e Add syncback roundtrip and clean mode stress tests
- Introduced a new testing plan for comprehensive build-syncback roundtrip tests and mutation stress tests to ensure clean mode produces consistent results.
- Created utility functions for running builds and syncbacks, and for asserting directory equality.
- Updated existing tests to reflect changes in behavior when standalone scripts receive children, ensuring they convert to directory format.
- Added new test cases to validate the conversion of standalone scripts and modules when children are added, enhancing coverage of syncback functionality.
2026-02-01 18:34:02 -06:00
Joe
0eb135ee15 Enhance service visibility configuration in snapshot tests
- Added `ignoreHiddenServices: true` and a comprehensive list of `visibleServices` to multiple snapshot test files to improve service visibility management during testing.
- Refactored logging in the `diff.lua` file to streamline the trace output for hidden services, enhancing clarity in the sync process.
2026-02-01 18:28:31 -06:00
Joe
b368eb2401 Add CI pipeline documentation and enhance syncback architecture
- Introduced a new CI pipeline documentation file outlining steps for auto-fixing formatting, running linters, building, and testing.
- Documented the Rojo syncback architecture, detailing improvements to prevent duplicate file creation and format mismatches.
- Updated syncback logic to ensure existing instances are updated instead of creating duplicates, enhancing project file management.
- Added tests for encoding instances and handling nested children to improve reliability in syncback operations.
2026-02-01 18:18:31 -06:00
Joe
edc09741bf Update plugin references from Rojo to Atlas
- Changed all instances of "Rojo" to "Atlas" in error messages, UI titles, and connection actions for consistent branding.
- Updated the sound player widget and patch history recording to reflect the new name.
- Enhanced logging in the hydration process to provide better diagnostics for missing virtual instances.
2026-02-01 11:57:00 -06:00
Joe
9ab1369444 Update asset IDs and improve header component styling
- Changed asset IDs for the logo and plugin button to new values for updated branding.
- Updated the header component to use a fixed white color for the logo and adjusted its size for better visibility.
- Modified the fullscreen notification component to reflect the same logo styling changes.
- Updated the brand color in the theme for a consistent visual identity.
2026-02-01 11:51:49 -06:00
Joe
60518c2ad6 Update asset IDs for logo and plugin button in Assets.lua
- Changed the asset ID for the logo to a new value for updated branding.
- Updated the plugin button asset ID to reflect the latest design changes.
2026-02-01 11:21:01 -06:00
Joe
5197ca720d Refactor comment formatting in DomLabel component
- Cleaned up comment formatting in the DomLabel component for improved readability and consistency.
- Ensured that the button remains active for input events, maintaining user interaction functionality.
2026-02-01 10:52:45 -06:00
Joe
9f8ff3b57e Implement path canonicalization for non-existent files in syncback loop
- Added a helper function to canonicalize paths that may not exist, ensuring accurate path resolution by falling back to the nearest existing ancestor.
- Updated the handling of added paths in the syncback loop to utilize the new canonicalization logic, improving consistency in path comparisons.
2026-02-01 10:50:42 -06:00
Joe
df70dc1ff4 Refactor transparency logic and improve button interaction in PatchVisualizer
- Simplified transparency handling in the SelectionOption component to enhance hover effects for parent-only and normal nodes.
- Updated the DomLabel component to ensure the button is active for input events, improving user interaction.
- Cleaned up comments for clarity and maintainability.
2026-02-01 10:42:02 -06:00
Joe
b2ce199a37 Update dependencies and improve build script
- Updated `embed-resource` version in `Cargo.toml` and `Cargo.lock` to 3.0.6 for enhanced functionality.
- Upgraded several dependencies including `dirs`, `dirs-sys`, `float-cmp`, and `hashbrown` to their latest versions for better performance and security.
- Modified the build script to handle resource compilation more gracefully by using `embed_resource::NONE`.
2026-02-01 10:24:47 -06:00
Joe
e342f00306 Enhance syncback logic to preserve nested project files
- Updated the syncback loop to skip removal of nested project files, ensuring project structure is maintained.
- Added logging to indicate when nested project files are being skipped during the syncback process.
2026-02-01 10:13:24 -06:00
Joe
a8752b6b8d Refactor DomLabel and SelectionOption components for improved readability
- Simplified conditional logic for caret visibility in the SelectionOption component.
- Enhanced the rendering logic in the ConfirmingPage to improve clarity and maintainability.
- Updated the Abort button rendering to use a more concise syntax for conditional display.
2026-02-01 10:10:38 -06:00
Joe
af65056c44 Update default settings and enhance ConfirmingPage logic
- Changed default settings to enable two-way and one-shot sync, disable notifications and sync fallback, and adjust confirmation behavior.
- Improved ConfirmingPage to conditionally display the Abort button and update the Accept button text based on the presence of changes in the patch tree.
- Updated logging level in SyncbackStats to warn for better visibility on debug logging hints.
2026-02-01 10:06:34 -06:00
Joe
01e20f521a Refactor logging in syncback command to use log crate
- Replaced `eprintln!` statements with `log::info!` for consistent logging throughout the `syncback` command.
- Enhanced logging for download operations, syncback initiation, and sourcemap generation to improve traceability.
- Updated git index refresh logging to provide clearer feedback on success or failure.
- Ensured that debug logs are used appropriately for non-git repository scenarios.
2026-02-01 09:58:13 -06:00
Joe
6ed96f1f7e Enhance SelectionOption component with hover state and caret visibility logic
- Refactored the `SelectionOption` to be a Roact component that tracks hover state.
- Added logic to determine caret visibility based on node properties (parent-only, has children, and selection state).
- Updated background and text transparency based on hover state for improved UX.
- Adjusted event handling for mouse enter, mouse leave, and click actions to accommodate new behavior.
- Modified `SelectionRadio` to pass necessary props to `SelectionOption` for consistent behavior.
2026-02-01 09:51:48 -06:00
Joe
2b2ada219e Implement auto-download feature for syncback command
- Enhanced the `syncback` command to automatically download Roblox place files from the asset delivery API, allowing for zero-argument usage.
- Updated `Cargo.toml` to include compression features for `reqwest` and moved `tempfile` to dependencies.
- Introduced a new `download` argument in `SyncbackCommand` to specify place IDs for downloading.
- Implemented logic to resolve input file paths, prioritizing downloads when necessary.
- Added sourcemap generation after successful syncback and refreshed the git index if in a repository.
- Updated tests to validate the new download functionality and sourcemap creation.
2026-02-01 09:46:34 -06:00
Joe
8fe908740f Add statistics tracking for syncback operations
- Introduced a new `SyncbackStats` module to track and report issues during syncback, including duplicate names, unknown classes, and properties.
- Updated the `syncback_loop` and related functions to utilize the stats tracker, logging summaries of issues encountered.
- Enhanced property filtering and instance syncing to record statistics on unknown classes and properties.
- Modified tests to ensure consistent output by normalizing temporary paths in snapshots.
- Added `regex` dependency for path normalization in tests.
2026-02-01 08:29:00 -06:00
Joe
58399bb863 Implement incremental syncback mode to preserve existing file structure
- Added an `incremental` flag to the `SyncbackCommand` to allow for preserving existing file structure and middleware formats during syncback operations.
- Enhanced the `syncback_loop` function to differentiate between clean mode and incremental mode, ensuring orphaned files are removed only in clean mode.
- Updated logging to reflect the mode of operation during syncback.
- Introduced new tests to validate the behavior of clean mode versus incremental mode, ensuring proper handling of orphaned files and preservation of existing structures.
2026-02-01 08:14:20 -06:00
Joe
0e5e809894 UX update 2026-02-01 07:58:06 -06:00
Joe
3e6a50ce4b syncback 2026-01-31 13:22:29 -06:00
Joe
5f91a0777a Implement new oneshot Vfs for CLI commands and enhance JSON5 serialization
- Added `new_oneshot` method to the Vfs struct, providing a backend suitable for one-time operations without file watching.
- Updated CLI commands (`fmt_project` and `syncback`) to utilize the new oneshot Vfs, improving error handling during file operations.
- Enhanced JSON5 serialization by introducing a custom serializer that directly builds a tree structure, improving performance and maintaining sorted keys.
- Improved error logging in JSON serialization to provide more context on failures.
2026-01-31 13:06:37 -06:00
Joe
fca802a4e5 update 2026-01-31 12:08:06 -06:00
Joe
ebbc15c676 Update dependencies in Cargo.lock and Cargo.toml
- Bump versions of several packages: `insta` to 1.46.2, `portable-atomic` to 1.13.1, `portable-atomic-util` to 0.2.5, `slab` to 0.4.12, `zerocopy` to 0.8.37, `zerocopy-derive` to 0.8.37, and `zmij` to 1.0.18.
- Update checksums for the modified packages to ensure integrity and compatibility.
2026-01-31 12:06:51 -06:00
Joe
6dc8f219bd Enhance logging for syncback operations and patch applications
- Added detailed logging for syncback operations, including additions, removals, and updates, to improve traceability and debugging.
- Implemented summary logs for patch applications in both the client and server, capturing the number of changes made.
- Enhanced logging in the ChangeBatcher and ApiService to provide insights into property changes and instance updates during syncback processes.
- Improved error handling and logging for VFS events to ensure better visibility of file operations.
2026-01-31 12:06:27 -06:00
Joe
d3d914e660 Enhance path encoding logic and add comprehensive tests
- Updated the `encode_path_name` function to handle cases of leading, trailing, and entirely empty strings, ensuring correct encoding of spaces.
- Introduced new tests for single space, multiple spaces, and empty string scenarios to validate encoding and decoding behavior.
2026-01-31 11:53:44 -06:00
Joe
9dd2fd159e Refactor property filter imports and improve log formatting in ApiService
- Adjusted the import order for property filter functions for consistency.
- Enhanced log formatting in the syncback logic to improve readability and maintainability.
- Reformatted code for better alignment and clarity in various sections of the ApiService implementation.
2026-01-30 13:19:32 -06:00
Joe
dccd3a691a Enhance property encoding and class descriptor retrieval in rbx_dom_lua
- Introduced a new function, `findClassDescriptor`, to retrieve class properties and metadata, including inherited properties, from the database.
- Updated `encodeInstance` to include encoding for Tags alongside Attributes, ensuring comprehensive property serialization.
- Improved property filtering logic to skip non-serializable properties and those matching default values, aligning with syncback behavior.
- Enhanced comments for clarity on property handling and encoding processes.
2026-01-30 13:18:20 -06:00
Joe
c0d089f0aa Enhance script property encoding in encodeInstance.lua
- Updated the encodeInstance function to include additional script properties (Disabled, LinkedSource, etc.) for encoding into the .meta.json5 file.
- Improved handling of properties by skipping those that are already managed or should be ignored, ensuring only serializable properties are encoded.
- Clarified comments to indicate the necessity of encoding the Source property.
2026-01-30 12:55:53 -06:00
Joe
439eb3f5f8 Enhance syncback logic for removed instances in ApiService
- Implemented functionality to delete files from the filesystem when instances are removed in Studio but exist in Rojo, ensuring proper synchronization.
- Added error handling for cases where the instance's filesystem path may not exist due to parent directory deletions.
- Introduced a new method, `syncback_removed_instance`, to encapsulate the logic for handling the removal of instances and their associated metadata files.
- Updated tests to verify the correct behavior of the new removal logic.
2026-01-30 12:52:36 -06:00
Joe
8c6aa36027 Enhance error handling in TestServeSession for interrupted reads
- Updated the error handling logic in the TestServeSession implementation to account for `std::io::ErrorKind::Interrupted`, ensuring that the session can properly retry on interrupted read operations, in addition to handling timeouts and would-block scenarios.
2026-01-30 11:40:01 -06:00
Joe
a98d5c6cce Enhance PatchSet data model update handling and update default project path in CLI
- Improved the `removeDataModelName` function in PatchSet to remove names from both `changedName` and `changedProperties`, ensuring more robust update management.
- Updated the default project path in the ServeCommand struct to `default.project.json5` for clearer project serving expectations.
2026-01-30 11:35:49 -06:00
Joe
77088eccd8 Implement DataModel name change removal in PatchSet and adjust session handling in App
- Added a new function to PatchSet to remove the DataModel name change from updates, preventing unwanted synchronization of the project name.
- Updated the App:startSession method to conditionally skip session lock acquisition and release based on one-shot mode settings.
- Enhanced the confirmation callback to utilize the new PatchSet function for filtering DataModel name changes from patches.
2026-01-30 11:26:40 -06:00
Joe
240c225be0 Refactor PullAll button logic in Confirming.lua for improved readability
- Removed conditional rendering of the PullAll button based on settings and simplified its implementation.
- Enhanced the overall structure of the button definition for better clarity in the ConfirmingPage render function.
2026-01-30 11:18:00 -06:00
Joe
0b243b4ca9 Add CSV input files and enhance syncback warning logic
- Introduced a new CSV input file with translation data for Spanish.
- Updated the `init.csv` file to include a new entry for "Rojo" with its context and example.
- Enhanced the syncback logic to conditionally emit warnings for duplicate child names based on the new `warn_duplicate_names` configuration in `SyncbackRules`.
- Added documentation for the new warning behavior in the `SyncbackRules` and `SyncbackSnapshot` implementations.
2026-01-30 10:42:38 -06:00
Joe
18a74c8e4d Enhance script handling and UI consistency
- Added support for encoding the RunContext property in the Script class to determine file suffixes (.server.luau, .client.luau, .plugin.luau, .legacy.luau).
- Updated the Confirming.lua file to improve UI consistency in the confirmation message display.
- Modified snapshot middleware and syncback logic to accommodate new file extensions and ensure proper handling of plugin scripts.
- Refactored tests to align with the new naming conventions for script suffixes and improved path uniqueness checks.
2026-01-30 10:31:36 -06:00
Joe
38cbc582f4 Update default behavior of ignore_hidden_services in SyncbackRules
- Changed the default value of the `ignore_hidden_services` option from `false` to `true` to ensure that only visible services are synced back by default.
- Updated related documentation and comments to reflect the new default behavior and clarify the filtering logic in the syncback loop.
2026-01-30 10:18:45 -06:00
Joe
9b412d28ae Add support for filtering hidden services in syncback
- Introduced a new configuration option `ignore_hidden_services` in `SyncbackRules` to allow filtering of internal services during syncback.
- Added a constant `VISIBLE_SERVICES` to define which services are considered visible and should be included when the filtering option is enabled.
- Implemented the `strip_hidden_services` function to remove non-visible services from the syncback process.
- Updated the syncback loop to apply the filtering logic based on the new configuration option.
- Enhanced path uniqueness checks by pre-computing duplicate sibling information for improved performance in the syncback process.
2026-01-30 10:15:21 -06:00
Joe
5a85c5145c Refactor project configuration to use .json format
- Replaced the legacy .json5 project file with a new .json format for `plugin.project.json`.
- Updated `build.rs` to prioritize the new .json format while maintaining backward compatibility with .json5.
- Made adjustments to the Confirming.lua file to enhance UI consistency.
- Improved metadata handling in snapshot middleware to support both modern and legacy file extensions.
2026-01-30 10:06:32 -06:00
Joe
5f059dbc16 Add back legacy support for .json and .lua 2026-01-30 09:38:43 -06:00
Joe
4aac7d0d48 Update snapshot files to reflect changes in module structure and properties
- Changed various instances from Folder to ModuleScript in snapshot files to align with updated project structure.
- Added new ModuleScript instances with appropriate properties in multiple test snapshots, enhancing test coverage for module handling.
- Updated project names in syncback snapshots to ensure consistency with the new structure.
2026-01-30 09:28:22 -06:00
Joe
f08a4d21e7 Update file extensions from .lua to .luau and adjust README for glob ignore tests
- Changed return statements in `init.client.lua` and `init.lua` files to reflect the new .luau extension.
- Updated README in `ignore_glob_spec` to specify that glob ignores now work with .spec.luau files instead of .spec.lua.
- Modified various test files to transition from .json to .json5 format, ensuring consistency across project configurations.
2026-01-30 09:19:35 -06:00
Joe
84f76d48fc Add project configuration and test files in JSON5 format
- Introduced new configuration files for testing, including `default.project.json5`, `client_in_folder`, and others.
- Updated existing project files to use JSON5 format, ensuring consistency across configurations.
- Added new Lua scripts and model files to support various test cases.
- Adjusted snapshot files to align with the new project structure and properties.
2026-01-30 09:16:46 -06:00
Joe
779e3de0ae Update project configuration and snapshot files
- Changed the default project file from `plugin.project.json` to `plugin.project.json5` in `build.rs`.
- Added new project configuration files in JSON5 format for various test cases, including `default.project.json5`, `client_in_folder`, `csv_bug_145`, and others.
- Updated snapshot files to reflect changes in instance structure and properties, ensuring consistency with the new project configurations.
- Removed unnecessary script and module instances from snapshot files to streamline the testing process.
2026-01-30 08:32:42 -06:00
Joe
d3cc11659a RunContext refactor + sync updates 2026-01-30 08:12:04 -06:00
Joe
c7cddb72c2 Update syncback feature to handle instance pulling from Studio
- Updated the `ServeSession` to implement logic for pulling instances that exist in Studio but not in Rojo's filesystem, creating appropriate files during sync confirmation.
- Introduced a new `encodeInstance` function to serialize Studio instances for transmission, supporting all instance types.
- Modified the `PatchTree` to allow explicit user selection for push/pull/skip actions, enhancing user control during sync operations.
- Added tests for the new encoding functionality and updated existing tests to ensure proper behavior with the new syncback logic.
2026-01-30 07:18:10 -06:00