Commit graph

2031 commits

Author SHA1 Message Date
Joe
56e1ab4a06 Remove unused methods from ServeSession and clean up syncback logic
- Deleted the `project_port` and `serve_address` methods from the `ServeSession` implementation as they were no longer needed.
- Removed the `scan_directory` and `normalize_existing_path` helper functions from the `syncback_loop_with_stats` function, streamlining the code and improving maintainability.

These changes aim to enhance code clarity and reduce unnecessary complexity in the session and syncback functionalities.
2026-02-19 03:48:17 -06:00
Joe
5fab0d573f Refactor ServeCommand and enhance placeholder replacement in syncback
- Updated the `ServeCommand` to load the initial project directly, improving clarity and reducing unnecessary session handling.
- Introduced a new `replace_placeholders` function in `FsSnapshot` to efficiently replace `__ROJO_REF_<hex>__` placeholders using a HashMap, optimizing the substitution process.
- Enhanced the syncback logic to handle both `__ROJO_REF_` and `Rojo_Ref_` markers, ensuring comprehensive path replacements during the syncback process.

These changes aim to improve the performance and maintainability of the serve and syncback functionalities.
2026-02-19 03:32:20 -06:00
Joe
3ccaaa63db Enhance PrefetchCache and improve directory handling in VFS
- Added a `children` field to the `PrefetchCache` structure to store sorted child paths for directories, optimizing directory read operations.
- Updated the `read_dir` method in `VfsInner` to utilize the new `children` cache, improving performance by reducing backend calls for cached directories.
- Refactored the `prefetch_project_files` function to populate the `children` map during prefetching, enhancing the efficiency of path collection.
- Adjusted tests to accommodate the new `children` field in `PrefetchCache`, ensuring comprehensive coverage of the updated functionality.

These changes aim to improve the performance and reliability of the VFS by refining the prefetching mechanism and enhancing directory handling.
2026-02-19 02:39:23 -06:00
Joe
5a943c33ea Refactor prefetch_project_files function for improved readability
- Simplified the iteration over directory entries in the `prefetch_project_files` function by using `into_iter().flatten()` instead of a nested loop.
- This change enhances code clarity while maintaining the existing functionality of collecting valid directory entries.

These modifications aim to streamline the code and improve maintainability in the prefetching process.
2026-02-19 02:27:36 -06:00
Joe
0462b91a6c Enhance PrefetchCache functionality and improve project file prefetching
- Updated the `PrefetchCache` structure to include metadata about whether paths are files or directories, optimizing the cache's utility during VFS operations.
- Refactored the `prefetch_project_files` function to accept a `Project` object, allowing for more flexible path collection and improved logging of the prefetching process.
- Added tests to validate the behavior of the prefetch cache, ensuring correct handling of file reads, canonicalization, and cache depletion scenarios.
- Enhanced existing tests to cover new functionality, including concurrent reads and stress tests for snapshot determinism.

These changes aim to improve the performance and reliability of the VFS by refining the prefetching mechanism and ensuring accurate metadata handling.
2026-02-19 02:26:04 -06:00
Joe
9d3d02cd57 Add new Git configuration options in InitCommand
- Introduced additional Git configuration settings: `core.splitIndex`, `core.untrackedcache`, and `feature.manyFiles` to enhance repository initialization.
- These changes aim to improve the default setup for new repositories, optimizing performance and functionality from the start.
2026-02-19 02:14:01 -06:00
Joe
1ffed1212d Add prefetch cache for VFS to optimize file reads
- Introduced a `PrefetchCache` structure to store pre-read file contents and canonical paths, enhancing the speed of initial reads during snapshot building.
- Implemented parallel file reading using `rayon` and `walkdir` to populate the cache efficiently.
- Updated the `VfsInner` struct to include the prefetch cache and modified read methods to utilize it, reducing I/O operations.
- Added functions to set and clear the prefetch cache in the `Vfs` API, improving memory management during live operations.
- Enhanced tests to validate the functionality of the prefetch cache, ensuring correct behavior during file reads and canonicalization.

These changes aim to significantly improve the performance of the VFS by minimizing file access times during initial operations.
2026-02-19 02:04:15 -06:00
Joe
b105d86541 fix NaN equality for trueEquals for compound types 2026-02-19 02:02:10 -06:00
Joe
354d4c8b21 Add yield intervals for diffing and hydrating processes
- Introduced `DIFF_YIELD_INTERVAL` and `HYDRATE_YIELD_INTERVAL` constants to manage execution pacing during the diffing and hydrating processes, respectively.
- Implemented logic to pause execution every specified interval to improve performance and prevent potential blocking in long-running operations.
- Enhanced the `diff` and `hydrate` functions to track and yield based on their respective counts, ensuring smoother operation during intensive tasks.

These changes aim to enhance the responsiveness of the system during heavy processing tasks by introducing controlled yielding mechanisms.
2026-02-19 01:49:13 -06:00
Joe
b85c5f5ec7 Refactor font comparison logic in variant_eq and hash_variant functions
- Simplified the comparison logic for `Font` variants in the `variant_eq` and `variant_eq_disk` functions by consolidating multiple conditions into single lines for improved readability.
- Removed the handling of `cached_face_id` from the `hash_variant` function, streamlining the hashing process for `Font` variants.

These changes aim to enhance code clarity and maintainability while preserving the existing functionality.
2026-02-19 01:47:37 -06:00
Joe
d9fa62c88e Add server-side and test-side port retry mechanisms to handle race conditions
- Introduced a new plan to address port-in-use race conditions in both server and test environments.
- Implemented a retry mechanism with exponential backoff for binding to known ports in `LiveServer::start()`.
- Added a `respawn_with_new_port()` method in `TestServeSession` to handle transient port conflicts during tests.
- Modified `wait_to_come_online()` to retry with a new port if the server process exits due to `AddrInUse`.
- Updated `fresh_rebuild_read()` to include port retry logic, enhancing robustness against port conflicts.

These changes aim to improve the reliability of server and test interactions by mitigating race conditions related to port usage.
2026-02-19 01:34:53 -06:00
Joe
bf56dc4733 Refactor syncback error handling and improve concurrency management
- Enhanced the syncback process to prevent concurrent executions by implementing a locking mechanism.
- Updated error responses to provide clearer feedback when a syncback is already in progress.
- Refactored related functions to streamline the syncback initiation logic, improving overall reliability.
- Added new tests to validate the concurrency handling and error messaging, ensuring robustness in edge cases.

These changes aim to enhance the reliability and user experience of the syncback feature by addressing concurrency issues and improving error handling.
2026-02-19 01:27:31 -06:00
Joe
7d0232c430 Add automatic dedup suffix stripping to enhance syncback functionality
- Introduced a new plan to automatically strip `~N` dedup suffixes from filenames during forward sync, eliminating the need for redundant `.meta.json5` files.
- Implemented the `strip_dedup_suffix()` utility in `dedup_suffix.rs` to handle suffix removal.
- Updated `file_name_for_path()` and `get_dir_middleware()` to utilize the new stripping functionality.
- Modified syncback logic to skip writing meta `name` fields for dedup-only cases, ensuring cleaner instance naming.
- Enhanced existing tests and added new tests to cover the updated dedup behavior, ensuring robustness and correctness.

These changes aim to streamline the handling of deduplicated instances, improving overall system efficiency and clarity in naming conventions.
2026-02-19 01:15:28 -06:00
Joe
17d52e3edf Enhance float formatting and comparison functions for disk representation
- Made `format_f32` and `format_f64` functions public to allow external access.
- Introduced new constants for disk options and buffer sizes for `f32` and `f64`.
- Added `cleanup_f32` function to clean up float values before comparison.
- Implemented `disk_eq_f32` and `disk_eq_f64` functions to compare float values based on their disk representation.
- Updated `variant_eq_disk` to utilize the new disk equality functions, improving accuracy in matching algorithms.

These changes aim to enhance the precision of float comparisons and ensure consistent behavior across different representations in the system.
2026-02-19 00:44:16 -06:00
Joe
532425df9e Update audit documentation and rules for live syncback enhancements
- Added a new section in `audit.md` for the Live Syncback Pipeline, detailing the plugin encoding, transport, and server handling processes.
- Included entries for newly introduced files `encodeHelpers.lua` and `encodeService.lua` in the audit documentation.
- Updated the audit checklist to cover live syncback parity and related concerns.
- Revised rule MDC files (`atlas-api.mdc`, `atlas-plugin.mdc`, `atlas-dedup.mdc`) to reflect recent changes, including the addition of `encodeHelpers.lua` and clarifications on `SyncbackConfirm`.
- Ensured comprehensive coverage of new test suites in the audit documentation.

These changes aim to enhance the clarity and accuracy of the audit documentation and rules, aligning them with the latest codebase updates.
2026-02-19 00:22:49 -06:00
Joe
49b4d8581f Add Live Syncback Audit Fixes Plan
- Introduced a new audit plan addressing six identified issues during the live syncback audit, including resource leaks, error handling, concurrent request management, input validation, documentation clarity, and test coverage.
- Implemented fixes such as replacing `mem::forget` with `drop` for better memory management, enhancing error recovery to prevent server crashes, and validating chunk counts against blob sizes.
- Updated documentation to reflect the audit findings and standards, ensuring clarity on the requirements for each fix.
- Added five new integration tests to cover various edge cases and ensure robustness in the syncback functionality.

These changes aim to improve the reliability and correctness of the live syncback feature while providing a structured approach to addressing identified issues.
2026-02-19 00:18:00 -06:00
Joe
5b38648ead Update dependencies and improve syncback handling
- Updated versions of several dependencies in `Cargo.lock`, including `async-compression` (0.4.40), `aws-lc-rs` (1.16.0), `bumpalo` (3.20.1), and `compression-codecs` (0.4.37), ensuring compatibility and access to the latest features and fixes.
- Refactored the `fire` method in `SyncbackSignal` to return a boolean indicating whether a syncback was successfully initiated, preventing concurrent syncbacks.
- Enhanced error handling in the API syncback process to return a conflict response if a syncback is already in progress.
- Improved the `serve.rs` file by replacing `forget` with `drop` for better memory management and added checks to ensure service chunk integrity during live syncback operations.
- Added new tests for edge cases and resilience in live syncback functionality, ensuring robustness against malformed data and rapid sequential requests.

These changes aim to enhance the reliability and performance of the syncback feature while keeping dependencies up to date.
2026-02-19 00:17:43 -06:00
Joe
69f0b9fd63 Add Audit Plan for Ambiguous Path Handling
- Introduced a new audit plan detailing the "Ambiguous Path Handling" feature, including three parallel matching algorithm implementations (two in Rust and one in Lua) and their integration with the Reconciler.
- Documented findings related to scoring discrepancies between Lua and Rust implementations, including fixes for stale comments, scoring granularity for Tags/Attributes, and performance improvements in cost computation.
- Enhanced the `trueEquals` function to support fuzzy equality for additional types (UDim, UDim2, NumberRange, Rect, NumberSequence, ColorSequence) with corresponding unit tests to ensure accuracy.

These changes aim to improve the reliability and performance of the matching algorithms while ensuring consistency across implementations.
2026-02-19 00:02:41 -06:00
Joe
7e0538b9f5 Remove float-cmp dependency and implement custom float comparison logic
- Eliminated the `float-cmp` crate from the project, replacing its functionality with custom float comparison functions that match Lua's epsilon-based equality checks.
- Updated the `variant_eq` function to utilize the new fuzzy equality methods for `Float32` and `Float64` variants, ensuring consistent behavior across Rust and Lua implementations.
- Enhanced the matching algorithms in both forward sync and syncback processes to account for refined scoring of `Ref`, `Tags`, and `Attributes`, improving scoring accuracy and parity between implementations.
- Introduced a new plan document detailing the changes made to the matching algorithms, including the rationale for the updates and the expected impact on performance and correctness.

These changes aim to improve the reliability and maintainability of the matching algorithms while ensuring parity with Lua's behavior.
2026-02-18 23:57:12 -06:00
Joe
a283fd1dc9 Add Git Sync Defaults Audit Plan
- Introduced a comprehensive audit plan for the git-based sync defaults feature, detailing the interaction between server and plugin components, including metadata handling and auto-staging logic.
- Documented the audit findings, highlighting performance considerations, path normalization issues, and code quality improvements.
- Included a sequence diagram to illustrate the workflow and a detailed table of audited files, enhancing clarity and maintainability of the feature.

These changes aim to ensure a thorough understanding and evaluation of the git sync defaults implementation, promoting better performance and reliability in the system.
2026-02-18 23:28:14 -06:00
Joe
b1180d7361 Enhance Luau documentation with additional context and examples
- Updated the Luau rules documentation to clarify the default context as Roblox Luau and provided detailed paths for accessing Roblox-specific and official Luau documentation.
- Added new sections on string literal escapes, number literals, primitive types, and type refinements, including examples to illustrate usage.
- Improved explanations of sealed vs unsealed tables and user-defined type functions, enhancing clarity for developers.

These changes aim to improve the comprehensiveness and usability of the Luau documentation, facilitating better understanding and application of the language features.
2026-02-18 23:27:53 -06:00
Joe
23874d8a71 Consolidate filesystem name retrieval in ref_target_path_from_tree
- 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.
2026-02-18 23:22:40 -06:00
Joe
b0f9b06cbb Refactor filesystem name retrieval in ref_target_path_from_tree
- 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.
2026-02-18 23:22:18 -06:00
Joe
d3a9155e10 Update patch application logic to ensure correct resolution order for legacy and path-based references
- 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.
2026-02-18 23:17:06 -06:00
Joe
9bb237f4eb Add ChangeBatcher Encoding Audit Plan
- 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.
2026-02-18 23:04:00 -06:00
Joe
9d8762bbaf Refactor encoding logic in ChangeBatcher and enhance duplicate handling
- 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.
2026-02-18 23:02:43 -06:00
Joe
24dec4073d Enhance luau-optimize documentation with detailed type safety guidelines
- 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.
2026-02-18 22:51:45 -06:00
Joe
e6c0627652 Add luau-optimize cursor command for performance optimization
- 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.
2026-02-18 22:37:32 -06:00
Joe
b47eef1173 Add live syncback functionality and optimize service encoding
- 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.
2026-02-18 22:34:52 -06:00
Joe
7f4b5c4941 Refactor float formatting tests for improved precision and consistency
- 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.
2026-02-18 21:04:50 -06:00
Joe
f59392581e Remove max significant digits and zero cutoff checks in float formatting functions for improved simplicity and performance. This change streamlines the format_f32 and format_f64 functions, enhancing the overall efficiency of float serialization in JSON. 2026-02-18 10:35:17 -06:00
Joe
b8a1dc269c Remove zero cutoff checks in float formatting functions for improved simplicity and performance. This change streamlines the format_f32 and format_f64 functions, enhancing the overall efficiency of float serialization in JSON. 2026-02-18 10:33:19 -06:00
Joe
ea9025725a Update float cutoff values and adjust test cases for improved precision
- 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.
2026-02-18 10:25:16 -06:00
Joe
07e0100cad Add lexical-write-float and update float formatting in JSON serialization
- 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.
2026-02-18 10:17:07 -06:00
Joe
0450dabfce Refactor encoding logic in ChangeBatcher for improved readability and consistency
- 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.
2026-02-18 09:47:50 -06:00
Joe
3c026aea40 Add float formatting functions and update serializer for improved precision
- 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.
2026-02-18 09:45:44 -06:00
Joe
39c8bd41f4 Enhance live syncback process with improved reference handling and float precision
- 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.
2026-02-18 09:11:59 -06:00
Joe
7dc4f52793 Implement live syncback fixes addressing multiple issues
- 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.
2026-02-18 08:44:21 -06:00
Joe
a75a1443c0 Enhance syncback process by integrating serialization of service children
- 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.
2026-02-18 08:21:25 -06:00
Joe
a823db0297 Refactor encoding logic in ChangeBatcher and improve matching depth handling
- 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.
2026-02-18 08:11:00 -06:00
Joe
e0fd9077e8 Refactor service encoding to streamline properties handling
- 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.
2026-02-18 08:00:49 -06:00
Joe
8070129bca Refactor service encoding to conditionally include properties, attributes, tags, and references
- 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.
2026-02-18 07:40:45 -06:00
Joe
c3cb9b4b98 Enhance syncback functionality and improve matching process
- 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.
2026-02-18 07:38:39 -06:00
Joe
72ad84b5a7 Implement live syncback service properties encoding and enhance syncback functionality
- 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.
2026-02-18 07:22:29 -06:00
Joe
30e032b27e Update color handling and enhance session management in the Reconciler
- 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.
2026-02-18 06:59:03 -06:00
Joe
ddd47b9afa Enhance matching module with valid children tracking and code readability improvements
- 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.
2026-02-18 06:40:28 -06:00
Joe
b687c8862d Enhance matching module with reference identity and caching improvements
- 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.
2026-02-18 06:16:33 -06:00
Joe
bf4aef6e94 Update sourcemap generator command in VSCode settings
- 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.
2026-02-18 06:00:38 -06:00
Joe
93ea0bdef6 Refactor syncback process and improve code readability
- 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.
2026-02-18 05:58:17 -06:00
Joe
372a422b3d Update SyncbackRequest structure and API protocol validation
- 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.
2026-02-18 05:32:46 -06:00