Skip to content

Harden side menu lifecycle and strictness - #1

Merged
ddespinoza merged 1 commit into
mainfrom
fix/menu-stability-lifecycle-hardening
Oct 25, 2026
Merged

ddespinoza merged 1 commit into
mainfrom
fix/menu-stability-lifecycle-hardening

Conversation

Copilot AI commented Oct 25, 2026

Copy link
Copy Markdown

Summary

This pull request hardens side_menu runtime stability and maintainability by fixing lifecycle leaks, removing unnecessary polling, and improving strictness and null-safety across frontend and backend code paths.

Changes

  • Frontend lifecycle hardening:
    • Added listener/timer teardown in menu and loader components.
    • Replaced setInterval layout polling in StandardMenu.vue with resize-driven requestAnimationFrame recomputation.
    • Fixed opener/closer accessibility attributes (aria-label) and removed undefined binding usage.
    • Added null/availability guards in helper utilities (menu, dom, setting).
  • Store and menu correctness:
    • Removed redundant await await and unused imports in src/store/nav.js.
    • Fixed order index handling where index 0 could be incorrectly dropped.
  • Backend strictness and safety:
    • Added declare(strict_types=1); across lib/ PHP files.
    • Replaced loose in_array checks with strict checks.
    • Moved key controllers away from direct \OC::$server session access to injected IUserSession.
    • Added null-user guards in personal/app controller flows.
    • Simplified app ordering comparator logic for predictable sorting.

Impact

  • Reduces memory-leak risk from orphaned listeners/timers.
  • Cuts unnecessary CPU/layout work from continuous polling.
  • Improves resilience against null/undefined runtime states.
  • Tightens type and comparison behavior for safer backend execution.

Validation

  • PHP syntax lint (php -l) passes for all files under lib/.

Stabilize menu behavior by cleaning up global listeners/timers, replacing continuous polling with resize-driven recompute, guarding null-sensitive frontend helpers, and tightening backend typing/comparisons and user-session handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ddespinoza
ddespinoza marked this pull request as ready for review October 25, 2026 00:40
@ddespinoza
ddespinoza merged commit 032ece7 into main Oct 25, 2026
3 checks passed
@ddespinoza
ddespinoza deleted the fix/menu-stability-lifecycle-hardening branch October 25, 2026 00:50
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.

2 participants