Implement Outlook Email Plus provider features#76
Open
zjm54321 wants to merge 9 commits into
Open
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for a new “Outlook Email Plus” mail provider/generator, including UI configuration, background lifecycle handling (claim/complete/release), verification-code polling, and accompanying unit tests.
Changes:
- Introduces
outlook-email-plus-utils.jsandbackground/outlook-email-plus-provider.jsto normalize config, claim addresses, manage alias usage, and poll verification codes. - Wires the new provider/generator through background verification flows and sidepanel settings/UI (including persistence).
- Adds node:test coverage for both the utility module and provider behaviors.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/outlook-email-plus-utils.test.js | Adds unit tests for URL/header/response/address normalization helpers. |
| tests/outlook-email-plus-provider.test.js | Adds end-to-end-ish provider tests for claiming, reuse, lifecycle callbacks, and polling. |
| sidepanel/sidepanel.js | Adds UI state + normalization + persistence for Outlook Email Plus settings and generator/provider selection. |
| sidepanel/sidepanel.html | Adds provider/generator options and a dedicated Outlook Email Plus settings section. |
| outlook-email-plus-utils.js | New shared utility module for normalization and response handling. |
| background/verification-flow.js | Routes verification polling to Outlook Email Plus when selected. |
| background/steps/fetch-signup-code.js | Treats Outlook Email Plus like other polling-based providers in step 4. |
| background/steps/fetch-login-code.js | Treats Outlook Email Plus like other polling-based providers in step 8. |
| background/outlook-email-plus-provider.js | New provider implementation: claim/reuse aliases, poll codes, complete/release claims. |
| background/logging-status.js | Adds display label for the new provider. |
| background/auto-run-controller.js | Ensures Outlook Email Plus settings/claim state are carried into auto-run state snapshots. |
| background.js | Imports new modules, adds persisted settings + normalization, integrates generator selection, redacts secrets in state logging, and finalizes claim lifecycle with run records. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }); | ||
| inputOutlookEmailPlusAliasMaxPerMailbox?.addEventListener('blur', () => { | ||
| inputOutlookEmailPlusAliasMaxPerMailbox.value = String( | ||
| normalizeOutlookAliasMaxPerAccount(inputOutlookEmailPlusAliasMaxPerMailbox.value) |
Comment on lines
+339
to
+343
| const aliasMax = getAliasMaxForState(state, storedClaim.aliasMax); | ||
| const aliasIndex = Math.min(aliasMax, Math.max( | ||
| getPayPalAliasIndex(storedClaim.registrationEmail, baseAddress) || 0, | ||
| Math.floor(Number(storedClaim.aliasIndex) || 0) | ||
| )); |
Comment on lines
+465
to
+466
| function getAliasMaxForState(state = {}) { | ||
| return normalizeAliasMax(state.outlookEmailPlusAliasMaxPerMailbox, DEFAULT_ALIAS_MAX_PER_MAILBOX); |
| buildOutlookEmailPlusHeaders, | ||
| buildOutlookEmailPlusPayPalAliasAddress, | ||
| deriveOutlookEmailPlusBaseAddress, | ||
| generateOutlookEmailPlusTag, |
Comment on lines
+653
to
+660
| const claim = resolveClaimRegistration(normalizeOutlookEmailPlusClaim(result), { | ||
| aliasTag: options.aliasTag, | ||
| aliasIndex: 1, | ||
| aliasMax, | ||
| callerId, | ||
| projectKey: config.projectKey, | ||
| taskId, | ||
| }); |
| } | ||
|
|
||
| if (sawNoCode) { | ||
| await completeOutlookEmailPlusClaim(latestState, { result: 'verification_timeout' }); |
Author
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.


添加了 Outlook Email Plus 的支持