添加Yahoo邮箱服务#268
Open
sk856 wants to merge 2 commits into
Open
Conversation
## 概述 本 PR 新增 Yahoo 邮箱服务,支持通过 Yahoo 邮箱自动创建临时别名邮箱,并将返回的最终邮箱地址回填到注册流程中,同时接入 OpenAI 与 Kiro 的验证码读取链路。 ## 主要变更 新增 Yahoo Mail 工具与内容脚本: - 新增 `yahoo-utils.js` - 新增 `content/yahoo-mail.js` - 支持 Yahoo 邮箱登录态检测和账号密码自动登录 - 支持创建 Yahoo 临时别名邮箱 侧边栏新增 Yahoo 邮箱服务选项: - 新增 Yahoo 邮箱 provider - 新增 Yahoo 临时邮箱 generator - 新增 Yahoo 账号 / 密码配置卡片 - 登录按钮通过后台打开 Yahoo,并可自动填写账号密码 - Yahoo 选项提示默认邮箱页面需要设置为 ALL 注册/自动运行流程集成: - 手动“获取邮箱”、步骤 2、自动运行均可创建 Yahoo 临时别名并回填 - 创建别名完成后恢复到 ChatGPT 注册页继续提交邮箱 - 步骤 4/8 验证码轮询支持 Yahoo 邮箱 - Yahoo 取码使用收件箱顶部邮件优先策略 - 顶部邮件未直接露出验证码时,会点进邮件正文读取 - Yahoo 验证码流程不删除收件箱邮件 Kiro 流程集成: - Kiro 注册邮箱验证码接入 Yahoo 专用取码链路 - Kiro 桌面授权验证码接入 Yahoo 专用取码链路 - 如果 1 分钟内未收到 Kiro 验证码,会回到 Kiro 页面点击重新发送,再切回 Yahoo 收件箱读取新邮件 - 支持 Yahoo 顶部 AWS/Kiro 邮件识别与正文读码 兼容现有逻辑: - 保留现有侧边栏、HeroSMS、source registry、operation delay 等行为 - 补充 Yahoo provider、verification、Kiro、sidepanel、source registry 相关测试覆盖 ## 测试 - `node --check background.js` - `node --check background/generated-email-helpers.js` - `node --check background/verification-flow.js` - `node --check background/kiro/register-runner.js` - `node --check background/kiro/desktop-authorize-runner.js` - `node --check content/yahoo-mail.js` - `node --check content/kiro/register-page.js` - `node --check sidepanel/sidepanel.js` - Yahoo/Kiro 相关测试:69/69 通过 - 侧边栏/source registry/operation delay 回归测试:33/33 通过
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
该 PR 新增 Yahoo 邮箱服务支持:可在 Yahoo Mail 内自动创建临时别名邮箱并回填到注册流程,同时将 OpenAI 与 Kiro 的验证码读取链路接入 Yahoo 的“顶部邮件优先 + 必要时打开详情读码”策略。
Changes:
- 新增 Yahoo 工具模块与 Yahoo Mail 内容脚本,支持登录态检测、创建一次性别名、顶部邮件读码及必要时打开详情读码
- 侧边栏新增 Yahoo provider / generator 选项与账号密码配置,并通过后台统一打开登录页
- OpenAI 验证码轮询与 Kiro 注册/桌面授权流程接入 Yahoo 专用轮询策略,并补充相应测试
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| yahoo-utils.js | 提供 Yahoo provider/generator 常量、别名/消息规范化及验证码提取辅助方法 |
| content/yahoo-mail.js | Yahoo Mail 内容脚本:顶部邮件检测、打开邮件详情读码、创建一次性别名、登录表单自动填充 |
| mail-provider-utils.js | 将 Yahoo provider 纳入通用 provider 归一化与 mail config 构建 |
| shared/source-registry.js | 注册 yahoo-mail source 与 driver commands,并支持从 location 探测 |
| manifest.json | 为 mail.yahoo.com 注入 Yahoo Mail 内容脚本栈 |
| sidepanel/sidepanel.html | UI 增加 Yahoo provider 与 generator 选项、Yahoo 账号/密码输入行、引入 yahoo-utils.js |
| sidepanel/sidepanel.js | 增加 Yahoo provider/generator 常量、UI 显隐逻辑、收集并保存 Yahoo 凭据、登录按钮改走后台消息打开 |
| flows/openai/mail-rules.js | OpenAI 邮箱验证码轮询参数对 Yahoo 做更长/更慢的默认配置,并启用 keepRefreshingUntilCode |
| background/verification-flow.js | 引入 Yahoo 专用“前台刷新收件箱+顶部邮件检查+重开标签页”轮询逻辑,禁用 Yahoo 普通定时轮询路径 |
| background/generated-email-helpers.js | 新增通过内容脚本在 Yahoo 设置页创建临时别名邮箱的 generator 实现 |
| background/steps/fetch-signup-code.js | Step 4 对 Yahoo 走专用刷新/重发节奏,并避免进入步骤时预先打开旧收件箱轮询 |
| background/steps/fetch-login-code.js | Step 8 对 Yahoo 同步采用专用刷新/重发节奏,并将 Yahoo inbox url 规范到 ALL_INBOX |
| background/steps/submit-signup-email.js | Step 2 从邮箱页回到注册页后新增日志,并调整窗口聚焦逻辑 |
| background/kiro/register-runner.js | Kiro 注册验证码读取接入 Yahoo 顶部邮件 + 打开详情读码 + 1 分钟后回 Kiro 重发策略 |
| background/kiro/desktop-authorize-runner.js | Kiro 桌面授权 OTP 读取接入 Yahoo 顶部邮件 + 打开详情读码 |
| background/navigation-utils.js | source url family 支持 yaho o-mail 的 hostname 识别 |
| background/logging-status.js | 日志状态增加 yahoo-mail label |
| background.js | 引入 yahoo-utils、持久化 Yahoo 凭据字段、支持 Yahoo generator/provider、实现 OPEN_MAIL_PROVIDER_LOGIN 并尝试自动填充登录 |
| tests/yahoo-mail-content.test.js | 覆盖 Yahoo 内容脚本的顶部邮件策略、指纹/新鲜度、打开详情读码、别名创建等行为 |
| tests/yahoo-mail-delete-flow.test.js | 确认别名删除流仍存在且验证码流程不再删除收件箱邮件 |
| tests/verification-flow-yahoo.test.js | 覆盖后台 verification flow 对 Yahoo 使用顶部邮件命令与 payload 约束 |
| tests/source-registry-yahoo.test.js | 覆盖 source registry 对 yahoo-mail 的探测与 command 支持 |
| tests/signup-page-yahoo-resend-guard.test.js | 确认注册页仍保留 resend 能力,避免 Yahoo 前台刷新流被误禁用 |
| tests/sidepanel-yahoo-provider.test.js | 覆盖侧边栏 Yahoo provider/generator UI 与配置字段 |
| tests/kiro-yahoo-mail-command.test.js | 覆盖 Kiro runner 使用 Yahoo detail-capable commands 与重发节奏 |
| tests/background-yahoo-provider.test.js | 覆盖 background 中 normalize/provider/config、OPEN_MAIL_PROVIDER_LOGIN、生成邮箱持久化与自动运行回填等 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
已根据 Copilot 审查意见完成修改:
验证:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 新增 Yahoo 邮箱服务,支持通过 Yahoo 邮箱自动创建临时别名邮箱,并将返回的最终邮箱地址回填到注册流程中,同时接入 OpenAI 与 Kiro 的验证码读取链路。
主要变更
新增 Yahoo Mail 工具与内容脚本:
yahoo-utils.jscontent/yahoo-mail.js侧边栏新增 Yahoo 邮箱服务选项:
注册/自动运行流程集成:
Kiro 流程集成:
兼容现有逻辑:
测试
node --check background.jsnode --check background/generated-email-helpers.jsnode --check background/verification-flow.jsnode --check background/kiro/register-runner.jsnode --check background/kiro/desktop-authorize-runner.jsnode --check content/yahoo-mail.jsnode --check content/kiro/register-page.jsnode --check sidepanel/sidepanel.js