mirror of
https://github.com/openclaw/openclaw.ai.git
synced 2026-07-15 12:25:40 -04:00
[PR #37] [MERGED] Refactor: optimize JavaScript performance and robustness #41
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/openclaw/openclaw.ai/pull/37
Author: @HemantSudarshan
Created: 1/31/2026
Status: ✅ Merged
Merged: 2/13/2026
Merged by: @steipete
Base:
main← Head:main📝 Commits (3)
19a1bbfrefactor: optimize JavaScript performance and robustness0718d00chore: clean up redundant lock files814e080fix: always cleanup clipboard fallback textarea📊 Changes
6 files changed (+355 additions, -8435 deletions)
View changed files
📝
.gitignore(+4 -0)➕
OPTIMIZATIONS_SUMMARY.md(+229 -0)➖
package-lock.json(+0 -5103)➖
pnpm-lock.yaml(+0 -3251)📝
src/layouts/Layout.astro(+1 -1)📝
src/pages/index.astro(+121 -80)📄 Description
Pull Request: JavaScript Performance and Robustness Improvements
📋 Summary
This PR optimizes the landing page JavaScript for better performance, reliability, and future-proofing.
🎯 Changes
1. Fixed Deprecated API Usage
navigator.platformAPInavigator.userAgentDatawith fallback2. Added Comprehensive Null Safety
updateCommands(),updateVisibility(), event listeners, Easter egg3. Performance Optimization
.pm-cmd,.pm-install,.os-cmd, etc.)4. Removed Dead Code
installCmdsobject (13 lines)osCmdsobject5. Enhanced Clipboard Functionality
execCommandfallback for older browsers6. Lock File Cleanup
package-lock.jsonandpnpm-lock.yamlbun.lockas primary (per README).gitignoreto prevent future conflicts📊 Statistics
🧪 Testing
All changes are backwards compatible and defensive:
📚 Documentation
See
OPTIMIZATIONS_SUMMARY.mdfor detailed before/after code comparisons.🤔 Discussion Points
bun.lockbased on the README. Let me know if you prefer keeping multiple lock files.✅ Checklist
OPTIMIZATIONS_SUMMARY.md)Ready for review! Let me know if you'd like any changes or have questions about the approach. 🙌
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.