LearnNewsExamplesServices
Frontmatter
id8072
titleEnhance LivePreview: Add destroy logic and rename connection handlers
stateClosed
labels
enhancementairefactoring
assigneestobiu
createdAtDec 9, 2025, 5:44 PM
updatedAtDec 9, 2025, 6:03 PM
githubUrlhttps://github.com/neomjs/neo/issues/8072
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 9, 2025, 6:03 PM

Enhance LivePreview: Add destroy logic and rename connection handlers

Closed v11.17.0 enhancementairefactoring
tobiu
tobiu commented on Dec 9, 2025, 5:44 PM

This ticket covers two improvements for Neo.code.LivePreview:

  1. Clean up on destroy: When a LivePreview instance is destroyed, it should ensure its associated pop-out window is closed.

    • Implement a destroy() method.
    • Use Neo.Main.windowClose({names: [this.id]}) to close the specific window associated with this instance.
  2. Rename connection handlers: To improve clarity regarding the data source (window vs app), rename the worker connection listeners:

    • onAppConnect -> onWindowConnect
    • onAppDisconnect -> onWindowDisconnect
    • The events receive appName and windowId, but since appName is not unique across tabs, windowId is the key identifier. Renaming reflects this focus.
tobiu added the enhancement label on Dec 9, 2025, 5:44 PM
tobiu added the ai label on Dec 9, 2025, 5:44 PM
tobiu added the refactoring label on Dec 9, 2025, 5:44 PM
tobiu assigned to @tobiu on Dec 9, 2025, 5:44 PM
tobiu referenced in commit 3fe41a5 - "Enhance LivePreview: Add destroy logic and rename connection handlers #8072" on Dec 9, 2025, 6:02 PM
tobiu closed this issue on Dec 9, 2025, 6:03 PM