fix: #3621490 Record complete cacheability in entityViewAlter and menuLocalTasksAlter

Issue: https://www.drupal.org/project/canvas_override/issues/3621490

Summary

entityViewAlter() added the user.permissions cache context only on the permission-granted branch, so a node build cached for a user without Canvas Override permissions was reused for editors and the core/htmx library went missing.

menuLocalTasksAlter() varied its tabs by five permissions, the node type's third-party setting and the node label without declaring any of them.

The context is now added unconditionally, and the local-task alter records the node type dependency, the user.permissions context and the node dependency before any early return.

AI-Generated: Yes (fix authored with Claude Code; reviewed by Rajab Natshah.)

Checkpoints

  • File an issue about this project
  • Addition/Change/Update/Fix to this project
  • Testing to ensure no regression
  • Automated unit/functional testing coverage
  • Developer Documentation support on feature change/addition
  • User Guide Documentation support on feature change/addition
  • UX/UI designer responsibilities
  • Accessibility and Readability
  • Reviewed by a human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Update Release Notes
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading