Skip to content

fix: clarify imported account token status#82

Draft
ZeroPointSix wants to merge 2 commits into
mainfrom
codexweb/issue-78-import-token-state-label
Draft

fix: clarify imported account token status#82
ZeroPointSix wants to merge 2 commits into
mainfrom
codexweb/issue-78-import-token-state-label

Conversation

@ZeroPointSix

Copy link
Copy Markdown
Owner

Summary

  • Fixes 导入了邮箱,显示未知? #78 by changing the initial refreshable Outlook account token badge from 未知 to 未刷新.
  • Adds the English i18n entry Not refreshed.
  • Adds a frontend contract assertion so imported/refreshable Outlook cards no longer fall back to the old unknown label.

Design Basis

  • Checked the Issue feat: 希望增加一个号池管理的功能 #60 pool-management FD/TD/TDD/TODO and current pool-admin service/repository tests.
  • move_out_of_pool intentionally clears pool_status but keeps the account in account management, so the reported pool-count/account-management-count behavior is preserved and not changed here.

Validation

  • Targeted remote sandbox tests: .venv/bin/python -m pytest tests/test_frontend_account_type_and_refresh_suggestions_contract.py tests/test_auto_import.py tests/test_pool_admin_service.py -> 40 passed.
  • Full remote sandbox run: .venv/bin/python -m pytest -> 1523 passed, 7 skipped, 4 failed in tests/test_pool_cf_real_e2e.py because the real CF Worker returned HTTP 400 / UPSTREAM_BAD_PAYLOAD while creating mailboxes. This matches the repository's existing historical note for that external E2E file and is not touched by this UI-copy change.
  • git diff --check passed before commit.

Risk

  • Low: UI copy/i18n/contract-test only.
  • No backend import, token refresh, account deletion, or pool state behavior changed.

Notes

@ZeroPointSix

Copy link
Copy Markdown
Owner Author

CodeXWeb trace for Issue #78:

  • Source Issue: 导入了邮箱,显示未知? #78
  • Claim comment: 导入了邮箱,显示未知? #78 (comment)
  • Scope: UI label/i18n/contract-test only; no backend import, token refresh, account deletion, or pool-status behavior changed.
  • Validation: targeted sandbox tests 40 passed; full sandbox pytest completed with 1523 passed, 7 skipped, and 4 known external CF Worker real-E2E failures in tests/test_pool_cf_real_e2e.py.
  • Workspace record: WORKSPACE.md entry 277.

This PR is draft and should not be auto-merged.

@sonarqubecloud

Copy link
Copy Markdown

Copy link
Copy Markdown
Owner Author

总体结论:本 PR 的改动范围清晰,和 Issue #78 的用户可见问题一致;本轮未发现阻塞合并的代码问题。

关键发现:

  • 已核对 static/js/features/groups.js 的默认 refreshable Outlook token 徽标,从旧的“未知”改为“未刷新”,且 valid / invalid / expired 等已有状态分支保持不变,风险主要局限在展示文案。
  • 已核对 static/js/i18n.js 增加了 未刷新 -> Not refreshed,没有替换或移除既有 未知 -> Unknown,因此其他未知状态文案不会被误改。
  • 已核对 tests/test_frontend_account_type_and_refresh_suggestions_contract.py 增加了正向断言和旧文案回归断言,能覆盖这次 UI 文案回退风险。
  • PR 描述明确未修改账号导入、token refresh、账号删除或号池状态逻辑;从 diff 看也确实没有触碰这些行为路径。

优先级建议:

  • 阻塞:无。
  • 中:完整测试仍有 tests/test_pool_cf_real_e2e.py 的外部 CF Worker 失败,虽然与本 PR 无关,但合并前建议 maintainer 确认这是当前仓库已接受的外部 E2E 状态,而不是本轮必须修复的问题。
  • 低:如果后续 UI 有截图/浏览器快照测试,可以补一张导入后未刷新 Outlook 卡片的可视化断言,降低纯字符串合约测试漏掉布局问题的风险。

后续建议:

  • 保持 draft,等维护者确认外部真实 E2E 失败可接受后再转 ready。

@ZeroPointSix ZeroPointSix left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

总体结论:本轮正式 review 覆盖 PR #82 当前 head fee5848e2d53ca8051dab213fbe73c0fc59a7d58。改动范围和 Issue #78 的用户可见问题一致,未发现阻塞合并的代码问题。

关键发现:

  • 已核对 static/js/features/groups.js:可刷新 Outlook 账号在没有 token_status 时默认显示从“未知”改为“未刷新”,且 valid / invalid / expired / refreshing 等既有状态分支没有被改动,行为风险集中在展示文案。
  • 已核对 static/js/i18n.js:新增 未刷新 -> Not refreshed,没有移除或替换既有 未知 -> Unknown,因此其他未知状态文案不会被误改。
  • 已核对 tests/test_frontend_account_type_and_refresh_suggestions_contract.py:新增正向断言和旧文案回归断言,能覆盖本次 UI 文案回退风险。
  • PR 描述声明不涉及账号导入、token refresh、账号删除或号池状态行为;从本次 diff 看也没有触碰这些后端路径,描述与改动一致。

优先级建议:

  • 阻塞:无。
  • 中:完整测试仍记录 tests/test_pool_cf_real_e2e.py 的外部 CF Worker 失败;虽然与本 PR diff 不相邻,合并前建议 maintainer 确认这仍是当前仓库可接受的外部 E2E 状态。
  • 低:如果后续有浏览器截图或可视化回归测试,可以补一条导入后未刷新 Outlook 卡片的渲染断言,降低纯字符串合约测试漏掉布局问题的风险。

后续建议:

  • 当前 PR 可以继续保持小范围修复;转 ready 前重点确认外部 E2E 失败是否按仓库既有策略豁免,而不是扩展本 PR 去处理无关的 CF Worker 问题。

巡检审查标记:PR & Issue Reviewer 已审查当前 head commit fee5848e2d53ca8051dab213fbe73c0fc59a7d58;本轮对 ZeroPointSix/outlookEmailPlus#82 写回正式 review。

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