You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Playwright project configuration and implement comprehensive CI/Pipeline improvements
- Fixed Playwright "Pixel" project error by correctly mapping device names to project names in mobile-ux-tests matrix
- Exposed retry parameters as environment variables (DEPENDENCY_INSTALL_RETRIES, DEPENDENCY_INSTALL_TIMEOUT, RETRY_DELAY_SECONDS) for better CI tuning
- Enhanced cache configuration to include both package-lock.json and yarn.lock for better cache invalidation
- Optimized build process by removing duplicate yarn build commands from server startup steps
- Fixed deprecated conditional syntax in PLAYWRIGHT_BASE_URL environment variable
- Added comprehensive feature flag system (src/utils/featureFlags.ts) for controlling global patches with environment variable support
- Enhanced GLOBAL_PATCHES.md documentation with feature flag information and safer defaults
- Updated polyfills to use conditional loading based on feature flags
- Integrated SafeEventListenerUtility with feature flag control in index.tsx
- Increased wallet restore test timeout from 5s to 45s with enhanced error handling (30s timeout for wallet interface)
- Improved error logging and made all global patches opt-in for better security
Co-authored-by: 0xrinegade <[email protected]>
Copy file name to clipboardExpand all lines: GLOBAL_PATCHES.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,33 @@ This document provides comprehensive documentation about global modifications, m
6
6
7
7
SVMSeek operates in a complex browser extension ecosystem where multiple wallet extensions compete for global properties and APIs. To ensure compatibility and prevent crashes, several global modifications have been implemented as defensive programming measures.
8
8
9
+
**⚠️ IMPORTANT:** All global patches can now be controlled via feature flags in `src/utils/featureFlags.ts`. This allows fine-grained control over which modifications are enabled in different environments.
10
+
11
+
## 🎛️ Feature Flag Control
12
+
13
+
Global patches are now controlled by environment variables and feature flags:
14
+
15
+
```bash
16
+
# Global patch control
17
+
REACT_APP_ENABLE_OS_POLYFILL=true
18
+
REACT_APP_ENABLE_BUFFER_POLYFILL=true
19
+
REACT_APP_ENABLE_SAFE_EVENT_LISTENERS=true
20
+
REACT_APP_ENABLE_CRYPTO_POLYFILL=true
21
+
22
+
# Security features (enabled by default)
23
+
REACT_APP_DISABLE_RATE_LIMITING=false
24
+
REACT_APP_DISABLE_ORIGIN_VALIDATION=false
25
+
REACT_APP_DISABLE_MESSAGE_SECURITY=false
26
+
27
+
# Extension compatibility (enabled by default)
28
+
REACT_APP_ENABLE_EXTENSION_COMPATIBILITY=true
29
+
```
30
+
31
+
**Default Behavior:**
32
+
- Development: All patches enabled for maximum compatibility
33
+
- Staging: Essential patches enabled
34
+
- Production: Only explicitly enabled patches (safer defaults)
0 commit comments