Skip to content

Refine export lifecycle and packaged runtime - #79

Merged
FernandoAbishai merged 1 commit into
mainfrom
phase/9e3-full-video-export-controller
Oct 14, 2026
Merged

FernandoAbishai merged 1 commit into
mainfrom
phase/9e3-full-video-export-controller

Conversation

@FernandoAbishai

Copy link
Copy Markdown
Owner

Problem

Full-video export state lived inside the conditional side panel, so closing the panel could destroy controller state. Startup also waited for the Python backend before showing the main window, the initial renderer bundled every heavy panel, and the packaged Python runtime carried avoidable bytecode, development headers, and package test artifacts.

Change

  • keep the full-video export controller mounted in App while the export panel is opened and closed
  • show the Electron window while the local backend starts and gate backend-dependent actions until readiness
  • lazy-load AI, export, and settings panels
  • remove the unused python-shell production dependency
  • freeze the macOS arm64 runtime dependency graph with a committed constraints file and record/verify its SHA-256 provenance
  • avoid generating Python bytecode, prune non-runtime Torch headers and validated package test artifacts, and exclude backend smoke scripts from the packaged app
  • fix bundle attribution so vendored .dist-info metadata is not counted as an installed distribution

Measured against the previous candidate, app logical size drops from 1,166,546,357 to 961,725,890 bytes (-17.56%) and DMG size from 371,904,320 to 307,127,822 bytes (-17.42%).

Verification

  • frontend lint and production build: PASS
  • desktop QA: PASS, including 125 backend tests and the golden creator path
  • packaged runtime/backend/renderer transport checks: PASS
  • DMG hdiutil verify: PASS
  • real packaged Whisper lifecycle: PASS (verified first download, transcription, offline reuse, corrupt-model repair, deletion and reacquisition)
  • git diff --check: PASS
  • independent review: no MUST-FIX findings

Risks and follow-ups

The dependency graph is version-frozen but not fully artifact-hash reproducible yet because openai-whisper is built from a source archive. Developer ID signing, hardened runtime, notarization, and release-channel metadata are follow-up release-hardening work.

Keep full-video export state mounted outside the side panel, show the app while the backend starts, and lazy-load heavy panels for a lighter initial renderer.\n\nTrim non-runtime Python payload, freeze the macOS arm64 dependency graph, and record/verify constraints provenance. The packaged DMG is about 17% smaller while real Whisper download, offline reuse, repair, and reacquisition remain verified.
Copilot AI balanced review requested due to automatic review settings October 14, 2026 04:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T04:17:49.526462Z 25177a7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@FernandoAbishai
FernandoAbishai merged commit 5af37e9 into main Oct 14, 2026
2 checks passed
@FernandoAbishai
FernandoAbishai deleted the phase/9e3-full-video-export-controller branch October 14, 2026 04:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25177a7d03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 170 to +178
onClick={() => void onOpenWorkflow('full-video')}
disabled={isCheckingSystem}
/>
<StartWorkflowButton
icon={<Smartphone className="h-4 w-4" aria-hidden="true" />}
title="Create Clips"
detail="Find, review and export social-ready moments"
onClick={() => void onOpenWorkflow('short')}
disabled={isCheckingSystem}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate resume actions until the backend is ready

When the Electron home screen is shown during Python startup, only these primary workflow controls are disabled; the Recover/Earlier and recent-project buttons remain active. Those handlers immediately restore a project with a backend /file URL, so clicking one before port 8642 is listening makes the video and waveform requests fail, and the waveform effect does not retry when backendReady later changes. Disable all resume actions—or guard their handlers—until backend startup and system checks complete.

Useful? React with 👍 / 👎.

Comment thread electron/main.js
});
const rendererSmoke = process.env.SCRIPTCUT_RENDERER_SMOKE === '1';
const creatorQualificationSmoke = process.env.SCRIPTCUT_CREATOR_QUALIFICATION_SMOKE === '1';
if (!rendererSmoke && !creatorQualificationSmoke) createWindow();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Register the macOS activate handler before backend startup

Creating the window here before awaiting backend startup introduces a macOS lifecycle gap because the app.on('activate', ...) handler is still registered only after pythonBackend.start() completes. If a user closes the initial window while the backend is starting and then clicks the Dock icon during that interval, the activation is ignored; when startup later finishes, no code recreates the window, so the app remains windowless until another activation. Register the handler before starting the backend or check for an empty window list after startup.

Useful? React with 👍 / 👎.

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