Proposal: narrowly scoped account order API
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- api
调研方向
Read the proposed accountOrder.getOrder() and accountOrder.setOrder(accountIds) contract and the linked contribution description for the implementation, schema, example, documentation, and tests; the payload does not name their file paths. First assess whether the repository wants this experimental API and its permission model. Done means maintainers resolve the scope and permission questions and agree on a draft; the proposal says a pull request will link back here.
由索引模型根据 Issue 内容生成。
描述
Use case
Mail add-ons can read the account order through accounts.list(false), but the documented API has no corresponding write method. CSMailSort needs to let users explicitly arrange existing accounts while retaining Thunderbird's native account list and default account.
Proposed narrow experiment
accountOrder.getOrder(): Promise<string[]>— IDs of the same mail accounts exposed byaccounts.list(false), in native order.accountOrder.setOrder(accountIds): Promise<void>— persist a complete permutation of the current mail account IDs.
The draft uses Thunderbird's native MailServices.accounts.reorderAccounts. It validates the complete membership before writing, reads back the result, flushes preferences, and attempts to restore and verify the previous order if a write or persistence step fails. A failed recovery is reported distinctly. Non-mail accounts keep their visible slots; the native method preserves hidden accounts. The default account is not changed.
There is no window patching, replacement folder pane, folder ordering, grouping, message access, account creation, arbitrary preference access, network access, or startup reapplication in the experiment. The two methods require accountsRead; like all experiments, installation still requests full unrestricted access. A core write permission, if appropriate in the future, is outside this proposal.
Contribution
I have prepared an MPL-2.0 implementation, schema, read-only example, documentation, and dependency-free tests against the actual parent implementation. The repository lint and nine test groups pass, including invalid/stale membership, permission denial, excluded/hidden accounts, no-ops, default-account preservation, and write/readback/recovery errors. Native testing is being recorded separately; the mock tests are not a native UI compatibility claim.
The intended development target is Thunderbird 160. A pull request will link back here with the code and validation limits.
Feedback requested
Would this scope and complete-permutation contract be suitable for a draft in this repository? In particular, is the separate accountOrder namespace appropriate, and should a future core version use a dedicated write permission?
This is a proposal for discussion, not a claim of acceptance into Thunderbird core or approval for an ATN listing.
- 主要语言
- JavaScript
- 星标
- 33
- 派生
- 18
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
thunderbird/webext-experiments 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 5/5 一周以上 新手友好度 25/100
thunderbird/webext-experiments#72 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 5/5 一周以上 新手友好度 20/100
thunderbird/webext-experiments#61 · 2 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
thunderbird/webext-experiments#60 · 1 条评论 ·
查看 thunderbird/webext-experiments 的全部 Issue
相似的 Issue
-
bot:ai-assisted component:platform-js status:untriaged
难度 2/5 1-3 小时 新手友好度 78/100
midnightntwrk/platform-js#69 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
awesome-dsh-plugin/awesome-dsh-plugin#16639 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
manuXD270516/descanso#80 ·
维护者通常 2 天内回复
-
needs verification
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 13 天内回复