Skip to content

Comments

Add per-app cascade configuration and auto app ID detection#1

Draft
Copilot wants to merge 9 commits intomainfrom
copilot/refactor-onload-function
Draft

Add per-app cascade configuration and auto app ID detection#1
Copilot wants to merge 9 commits intomainfrom
copilot/refactor-onload-function

Conversation

Copy link

Copilot AI commented Feb 18, 2026

Cascade configuration was global. App registration required manual appId passing. Iframes with identical titles couldn't share cascade state.

Changes

Per-app cascade settings

  • App definitions now accept cascadeOffset and maxCascade (defaults: 15px, 4 stack)
  • registerActiveApp() stores settings in active instance
  • addWindow() reads per-app settings instead of globals

Auto appId detection

  • addWindow() extracts title as appId when not provided
  • Eliminates explicit appId parameter in most cases

Iframe cascade defaults

  • simpleIframe() enables cascade by default
  • addIframeWindow() helper reduces duplication across 3 call sites

Example

// App definition with custom cascade
APP_REGISTRY.appDefinitions.utilities.myApp = {
    cascadeOffset: 20,  // Per-app override
    maxCascade: 6
};

// Before: manual appId required
addWindow(iframe, 0, 0, 0, 0, true, true, 'pixelwind', appDef);

// After: auto-detected from title
addIframeWindow(simpleIframe('https://example.com', { title: 'pixelwind' }));

Multiple iframes with title "Boids Test" now share cascade state automatically:

Cascade behavior

Windows cascade with 15px offset, tracked in single APP_REGISTRY.activeInstances['Boids Test'] entry.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 18, 2026 03:36
Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor onload function in hardcoded.js for standardization Refactor startup to app registry with configurable parameters Feb 18, 2026
Copilot AI requested a review from zigzag1001 February 18, 2026 03:41
@zigzag1001 zigzag1001 closed this Feb 18, 2026
@zigzag1001 zigzag1001 deleted the copilot/refactor-onload-function branch February 18, 2026 04:06
@zigzag1001 zigzag1001 restored the copilot/refactor-onload-function branch February 18, 2026 04:36
@zigzag1001 zigzag1001 reopened this Feb 18, 2026
Copilot AI and others added 2 commits February 18, 2026 04:51
Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
Copilot AI changed the title Refactor startup to app registry with configurable parameters Refactor app registry to script.js with per-profile cascade and independent URL parameters Feb 18, 2026
Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
Copilot AI changed the title Refactor app registry to script.js with per-profile cascade and independent URL parameters Refactor app registry into definitions and active instances with per-app cascade tracking Feb 18, 2026
Copilot AI and others added 2 commits February 18, 2026 06:18
Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
…orage

Co-authored-by: zigzag1001 <72932714+zigzag1001@users.noreply.github.com>
Copilot AI changed the title Refactor app registry into definitions and active instances with per-app cascade tracking Add per-app cascade configuration and auto app ID detection Feb 18, 2026
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