Skip to content

feat(media-os): integrate real-time status data from video API#1930

Closed
whed961114-oss wants to merge 1 commit into
heygen-com:mainfrom
whed961114-oss:feat/media-os-live-data
Closed

feat(media-os): integrate real-time status data from video API#1930
whed961114-oss wants to merge 1 commit into
heygen-com:mainfrom
whed961114-oss:feat/media-os-live-data

Conversation

@whed961114-oss

Copy link
Copy Markdown

Changes

Core Feature

  • 接入真实数据:从 video.kuaibaoguang.cn/api/video-dashboard.php 获取实时状态
    • action=list:今日生成视频数量
    • action=system:AI 在线状态 + 渲染状态

Implementation Details

  • 新增两个 fetch 调用在 App.tsx
  • Vite dev server 代理配置(/video-api)+ token 注入,避免 CORS 和密钥泄露
  • 新增纯函数 deriveAiStatus / deriveRenderStatus + 单测(7/7 全绿)
  • UI 标签优化:GPU 状态 → 渲染状态(准确反映纯 CPU 渲染管道)

Bug Fixes

  • 修复生产权限问题:storage/db/media_os.sqlitehyperframes-demo/renders/ 目录由 root:root 改为 www:www,解决 PHP-FPM 无法写入导致的 500 错误

Tests & Build

  • Unit tests: 7/7 ✅
  • tsc --noEmit
  • vite build
  • Puppeteer E2E 验证:实际数据流通正常

Not Included (Next Phase)

  • 生成视频按钮的动态功能实现(仍为静态模板)

- Add fetch calls for video count (list API) and system status
- Implement Vite dev proxy with token injection for CORS bypass
- Add deriveAiStatus/deriveRenderStatus pure functions with unit tests
- Update UI label: 'GPU状态' → '渲染状态' (reflect CPU-only pipeline)
- Split App into small focused components (StatCard/PostList/PostCard/
  ActionPlanPanel/GenerateVideoButton) + data hooks (useMediaOsData/
  useGenerateVideo) to stay under the repo's complexity/size budget
- Add "立即生成视频" button wired to action=generate, with loading state,
  success/error feedback, and auto-refresh of today's video count
- Add generateVideo() with injectable fetch for unit testing success/
  skip/failure paths
- Fix media_os.sqlite, renders/, and storage/logs/*.log permissions
  (chown www:www) — root-owned files were causing every DB-backed API
  call to 500 or return HTML warnings mixed into JSON
- All tests (11/11), typecheck, and build passing

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@jrusso1020

Copy link
Copy Markdown
Collaborator

Thanks for the submission, but I'm going to close this — it's out of scope for the HyperFrames repo.

@hyperframes/media-os is a self-contained dashboard app whose data sources (kuaibaoguang.cn WordPress feed and video.kuaibaoguang.cn/api/video-dashboard.php) are external infrastructure that HeyGen doesn't own or operate. It has no dependency on, or integration with, HyperFrames itself — the connection is name-only. Merging it would put third-party integration code, secrets wiring, and a PHP/SQLite backend contract into this monorepo for us to own and maintain indefinitely, which isn't something we can take on here.

If this is sanctioned HeyGen work, it belongs in its own repository. If you'd like to build on top of HyperFrames as a consumer of the package, happy to point you at the docs — but that integration shouldn't live inside this repo.

@jrusso1020 jrusso1020 closed this Jul 4, 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