-
Notifications
You must be signed in to change notification settings - Fork 219
chore: refactor renderer init #6925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…s startup structure - Removed references to `ampersand-view` from `package.json` and `package-lock.json`. - Updated entry point in `webpack.config.js` to use `index.ts` instead of `index.tsx`. - Cleaned up type definitions by removing the `ampersand-view` module declaration. - Refactored `setup-hadron-distribution.ts` to improve clarity and organization. - Introduced a new `application.tsx` file to manage application lifecycle and rendering. - Added global error handling and DNS configuration in `index.ts`. - Removed obsolete `menu-renderer.js` file. - Migrated stateful imports to regular exported functions (eg. CSP in `csp.ts`).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the renderer initialization by removing the ampersand‑view dependency and improving the application startup structure. Key changes include updating the webpack entry point, refactoring the Hadron distribution setup with enhanced documentation, and migrating stateful imports to regular exported functions.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/compass/webpack.config.js | Updated the entry point from index.tsx to index.ts |
packages/compass/src/setup-hadron-distribution.ts | Added a JSDoc comment and reformatted environment variable setup |
packages/compass/src/main/index.ts | Changed to an import-based setup for Hadron distribution |
packages/compass/src/app/utils/csp.ts | Converted injectCSP to an exported function and removed auto-run call |
packages/compass/src/app/menu-renderer.js | Removed obsolete file |
packages/compass/src/app/index.ts | Introduced new lifecycle initialization code |
packages/compass/package.json | Removed ampersand‑view dependency |
Comments suppressed due to low confidence (2)
packages/compass/src/setup-hadron-distribution.ts:13
- Typo in the comment on line 13: 'durng' should be 'during'.
* All these variables below are used by Compass and its plugins in one way or
packages/compass/src/app/utils/csp.ts:107
- The previous auto-invocation of injectCSP() has been removed. Ensure that this function is explicitly called where needed to maintain CSP injection.
injectCSP();
refactor: remove ampersand-view dependency and update renderer process startup structure
ampersand-view
frompackage.json
andpackage-lock.json
.webpack.config.js
to useindex.ts
instead ofindex.tsx
.ampersand-view
module declaration.setup-hadron-distribution.ts
to improve clarity and organization.application.tsx
file to manage application lifecycle and rendering.index.ts
.menu-renderer.js
file.csp.ts
).