Proposal: narrowly scoped account order API
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- api
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- JavaScript
- Stelle
- 33
- Fork
- 18
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di thunderbird/webext-experiments
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
thunderbird/webext-experiments#72 · 3 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
thunderbird/webext-experiments#61 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
thunderbird/webext-experiments#60 · 1 commento ·
Tutte le issue di thunderbird/webext-experiments
Issue simili
-
Edit: Hello TasteApertachannels:edit check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
hiero-ledger/hiero-sdk-js#4793 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
addyosmani/agent-skills#802 ·
I maintainer di solito rispondono entro 4 giorni
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CollaboraOnline/online#16421 · 1 commento ·