y-scope / yscope-log-viewer

A tool that can be used to view logs compressed in CLP's IR Stream format.
Apache License 2.0
11 stars 12 forks source link

Initial commit of refactored log viewer with support for typed communication between renderer and worker. #45

Closed junhaoliao closed 4 months ago

junhaoliao commented 4 months ago

References

Description

This PR adds the initial files for the refactored log viewer into the /new-log-viewer directory. Once the features of the new log viewer are fully implemented and match the functionality of the existing code, we will replace the current implementation with the new version.

Below are added in this PR:

  1. Webpack configuration for the project.
  2. TypeScript setup for the new log viewer.
  3. React application for the log viewer interface.
  4. Integrated @pmmmwh/react-refresh-webpack-plugin for fast refresh during development.
  5. Renderer handler that only submits request messages.
  6. Worker handler that only prints the messages received.

Validation performed

  1. Verified the Webpack configuration works without errors.
  2. Confirmed the Babel-TypeScript setup compiles successfully.
  3. Ensured the React application renders the initial interface correctly. Validated the integration of @pmmmwh/react-refresh-webpack-plugin for effective hot reloading.
  4. Tested the renderer handler to confirm it submits request messages as expected and the worker handler to verify it prints the received messages.
junhaoliao commented 4 months ago

@Henry8192 Please take a look before we send this PR to another reviewer.

kirkrodrigues commented 4 months ago

I didn't review the webpack config very carefully, but I assume that's something we can iterate on as time goes on.