Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Refactor shared editor-readiness tracking for remote export and review

未关闭
#1,111 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
重构
描述清晰度
描述清楚
活跃度
活跃
技术栈
electron, typescript

调研方向

Start by comparing electron/mcp/remoteExport.ts and electron/mcp/reviewRecording.ts, then inspect their corresponding tests and the PR #1110 review thread for context. Identify the duplicated readiness and lifecycle behavior before locating the shared tracker’s appropriate module and test entry points. Done means both consumers share readiness state, meet the listed acceptance criteria, and their tracker and consumer tests pass.

由索引模型根据 Issue 内容生成。

描述

Summary

Extract the duplicated editor-readiness tracking from electron/mcp/remoteExport.ts and electron/mcp/reviewRecording.ts into a shared createEditorTracker({ ipc }) module.

This is a non-blocking maintainability follow-up to PR #1110. Requested by @deepak982. Keep this refactor separate from that PR.

Rationale

Both consumers maintain ready-editor maps, monitor editor lifecycle events, register remote-editor-ready listeners, and wait for an editor to report the requested recording path. Readiness-rule changes currently require updates in both modules.

Required changes

  • Move ready-editor tracking, path normalization, lifecycle monitoring, and the remote-editor-ready listener into the shared tracker.
  • Expose waitForEditor(videoPath, signal, cancelMessage).
  • Expose onEditorGone(editor, cb) so each consumer can settle its own pending request when its editor closes, crashes, or reloads.
  • Update remote export and recording review to use the tracker and remove their duplicated readiness logic.
  • Ensure both consumers share one tracker instance for the same IPC source rather than creating separate readiness maps and listeners.
  • Preserve each consumer's export or review behavior, cancellation messages, and timeout behavior.

Affected areas

  • electron/mcp/remoteExport.ts
  • electron/mcp/reviewRecording.ts
  • A new shared editor-readiness tracker module
  • Corresponding tracker, remote-export, and recording-review tests

Acceptance criteria

  • Remote export and recording review use shared readiness state and lifecycle monitoring.
  • Waiting resolves only for a live, non-crashed editor reporting the requested recording path.
  • Not-ready notifications and editor closure, crashes, or main-frame reloads clear readiness.
  • Editor disappearance settles the affected consumer's pending request.
  • Cancellation and timeout paths remove wait callbacks, timers, and abort listeners.
  • Tests cover the shared tracker and preserve existing remote-export and recording-review behavior.

References

主要语言
TypeScript
星标
32.4k
派生
2.6k
平均合并
5 天 3 小时
30 天内合并 PR
23

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

webadderallorg/Recordly 的其他 Issue

查看 webadderallorg/Recordly 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。