Skip to content

Remove dependencies superseded by native browser APIs#989

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/remove-unneeded-dependencies
Draft

Remove dependencies superseded by native browser APIs#989
Copilot wants to merge 2 commits into
mainfrom
copilot/remove-unneeded-dependencies

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

Three runtime dependencies are replaceable with modern browser-native APIs, and husky was incorrectly placed in dependencies instead of devDependencies.

Removed packages

  • file-saver — replaced with URL.createObjectURL + programmatic <a download> click (redux/actions.js)
  • he — replaced with DOMParser for HTML entity decoding (components/Admin/Log.js). Uses a null-byte placeholder to preserve <br> separators before parsing so line-splitting continues to work:
    const BR_PLACEHOLDER = '\u0000BR\u0000';
    const escaped = line.replace(/<br>/gi, BR_PLACEHOLDER);
    const doc = new DOMParser().parseFromString(escaped, 'text/html');
    const lines = doc.documentElement.textContent.split(BR_PLACEHOLDER);
  • redux-devtools-extension (archived/deprecated) — replaced with an inline check against the extension's global (redux/store.js):
    const composeEnhancers =
      (typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose;

Dependency classification fix

  • husky moved from dependenciesdevDependencies (git hooks tool, dev-only)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdn.ampproject.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node lib/warmup.js /home/REDACTED/.cache/node-gyp/24.14.0/deps/uv/include -I /home/REDACTED/.cache/node-gyp/24.14.0/deps/zlib -I /home/REDACTED/.cache/node-gyp/24.14.0/deps/v8/include -I ../../node-addon-api -I /home/REDACTED/work/synbiohub3/synbiohub3/frontend/node_modules/sharp/vendor/8.10.0/include -I (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Revieweing next JS config to remove uneeded dependencies and clean up the project</issue_title>
<issue_description></issue_description>

<agent_instructions>go and check which import/packages are no longer needed as they are included in the browser now, for example babble is not needed if we are targeting current browsers to my understanding because updated javascript is included now</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…n; move husky to devDependencies

Co-authored-by: PeterHindes <19994487+PeterHindes@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SynBioHub/synbiohub3/sessions/04c49978-46af-4b70-a98e-827b92417e95
Copilot AI changed the title [WIP] Review Next.js config to remove unneeded dependencies Remove dependencies superseded by native browser APIs Mar 24, 2026
Copilot AI requested a review from PeterHindes March 24, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revieweing next JS config to remove uneeded dependencies and clean up the project

2 participants