Skip to content

[feat] desktop: add bundled macOS and Windows apps - #397

Open
FayeSpica wants to merge 34 commits into
ThinkFlowLab:mainfrom
FayeSpica:feat/desktop-host
Open

FayeSpica wants to merge 34 commits into
ThinkFlowLab:mainfrom
FayeSpica:feat/desktop-host

Conversation

@FayeSpica

@FayeSpica FayeSpica commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Download the review build

Download and install the build for your platform. Both installers passed the Desktop Release checks.

Platform Installer Installation
macOS (Apple Silicon) OpenDirector-v0.1.4-mac-arm64-adhoc.dmg Open the DMG and drag OpenDirector to Applications. Try opening OpenDirector from Applications. If macOS blocks this review build, go to System Settings → Privacy & Security → Security. Find the OpenDirector blocked notice, click Open Anyway, then confirm in the prompt. Apple Support.
Windows (x64) OpenDirector-v0.1.4-win-x64-unsigned.exe Run the installer, then open OpenDirector from the Start menu.

SHA-256 files are on the v0.1.4-desktop-test.22 prerelease.

Summary

  • Add a Desktop Release GitHub Actions workflow. On version tags or manual dispatch, it builds and smoke-tests the macOS arm64 DMG and Windows x64 NSIS installer. The macOS job verifies the app’s ad-hoc signature before and after smoke testing. Each platform independently uploads its installer and SHA-256 file to the same draft GitHub Release after its checks pass.

  • Add a bundled Electron application for macOS and Windows. It reuses the Web UI and project services through an authenticated local Python Host. Closing the window keeps the Host running. Quitting checks active work and releases the app’s edit sessions.

  • Add a collapsible project sidebar, platform-specific window controls, and terminal command registration. Localize the first project’s automatic name, the default conversation title, and the CLI default model label. Preserve user-defined names across language changes. See the desktop architecture.

  • Download example canvases through the local Host and show download progress in the import UI.

Linked issue

Refs #363. Notarization and automatic updates are separate work.

Follow-up

  • Apple Developer ID signing for official macOS releases is open for discussion.
  • Add a Manage OpenDirector CLI… item to the desktop app menu to manage the opendirector terminal command.

Labels

  • Labels applied, including type:feat, area:desktop, and area:ci.

Test plan

  • Bilingual browser regression: node tests/browser/bilingual_defaults.mjs against the isolated assistant fixture. Switch English to Chinese and back. Check the history list and preserve custom names.
  • PR checks: run the repository’s Release checks and Desktop checks.
  • On both installers, smoke tests verified that dropped MP4, PNG, and WAV files retained their original SHA-256 fingerprints and remained bound to canvas nodes after relaunch.
  • macOS installer: run the release smoke test on the App copied from the DMG and verify its signature before and after.
  • Windows installer: install, run the packaged smoke test, and uninstall.

Test result

  • Bilingual browser regression: passed locally and in the assistant browser job.
  • PR checks: see the Checks tab for the current commit.
  • macOS installer: the App copied from the DMG passed all three smoke launches and strict signature checks before and after the test. macOS job
  • Windows installer: silent installation, all three smoke launches, and uninstall passed. Windows job

Clean-machine acceptance for Agent-assisted creation, editing, export, and recovery is pending.

Evidence that it works

Desktop screenshots show the project sidebar in its collapsed and expanded states, along with the example canvas and Windows installer.

macOS

App
image

Sidebar collapsed by default

Sidebar collapsed

Sidebar expanded

Sidebar expanded

Example
image

Windows

Install
image

Sidebar collapsed by default
image

Provider verification

  • No real-provider verification is claimed. The assistant browser regression uses an isolated model fixture.

Bilingual UI

  • New UI and native-menu text includes zh-CN and en-US.

Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@FayeSpica FayeSpica added type:feat New capability or behaviour area:ci Continuous integration and checks area:desktop Desktop integration / 桌面集成 labels Nov 18, 2026
Comment thread apps/desktop/src/command.mjs Fixed
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@FayeSpica
FayeSpica marked this pull request as ready for review November 18, 2026 11:45
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@github-actions github-actions Bot added area:docs Documentation / 文档 area:timeline Timeline, subtitles and export labels Nov 18, 2026
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@github-actions github-actions Bot added the area:install Install, startup and environment support label Nov 18, 2026
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@github-actions github-actions Bot added the area:i18n Localisation and bilingual UI label Nov 18, 2026
FayeSpica and others added 4 commits November 18, 2026 23:19
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
## summary

- Delete uv's version-less Python alias (a junction on Windows) before
  packaging. electron-builder dereferences that link for a Windows target,
  so the archive carried the whole runtime twice.
- Prepare each runtime from an empty python directory and point the manifest
  at the concrete distribution, rejecting an ambiguous layout instead of
  taking whichever directory readdir happened to return first.
- The installer payload falls from 1,336.7 MiB and 11,837 files to 969.6 MiB
  and 5,958 files; the unsigned installer falls from 403.2 MiB to 293.7 MiB.

## validation

- npm ci --prefix apps/desktop, npm run prepare:runtime, and
  npm run pack:windows produced one python directory under
  resources/runtime and the installer above.
- node apps/desktop/scripts/smoke.mjs against win-unpacked: passed.
- npm test --prefix apps/desktop: 6 passed, 1 skipped (the packaged-host test
  needs OPENDIRECTOR_DESKTOP_RUNTIME).
- 7z extraction of the installer: 46.7 s and 11,837 files before, 25.0 s and
  5,958 files after.
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@github-actions github-actions Bot added the area:canvas Canvas, nodes and direct manipulation label Nov 18, 2026
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@github-actions github-actions Bot added the area:agent Agent runtime, assistant chat and tools label Nov 18, 2026
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
@FayeSpica FayeSpica changed the title [feat] desktop: add a bundled application and collapsible sidebar [feat] desktop: add bundled macOS and Windows apps Nov 19, 2026
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
## summary

- Mock example downloads at the local Host endpoint.
- Use distinct images for the H3 first and last frame uploads.

Signed-off-by: Weiming Liao <liaowm5@gmail.com>
…top-release-397

Signed-off-by: Weiming Liao <liaowm5@gmail.com>

# Conflicts:
#	apps/api/src/opendirector_api/agent.py
#	tests/browser/minimax_h3.mjs
…top-release-397

Signed-off-by: Weiming Liao <liaowm5@gmail.com>

# Conflicts:
#	apps/api/src/opendirector_api/agent.py
#	docs/README.md
Signed-off-by: Weiming Liao <liaowm5@gmail.com>
## summary
- Stream asset uploads to the shared Host API and clean up cancelled uploads.
- Decode annotation data locally and verify saved media in desktop and browser regressions.

Signed-off-by: Weiming Liao <liaowm5@gmail.com>
Comment thread apps/desktop/src/main.mjs
// Electron net.fetch buffers request streams internally. The private Host
// upload uses Node fetch to send the body incrementally over loopback.
const response = await (options.duplex ? fetch(url, options) : net.fetch(url, options));
if (response.status >= 400) log.write(`Host request ${options.method} ${new URL(url).pathname}: ${response.status}\n`);
signal?.throwIfAborted();
const path = `${creationPath(this.id)}/uploads/${handle}`;
try {
const response = await fetch(`/api${path}`, {
Signed-off-by: Weiming Liao <liaowm5@gmail.com>

@wangtiance wangtiance left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

本轮对 92e24cb 做了桌面宿主边界的重点静态审阅:包括自定义协议到 loopback Host 的转发、Host 握手、IPC 来源校验、preload 暴露面以及退出清理。所读代码包含固定 Host origin 检查、清除客户端认证头并注入私有 token、拒绝重定向,以及主窗口/主 frame 的 IPC 校验;本轮在这些路径中未确认新的阻塞问题。这是局部代码审阅,不是完整功能或安全验收,也未在本机运行安装包。

当前 head 的 check-runs API 返回 14 个检查,均为 success,包括 Release checks 的 Python、前端、三条浏览器车道、静态检查、CodeQL 和 Desktop shell 检查。此前 CodeQL 留下的评论不能单独作为当前版本仍存在漏洞的证据,仍应结合当前告警状态和实际数据流判断。

发布证据还需与源码检查分开:desktop.yml 当前只在 Ubuntu 运行 shell 单元测试,不证明 macOS/Windows 安装包已经通过创建、编辑、导出及恢复验收。PR 描述也明确把干净机器的这些验收列为 pending。建议在发布前记录安装包对应 SHA、系统版本、操作结果及日志;不要把全绿的源码 CI 写成完整桌面验收通过。

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

Labels

area:agent Agent runtime, assistant chat and tools area:canvas Canvas, nodes and direct manipulation area:ci Continuous integration and checks area:desktop Desktop integration / 桌面集成 area:docs Documentation / 文档 area:i18n Localisation and bilingual UI area:install Install, startup and environment support area:timeline Timeline, subtitles and export type:feat New capability or behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants