Repository navigation
fix(calendar): support Safari 15 when limitDays is set - #4351
Draft
ashenthefox wants to merge 2 commits into
Draft
ashenthefox wants to merge 2 commits into
ashenthefox wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4350.
What changes
Object.groupBy()call in the calendar'slimitDays > 0code path with a simple date-keyed grouping loop compatible with Safari 15.YYYY-MM-DDdate keys. No global polyfill and no effect on thelimitDays: 0path.Object.groupByis undefined: empty/unlimited lists, two-day ordering, one-day boundary and maximum entries, already-finished events.Actual validation
develop86a2d722b72353222189c0d8af02104f4b9485f3: 2 passed, 3 failed, expectedTypeError: Object.groupBy is not a functionfrom realcreateEventList.describe/it/expectglobals: 5 passed, 0 failed, exit 0.Module.register('calendar', ...)implementation; a lightweight fakemomentboundary supplies fixed dates to avoid external dependency installation and check exact date behavior.node --run test, Prettier/ESLint, and Electron/browser suite have not been executed locally, because the repository's npm dependencies are not present and network installation is unavailable in this environment. CI status will be checked against the exact PR head. This PR remains draft until relevant checks or another authentic validation route establishes readiness.No screenshots: this is a logic/compatibility correction without intended visual design changes.
Additional execution and exact-head CI
Object.groupByunavailable producesTypeError: Object.groupBy is not a function; loading the patched module under the same browser fixture yields the expected Today/Tomorrow list. This is a controlled module-level browser reproduction, not Safari 15 hardware testing and not an entire MagicMirror UI E2E test.node run_tests.mjs(local minimal Vitest-globals shim) 5 passed / 0 failed;node --check defaultmodules/calendar/calendar.jsandnode --input-type=module --check < tests/unit/modules/default/calendar/calendar_grouping_spec.jsboth exited 0. The latter parses the Vitest-import syntax as ESM; no claim of a native Vitest run.bce194589d10ec89b874228e33a4c49dd66edaec: Review Dependencies (44560388748), CodeQL (44560388822), Electron Rebuild Testing (44560388555), Enforce Pull-Request Rules (44560388603), Run Automated Tests (44560388640) all showcompleted/action_requiredwith zero jobs each. No workflow, linter, Electron suite or Playwright E2E can be counted as passed. Maintainer-side approval is required to start these upstream workflows. This draft stays unverified by CI pending that authorization.Verified current CI and regression recheck (2026-11-20)
GitHub now reports 13 completed/successful head-bound check runs on
4006636c2cdcea6ee84b6fb6d77c21ddc658568c, including Node 22/24/26 test jobs, code-style checks, dependency review, CodeQL and Electron rebuilds. This supersedes the earlieraction_requiredstatuses recorded above for the older commitbce1945.Independently reran the five committed calendar grouping regression cases using the source at the upstream base SHA and patched current PR source in Node 22.16.0 with a minimal Vitest API shim: upstream 2 passed / 3 failed (
Object.groupBy is not a function, exit 1); patched 5 passed / 0 failed (exit 0). This is source-level validation, not a native local Vitest run, full UI E2E run or Safari 15 device test. CI results are GitHub-reported, not rerun locally.