Conversation
- Added telemetry support to track document opens for usage-based billing. - Introduced `initTelemetry` method in the Editor class to initialize telemetry based on configuration. - Created tests for telemetry functionality, ensuring correct behavior when enabled/disabled and with various configurations. - Updated Editor and SuperDoc configurations to include telemetry options and license key handling. - Enhanced SuperConverter to manage document creation timestamps for unique identification.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64ce62e12f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
packages/super-editor/src/core/super-converter/SuperConverter.js
Outdated
Show resolved
Hide resolved
- Simplified telemetry logging in the Editor class by removing unnecessary comments and enhancing debug output for document information. - Removed redundant isNewFile tracking in SuperDoc, allowing automatic handling based on context.
- Introduced default community license key in the Editor class for telemetry initialization. - Updated `initTelemetry` function to use the default license key when none is provided. - Added tests to verify behavior with default and custom license keys. - Improved documentation for the community license key usage.
caio-pizzol
left a comment
There was a problem hiding this comment.
nice work! just a few comments
packages/super-editor/src/core/super-converter/SuperConverter.js
Outdated
Show resolved
Hide resolved
packages/super-editor/src/core/super-converter/SuperConverter.js
Outdated
Show resolved
Hide resolved
packages/super-editor/src/core/super-converter/SuperConverter.js
Outdated
Show resolved
Hide resolved
|
@caio-pizzol forgot to mention. I intentionally left console logs and livetest url here for easy testing. Once code reviewed - I'll remove that of course |
- Introduced a guard flag to prevent double-tracking of document opens in the Editor class. - Updated document identifier generation to be asynchronous, ensuring metadata is available before tracking. - Enhanced SuperConverter to manage document timestamps and unique identifiers more effectively. - Added new utility methods for generating Word-compatible timestamps and content hashes. - Improved test coverage for document identifier resolution and timestamp handling in various scenarios.
- Renamed `isNewFile` to `isBlankDoc` in SuperConverter for clarity regarding document creation context. - Updated related comments and documentation to reflect the new naming and functionality. - Enhanced test cases to align with the refactored telemetry and document handling logic.
05fae90 to
43e0d97
Compare
- Ensured document metadata is generated regardless of telemetry settings
harbournick
left a comment
There was a problem hiding this comment.
Just the null licenseKey/default stuff otherwise looks good!
- Simplified license key management in telemetry initialization. - Updated tests to reflect changes in license key usage and ensure correct behavior. - Introduced COMMUNITY_LICENSE_KEY constant for consistent license key usage across modules.
initTelemetrymethod in the Editor class to initialize telemetry based on configuration.