Files

12 KiB
Raw Permalink Blame History

Decisions

Decisions taken on tmail-flutter, oldest first. Append only: a decision that changes gets a new entry that replaces the old one and cites it. Entry format: the twake-decisions skill of linagora/twake-guidelines.

Categories: UX, UI, Product, Architecture, Infra, Tech.

2026-11-24, [Infra] A fork pull request runs no code before a linagora member vouches for its head commit

  • Decision: replaces the fork check of the PR image delivery, which let any fork run its tests and was approved by a comment tied to no commit: the Jenkinsfile starts with an Authorize fork stage: a pull request from a fork runs nothing of its own (build, tests, scripts, post actions) unless the fork owner is a linagora member, or a member approved its head commit, submitted a review "Build this please" on it, or commented "Build this please " with its full id. No credential is bound at pipeline level; github and dockerHub are bound only around the steps that use them (withGithubCredential, withDockerHubLogin with a throwaway Docker config). The block holding these helpers is the same in the Jenkinsfiles of twake-contacts-frontend, twake-calendar-frontend, twake-calendar-side-service, webadmin-proxy, tmail-flutter, esn-sabre, tmail-backend and twake-mail-admin, and is changed in all of them.
  • Decided by: Benoit Tellier, after the twake-qa security review of twake-calendar-side-service (SEV-1, 2026-11-23); the pipeline of twake-contacts-frontend is the model.
  • Why: the agents are persistent and shared, so code of a pull request that runs before the check can read a credential bound later in the same build, or leave a process behind for a later one. A review is tied to a commit by GitHub, unlike a comment, so a commit pushed after the approval is not built until a member reviews it again.
  • Scope: Jenkinsfile and JenkinsfileMobile. The backend teardown in post runs only for an authorized build.

2026-11-25, [Architecture] On web basic auth, a sign out in one tab invalidates the login copy of every other tab through a marker in localStorage

  • Decision: the basic-auth login of a tab lives in its sessionStorage next to a tag holding the sign-out marker (basicAuthSignOutMarker in localStorage) it was saved under. A user sign out replaces the marker. A tab whose tag no longer matches the marker rejects its requests, removes its own login copy and tag, and goes to the login page. Only the marker is read for this check, and the tab never clears shared data (Hive, marker, composer snapshots).
  • Decided by: Dat H. Pham, in linagora/tmail-flutter#5163.
  • Why: sessionStorage is per tab, so no other tab learns of a sign out, and the password stayed usable in the tabs left open. Another tab may already be signed in again, so a leaving tab must not touch shared data.
  • Scope: web basic auth only; OIDC and mobile are unchanged. authentication_info_cache_manager.dart, sign_out_marker_storage.dart, basic_auth_tab_guard.dart and the request interceptors.

2026-11-25, [UX] A tab signed out from another tab keeps its open drafts

  • Decision: before a tab with a revoked login goes to the login page, it saves a reload snapshot of every open composer. It leaves without the browser leave prompt.
  • Decided by: Dat H. Pham, in linagora/tmail-flutter#5163.
  • Why: the user loses nothing typed, and the dashboard prompt cannot trap a tab that has already dropped its login.
  • Scope: basic_auth_tab_guard.dart, composer_manager.dart.

2026-11-25, [UX] On web basic auth, a same-origin app route opened in a new tab inherits the login

  • Decision: same-origin app routes open in a new tab without noopener, so the tab inherits a copy of the sessionStorage login and does not ask for it again. Other links and print tabs open with noopener. A tab with an opener removes the composer and identity drafts it copied, then detaches the opener.
  • Decided by: Dat H. Pham, in linagora/tmail-flutter#5163.
  • Why: the new tab keeps working without a second sign in, and a draft stays owned by the one tab that created it.
  • Scope: app_route_tab_environment.dart, html_utils.dart, child_tab_session_cleaner.dart, mailbox_action_handler_mixin.dart, email_action_controller.dart.

2026-11-27, [Architecture] Settings › Delegation › With me re-reads the session when its list of owners differs from the session

  • Decision: when the With me list loads and names a different set of owners than the shown session's delegated accounts, the session is re-read once and handed to the dashboard, so the account switcher offers the same mailboxes as the list. A load that fails, or that a newer load replaced, triggers no re-read. Re-reading on resume and on accountNotFound stays with linagora/tmail-flutter#5162.
  • Decided by: Dat Vu, in linagora/tmail-flutter#5188.
  • Why: the session is read only at sign in, so a grant or a revoke made while the app runs reached the With me list but not the switcher, which then offered a mailbox the server refuses or hid one just granted.
  • Scope: delegated_to_me_notifier.dart, delegated_to_me_section.dart.

2026-12-01, [UX] A delegate is in the user's domain and is never a team mailbox

  • Decision: the add delegates dialog suggests only contacts of the user's domain and refuses, before submit, an address of another domain (subdomains included) or of a team mailbox the user belongs to. Every refusal shows under the field instead of as a toast. A user name with no domain skips the domain check, and the server still refuses whatever the app lets through. The team mailboxes come from the mailbox cache only, so opening the dialog never fetches or rewrites it.
  • Decided by: Dat Vu, in linagora/tmail-flutter#5227. Cache-only read agreed with the reviewers in linagora/tmail-flutter#5230.
  • Why: James answers the same "User … does not exist" for another domain and for an unknown local address, so only a client check can give the reason, and a toast behind the dialog barrier was easy to miss.
  • Scope: add_delegates_notifier.dart, add_delegates_dialog.dart, delegate_providers.dart, ADR-0115.

2026-12-01, [UX] Delegation shows a person by contact name when the user has a contact with that address

  • Decision: the person rows of Settings › Delegation (By me, With me and both remove confirmations) every mailbox of the account switcher, my own included, the header of the account menu, the account menu of Settings and the one inside Cozy, the header of Settings, the "Viewing" banner, the account switch loading dialog and the switch failure toasts show the name of the user's contact whose address is exactly that address, with the address below. The name comes from one contact autocomplete query per address on the user's own account, searching the part before @ (TMail contact search finds a whole address only up to 29 characters, the n-gram limit of its email field, while the part before @ finds the contact at any length) and keeping only the contact with exactly that address, available as soon as that account has the TMail contact autocomplete capability, without waiting for a screen to register the autocomplete bindings. A failed query is retried, and until it succeeds the row shows the address. With no matching contact, a blank name or no such capability, the row shows the address alone. Avatars, the one of the mobile mailbox drawer included, take their initial from the contact name when there is one, else from the address. The loading dialog and the toasts use a name already loaded and otherwise the address, so they never wait for a query.
  • Decided by: Dat Vu, in linagora/tmail-flutter#5226.
  • Why: an address alone is harder to recognize than a name, and twake-mail-frontend already shows contact names in both places.
  • Scope: delegate_providers.dart, account_switcher_sections.dart, delegation_person_tile.dart, my_delegates_section.dart, delegated_to_me_section.dart, remove_delegate_dialog.dart, standalone_account_avatar_menu.dart, account_switcher_avatar.dart, workplace_account_switcher.dart, compact_account_switcher.dart, viewing_owner_banner.dart, account_switch_loading_dialog_host.dart, account_switch_failure_toast.dart, start_on_account.dart, show_notification_account.dart, mailbox_app_bar.dart, profile_setting_icon.dart, profile_setting_menu_overlay.dart, manage_account_dashboard_view.dart, user_information_widget.dart, settings_first_level_view.dart, setting_user_info_widget.dart, cozy_profile_setting_icon.dart, navigation_bar_widget.dart, and the Unicode-aware initials of string_extension.dart (firstLetterToUpperCase).

2026-12-02, [Architecture] Mail saves attachments to Twake Drive through Drive intents

  • Decision: Mail saves, finds and organizes attachments in the user's Drive with the Drive UPLOAD, LOOKUP and MOVE intents, never with direct stack calls. Details in ADR-0118.
  • Decided by: Quentin Valmori, in linagora/cozy-twakemail#58.
  • Why: direct calls need Mail manifest grants on Drive files and references, which were refused.
  • Scope: Save to Drive (#4791), docs/adr/0118-save-attachment-to-drive.md.

2026-12-02, [Architecture] Every Drive intent message goes through one shared router

  • Decision: one DriveIntentMessageRouter in the workplace module receives the messages of every Drive intent, on web and on mobile. Callers register a route per intent ID before the frame loads and remove it on any terminal outcome. Each route has its own origin rule. A message with no route is dropped. The picker registers a route and owns no window listener. Each route is bound to its own frame. Mobile WebViews accept only the Drive origin and are cleared on logout. Details in ADR-0119.
  • Decided by: Dang Dat, in linagora/tmail-flutter#5233.
  • Why: the picker, UPLOAD, LOOKUP and MOVE can be open together, and each extra window listener hears the messages of the others.
  • Scope: workplace module, docs/adr/0119-drive-intent-message-router.md, amends ADR-0096.

2026-12-02, [Product] Save all and the chip Save share one save queue per email

  • Decision: a chip Save and Save all add their files to one queue per email, saved one after another. The Save all button shows from 2 eligible attachments, hides when all are saved, and shows "n/m" while the queue runs. The queue continues after a file failure and stops on full Drive, 403 after one new exchange, or unsupported UPLOAD. It belongs to the conversation view (the thread, or the email when threads are off): leaving it stops the queue where it is, with no toast. Queues of one conversation view run one after another, in start order, so one UPLOAD runs per view. A press on the busy button stops it with a toast. A waiting queue ends with no toast when stopped, or when the running queue stops on full Drive, 403 or unsupported UPLOAD. One toast per queue run, and Organize gets the files saved in that run. Details in ADR-0120.
  • Decided by: Dang Dat, in linagora/tmail-flutter#5237.
  • Why: two flows on one email would run two UPLOADs at once and end in several toasts. A save cut on leave is resolved by LOOKUP when the email shows again.
  • Scope: Save to Drive (#4791), docs/adr/0120-save-all-to-drive.md.

2026-12-02, [Architecture] Drive LOOKUP is the only source of saved state, results held by one app-level store

  • Decision: Mail reads saved state with the Drive LOOKUP intent on opening an email with the savedtodrive keyword, which a save sets, before a save queue run and after an unknown save outcome. One app-level store per email owns the save results; running LOOKUPs and saves belong to the conversation view. A file saved without a reference stays saved until the store drops its entry. Details in ADR-0121.
  • Decided by: Dang Dat, in linagora/tmail-flutter#5239.
  • Why: LOOKUP rules were spread over ADR-0118, and a reference-free save went back to idle on reopen.
  • Scope: Save to Drive (#4791), docs/adr/0121-drive-lookup-saved-state.md.