Skip to content

fix(interactive): contain scrolling and regenerate code - #1325

Open
KimYeongHyeon wants to merge 1 commit into
THU-MAIC:mainfrom
KimYeongHyeon:fix/interactive-runtime-recovery
Open

fix(interactive): contain scrolling and regenerate code#1325
KimYeongHyeon wants to merge 1 commit into
THU-MAIC:mainfrom
KimYeongHyeon:fix/interactive-runtime-recovery

Conversation

@KimYeongHyeon

@KimYeongHyeon KimYeongHyeon commented Sep 1, 2026

Copy link
Copy Markdown

Summary

Fixes runaway scrolling in generated interactive content and adds a host-owned recovery control that regenerates failed Python/code widgets without replacing narration or scene actions.

Related Issues

Related to #314 and #202. No existing issue exactly matched the runaway root-scroller behavior shown in the reproduction.

Changes

  • enforce a single bounded root scroller inside generated iframes, with the viewport patch injected after authored head styles
  • expose widget type to the host and add an owner-only Regenerate code control outside the sandbox
  • regenerate content from the persisted outline while preserving scene identity, narration, and actions
  • guard read-only/edit-locked/stale responses and localize the control in all 12 locales
  • add unit, real-Chromium, and headed desktop/mobile regression coverage

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or build changes

Verification

Steps to reproduce / test

  1. Open a generated interactive code scene whose authored CSS sets html, body as root scrollers and whose content exceeds the viewport.
  2. Confirm scrolling stays inside the iframe and does not grow the page indefinitely.
  3. Click Regenerate code and confirm only the code-widget content is replaced.

What you personally verified

  • 28 targeted unit tests passed.
  • Real Chromium root-scroll regression passed.
  • Headed Playwright passed at 1280x900 and 390x844, including scroll ownership, regeneration, clean page console/API responses, and before/after screenshots.
  • Full tsc --noEmit, targeted ESLint/Prettier, and 12-locale key alignment passed.
  • Read-only, edit-lock, missing/stale generation boundaries are covered by hard gates/tests.

Evidence

  • CI passes (pnpm check && pnpm lint && npx tsc --noEmit)
  • Manually tested locally
  • Screenshots / recordings attached (if UI changes)

Checklist

  • My code follows the project coding style
  • I have performed a self-review of my code
  • I have added/updated documentation as needed
  • My changes do not introduce new warnings
@chatgpt-codex-connector

Copy link
Copy Markdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant