Commit graph

673 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
Joe
8ede87e1cf Update dependencies and improve CLI argument handling
- Updated various dependencies in Cargo.toml and Cargo.lock, including `env_logger`, `fs-err`, and `clap`, to their latest versions for enhanced functionality and security.
- Refactored CLI argument handling in `build.rs` and `mod.rs` to align with the new `clap` version, improving error reporting and verbosity options.
- Added new packages such as `anstream`, `colorchoice`, and `jiff` to enhance project capabilities.
2026-01-30 05:22:39 -06:00
Joe
bda2af3dfb Use msgpack for API 2026-01-27 07:13:02 -06:00
Joe
a7f36fab5e Preserve and restore instigating source in Lua snapshot initialization
- Added logic to preserve the init script's instigating source before copying directory metadata, ensuring accurate file path references.
- Updated snapshot files to reflect the correct instigating source path for improved synchronization and consistency in tests.
2026-01-24 10:04:47 -06:00
Joe
b30aa8280d Implement sync source-only mode in ServeSession and ChangeBatcher
- Added support for a new sync mode in ServeSession that filters property changes to only include the Source property when the server indicates it is in source-only mode.
- Updated ChangeBatcher to handle the new syncSourceOnly parameter, ensuring that only relevant property changes are processed based on the server's capabilities.
- Enhanced API response to include sync_source_only flag, indicating the server's sync capabilities.
- Adjusted related functions to accommodate the new sync logic, improving data synchronization efficiency.
2026-01-24 05:24:08 -06:00
Joe
8650cdbd82 Update button layout order in ConfirmingPage and enhance error handling in change processor
- Changed the layout order of the reject button in the ConfirmingPage to improve UI consistency.
- Added error handling for file operations in the change processor, logging errors when file removal or writing fails, enhancing robustness and debuggability.
2026-01-24 05:12:46 -06:00
Joe
9692c843e7 Refactor JSON serialization for WebSocket responses
- Switched to using the compact JSON5 encoder for improved transport efficiency while preserving NaN/Infinity values in WebSocket subscription responses.
- Updated comments for clarity on the changes made to the serialization process.
2026-01-23 06:43:59 -06:00
Joe
7c6c4a0e85 Refactor path handling in sourcemap processing
- Canonicalized project directory once for consistent comparison, improving the logic for generating relative paths.
- Enhanced fallback mechanism for absolute paths when files are outside the project directory, increasing robustness in path management.
2026-01-23 04:36:30 -06:00
Joe
4a6fdaa02d Improve path handling in sourcemap processing
- Enhanced the logic for creating output file paths by attempting to generate relative paths from the project directory.
- Added a fallback to absolute paths for files outside the project directory, improving robustness in path management.
2026-01-22 23:05:39 -06:00
Joe
9abc0e4728 Switch from JSON5 to standard JSON for sourcemaps to ensure compatibility with external tools like LSPs 2026-01-22 22:50:57 -06:00
Joe
2b716351c1 Refactor JSON handling and improve code clarity
- Updated error messages in Http.jsonDecode for better context.
- Enhanced serialization error handling in CompactJson5Serializer.
- Reformatted struct definitions in tests for improved readability.
- Adjusted assertions in tests for better clarity and consistency.
- Refactored project file name checks for improved readability.
2026-01-22 22:22:03 -06:00
Joe
fdd1d145cf json5 work 2026-01-22 22:19:00 -06:00
Joe
cd63b5c9c0 json5 2026-01-22 21:27:34 -06:00
Joe
074e62951f revert unresolved value patches 2026-01-22 19:51:44 -06:00
Joe
fd47b8d3b1 Enhance UnresolvedValue handling for CFrame and OptionalCFrame variants
- Added checks to skip serialization for CFrames and OptionalCFrames with NaN values, improving data integrity during processing.
- Introduced a new helper function `cframe_is_nan` to centralize NaN checks for CFrame values, enhancing code clarity and maintainability.
- Updated the logic in `from_variant_unambiguous` to ensure that invalid CFrame values are not serialized, preventing potential errors in downstream processing.
2026-01-22 19:21:59 -06:00
Joe
bf1d872f13 Refactor AmbiguousValue handling for CFrame conversion
- Introduced a new method `array12_to_cframe` to streamline the conversion of Array12 values to CFrame, improving code clarity and reducing redundancy.
- Updated handling for both CFrame and OptionalCFrame variants to utilize the new conversion method, enhancing maintainability and consistency in value processing.
2026-01-21 16:13:46 -06:00
Joe
69774fd546 Update .gitmodules for rbx-dom URL and enhance UnresolvedValue handling
- Changed the rbx-dom submodule URL in .gitmodules from SSH to HTTPS for easier access.
- Introduced a new method to handle OptionalCFrame variants in UnresolvedValue, allowing for better serialization by returning `None` for `OptionalCFrame(None)`.
- Updated various files to utilize the new handling logic, ensuring properties are only inserted when resolved values are available.
2026-01-21 16:07:24 -06:00
Joe
4a09689090 Enhance WhitespaceUtil and Reconciler to handle duplicate names and improve diffing logic
- Updated WhitespaceUtil to return distinct values for totalDiff and whitespaceDiff when differences exceed 100 lines, based on content changes.
- Introduced findDuplicateNames function in Reconciler to identify and skip instances with duplicate names, ensuring reliable syncing.
- Enhanced diffing logic to account for ambiguous paths and log skipped duplicates during the sync process.
- Improved error handling in syncback_dir_no_meta to log and skip children with duplicate names in the file system.
2026-01-20 22:10:19 -06:00
Joe
196cf7aed7 Refactor reference handling in Rojo system to prioritize path-based attributes
- Updated attribute prefixes to use REF_PATH_ATTRIBUTE_PREFIX for path-based references.
- Enhanced PatchApplyContext and related functions to support path-based linking, falling back to ID-based references when necessary.
- Implemented cleanup for legacy attributes to ensure they do not persist in the live game.
- Improved error handling and logging for reference resolution processes.
2026-01-20 21:34:37 -06:00
Joe
3cf452cb7b Refactor property extension in finalize_patch_application for improved readability 2026-01-20 21:12:31 -06:00
Joe
a1e270949d Add support for external references in RojoTree and syncback process
- Introduced REF_EXTERNAL_ATTRIBUTE_PREFIX for attributes pointing to external instances.
- Enhanced PatchApplyContext to track external references and apply them during patch application.
- Implemented get_instance_by_path method in RojoTree for resolving paths to external instances.
- Updated collect_referents function to handle external references and preserve their paths during syncback.
- Refactored link_referents to include external reference handling in the linking process.
2026-01-20 21:05:28 -06:00