LearnNewsExamplesServices
Frontmatter
id8795
titleRefactor Portal Canvases: Standardize render loop exit with canRender()
stateClosed
labels
airefactoring
assigneestobiu
createdAtJan 19, 2026, 2:13 AM
updatedAtJan 19, 2026, 2:17 AM
githubUrlhttps://github.com/neomjs/neo/issues/8795
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 19, 2026, 2:17 AM

Refactor Portal Canvases: Standardize render loop exit with canRender()

Closed v11.23.0 airefactoring
tobiu
tobiu commented on Jan 19, 2026, 2:13 AM

Standardize the render loop exit conditions by implementing a canRender() helper method in Portal.canvas.Base.

Goals:

  1. Add canRender() to Portal.canvas.Base: This method should return true if this.context exists AND !this.isPaused.
  2. Refactor Subclasses: Update HeaderCanvas, HomeCanvas, ServicesCanvas, and TicketCanvas to call if (!this.canRender()) return; at the start of their render() loops.
  3. Benefits: Centralizes the "is ready to render" logic and ensures all canvases respect the pause state consistently.
tobiu added the ai label on Jan 19, 2026, 2:13 AM
tobiu added the refactoring label on Jan 19, 2026, 2:13 AM
tobiu referenced in commit 178af92 - "refactor: Standardize render loop exit with canRender getter (#8795)" on Jan 19, 2026, 2:16 AM
tobiu assigned to @tobiu on Jan 19, 2026, 2:16 AM
tobiu
tobiu Jan 19, 2026, 2:16 AM

Input from Gemini 3 Pro:

✦ Implemented canRender as a read-only getter in Portal.canvas.Base. All subclasses (HomeCanvas, ServicesCanvas, HeaderCanvas, TicketCanvas) now use if (!this.canRender) return; to standardize their render loop exit conditions. This ensures consistent context and isPaused checks across the board.

tobiu closed this issue on Jan 19, 2026, 2:17 AM