Skip to content

Conversation

@panchi64
Copy link
Member

@panchi64 panchi64 commented Jul 8, 2025

This PR includes the code necessary for dynamic link imports for the WASM.

@panchi64 panchi64 self-assigned this Jul 8, 2025
@panchi64 panchi64 requested a review from Copilot July 10, 2025 19:15
@panchi64 panchi64 added enhancement New feature or request needs-attention This issue or PR requires acknowledgement labels Jul 10, 2025
Copy link

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 implements dynamic WASM link deployment and refactors asset preloading and related components.

  • Revamps assetPreloader.ts to use dynamic imports, conditional caching, and ETag checks
  • Updates the createWasmCanvas hook with stricter typing, visibility handling, and code cleanup
  • Applies formatting, naming, and structural refactors across various components and CSS

Reviewed Changes

Copilot reviewed 40 out of 46 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/assetPreloader.ts Revamped asset preloader for dynamic WASM imports and caching logic
src/index.tsx Minor update to error message punctuation
src/index.css Reformatted font-family declarations
src/components/hooks/createWasmCanvas.ts Refactored canvas hook with improved typing and lifecycle management
src/components/WasmIframeWrapper.tsx Added createEffect and refined iframe messaging
src/components/Wallet/utils/format.ts Added trailing comma in options object for readability
src/components/Wallet/WalletContext.tsx Refactored context naming, storage loading/saving, and hooks
src/components/Wallet/WalletApp.tsx Enhanced JSX formatting and event handlers
src/components/WGPUNotification/WGPUNotificationWindow.tsx Consolidated imports and improved drag/resize handling
src/components/WGPUNotification/WGPUNotificationApp.tsx Switched to Show for conditional UI in WebGPU support checks
src/components/Theme/theme.css Reformatted multi-line CSS properties
src/components/Theme/ThemeSwitcher.tsx Removed unused ThemeSwitcher component
src/components/Theme/ThemeContext.tsx Refined context naming and provider implementation
src/components/StatsList.tsx Simplified list rendering and renamed export
src/components/SplashScreen.tsx Modularized splash screen logic, added untrack, improved hooks
src/components/SplashScreen.module.css Reformatted background and size declarations
src/components/ProgramWindow/programContext.tsx Improved TypeScript types and program registry normalization
src/components/ProgramWindow/ProgramWindow.tsx Refined drag-and-drop logic and JSX structure
src/components/ProgramEventDemo.tsx Updated imports, enum naming, and demo event wiring
Comments suppressed due to low confidence (4)

src/components/hooks/createWasmCanvas.ts:433

  • [nitpick] The variable shouldrunInit doesn’t follow camelCase convention. Rename it to shouldRunInit for consistency.
    const shouldrunInit = enabled(); // Depend on enabled prop accessor

src/components/hooks/createWasmCanvas.ts:436

  • [nitpick] The variable iswasmReady should be isWasmReady to follow camelCase and clearly indicate the acronym.
    const iswasmReady = isReady(); // Depend on ready signal

src/components/hooks/createWasmCanvas.ts:440

  • [nitpick] The variable needsinitialization should be needsInitialization to follow camelCase convention and improve readability.
      canvas && shouldrunInit && !iswasmReady && !currentError && !currentBridge;

src/components/StatsList.tsx:39

  • [nitpick] The default export statsList is lowercase, while component names should be PascalCase. Rename it to StatsList for consistency with React/Solid conventions.
export default statsList;

@panchi64 panchi64 merged commit df8615a into dev Jul 10, 2025
1 check passed
@panchi64 panchi64 deleted the feat/dynamic-wasm-link branch July 10, 2025 19:28
panchi64 added a commit that referenced this pull request Jul 10, 2025
 Dynamic Link Deployment Test - Dev Site  (#7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-attention This issue or PR requires acknowledgement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants