Skip to content

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

chore: refactor renderer init #6925

wants to merge 6 commits into from

Conversation

mcasimir
Copy link
Collaborator

refactor: remove ampersand-view dependency and update renderer process 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).

mcasimir added 2 commits May 15, 2025 17:24
…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`).
@mcasimir mcasimir requested a review from Copilot May 15, 2025 15:38
@mcasimir mcasimir added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label May 15, 2025
Copy link

@Copilot Copilot AI left a 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();

@mcasimir mcasimir added the no release notes Fix or feature not for release notes label May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no release notes Fix or feature not for release notes no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant