Proposal: narrowly scoped account order API
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- api
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 33
- Forks
- 18
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de thunderbird/webext-experiments
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
thunderbird/webext-experiments#72 · 3 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
thunderbird/webext-experiments#61 · 2 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
thunderbird/webext-experiments#60 · 1 comentario ·
Todos los issues de thunderbird/webext-experiments
Issues similares
-
Edit: Hello TasteAbiertochannels:edit check:passed
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
hiero-ledger/hiero-sdk-js#4793 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
addyosmani/agent-skills#802 ·
Los mantenedores suelen responder en 4 días
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CollaboraOnline/online#16421 · 1 comentario ·