- Introduced a new plan to eliminate duplicated InstigatingSource branching logic by replacing it with a call to `tree.filesystem_name_for()`.
- This change simplifies the code, enhances maintainability, and ensures consistent behavior without altering function signatures or requiring additional tests.
- Replaced the manual derivation of filesystem names with a call to `tree.filesystem_name_for(current)`, simplifying the code and improving maintainability.
- This change enhances clarity by centralizing the logic for obtaining filesystem names, reducing redundancy in the function.
- Added a comment to clarify the importance of resolving `Rojo_Target_*` before `Rojo_Ref_*` to ensure proper overwriting of results for the same property.
- This change aims to enhance the maintainability and correctness of the patch application process in the `finalize_patch_application` function.
- Introduced a new audit plan for ChangeBatcher encoding refactors, detailing changes in `encodeService.lua` and `encodeInstance.lua`, including the addition of a new encoding service and modifications to duplicate handling.
- Documented findings related to code quality, test gaps, and documentation improvements, with specific tasks completed to enhance clarity and maintainability.
- Updated related test files to ensure comprehensive coverage of the new encoding logic and property handling.
These changes aim to improve the overall structure and documentation of the encoding process, ensuring better maintainability and understanding of the system.
- Updated `encodeInstance` and `encodeService` to utilize helper functions for encoding attributes and tags, improving code organization and readability.
- Changed duplicate handling to allow encoding of instances with duplicate-named siblings, with the server managing name collisions through a dedup suffix system.
- Added debug logging for duplicate detection to aid in diagnostics.
- Streamlined property encoding by implementing a helper function to iterate over encodable properties, enhancing maintainability and consistency.
These changes improve the clarity and efficiency of the encoding process while ensuring accurate handling of duplicate instances.
- Expanded the `luau-optimize` command documentation to include comprehensive strategies for achieving type accuracy in Luau scripts.
- Added sections on removing deoptimizers, annotating types, and avoiding `any` casts to improve code performance and maintainability.
- Emphasized the importance of accurate type annotations and provided best practices for handling type refinements and generics.
These updates aim to guide developers in optimizing their Luau code for better performance and type safety.
- Introduced a new command `/luau-optimize` to analyze and optimize Luau files using `luau-compile`, `luau-analyze`, and `luau-ast` tools.
- Created a detailed plan outlining the multi-phase optimization workflow, including scope resolution, configuration, and deep code analysis.
- Implemented user interaction for configuration settings to tailor optimization intensity and algorithmic changes based on user input.
These additions enhance the development experience for Roblox Luau scripts, ensuring improved performance, type safety, and code quality.
- Introduced a new endpoint `/api/syncback` for one-click full sync from Roblox Studio to the filesystem, eliminating the need for an active WebSocket connection.
- Implemented `SyncbackRequest` and `ServiceChunk` structures to handle service-level properties and child instances during syncback.
- Enhanced `encodeService` to include ObjectValue carriers for accurate reference handling and prevent data loss.
- Updated the syncback process to utilize Luau-style relative paths for reference attributes, improving path management and consistency.
- Integrated session caching in the matching algorithm to optimize performance during syncback operations.
These changes significantly improve the live syncback experience, ensuring reliable data synchronization and enhanced performance during development.
- Updated test cases in `json.rs` to reflect changes in float formatting, ensuring accurate representation of zero and small values.
- Adjusted assertions to validate the preservation of small float values instead of clamping them to zero, enhancing the accuracy of float serialization in JSON.
- Ensured consistency in expected outputs for negative float values and other edge cases.
These modifications improve the reliability of float formatting tests, aligning them with the latest changes in serialization logic.
- Increased the zero cutoff values for `f32` and `f64` in `json.rs` to enhance the precision of float formatting.
- Modified test cases to reflect changes in expected output for negative float values, ensuring consistency with the updated formatting logic.
These adjustments improve the accuracy of float serialization in JSON, addressing previous inconsistencies in test validations.
- Added `lexical-write-float` and its dependencies to `Cargo.toml` and `Cargo.lock` for improved float formatting capabilities.
- Enhanced float formatting functions in `json.rs` to utilize the new lexical library, ensuring more precise and consistent numeric representation.
- Updated tests to validate the new formatting behavior, including handling of small values and special cases.
These changes improve the accuracy and efficiency of float serialization in JSON, addressing previous inconsistencies and enhancing overall data integrity.
- Simplified the `isReadable` condition in `encodeService.lua` for better clarity.
- Updated float formatting functions in `json.rs` to enhance precision and consistency in numeric representation.
- Refactored handling of `AmbiguousValue` in `resolution.rs` to eliminate unnecessary type casting, improving data integrity.
- Cleaned up formatting in `serve.rs` and test files for better code readability.
These changes enhance the clarity and efficiency of the encoding and serialization processes, contributing to overall performance improvements.
- Introduced `trim_float`, `format_f32`, and `format_f64` functions to handle float formatting, ensuring consistent representation of numeric values.
- Updated the `serialize_f32` and `serialize_f64` methods in `CompactJson5Serializer` and `Json5ValueSerializer` to utilize the new formatting functions, enhancing output accuracy.
- Adjusted the handling of float values in `UnresolvedValue` to improve data consistency and precision during serialization.
- Added unit tests for the new formatting functions to validate their behavior and ensure correctness.
These changes enhance the precision of float serialization in JSON5, addressing previous inconsistencies and improving overall data integrity.
- Implemented ObjectValue carriers for service-level references, allowing for accurate serialization of non-direct child references during syncback.
- Updated `encodeService` to include explicit handling of attributes and tags, ensuring they are properly encoded and preventing data loss.
- Refactored `build_dom_from_chunks` to manage ObjectValue carriers and resolve references correctly, enhancing data integrity.
- Truncated float values to f32 precision in `UnresolvedValue::from_variant`, aligning with rbxl storage requirements and improving consistency.
These changes address critical issues in the live syncback process, enhancing reliability and data accuracy.
- Added explicit encoding for Workspace attributes and tags in `encodeService.lua` to prevent data loss during syncback.
- Filtered non-serializable properties, including `ClockTime`, in `build_dom_from_chunks` to ensure accurate data handling.
- Resolved a leak of `Rojo_Ref_CurrentCamera` by filtering deferred referents after camera destruction in `syncback_loop`.
- Truncated float values to f32 precision in `UnresolvedValue::from_variant` to match rbxl storage format, improving data consistency.
These changes enhance the reliability and accuracy of the live syncback process, addressing critical issues identified in previous implementations.
- Introduced `SerializationService` to serialize child instances during syncback, improving data handling.
- Updated `performSyncback` to include serialized children data in the syncback request.
- Refactored `ServiceChunk` structure to store child count instead of serialized data, optimizing memory usage.
- Adjusted related functions and tests to accommodate the new data structure, ensuring consistency and accuracy in syncback operations.
These changes significantly enhance the efficiency and clarity of the syncback process, allowing for better management of service data.
- Simplified the `isReadable` condition in `encodeService` for better readability.
- Updated the `ServiceChunk` structure to conditionally include properties and references only if they exist, enhancing data efficiency.
- Introduced a `MAX_SCORING_DEPTH` constant in the matching module to limit recursion depth, improving performance and preventing potential stack overflow issues.
- Refactored the `computePairCost` and `matchChildren` functions to incorporate the new depth parameter, ensuring accurate cost calculations during matching.
These changes enhance the clarity and efficiency of the encoding and matching processes, contributing to overall performance improvements.
- Removed the encoding of attributes and tags from the `encodeService` function, consolidating their inclusion into the properties map as `Variant::Attributes(...)` and `Variant::Tags(...)`.
- Updated the `ServiceChunk` struct to reflect these changes, ensuring a more efficient serialization process during syncback operations.
- Adjusted related tests to align with the new structure, enhancing overall data management and consistency in service encoding.
These modifications improve the clarity and performance of the service encoding process.
- Updated the `encodeService` function to return a more concise result object by conditionally including properties, attributes, tags, and references only if they are present.
- This change enhances the efficiency of the encoding process by reducing unnecessary data in the output, improving overall performance during syncback operations.
- Implemented live syncback via the Studio plugin, enabling Roblox to filesystem synchronization during `atlas serve` sessions.
- Added `SyncbackRequest` structure and API protocol validation for plugin-initiated syncback.
- Introduced `SyncbackConfirm` UI component for user confirmation of live syncback operations.
- Enhanced matching module with reference identity checks, caching, and valid children tracking.
- Updated deduplication logic to start suffix numbering at `~2` and improved attribute indexing in `RefPathIndex`.
- Refactored animation goal settings for instant transitions and updated color handling in the Reconciler.
These changes significantly enhance the syncback process and improve the overall performance and maintainability of the matching module.
- Introduced a new `encodeService` helper in the plugin to serialize service properties, attributes, tags, and references alongside children data.
- Updated the `performSyncback` function to utilize the new encoding method, ensuring all services are processed without child-only restrictions.
- Extended the `ServiceChunk` struct to include fields for properties, attributes, tags, and references, improving data handling during syncback.
- Modified the `build_dom_from_chunks` function to apply service properties and resolve references when reconstructing the service instances.
- Added comprehensive tests to validate the new service properties handling, ensuring accurate synchronization and data integrity.
These enhancements significantly improve the live syncback process, allowing for better service data management and consistency.
- Added 'Name' to the list of excluded property names in the rbx_dom_lua module to prevent unnecessary comparisons.
- Updated color handling in the diff stress tests to use Color3.fromRGB for better precision and clarity in color representation.
- Improved the hydrate function to initialize a new session if none is provided, enhancing session management during instance hydration.
- Refined the trueEquals function to handle NaN comparisons correctly, ensuring accurate equality checks for numeric values.
These changes improve the accuracy of property comparisons and enhance the overall functionality of the Reconciler module.
- Added a `validChildren` field to the `VCache` structure to track valid child instances during the matching process.
- Refactored the `cacheVirtual` function to improve readability by formatting parameters across multiple lines.
- Updated the `computePairCost` function to utilize the new `validChildren` field for more accurate cost calculations.
- Simplified the `matchChildren` function by removing redundant code and improving the handling of matched instances.
- Enhanced test cases for the `matchChildren` function to ensure consistent behavior and validate the new changes.
These updates improve the efficiency and clarity of the matching process, ensuring better performance and maintainability.
- Introduced a new `RefIdentity` type to store reference details (name and className) in the matching process.
- Updated `VCache` and `SCache` structures to include references, improving the handling of reference comparisons during matching.
- Modified `cacheVirtual` and `cacheStudio` functions to support reference caching, enhancing performance and accuracy in matching.
- Improved `countOwnDiffs` function to account for reference mismatches, ensuring more precise cost calculations.
- Added comprehensive tests to validate the new reference handling and caching mechanisms.
These changes significantly enhance the efficiency and accuracy of the matching process in the application.
- Changed the `luau-lsp.sourcemap.generatorCommand` from using `default.project.json` to `plugin.project.json` to align with the updated project structure.
This change ensures that the sourcemap generation process is correctly configured for the current project setup.
- Reformatted the `SYNCBACK_SERVICES` list for better readability by aligning entries vertically.
- Simplified the `performSyncback` function by removing unnecessary Promise wrapping, enhancing clarity and maintainability.
- Updated the `NotConnectedPage` component to improve the structure of button elements and their associated tooltips.
- Refactored the `hydrate` and `matching` modules to streamline function calls and improve code organization.
These changes enhance the overall readability and maintainability of the syncback process and related components.
- Changed the `protocol_version` and `place_id` fields in the `SyncbackRequest` struct from `u64` to `f64` to accommodate Luau's numeric representation.
- Updated the API's protocol version validation to compare the `syncback_request.protocol_version` as a `u64`, ensuring compatibility with the expected protocol version.
- Enhanced type handling for `place_id` to maintain consistency in the syncback process.
These changes improve the handling of numeric fields in syncback requests, aligning with the requirements of the Luau environment.
- Updated the `SyncbackConfirm` component to use `Theme.StudioProvider` for improved theming support.
- Introduced a `noTransparency` binding to manage button transparency, enhancing visual consistency.
- Adjusted the `Cancel` and `Confirm` buttons to utilize the new transparency binding, improving user experience during syncback confirmation.
These changes enhance the UI's responsiveness and maintainability of the syncback confirmation process.
- Introduced a new matching session caching mechanism in the Lua matching module to enhance performance with native code generation.
- Rewrote the Lua matching algorithm to utilize session-based caching, reducing redundant computations and improving efficiency.
- Updated Rust implementations to include session caching, ensuring consistency across both Lua and Rust.
- Enhanced the `hydrate` function to support session management during instance hydration.
- Added comprehensive tests to validate the new caching mechanism and its integration with existing functionality.
These changes significantly improve the performance and maintainability of the matching process in the application.
- Added a new `performSyncback` function in the `App` module to handle the synchronization of service data from the game to the server.
- Introduced a `SyncbackConfirm` UI component to confirm syncback actions from the user.
- Updated the API to include a new `/api/syncback` endpoint for handling syncback requests, validating protocol and server versions.
- Enhanced the `SyncbackSignal` mechanism to facilitate communication between the server and the syncback process.
- Added tests to ensure the functionality of the live syncback feature and its integration with the CLI.
These changes improve the overall synchronization capabilities of the application, allowing for real-time updates and better project management.
- Simplified function calls and removed unnecessary line breaks in `change_processor.rs`, `rojo_ref.rs`, `syncback/meta.rs`, `syncback/mod.rs`, `syncback/ref_properties.rs`, and `web/api.rs` to enhance code clarity.
- Updated test assertions in `two_way_sync.rs` for better readability by consolidating multiple lines into single assertions.
These changes improve the overall maintainability and readability of the codebase.
- Introduced a new migration plan for converting `Rojo_Ref_*` attribute paths to Luau require-by-string style, enhancing portability with relative paths.
- Updated existing test snapshots to reflect the new path formats, ensuring consistency across various scenarios.
- Enhanced the `compute_relative_ref_path` and `resolve_ref_path` functions to support the new path semantics, improving path resolution logic.
- Refactored related code in `change_processor`, `syncback`, and `snapshot` modules to accommodate the new reference path handling.
These changes improve the robustness and maintainability of reference path management in the project.
- Simplified test assertions in `fs_snapshot.rs` and `ref_properties.rs` for better readability by removing unnecessary line breaks.
- Enhanced the formatting of code in `rojo_ref.rs` to maintain consistency and improve clarity.
These changes improve the overall readability and maintainability of the test code and related implementations.
- Introduced tests to verify that the new approach for handling Rojo_Ref_* attributes uses unique placeholders, preventing path corruption from chaining substitutions.
- Added a test to document the old failure mode where duplicate-named instances would lead to corrupted paths due to sequential substitutions.
- Enhanced the `collect_referents` function to populate a mapping of placeholders to target references, ensuring accurate path resolution during syncback.
These changes improve the reliability of reference path handling and prevent future regressions related to path substitutions.
- Removed the `populate_initial_ref_path_index` method from `ChangeProcessor` and integrated its functionality into the `RefPathIndex` struct with a new `populate_from_dir` method.
- Updated the `ServeSession` to initialize `RefPathIndex` by populating it directly from the project root directory, ensuring pre-existing `Rojo_Ref_*` attributes are indexed correctly.
- This refactor enhances code organization and improves the efficiency of attribute indexing during session initialization.
- Replaced `Flipper.Spring` with `Flipper.Instant` for setting animation goals across multiple components, including `Page`, `Checkbox`, `Dropdown`, `IconButton`, `TextButton`, `TextInput`, `TouchRipple`, and `Notification`.
- This change simplifies the animation logic, providing immediate transitions without spring dynamics, enhancing performance and responsiveness.
These updates improve the user experience by ensuring quicker visual feedback during state changes.
- Introduced a new plan for compacting JSON5 arrays, allowing arrays with fewer than 12 non-compound elements to render inline.
- Updated the `write_to()` function in `src/json.rs` to implement this formatting rule, enhancing the output for specific JSON5 structures.
- Adjusted test snapshots to reflect the new inline formatting for arrays, ensuring consistency across various JSON5 examples.
These changes improve the readability and efficiency of JSON5 data representation, aligning with the new formatting rules.
- Changed the default value of `sync_unscriptable` in `SyncbackRules` from `true` to `false` to better reflect intended behavior.
- Adjusted the property filter logic to align with the updated default, ensuring consistent handling of unscriptable properties.
These changes improve the clarity and functionality of the syncback feature, enhancing its overall reliability.
- Removed the `luau` dependency from `rokit.toml`.
- Updated deduplication logic to append `~2`, `~3`, etc. instead of `~1`, `~2` for naming collisions in various files, ensuring consistent suffix management.
- Adjusted comments and documentation across multiple files to reflect the new suffix handling rules.
- Added new test cases to validate the updated deduplication behavior, ensuring accurate naming for instances with collisions.
These changes enhance the clarity and functionality of the deduplication process, improving overall consistency in naming conventions.
- Introduced a new field, `stage_paths`, to the `PatchSet` struct in `patch_compute.rs` to track filesystem paths for staging.
- Updated test cases to initialize `stage_paths` alongside other fields, ensuring consistency in patch set creation.
These changes enhance the testing framework by providing additional context for staged paths in patch sets.
- Introduced 20 new batch script files (BatchScript01.luau to BatchScript20.luau) for testing purposes.
- Enhanced the `change_processor` to consolidate git staging operations, reducing the risk of index.lock races by batching paths for staging.
- Updated the `PatchSet` struct to include a new field for pre-resolved filesystem paths to stage via git add.
- Modified the API to handle batch staging more efficiently, ensuring all files are staged correctly in mixed write scenarios.
These changes improve the testing framework and optimize git integration for batch operations.
- Updated the `compute_git_metadata` function to include canonical path resolution for changed files, improving the accuracy of ID retrieval from the tree.
- Implemented logic to check both the original and canonical paths for file IDs, ensuring comprehensive coverage of file changes.
These changes enhance the robustness of git metadata handling, ensuring more reliable synchronization behavior.
- Simplified multi-line function calls in `PatchTree.lua` and `SHA1.luau` for better clarity.
- Enhanced the `init.lua` file by formatting the `PatchTree.build` function call across multiple lines.
- Updated `change_processor.rs` and `api.rs` to improve the formatting of function calls and enhance code consistency.
- Made minor adjustments in test files to streamline assertions and improve readability.
These changes contribute to a cleaner codebase and enhance overall maintainability.
- Updated the audit documentation to clarify the handling of Ref properties, specifying the distinction between path-based and legacy ID-based attributes.
- Improved descriptions in the snapshot middleware and change batching sections to reflect recent changes in method locations and functionality.
- Added details on the new matching algorithm for forward sync, including scoring constants and its impact on instance pairing.
These changes improve the clarity of the documentation and ensure it accurately reflects the current implementation of syncback and snapshot processes.
- Renamed the `rejectWrongProtocolVersion` function to `rejectWrongVersion` for clarity.
- Enhanced version mismatch handling by providing detailed error messages when the plugin and server versions do not match.
- Updated the expected server version format in the configuration to include the patch version, ensuring accurate version checks.
These changes improve error reporting and version management in the plugin's API context.
- Introduced new tests for git-based sync direction defaults, verifying the presence of git metadata and correct mappings of changed files to instance references.
- Enhanced the `compute_git_metadata` function to include canonical paths for repository roots.
- Added multiple test cases to ensure accurate behavior of `changedIds` and `scriptCommittedHashes` based on git status.
- Created a new project structure for testing, including various script and model files to facilitate comprehensive testing of git integration.
These changes improve the robustness of the git synchronization features and ensure reliable behavior in various scenarios.
- Updated `clap` and `unicode-ident` versions in `Cargo.lock` and `Cargo.toml`.
- Added `sha1` crate to `Cargo.toml` for SHA1 hashing functionality.
- Introduced a new `git.rs` module for handling git operations, including changed files and SHA1 computation.
- Enhanced the sync confirmation dialog to auto-select defaults based on git status, improving user experience during two-way sync.
- Updated `PatchTree` to utilize git metadata for determining default selections during patch application.
These changes enhance the integration with git, providing smarter defaults and improving the overall sync process.