Skip to content

Reduce memory footprint of version compatibility popup - #267

Closed
MaslowBot with Copilot wants to merge 2 commits into
Maslow-Mainfrom
copilot/fix-popup-memory-warnings
Closed

MaslowBot with Copilot wants to merge 2 commits into
Maslow-Mainfrom
copilot/fix-popup-memory-warnings

Conversation

Copilot AI commented Nov 17, 2025 •

Copy link
Copy Markdown

Description

Version compatibility warning popup consumed excessive memory through verbose HTML messages and redundant logging. On ESP32 devices with limited RAM, this triggered low memory warnings.

Fixes #(issue)

Changes

Simplified popup message (www/js/connectdlg.js)

  • Reduced message from 396 to 217 bytes (45% reduction)
  • Consolidated multi-paragraph HTML to single concise line
  • Shortened title: "Version Compatibility Warning" → "Version Warning"

Removed redundant logging

  • 3 console.log/warn statements
  • 4 addMessage serial log calls

Before/After

// Before: 396 bytes
const warningTitle = "Version Compatibility Warning";
const warningMessage = `<p><strong>Firmware and WebUI versions may not be compatible:</strong></p>
    <p>• Firmware version: <code>${fw_version}</code></p>
    <p>• WebUI version: <code>${web_ui_version}</code></p>
    <p><br/>This may cause unexpected behavior...`;

// After: 217 bytes
const warningMessage = `<p><strong>Version mismatch:</strong> FW: ${fw_version}, UI: ${web_ui_version}<br/>Update to matching versions for best compatibility.</p>`;
alertdlg("Version Warning", warningMessage);

Build size impact: 131.49 kB → 131.23 kB compressed (-260 bytes)

Screenshot

Version Warning Popup

Note: Issue mentioned "new release" popups but none exist in codebase. Only version compatibility popup addressed.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have thoroughly tested this on hardware and these changes do not break any existing functionality. This is important!
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
Original prompt

This section details on the original issue you should resolve

<issue_title>popup wantings cause memory warnings</issue_title>
<issue_description>the popups for version incompatibilities and new releases are causing low memory warnings, find a way to reduce the memory footprint of these alerts.</issue_description>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Simplified warning message text from 396 to 217 bytes (45% reduction)
- Removed redundant console logging statements
- Removed duplicate serial log messages
- Shortened title from "Version Compatibility Warning" to "Version Warning"
- Consolidated multi-paragraph message into single concise line
- Compressed build size reduced by ~250 bytes (131.49 kB to 131.24 kB)

Co-authored-by: MaslowBot <231786780+MaslowBot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix memory warnings caused by popups Reduce memory footprint of version compatibility popup Nov 17, 2025
Copilot AI requested a review from MaslowBot November 17, 2025 21:02
@davidelang

Copy link
Copy Markdown
Collaborator

this has too much overlap with other work, closing

@davidelang davidelang closed this Nov 17, 2025
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.

popup wantings cause memory warnings

3 participants