Skip to content

Conversation

@ahmed-deriv
Copy link
Collaborator

This pull request upgrades the project to React 18, updates related dependencies, and replaces the @deriv-com/derivatives-charts package with @deriv-com/smartcharts-champion across all packages. It also updates Babel configurations to use the automatic JSX runtime and modernizes plugin usage. These changes aim to ensure compatibility with React 18, improve build performance, and maintain up-to-date charting functionality.

React 18 upgrade and dependency updates:

  • Upgraded react and react-dom dependencies to version 18.2.0 in all relevant package.json files, ensuring the project uses React 18 throughout.

Charting library migration:

  • Replaced all references to @deriv-com/derivatives-charts with @deriv-com/smartcharts-champion in dependencies, build configs, and code imports, ensuring the new charting library is used project-wide.
    Babel configuration modernization:

  • Switched Babel preset configuration to use the automatic JSX runtime for React (runtime: "automatic") in all Babel config files, improving build performance and compatibility with React 18.

  • Updated Babel plugins to use modern transform-* plugins instead of legacy proposal-* plugins for class properties, object rest/spread, export namespace, optional chaining, and nullish coalescing operator.

Webpack and alias changes:

  • Updated Webpack and build aliases to support the new charting library and React 18 JSX runtime, ensuring correct module resolution.

Code cleanup and minor fixes:

  • Removed unused React import in test files and updated imports for compatibility with new dependencies.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2025

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 3 package(s) with unknown licenses.
  • ⚠️ 1 packages with OpenSSF Scorecard issues.
See the Details below.

License Issues

package-lock.json

PackageVersionLicenseIssue Type
@deriv-com/smartcharts-champion1.2.2NullUnknown License

package.json

PackageVersionLicenseIssue Type
@deriv-com/smartcharts-champion^1.2.2NullUnknown License

packages/trader/package.json

PackageVersionLicenseIssue Type
@deriv-com/smartcharts-champion^1.2.2NullUnknown License

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
npm/@deriv-com/smartcharts-champion 1.2.2 UnknownUnknown
npm/mobx-react-lite 4.1.1 🟢 4.9
Details
CheckScoreReason
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Security-Policy🟢 9security policy file detected
Code-Review🟢 5Found 14/25 approved changesets -- score normalized to 5
Maintained🟢 1010 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
License🟢 10license file detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Signed-Releases⚠️ -1no releases found
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 0120 existing vulnerabilities detected
npm/react 18.3.1 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom 18.3.1 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-tabs 6.1.0 🟢 5.3
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 0Found 0/27 approved changesets -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST🟢 9SAST tool detected but not run on all commits
Vulnerabilities🟢 91 existing vulnerabilities detected
npm/scheduler 0.23.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/@deriv-com/derivatives-charts 1.1.8 UnknownUnknown
npm/@rollup/rollup-linux-x64-gnu 4.49.0 🟢 6
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 4Found 8/19 approved changesets -- score normalized to 4
Security-Policy🟢 10security policy file detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 9license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 1branch protection is not maximal on development and all release branches
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
Binary-Artifacts🟢 10no binaries found in the repo
Packaging🟢 10packaging workflow detected
Fuzzing⚠️ 0project is not fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities🟢 91 existing vulnerabilities detected
npm/react 17.0.2 🟢 4.9
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review🟢 7Found 21/30 approved changesets -- score normalized to 7
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
License🟢 10license file detected
Packaging🟢 10packaging workflow detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
Binary-Artifacts🟢 10no binaries found in the repo
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 0117 existing vulnerabilities detected
npm/react-dom 17.0.2 ⚠️ 1.3
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/19 approved changesets -- score normalized to 0
Dangerous-Workflow⚠️ -1no workflows found
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ -1No tokens found
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies⚠️ -1no dependencies found
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License⚠️ 0license file not detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Vulnerabilities⚠️ 055 existing vulnerabilities detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
npm/react-tabs 4.3.0 🟢 5.3
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Maintained🟢 1030 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Code-Review⚠️ 0Found 0/27 approved changesets -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Security-Policy⚠️ 0security policy file not detected
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST🟢 9SAST tool detected but not run on all commits
Vulnerabilities🟢 91 existing vulnerabilities detected
npm/scheduler 0.20.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/@deriv-com/smartcharts-champion ^1.2.2 UnknownUnknown
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/@deriv-com/derivatives-charts ^1.1.8 UnknownUnknown
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/@deriv-com/derivatives-charts ^1.1.8 UnknownUnknown
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/@deriv-com/smartcharts-champion ^1.2.2 UnknownUnknown
npm/react ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^18.2.0 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/@deriv-com/derivatives-charts ^1.1.8 UnknownUnknown
npm/react ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected
npm/react-dom ^17.0.2 🟢 5.7
Details
CheckScoreReason
Code-Review🟢 7Found 22/30 approved changesets -- score normalized to 7
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 2badge detected: InProgress
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Binary-Artifacts🟢 9binaries present in source code
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
Fuzzing⚠️ 0project is not fuzzed
Vulnerabilities⚠️ 0229 existing vulnerabilities detected

Scanned Manifest Files

package-lock.json
package.json
  • @deriv-com/smartcharts-champion@^1.2.2
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • react-dom@^18.2.0
  • @deriv-com/derivatives-charts@^1.1.8
  • @testing-library/react@^12.1.5
  • react@^17.0.2
  • react-dom@^17.0.2
packages/api-v2/package.json
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • @testing-library/react@^12.1.5
  • react@^17.0.2
packages/api/package.json
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • @testing-library/react@^12.1.5
  • react@^17.0.2
packages/components/package.json
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • react-dom@^18.2.0
  • @testing-library/react@^12.1.5
  • react@^17.0.2
  • react-dom@^17.0.2
packages/core/package.json
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • react-dom@^18.2.0
  • @deriv-com/derivatives-charts@^1.1.8
  • @testing-library/react@^12.1.5
  • react@^17.0.2
  • react-dom@^17.0.2
packages/reports/package.json
  • react@^18.2.0
  • react-dom@^18.2.0
  • react@^17.0.2
  • react-dom@^17.0.2
packages/shared/package.json
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • @testing-library/react@^12.1.5
  • react@^17.0.2
packages/stores/package.json
  • @deriv/[email protected]
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • @testing-library/react@^12.1.5
  • react@^17.0.2
packages/trader/package.json
  • @deriv-com/smartcharts-champion@^1.2.2
  • @testing-library/react@^13.4.0
  • react@^18.2.0
  • react-dom@^18.2.0
  • @deriv-com/derivatives-charts@^1.1.8
  • @testing-library/react@^12.1.5
  • react@^17.0.2
  • react-dom@^17.0.2

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 25, 2025

Deploying derivatives-trader with  Cloudflare Pages  Cloudflare Pages

Latest commit: c7ee359
Status: ✅  Deploy successful!
Preview URL: https://be6a9ece.derivatives-trader.pages.dev
Branch Preview URL: https://refactor-champion-chart.derivatives-trader.pages.dev

View logs

@ahmed-deriv ahmed-deriv changed the title Refactor/champion chart to Master [DO NOT MERGE] Ahmed: Refactor/champion chart to Master [DO NOT MERGE] Sep 25, 2025
@claude
Copy link

claude bot commented Oct 28, 2025

Claude finished @ahmed-deriv's task —— View job


Comprehensive PR Review Complete

I've conducted a thorough review of this React 18 upgrade and SmartCharts Champion migration. Unfortunately, the critical issues identified in previous reviews remain unaddressed, and this PR is still not ready for merge.


🔴 Critical Issues (Must Fix Before Merge)

1. React 18 Migration Incomplete: Deprecated API Still Used

Location: packages/core/src/index.tsx:32

Status: ❌ STILL NOT FIXED (flagged in both Oct 24 and Oct 27 reviews)

// eslint-disable-next-line react/no-deprecated
ReactDOM.render(<App root_store={root_store} />, wrapper);

Problem: The entire purpose of upgrading to React 18 is defeated by continuing to use the deprecated ReactDOM.render API. The eslint-disable comment shows this is a known issue being ignored.

Impact:

  • No access to React 18's concurrent rendering features
  • No automatic batching improvements
  • Deprecation warnings in console
  • Future React versions may remove this API entirely

Required Fix:

import { createRoot } from 'react-dom/client';

const root = createRoot(wrapper);
root.render(<App root_store={root_store} />);

Why This Matters: This is a blocking issue. Without this change, the React 18 upgrade provides zero benefit.


2. Memory Leak + Broken Functionality: Transformation Code Commented Out

Location: packages/trader/src/Modules/SmartChart/Adapters/index.ts:304-305

Status: ❌ STILL NOT FIXED (actually worse - transformation is now disabled)

const subscriptionId = transport.subscribe(apiRequest, (response: any) => {
    try {
        // transformations.toTQuoteFromStream(response, request.granularity);
        // console.log('Stream message received:', response);
        const quote = response;  // ← Raw API response passed directly to chart!
        callback(quote);
    } catch (error) {
        logger.error('Error transforming stream message:', error);
    }
});

Problems:

  1. Broken functionality: Raw API response passed to chart instead of transformed data
  2. Type mismatch: Chart expects TQuote format, receives raw API format
  3. No error threshold: If callback throws repeatedly, subscription continues indefinitely
  4. Unclear intent: Why is transformation commented out? This needs explanation

Required Fixes:

  1. Uncomment and use the transformation (critical for functionality):
    const quote = transformations.toTQuoteFromStream(response, request.granularity);
    callback(quote);
  2. Add error threshold to prevent runaway subscriptions
  3. Add proper cleanup in component unmount handlers

3. Silent Failures: No Loading/Error States in Chart Components

Locations:

  • packages/trader/src/AppV2/Containers/Chart/trade-chart.tsx:114-129
  • packages/trader/src/Modules/Trading/Containers/trade-chart.tsx:94-109
  • packages/trader/src/Modules/Contract/Containers/replay-chart.tsx:81-96

Status: ❌ STILL NOT FIXED

All three chart components have identical problematic patterns:

React.useEffect(() => {
    const fetchChartData = async () => {
        try {
            const data = await smartChartsAdapter.getChartData();
            setChartData({ activeSymbols: data.activeSymbols, tradingTimes: data.tradingTimes });
        } catch (error) {
            console.error('Error fetching chart data:', error);
            // No error state set, no retry mechanism, no user feedback
        }
    };
    fetchChartData();
}, [smartChartsAdapter]);

// Later in render:
if (!chartData || !chartData.tradingTimes) return null;  // ← Silent failure

Problems:

  1. No loading state → users see blank screen during fetch
  2. No error state → if fetch fails, users see blank screen forever
  3. No retry mechanism → single failure = permanent blank screen
  4. Silent error handling → errors logged but not displayed

User Impact: Users experience unexplained blank screens when network issues occur or API calls fail.

Required Fix:

const [isLoading, setIsLoading] = React.useState(true);
const [error, setError] = React.useState<Error | null>(null);

const fetchChartData = async () => {
    setIsLoading(true);
    setError(null);
    try {
        const data = await smartChartsAdapter.getChartData();
        setChartData({ activeSymbols: data.activeSymbols, tradingTimes: data.tradingTimes });
    } catch (error) {
        setError(error);
    } finally {
        setIsLoading(false);
    }
};

// In render:
if (isLoading) return <Loader />;
if (error) return <ErrorMessage onRetry={fetchChartData} />;

4. Type Safety Violations: Unsafe Type Assertions

Locations:

  • packages/trader/src/AppV2/Containers/Chart/trade-chart.tsx:162
  • packages/trader/src/Modules/Trading/Containers/trade-chart.tsx:148

Status: ❌ STILL NOT FIXED

const result = await smartChartsAdapter.getQuotes({
    symbol: params.symbol,
    granularity: params.granularity as any,  // ← Type safety defeated
    count: params.count,
    start: params.start,
    end: params.end,
});

Problem: The adapter defines TGranularity as a strict union type, but it's cast to any, defeating TypeScript's type safety.

Required Fix:

// Add type guard
const isValidGranularity = (g: number): g is TGranularity => {
    return [0, 60, 120, 180, 300, 600, 900, 1800, 3600, 7200, 14400, 28800, 86400].includes(g);
};

// Use with validation
const granularity = isValidGranularity(params.granularity) 
    ? params.granularity 
    : 0; // safe fallback

🟡 High Priority Issues (Should Fix Before Merge)

5. Performance: Inefficient Observable Conversion

Location: packages/trader/src/Modules/SmartChart/Adapters/index.ts:354-364

const plainActiveSymbols = Array.isArray(activeSymbolsData)
    ? JSON.parse(JSON.stringify(activeSymbolsData))  // ← Very inefficient
    : [];

const plainTradingTimes = tradingTimesData
    ? JSON.parse(JSON.stringify(tradingTimesData.tradingTimes))  // ← Very inefficient
    : {};

Problems:

  1. Double serialization is slow
  2. Can fail with circular references
  3. Loses non-serializable values (functions, Dates, etc.)
  4. MobX provides toJS() for this exact purpose

Better Approach:

import { toJS } from 'mobx';

const plainActiveSymbols = Array.isArray(activeSymbolsData) 
    ? toJS(activeSymbolsData) 
    : [];

Or use native structuredClone() if MobX-specific behavior isn't needed.


6. Missing Memoization in Chart Components

All three chart implementations

Problem: Callback functions passed to SmartChart are recreated on every render:

const getQuotes: TGetQuotes = async params => { /* ... */ };
// ↑ New function reference every render

<SmartChart getQuotes={getQuotes} />  
// ↑ Causes unnecessary re-renders in SmartChart

Required Fix:

const getQuotes = React.useCallback<TGetQuotes>(
    async params => { /* implementation */ },
    [smartChartsAdapter]
);

const subscribeQuotes = React.useCallback(
    (params, callback) => smartChartsAdapter.subscribeQuotes(params, callback),
    [smartChartsAdapter]
);

const unsubscribeQuotes = React.useCallback(
    params => smartChartsAdapter.unsubscribeQuotes(params),
    [smartChartsAdapter]
);

7. Silent Error Swallowing in Transformers

Location: packages/trader/src/Modules/SmartChart/Adapters/transformers.ts:76-78

} catch (markets_error) {
    return active_symbols;  // Silent failure, no logging
}

Problem: Errors are swallowed without any logging, making debugging impossible.

Fix: Add logging:

} catch (markets_error) {
    logger.error('Failed to process markets in enrichActiveSymbols', markets_error);
    return active_symbols;
}

8. Zero Test Coverage for New Adapter Code

Status: ❌ STILL NOT FIXED

Issue: ~1,200 lines of new adapter code across 5 files with no test coverage:

  • Adapters/index.ts (426 lines)
  • Adapters/transport.ts (246 lines)
  • Adapters/transformers.ts (228 lines)
  • Adapters/services.ts (148 lines)
  • Adapters/types.ts (175 lines)

Required Tests:

  1. Unit tests for transformation functions
  2. Integration tests for subscription lifecycle
  3. Error handling tests for transport layer
  4. Mock tests for services layer API calls

Example test structure:

describe('SmartCharts Adapter', () => {
    describe('transformations', () => {
        it('should transform ticks_history to TGetQuotesResult');
        it('should handle empty/null responses gracefully');
        it('should transform streaming tick to TQuote');
    });
    
    describe('subscriptions', () => {
        it('should create and cleanup subscriptions');
        it('should handle subscription errors');
        it('should prevent duplicate subscriptions');
    });
});

🟠 Medium Priority Issues (Recommended Improvements)

9. High Cyclomatic Complexity in Chart Markers

Location: packages/core/src/Stores/Helpers/chart-markers.js

Issue: File grew from 304 lines to 741 lines (+437 lines, +144% growth). The calculateMarker function (lines 362-598) is 236 lines with deeply nested conditionals.

Recommendation: Refactor into contract-type-specific functions:

const markerCalculators = {
    accumulator: calculateAccumulatorMarkers,
    tick: calculateTickContractMarkers,
    default: calculateNonTickContractMarkers,
};

const calculateMarker = (contract) => {
    const calculator = markerCalculators[getContractCategory(contract)];
    return calculator(contract);
};

10. Commented Code Should Be Removed

Locations:

  • packages/trader/src/Modules/SmartChart/Adapters/index.ts:304-305 (critical - see issue build(deps-dev): bump axios from 1.7.9 to 1.11.0 #2)
  • packages/trader/src/AppV2/Containers/Chart/trade-chart.tsx:286: // <>Chart here</>
  • packages/trader/src/Modules/Contract/Containers/replay-chart.tsx:243: // <>Chart here</>

Action: Remove commented code. Use git history if needed to recover old code.


11. Console Logging in Production Code

Locations: Multiple adapter files

Direct console.log, console.error, console.warn usage:

  • packages/trader/src/Modules/SmartChart/Adapters/services.ts:25,31,36
  • packages/trader/src/Modules/SmartChart/Adapters/index.ts:41,47,52
  • packages/trader/src/Modules/SmartChart/Adapters/transport.ts:25,31,36

Recommendation: Use a configurable logging service:

const logger = createLogger({ 
    enabled: process.env.NODE_ENV === 'development' 
});

12. Code Duplication: Three Identical Chart Components

Issue: Three nearly identical chart implementations:

  • AppV2/Containers/Chart/trade-chart.tsx
  • Modules/Trading/Containers/trade-chart.tsx
  • Modules/Contract/Containers/replay-chart.tsx

All duplicate adapter initialization, data fetching, and quote wrapping logic.

Recommendation: Extract shared logic into a custom hook:

const useSmartChartsAdapter = (config) => {
    // Shared initialization, data fetching, quote functions
    return { getQuotes, subscribeQuotes, unsubscribeQuotes, chartData, isLoading, error };
};

Security Review

No critical security vulnerabilities found:

  • ✅ No XSS vulnerabilities
  • ✅ No credential exposure
  • ✅ Proper WebSocket abstraction via @deriv/shared/WS
  • ✅ Authentication handled through existing infrastructure
  • ✅ No eval() or innerHTML usage in production code

Note: dangerouslySetInnerHTML usage found only in packages/components/src/components/page-error/page-error.tsx, which is acceptable for error display.


📊 React 18 Compatibility Assessment

Positive Changes

  • Babel configured with runtime: "automatic"
  • Dependencies upgraded to React 18.2.0 ✓
  • Modern Babel transform plugins used ✓
  • JSX imports no longer needed ✓

Incomplete Migration

Recommendation: Add StrictMode in development:

const isDevelopment = process.env.NODE_ENV === 'development';
const AppWrapper = isDevelopment ? React.StrictMode : React.Fragment;

const root = createRoot(wrapper);
root.render(
    <AppWrapper>
        <App root_store={root_store} />
    </AppWrapper>
);

📈 Test Coverage Assessment

⚠️ Critical Gap: Zero test coverage for new code

New code without tests:

  • 5 new adapter files (~1,200 lines) - 0 tests
  • Significant chart-markers.js changes (+437 lines) - outdated tests

Test priorities:

  1. Transformation functions (highest risk - data corruption)
  2. Subscription lifecycle (memory leaks)
  3. Error handling (silent failures)
  4. Edge cases (null/undefined responses)

🎯 Summary & Action Plan

Current Status: ❌ NOT READY FOR MERGE

The PR has 4 blocking critical issues that must be resolved:

Must Fix Before Merge (Blockers):

  1. Use React 18 createRoot API instead of deprecated ReactDOM.render
  2. ⚠️ Uncomment transformation in subscription handler (line 304-305)
  3. ⚠️ Add loading/error states to all 3 chart components
  4. ⚠️ Remove as any type assertions - use proper type guards

Should Fix Before Merge (High Priority):

  1. Optimize MobX observable conversion (use toJS())
  2. Add useCallback memoization to chart callbacks
  3. Add error logging in transformers
  4. Add basic test coverage for adapter code

Post-Merge Improvements (Technical Debt):

  1. Refactor calculateMarker complexity
  2. Remove commented code
  3. Implement proper logging service
  4. Extract shared chart logic into custom hook

🌟 Positive Aspects

Despite the issues, the PR has strong foundations:

  1. Well-structured adapter pattern: Clean separation of transport, services, transformers
  2. Comprehensive type definitions: types.ts is thorough and well-documented
  3. Good error boundaries: Most functions have try-catch blocks
  4. Backward compatibility: Handles both old and new API response formats
  5. Extensive market mappings: Good coverage in transformers

📋 Comparison with Previous Reviews

Status of issues from Oct 27 review:

Conclusion: The critical issues from previous reviews remain unaddressed. No meaningful progress has been made on fixing the blocking issues.


💡 Recommendations

Immediate Actions:

  1. Address all 4 critical blocking issues before next review
  2. Add at least basic test coverage for adapter transformations
  3. Test the commented-out transformation code - understand why it was disabled
  4. Add proper error/loading states to prevent blank screens

Development Process:

  • Consider implementing issues incrementally rather than accumulating tech debt
  • Add tests alongside new code rather than deferring
  • Use TypeScript's type system instead of bypassing with as any

📝 Final Verdict

Status: ❌ NOT READY FOR MERGE

Blocking Issues: 4 critical items must be resolved

Estimated Effort:

  • Critical fixes: 4-6 hours
  • Test coverage: 8-12 hours
  • Recommended improvements: 4-6 hours

Next Steps:

  1. Fix the React 18 rendering API (critical)
  2. Fix the commented-out transformation (critical)
  3. Add loading/error states (critical)
  4. Fix type assertions (critical)
  5. Add basic test coverage
  6. Request re-review

@deriv-com deriv-com deleted a comment from claude bot Oct 28, 2025
@deriv-com deriv-com deleted a comment from claude bot Oct 28, 2025
@claude
Copy link

claude bot commented Oct 29, 2025

Claude finished @ahmed-deriv's task —— View job


Comprehensive PR Review: React 18 Upgrade & SmartCharts Champion Migration

I've completed a thorough review of this PR. Unfortunately, this PR is NOT ready for merge due to multiple critical blocking issues that remain unresolved from previous reviews.


🔴 CRITICAL BLOCKING ISSUES (Must Fix)

1. ❌ React 18 Migration Incomplete - Deprecated API Still Used

Location: packages/core/src/index.tsx:31-32
Status: UNFIXED since Oct 24 review

// eslint-disable-next-line react/no-deprecated
ReactDOM.render(<App root_store={root_store} />, wrapper);

Problem: Using deprecated ReactDOM.render defeats the entire purpose of upgrading to React 18. The eslint-disable comment shows this is a known issue being deliberately ignored.

Impact:

  • No concurrent rendering features
  • No automatic batching improvements
  • Deprecation warnings in production
  • Future React versions will remove this API

Required Fix:

import { createRoot } from 'react-dom/client';

const root = createRoot(wrapper);
root.render(<App root_store={root_store} />);

Why This Matters: Without this change, React 18 provides ZERO benefits. This is the #1 blocking issue.


2. ⚠️ Broken Functionality - Transformation Code Commented Out

Location: packages/trader/src/Modules/SmartChart/Adapters/index.ts:304-307
Status: UNFIXED - Actually WORSE (transformation now disabled)

const subscriptionId = transport.subscribe(apiRequest, (response: any) => {
    try {
        // transformations.toTQuoteFromStream(response, request.granularity);
        // console.log('Stream message received:', response);
        const quote = response;  // ← Raw API response passed directly to chart!
        callback(quote);

Problems:

  1. Data corruption: Raw API response passed to chart instead of transformed TQuote format
  2. Type mismatch: Chart expects structured TQuote, receives raw API format
  3. Will cause runtime errors or chart malfunction
  4. No explanation: Why is transformation commented out?

Required Fix:

const subscriptionId = transport.subscribe(apiRequest, (response: any) => {
    try {
        const quote = transformations.toTQuoteFromStream(response, request.granularity);
        callback(quote);
    } catch (error) {
        logger.error('Error transforming stream message:', error);
    }
});

3. ❌ Missing Error/Loading States - Silent Failures

Locations:

  • packages/trader/src/AppV2/Containers/Chart/trade-chart.tsx:114-129
  • packages/trader/src/Modules/Trading/Containers/trade-chart.tsx:94-109
  • packages/trader/src/Modules/Contract/Containers/replay-chart.tsx:78-93

Status: UNFIXED in all 3 components

All three chart components have identical issues:

React.useEffect(() => {
    const fetchChartData = async () => {
        try {
            const data = await smartChartsAdapter.getChartData();
            setChartData({ activeSymbols: data.activeSymbols, tradingTimes: data.tradingTimes });
        } catch (error) {
            console.error('Error fetching chart data:', error); // ← No error state!
        }
    };
    fetchChartData();
}, [smartChartsAdapter]);

// Later in render:
if (!symbol || !active_symbols.length || !chartData || !chartData.tradingTimes) return null;  // ← Silent failure

Problems:

  1. No loading state → blank screen during fetch
  2. No error state → permanent blank screen on failure
  3. No retry mechanism → single failure is permanent
  4. Silent error handling → errors hidden from users

User Impact: Unexplained blank screens when network issues occur.

Required Fix:

const [isLoading, setIsLoading] = React.useState(true);
const [error, setError] = React.useState<Error | null>(null);

const fetchChartData = async () => {
    setIsLoading(true);
    setError(null);
    try {
        const data = await smartChartsAdapter.getChartData();
        setChartData({ activeSymbols: data.activeSymbols, tradingTimes: data.tradingTimes });
    } catch (err) {
        setError(err);
    } finally {
        setIsLoading(false);
    }
};

// In render:
if (isLoading) return <Loader />;
if (error) return <ErrorMessage onRetry={fetchChartData} error={error} />;

Note: replay-chart.tsx:184 correctly returns <Loader /> - apply this pattern to all three.


4. ❌ Type Safety Violations - Unsafe Type Assertions

Locations: 7 instances across 3 files

  • AppV2/Containers/Chart/trade-chart.tsx:162
  • Modules/Trading/Containers/trade-chart.tsx:148, 184, 198
  • Modules/Contract/Containers/replay-chart.tsx:125, 161, 175
const result = await smartChartsAdapter.getQuotes({
    symbol: params.symbol,
    granularity: params.granularity as any,  // ← Type safety defeated

Problem: The adapter defines TGranularity as a strict union type (0 | 60 | 120 | ...), but it's cast to any, defeating TypeScript's type safety.

Required Fix:

// Add type guard in types.ts
export const isValidGranularity = (g: number): g is TGranularity => {
    return [0, 60, 120, 180, 300, 600, 900, 1800, 3600, 7200, 14400, 28800, 86400].includes(g);
};

// Use with validation
const granularity = isValidGranularity(params.granularity) 
    ? params.granularity 
    : 0; // safe fallback to ticks

const result = await smartChartsAdapter.getQuotes({
    symbol: params.symbol,
    granularity, // ← Now type-safe
    count: params.count,
    start: params.start,
    end: params.end,
});

🟡 HIGH PRIORITY ISSUES (Should Fix Before Merge)

5. ⚠️ Performance - Inefficient Observable Conversion

Location: packages/trader/src/Modules/SmartChart/Adapters/index.ts:354-364

const plainActiveSymbols = Array.isArray(activeSymbolsData)
    ? JSON.parse(JSON.stringify(activeSymbolsData))  // ← Very inefficient
    : [];

const plainTradingTimes = tradingTimesData
    ? JSON.parse(JSON.stringify(tradingTimesData.tradingTimes))  // ← Very inefficient
    : {};

Problems:

  1. Double serialization is slow (stringify → parse)
  2. Can fail with circular references
  3. Loses non-serializable values (functions, Dates)
  4. MobX provides toJS() for this exact purpose

Better Approach:

import { toJS } from 'mobx';

const plainActiveSymbols = Array.isArray(activeSymbolsData) 
    ? toJS(activeSymbolsData) 
    : [];

const plainTradingTimes = tradingTimesData
    ? toJS(tradingTimesData.tradingTimes)
    : {};

Or use native structuredClone() if MobX-specific behavior isn't needed.


6. ⚠️ Missing Memoization - Unnecessary Re-renders

All 3 chart implementations

Problem: Callback functions passed to SmartChart are recreated on every render:

const getQuotes: TGetQuotes = async params => { /* ... */ };
// ↑ New function reference every render

<SmartChart getQuotes={getQuotes} />  
// ↑ Causes unnecessary re-renders in SmartChart

Required Fix:

const getQuotes = React.useCallback<TGetQuotes>(
    async params => {
        // implementation
    },
    [smartChartsAdapter]
);

const subscribeQuotes = React.useCallback(
    (params, callback) => smartChartsAdapter.subscribeQuotes(params, callback),
    [smartChartsAdapter]
);

const unsubscribeQuotes = React.useCallback(
    params => smartChartsAdapter.unsubscribeQuotes(params),
    [smartChartsAdapter]
);

7. ⚠️ Silent Error Swallowing

Location: packages/trader/src/Modules/SmartChart/Adapters/transformers.ts:76-78

} catch (markets_error) {
    return active_symbols;  // Silent failure, no logging
}

Problem: Errors swallowed without logging make debugging impossible.

Fix:

} catch (markets_error) {
    logger.error('Failed to process markets in enrichActiveSymbols', markets_error);
    return active_symbols;
}

Also applies to line 166-168 in the same file.


8. ❌ ZERO Test Coverage for New Adapter Code

Status: UNFIXED

Issue: ~1,221 lines of new adapter code across 5 files with NO test coverage:

  • Adapters/index.ts (426 lines)
  • Adapters/transport.ts (246 lines)
  • Adapters/transformers.ts (229 lines)
  • Adapters/services.ts (148 lines)
  • Adapters/types.ts (176 lines)

Required Tests:

describe('SmartCharts Adapter', () => {
    describe('transformations', () => {
        it('should transform ticks_history to TGetQuotesResult');
        it('should handle empty/null responses gracefully');
        it('should transform streaming tick to TQuote');
        it('should handle both candles and ticks formats');
    });
    
    describe('subscriptions', () => {
        it('should create and cleanup subscriptions');
        it('should handle subscription errors');
        it('should prevent duplicate subscriptions');
        it('should unsubscribe all on component unmount');
    });
    
    describe('services', () => {
        it('should fetch active symbols');
        it('should fetch trading times');
        it('should handle API errors gracefully');
    });
});

Testing Priorities:

  1. Transformation functions (highest risk - data corruption)
  2. Subscription lifecycle (memory leaks)
  3. Error handling (silent failures)
  4. Edge cases (null/undefined responses)

🟠 MEDIUM PRIORITY ISSUES (Recommended Improvements)

9. Code Complexity - chart-markers.js

Location: packages/core/src/Stores/Helpers/chart-markers.js

Observation: This file has substantial additions for accumulator markers. While functional, some functions are quite complex.

Recommendation: Consider extracting accumulator-specific logic into separate functions if complexity continues to grow.


10. Commented Code Should Be Removed

Locations:

  • packages/trader/src/Modules/SmartChart/Adapters/index.ts:304-305 (CRITICAL - see issue build(deps-dev): bump axios from 1.7.9 to 1.11.0 #2)
  • packages/trader/src/AppV2/Containers/Chart/trade-chart.tsx:286: // <>Chart here</>
  • packages/trader/src/Modules/Contract/Containers/replay-chart.tsx:243: // <>Chart here</>

Action: Remove commented code. Use git history if needed to recover old code.


11. Console Logging in Production Code

Locations: Multiple adapter files

Direct console.log, console.error, console.warn usage with eslint-disable:

  • packages/trader/src/Modules/SmartChart/Adapters/services.ts:25, 31, 36
  • packages/trader/src/Modules/SmartChart/Adapters/index.ts:41, 47, 52
  • packages/trader/src/Modules/SmartChart/Adapters/transport.ts:25, 31, 36

Recommendation: While acceptable for now, consider a configurable logging service:

const logger = createLogger({ 
    enabled: process.env.NODE_ENV === 'development' 
});

12. Code Duplication - Three Identical Chart Components

Issue: Nearly identical implementations in:

  • AppV2/Containers/Chart/trade-chart.tsx
  • Modules/Trading/Containers/trade-chart.tsx
  • Modules/Contract/Containers/replay-chart.tsx

All duplicate adapter initialization, data fetching, and quote wrapping logic.

Recommendation: Extract shared logic:

const useSmartChartsAdapter = (config) => {
    const adapter = React.useMemo(() => createSmartChartsChampionAdapter(config), []);
    const [chartData, setChartData] = React.useState({ activeSymbols: [] });
    const [isLoading, setIsLoading] = React.useState(true);
    const [error, setError] = React.useState(null);
    
    // Shared data fetching, quote functions, etc.
    
    return { getQuotes, subscribeQuotes, unsubscribeQuotes, chartData, isLoading, error };
};

✅ SECURITY REVIEW

No critical security vulnerabilities found:

  • ✅ No XSS vulnerabilities in new code
  • ✅ No credential exposure
  • ✅ Proper WebSocket abstraction via @deriv/shared/WS
  • ✅ Authentication handled through existing infrastructure
  • ✅ No eval() or new Function() usage in SmartChart code
  • dangerouslySetInnerHTML only in packages/components/src/components/page-error/page-error.tsx (acceptable for error display)

📊 REACT 18 COMPATIBILITY ASSESSMENT

✅ Positive Changes

  • Babel configured with runtime: "automatic"
  • Dependencies upgraded to React 18.2.0 ✓
  • Modern Babel transform plugins used ✓
  • JSX imports no longer needed ✓

❌ Incomplete Migration

Recommendation: Add StrictMode in development:

const isDevelopment = process.env.NODE_ENV === 'development';
const AppWrapper = isDevelopment ? React.StrictMode : React.Fragment;

const root = createRoot(wrapper);
root.render(
    <AppWrapper>
        <App root_store={root_store} />
    </AppWrapper>
);

📈 TEST COVERAGE ASSESSMENT

⚠️ Critical Gap: Zero test coverage for new code

New code without tests:

  • 5 new adapter files (~1,221 lines) - 0 tests
  • No tests found in packages/trader/src/Modules/SmartChart/Adapters/__tests__/

Existing tests (unaffected by adapter changes):

  • Components/__tests__/ - 9 test files for UI components ✓

Risk Level: HIGH - Untested transformation logic handling financial data.


🎯 SUMMARY & ACTION PLAN

Current Status: ❌ NOT READY FOR MERGE

Blocking Issues Count: 4 critical + 4 high priority = 8 must-fix issues

Must Fix Before Merge (Blockers):

  1. Use React 18 createRoot API - Remove deprecated ReactDOM.render
  2. ⚠️ Uncomment transformation code - Fix subscription handler (line 304-307)
  3. ⚠️ Add loading/error states - All 3 chart components
  4. ⚠️ Remove as any type assertions - Use proper type guards

Should Fix Before Merge (High Priority):

  1. Optimize MobX observable conversion (use toJS() or structuredClone())
  2. Add useCallback memoization to chart callbacks
  3. Add error logging in transformers catch blocks
  4. Add basic test coverage for adapter transformations

Post-Merge Technical Debt:

  1. Refactor complex marker calculation functions
  2. Remove commented code
  3. Implement configurable logging service
  4. Extract shared chart logic into custom hook

🌟 POSITIVE ASPECTS

Despite the issues, the PR has strong foundations:

  1. Well-structured adapter pattern - Clean separation of concerns (transport, services, transformers)
  2. Comprehensive type definitions - types.ts is thorough and well-documented
  3. Good error boundaries - Most functions have try-catch blocks
  4. Backward compatibility - Handles both old and new API response formats
  5. Extensive market mappings - Good coverage in transformers

📋 COMPARISON WITH PREVIOUS REVIEWS

Status of issues from Oct 27 review:

Conclusion: The critical issues from previous reviews remain completely unaddressed. No meaningful progress has been made on the blocking issues identified in October.


💡 RECOMMENDATIONS

Immediate Actions:

  1. Address all 4 critical blocking issues before next review
  2. Add at least basic test coverage for adapter transformations
  3. Investigate why transformation code was commented out - fix or document
  4. Add proper error/loading states to prevent blank screens

Development Process Improvements:

  • Implement issues incrementally rather than accumulating tech debt
  • Add tests alongside new code rather than deferring
  • Use TypeScript's type system - avoid bypassing with as any
  • Run linter and fix violations before pushing

📝 FINAL VERDICT

Status:NOT READY FOR MERGE

Blocking Issues: 4 critical items must be resolved

Estimated Effort:

  • Critical fixes: 6-8 hours
  • Test coverage: 8-12 hours
  • Recommended improvements: 4-6 hours

Next Steps:

  1. Fix React 18 rendering API (CRITICAL - 1 hour)
  2. Fix commented-out transformation code (CRITICAL - 2 hours)
  3. Add loading/error states to all 3 components (CRITICAL - 2 hours)
  4. Fix type assertions (CRITICAL - 1 hour)
  5. Add basic test coverage (HIGH PRIORITY - 8 hours)
  6. Request re-review

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.

5 participants