Skip to content

v0.2.3-beta

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 20 May 19:50

Release v0.2.3-beta

This pre-release includes critical performance improvements, coordinate edge-case robustness fixes, and configuration editor enhancements identified during the recent code review.

🚀 Key Improvements & Optimizations

  1. IANA Timezone Lookup Caching (Performance)

    • Replaced the $O(N)$ linear scans through the polygon boundary dataset (which run on every 1Hz render tick) with a coordinate-keyed ianaTzCache inside GeoClockCard.
    • Keys are based on 4-decimal coordinates (providing highly accurate $\sim 11$-meter resolution).
    • Reduces CPU usage dramatically, particularly on wall-mounted low-power tablets.
    • The cache is automatically cleared on configuration updates and initial data loads.
  2. Longitude Normalization (Robustness)

    • Integrated standard longitude wrapping (-180 to 180 degrees) into the findIanaZoneForLatLon utility inside timezones-iana.ts.
    • Prevents point-in-polygon lookups from failing when tracked entities or Home Assistant zone sensors report out-of-bounds coordinates (e.g. 185 or -190).
    • Covered with robust unit tests in test/timezones-iana.test.ts.
  3. Editor Color Alpha Preservation (Visual Editor Quality)

    • Implemented a smart alpha channel parser and formatting helper (hexToRgb, applyAlpha) inside the card configuration editor.
    • Opening and saving settings through the visual editor no longer strips alpha transparency. It intelligently parses previous configurations (including #rrggbbaa, #rgba, standard rgba(), and modern space-separated rgba()) and merges existing alpha channels when selecting new colors using the 6-digit visual color picker.
    • Cleaned up and removed the unused private strField helper to maintain a warning-free compilation.

📝 Release Note Standards Guideline

To ensure maximum transparency, future releases will consistently include detailed descriptive logs outlining performance impacts, architectural adjustments, and stability gains rather than raw autogenerated logs alone.