Merge upstream/dev (35 commits) into tth
Conflicts in lib/widgets/mesh_nav_tile.dart and lib/widgets/mesh_ui.dart: took upstream's iconSlot/ThemedIcon, busy spinner and SectionHeader description, and re-applied the terminal theme on top (18 dp icons, narrower gaps and padding, mono section labels). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
ceab62428a
103 files changed
+13328
-5463
No files matched your search
@@ -61,9 +61,9 @@ A list of nodes heard passively over the air but not yet added as contacts. Each
|
||||
## Compression (SMAZ and Cyr2Lat)
|
||||
|
||||
### Where to Find It
|
||||
Every open direct-message and channel chat shows **Compression: Off**, **Compression: SMAZ** or **Compression: Cyr2Lat** in a strip just below the app bar, above the messages. Tap it to open one sheet with the three choices and what each does. The choice applies to that contact or channel only and is saved on the phone, so it can be changed while the radio is offline. A channel that has not synced from the radio yet has no saved identity, so the strip is disabled and says why.
|
||||
The top-right menu of every direct-message and channel chat has a **Compression: Off**, **Compression: SMAZ** or **Compression: Cyr2Lat** item. Tap it to open a Compression page with the three choices and a short note on each. The choice applies to that contact or channel only and is saved on the phone, so it can be changed while the radio is offline. A channel that has not synced from the radio yet has no saved identity, so the choices are disabled and the page says why.
|
||||
|
||||
Only one mode is active per chat. Choosing SMAZ turns Cyr2Lat off and the other way round. Off and SMAZ close the sheet once saved; Cyr2Lat keeps it open to show its profile picker. If saving fails, the sheet says so and keeps showing the saved choice.
|
||||
Only one mode is active per chat. Choosing SMAZ turns Cyr2Lat off and the other way round. Cyr2Lat shows its profile picker on the same page. If saving fails, the page says so and keeps showing the saved choice.
|
||||
|
||||
### Off
|
||||
Sends your text exactly as typed. Every app can read it.
|
||||
|
||||
@@ -79,12 +79,12 @@ Tap a channel card to open the channel chat screen.
|
||||
- Tap the title or landscape icon to select a region; see [Regions](regions.md)
|
||||
- Overflow menu (⋮) → **Notifications**: choose all messages, mentions only or muted for this channel. The row shows the current mode
|
||||
- Overflow menu (⋮) → **Edit channel** and **Delete channel**: the same sheet and confirmation as a long-press in the channel list
|
||||
- Overflow menu (⋮) → **Show bookmarks** toggles the channel's bookmarked-message filter; the bookmark icon is filled while active and outlined while inactive.
|
||||
- Overflow menu (⋮) → **Bookmarks**: opens the **Bookmarks** screen scoped to this channel, with a split pill at the top to switch between **All** and `#channel` (plus in-screen search, copy, and single or bulk removal with confirmation).
|
||||
- Overflow menu (⋮) → **Chat background**: a color or picture, with a fade slider, behind this channel only. See [Chat backgrounds](themes.md#chat-backgrounds). Holiday greetings in new messages play a short animation, as in [direct chat](chat-and-messaging.md#message-list)
|
||||
|
||||
### Compression Strip
|
||||
### Compression
|
||||
|
||||
Below the app bar, above the messages, the same strip as in [direct chats](chat-and-messaging.md#compression-strip) shows and changes this channel's compression: Off, SMAZ or Cyr2Lat. It is stored with the channel's key, so every slot holding that channel shares it, and it can be changed offline. Until the channel has synced from the radio the strip is disabled and says why. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
The top-right menu has the same Compression item as [direct chats](chat-and-messaging.md#compression); it shows and changes this channel's compression: Off, SMAZ or Cyr2Lat. It is stored with the channel's key, so every slot holding that channel shares it, and it can be changed offline. Until the channel has synced from the radio the choices are disabled and the page says why. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
|
||||
### Message Display
|
||||
|
||||
@@ -92,7 +92,7 @@ Below the app bar, above the messages, the same strip as in [direct chats](chat-
|
||||
- **Incoming messages**: Colored avatar with sender's initial (or first emoji if name starts with one; color is deterministic from sender name hash), sender name in primary color, message bubble
|
||||
- **Outgoing messages**: Primary container color bubble with a small status icon: pending (clock), sent (checkmark), or failed (red error circle)
|
||||
- Automatic older-message loading on scroll-to-top
|
||||
- Long-press a message and choose **Bookmark** to mark it with a yellow icon. Bookmarks are stored separately from channel history and remain available after a channel is deleted.
|
||||
- Long-press a message and choose **Bookmark** (or choose **Select messages** and tap the bookmark button in the selection bar to bookmark several messages at once) to mark it with a yellow icon; removing a bookmark prompts for confirmation. Bookmarks are stored separately from channel history and remain available after a channel is deleted.
|
||||
- Jump-to-bottom button when scrolled up
|
||||
- **Pinch-to-zoom**: Two-finger zoom (0.8x–1.8x) and double-tap to reset text size
|
||||
- **Message tracing mode** (when enabled in App Settings): Each bubble additionally shows path prefix bytes (`via XX,YY,...`), a timestamp, and a repeat count icon
|
||||
|
||||
@@ -20,11 +20,11 @@ From the Contacts screen, tap any Chat-type contact to open the ChatScreen.
|
||||
- **Subtitle**: Current routing path label (e.g., "2 hops", "flood (auto)", "direct (forced)") and unread count. Tapping the subtitle shows the full path details.
|
||||
- **Action buttons**:
|
||||
- **Search** (magnifier icon): Replaces the title with a search field and lists every message in this conversation's full history whose text (or translation) contains the typed word, newest first, with matches highlighted. Channel search also matches sender names and skips messages caught by the [message filter](message-filter.md). Back, Esc or the arrow closes search. Channel chats have the same button.
|
||||
- **Overflow menu** (⋮ icon): Contains Routing, Info, Telemetry, Settings (link images and telemetry permissions), Chat background, Clear Chat, and Remove from contacts (rooms also have Room Server Management). Routing opens the routing sheet where you can switch between Auto, Direct, and Flood routing and manage recent paths (hop count, round-trip time, age, success count, color-coded by repeater). Info shows a dialog with contact type, path, GPS coordinates, and public key. Chat background sets a color or picture (with a fade slider) behind this chat only; see [Chat backgrounds](themes.md#chat-backgrounds).
|
||||
- **Overflow menu** (⋮ icon): Contains Routing, Info, Bookmarks, Telemetry, Settings (link images and telemetry permissions), Chat background, Clear Chat, and Remove from contacts (rooms also have Room Server Management). Routing opens the routing sheet where you can switch between Auto, Direct, and Flood routing and manage recent paths (hop count, round-trip time, age, success count, color-coded by repeater). Info shows a dialog with contact type, path, GPS coordinates, and public key. Chat background sets a color or picture (with a fade slider) behind this chat only; see [Chat backgrounds](themes.md#chat-backgrounds).
|
||||
|
||||
### Compression Strip
|
||||
### Compression
|
||||
|
||||
Below the app bar, above the messages, a strip shows **Compression: Off**, **SMAZ** or **Cyr2Lat** for this contact. Tap it to choose a mode in one sheet that explains each: SMAZ is lossless but needs a SMAZ-aware app on the other end and is only used when it makes a message smaller; Cyr2Lat swaps some Cyrillic letters for lookalike Latin ones, stays readable everywhere, but changes the exact characters, using the chosen Cyr2Lat profile. The setting is saved on the phone and can be changed offline. Channel chats show the same strip. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
The top-right menu has a **Compression: Off**, **SMAZ** or **Cyr2Lat** item for this contact. Tap it to choose a mode on a Compression page that explains each: SMAZ is lossless but needs a SMAZ-aware app on the other end and is only used when it makes a message smaller; Cyr2Lat swaps some Cyrillic letters for lookalike Latin ones, stays readable everywhere, but changes the exact characters, using the chosen Cyr2Lat profile. The setting is saved on the phone and can be changed offline. Channel chats have the same menu item. See [Compression](additional-features.md#compression-smaz-and-cyr2lat).
|
||||
|
||||
### Message List
|
||||
|
||||
@@ -33,7 +33,7 @@ Below the app bar, above the messages, a strip shows **Compression: Off**, **SMA
|
||||
- **Holiday animations**: A new message with a holiday greeting ("Happy Halloween", "Merry Christmas", and so on, in any app language) plays a short animation. Turn off in App Settings → Appearance; see [Holiday message animations](themes.md#holiday-message-animations)
|
||||
- **Outgoing messages**: Right-aligned, primary color background. **Failed messages** change to a red-toned error container background
|
||||
- **Incoming messages**: Left-aligned, grey background with a colored avatar (initial letter or first emoji of sender name; color is deterministic from a hash of the sender name)
|
||||
- Long-press a message and choose **Bookmark** to show a yellow bookmark on the bubble. **Show bookmarks** in the chat menu toggles a filter for bookmarked messages; use **Bookmarks** in the Channels screen menu to browse saved messages, including those from deleted contacts or channels. From the bookmarks list, copy a message with its copy button. It is ordered oldest-to-newest and opens at the newest message. The Export screen can save or share a dated Markdown file, grouped by contact and then channel, with linked URLs and URL-image embeds. Links remain tappable, and supported URL-image previews are shown when **Load images from links** is enabled in App Settings.
|
||||
- Long-press a message and choose **Bookmark** to show a yellow bookmark on the bubble (choosing **Remove bookmark** prompts for confirmation before removing it). **Bookmarks** in the chat menu opens the **Bookmarks** screen scoped to this conversation, with a split pill at the top to switch between **All** and the current contact; use **Bookmarks** in the Contacts or Channels screen menu to browse all saved messages across conversations, including those from deleted contacts or channels. The **Bookmarks** screen includes search (matching message text, translations, sender names, and conversation names, and scrolling to the highlighted card when a result is tapped), a copy button and remove button on each card, long-press multi-selection for bulk removal, and a confirmation dialog before removing single or selected bookmarks. It is ordered oldest-to-newest and opens at the newest message. The Export screen can save or share a dated Markdown file, grouped by contact and then channel, with linked URLs and URL-image embeds. Links remain tappable, and supported URL-image previews are shown when **Load images from links** is enabled in App Settings.
|
||||
- Bubble width capped at 72% of screen width
|
||||
- Hyperlinks rendered as tappable underlined text; inline decimal GPS coordinates are rendered as bold underlined links (see [Inline GPS Coordinates](#inline-gps-coordinates))
|
||||
- Message text follows the system font size (Android/iOS accessibility text size); pinch-to-zoom scales on top of it
|
||||
@@ -170,6 +170,7 @@ Add emoji reactions to incoming messages (not your own):
|
||||
| Translate | Incoming messages only (when translation is enabled and not yet translated) | Translates the message on-demand using the on-device model |
|
||||
| Mark as Unread | Incoming messages only | Marks this message and all subsequent incoming messages as unread |
|
||||
| Delete | All messages | Removes locally (not from mesh) |
|
||||
| Select messages | All messages | Starts multi-select with this message picked; see below |
|
||||
| Retry | Failed outgoing messages | Re-sends the message |
|
||||
| Open chat with sender | Room server chats | Opens 1:1 chat with the message sender |
|
||||
|
||||
@@ -177,6 +178,12 @@ In channel chats the menu also offers **Mark as spam**, **Filter this sender** a
|
||||
|
||||
Long-pressing directly on a detected GPS coordinate opens the coordinate action sheet (**Copy location** and **Open in maps**) instead of this message menu; long-press non-coordinate text in the message (or right-click on desktop) for message actions.
|
||||
|
||||
## Selecting Several Messages
|
||||
|
||||
Channel, direct and room chats share the same multi-select. Choose **Select messages** in the message menu; while selecting, tapping or long-pressing any message toggles it (it shows as selected immediately, with no double-tap delay) and the back button clears the selection. Chat-text double-tap-to-reset-zoom is turned off while selecting.
|
||||
|
||||
The selection bar offers **Copy** (oldest first) and **Delete** (after a confirmation) in all chats. Direct and room chats also offer **Bookmark** and **Resend**, which asks for confirmation and re-sends the selected outgoing messages oldest first. Delete and Resend are unavailable while the radio is offline.
|
||||
|
||||
## Image and translation setup
|
||||
|
||||
Enable URL images in the contact’s chat settings to preview supported image links; see [URL images](additional-features.md#url-image-previews). Images and files can also be uploaded to a configured IPFS provider from the **+** menu in direct or channel chat; the resulting URL is sent as ordinary text. See [sharing via IPFS](additional-features.md#share-an-image-via-ipfs) and [IPFS provider configuration](settings.md#ipfs-provider-configuration). Mesh image packets are currently sent through channel chat, not the direct-message composer. Set up translation and download a model in [App Settings](settings.md#translation) before using incoming or pre-send translation.
|
||||
@@ -93,6 +93,7 @@ The Contacts screen has a single **three-dot overflow menu** (`⋮`) in the app
|
||||
|
||||
- Add Contact — opens the Add Contact page
|
||||
- Discovered Contacts — opens the DiscoveryScreen
|
||||
- Bookmarks — opens the Bookmarks screen showing all saved messages
|
||||
- *(divider)*
|
||||
- Zero-Hop Advert — broadcasts your advertisement to immediately adjacent nodes
|
||||
- Flood Advert — broadcasts across the full mesh network
|
||||
|
||||
+73
-22
@@ -2,7 +2,7 @@
|
||||
|
||||
How MeshCore Open's interface is built today, and the rules to follow when adding or changing UI. Every value below comes from the code it cites. If you change one of those sources, or settle on a new pattern, update this page in the same change.
|
||||
|
||||
The source of truth is `lib/theme/mesh_theme.dart` (theme), `lib/widgets/mesh_ui.dart` (shared widgets), `lib/widgets/settings_reveal.dart` (reveal-on-enable and settings sliders) and `lib/widgets/mesh_nav_tile.dart` (settings rows). Where the code disagrees with this page, fix one of them; do not copy the inconsistency.
|
||||
The source of truth is `lib/theme/mesh_theme.dart` (theme), `lib/widgets/mesh_ui.dart` (shared widgets), `lib/widgets/settings_reveal.dart` (reveal-on-enable and settings sliders), `lib/widgets/mesh_nav_tile.dart` (settings rows) and `lib/widgets/unsaved_changes_guard.dart` (Save and the leave warning on pages that save to a radio). Where the code disagrees with this page, fix one of them; do not copy the inconsistency.
|
||||
|
||||
## 1. Principles
|
||||
|
||||
@@ -119,12 +119,20 @@ Icon sizes in use: 24 for tile and banner icons, 20 for menu icons and small act
|
||||
|---|---|---|
|
||||
| Group of related content | `MeshCard` | `onTap`/`onLongPress` give ink feedback; long-press adds a selection haptic |
|
||||
| Label above a group | `SectionHeader(label, trailing:)` | Upper-cases for you; pass the normal-case l10n string |
|
||||
| Settings navigation row | `MeshNavTile` | `onTap: null` dims it to 50 % and reports it as disabled; use `subtitle` to say why |
|
||||
| Settings navigation row | `MeshNavTile` | `onTap: null` dims it to 50 % and reports it as disabled; use `subtitle` to say why. `iconSlot` shows a themeable icon (e.g. node types, as in the contact list) |
|
||||
| Settings switch | `SwitchListTile` inside `MeshSettingsTileTheme` | Wrap the settings screen body once in `MeshSettingsTileTheme` |
|
||||
| Switch that reveals more controls | `SettingsReveal` | 200ms height ease, `surfaceContainerHighest`, 16px start indent. See [Reveal on enable](#reveal-on-enable) |
|
||||
| Settings slider | `SettingsValueSlider` | Requires a 24px `icon` (`ListTile.leading`). The title includes the selected number, so it stays visible. The drag bubble repeats it |
|
||||
| Radio-style choice in a sheet | `MeshSheetOption` | Used by the language picker, map time filter and compression sheet. Optional `subtitle` explains the option; `onTap: null` disables it. Selected rows show a filled radio icon **and** a bold title, with `selected` semantics |
|
||||
| Per-chat setting at the top of a chat | Full-width strip under the app bar, above the transcript (`ChatCompressionSelector` in `widgets/chat_compression_selector.dart`) | `surfaceContainerLow` fill, `outlineVariant` bottom border, 48dp minimum height, `bodyLarge` w600 "Label: value ▾"; tap opens one `showMeshSheet` with `MeshSheetOption`s. Shows the saved value only; a spinner replaces ▾ while saving; a disabled strip shows why below the label. One shared widget for DM and channel chats; parents pass state and async callbacks |
|
||||
| Read-only value in a settings row | 24px `onSurfaceVariant` icon, title (`meshTileTitleStyle`), the value on its own line in `MeshTheme.mono` 15 w500 `onSurface`, subtitle `bodyMedium` `onSurfaceVariant` | Same value style as the Settings device info card; not `StatTile`, which is for status screens (Node Name message length) |
|
||||
| Settings choice from a long list | `ListTile` with a 24px `leading` icon, title and subtitle, and a `DropdownButtonFormField` under the subtitle | Same row shape as `SettingsValueSlider`; no label or helper inside the field (Hop limit in Contact Settings) |
|
||||
| Settings saved to a radio | `SaveToRadioPage(title:, hasChanges:, onSave:, children:)` | See [Settings pages](#settings-pages). A custom scaffold uses `UnsavedChangesGuard` + `SaveChangesAction` |
|
||||
| Section explanation | `SectionHeader(label, description:)` | One or two short sentences in `bodyMedium` `onSurfaceVariant` under the label, for a note that belongs to one section (Node Name, Location) |
|
||||
| Option that needs a longer explanation | `MeshCard(padding: EdgeInsets.zero)`: explanation text, `Divider(height: 1, indent: 16, endIndent: 16)`, the switch row, divider, optional note | Text in `bodyMedium` `onSurfaceVariant`, padding 16 / 14, so it reads like tile subtitles. The dividers are inset on both sides to match the text (Off-Grid Repeat Mode) |
|
||||
| Note at the top of a page or section | `MeshInfoCard(text)` | Info icon and `bodyMedium` text in a `MeshCard`; one or two short sentences (Add Contact, Privacy) |
|
||||
| Text field with a byte limit | `TextField` with `x / max` as `suffixIcon` (Node Name) | Count always visible. Input past the limit is allowed: the count turns `error`, `errorText` says how far over, and Save is disabled. Don't block input silently |
|
||||
| Choosing a point on a map | `LocationPickerScreen(initial:)` | Page with a fixed centre pin; returns the `LatLng` to the form |
|
||||
| Radio-style choice in a sheet | `MeshSheetOption` | Used by the language picker, map time filter and compression page. Optional `subtitle` explains the option; `onTap: null` disables it. Selected rows show a filled radio icon **and** a bold title, with `selected` semantics |
|
||||
| Per-chat setting | Overflow-menu item `[icon] Label: value` that opens a dedicated page (`ChatCompressionScreen` in `screens/chat_compression_screen.dart`) | Same `Label: value` pattern as the channel `Notifications: ...` item. Page: centred `AdaptiveAppBarTitle`, `SectionHeader` with a one-sentence description, a `MeshCard(padding: EdgeInsets.zero)` of `MeshSheetOption` rows split by `Divider(height: 1, indent: 16)`, short notes per option, a `MeshInfoCard` when the choice is locked, an error `MeshCard` when a save fails, and a spinner in the app bar while saving. Shows the saved value only. One shared page for DM and channel chats; parents pass state and async callbacks |
|
||||
| Choosing between images | Selectable thumbnail tiles in a centred `Wrap` | Image send versions (`_versionTile` in `image_send_preview_sheet.dart`). `InkWell` with `MeshRadii.sm`; selected tile gets a 3px `primary` border **and** a `primary` check badge (never colour alone); caption under the tile in `bodySmall`, w600 when selected; figures such as packet counts in `MeshTheme.mono` 12; wrap the tile in `Semantics(button: true, selected:, label:)` |
|
||||
| Editing a set of members | Current items first, then a searchable add list | Group editor (`contact_group_editor_dialog.dart`). Wrapping upper-case section label with the count ("Current members (N)"); each member row has a trailing `IconButton` remove (`error` colour, tooltip names the item); the add list excludes current members, and tapping the row or its `primary` add button adds it |
|
||||
| Popup menu row | **always** `PopupMenuItem(child: MeshMenuItemRow(icon:, label:))` | Relies on `MeshTheme.popupMenuTheme` (`surfaceContainerHigh`, `MeshRadii.md`); `MeshMenuItemRow` gives a 20px icon slot, 12px gap, and 2-line wrap + ellipsis (`leading:` for `ThemedIcon`, no icon keeps the 20px slot). Main views share `mainOverflowTrailingItems` (`widgets/connect_sheet.dart`) |
|
||||
@@ -138,7 +146,7 @@ Icon sizes in use: 24 for tile and banner icons, 20 for menu icons and small act
|
||||
| Empty list | `EmptyState(icon:, title:, subtitle:, action:)` | Scrolls rather than overflowing at large text |
|
||||
| Inline error with retry | `ErrorRetryCard(message:, onRetry:, retryLabel:)` | Pass `retryLabel: context.l10n.common_retry` |
|
||||
| Radio offline on a remote-node screen | `RadioDisconnectedBanner` | Renders nothing while connected |
|
||||
| Sync progress | `SyncProgressAppBarBottom` as the app bar `bottom` | 3px bar |
|
||||
| Progress bar | `MeshProgressBar`; `MeshProgressAppBarBottom` as an app bar `bottom`; `SyncProgressAppBarBottom` for the app syncs, with `busy: true` while the screen waits for the radio (Settings actions) (`widgets/sync_progress_overlay.dart`) | See [Progress bars](#progress-bars) |
|
||||
| Toast message | `showDismissibleSnackBar(context, content: Text(...))` | Tap to dismiss, replaces the current snackbar, safe after an async gap |
|
||||
| List item entrance | `ListEntrance(index:)` | Optional. Plays only for rows built while the list is at rest at the top; rows scrolled into view appear at once |
|
||||
|
||||
@@ -148,7 +156,7 @@ Icon sizes in use: 24 for tile and banner icons, 20 for menu icons and small act
|
||||
- `FilledButton.tonal`: a secondary action that still needs weight (rare).
|
||||
- `OutlinedButton(.icon)`: secondary actions next to a filled one.
|
||||
- `TextButton`: Cancel and low-emphasis actions in dialogs; inline actions in cards.
|
||||
- Destructive confirm: `FilledButton` with `backgroundColor: scheme.error`, `foregroundColor: scheme.onError` (`showConfirmClearDialog` in `widgets/confirm_clear_dialog.dart`), or a `TextButton` with `foregroundColor: scheme.error` when it is not the primary action.
|
||||
- Destructive confirm: destructive or data-removing actions (such as clearing a chat, deleting a channel or contact, or removing single or bulk bookmarks) always prompt with a confirmation `AlertDialog` pairing a `Cancel` `TextButton` with an error-styled destructive action: `FilledButton` with `backgroundColor: scheme.error`, `foregroundColor: scheme.onError` (`showConfirmClearDialog` in `widgets/confirm_clear_dialog.dart`), or a `TextButton` with `foregroundColor: scheme.error` when it is not the primary action (as in `confirmClearChat` and `confirmRemoveBookmarks`). Use `showConfirmClearDialog(confirmLabel:)` for any confirm dialog; `warning: true` makes the button `scheme.tertiary` for disruptive, non-destructive actions (Reboot in Settings).
|
||||
- Dialog action order: Cancel first, primary last.
|
||||
- Avoid `ElevatedButton` in new code.
|
||||
|
||||
@@ -203,6 +211,18 @@ A dialog that offers several missing models (backup restore) uses the same rows
|
||||
|
||||
The channel's games list is a `showMeshSheet` with a `DraggableScrollableSheet`, the same layout as the Add channel sheet. Starting a game closes it and opens a second sheet, so sheets are never stacked.
|
||||
|
||||
### Progress bars
|
||||
|
||||
A thin bar at the top of a screen or list shows that something is running. Bars inside content (model downloads, image send progress) are not covered here.
|
||||
|
||||
1. 4px.
|
||||
2. Theme colours: don't set a colour or track. The theme's `progressIndicatorTheme` (`primary` on `surfaceContainerHigh`) applies, so the bar follows light, dark and custom themes.
|
||||
3. Use the shared widgets: `MeshProgressAppBarBottom` as an app bar `bottom` for the screen's own task (Refresh all in `repeater_settings_screen.dart`, the chess game), `SyncProgressAppBarBottom` for the app syncs (contacts, channels, queued messages), and `MeshProgressBar` at the top of content (chat search results, the line-of-sight map).
|
||||
4. Fill (`value`) when the progress is known; move (`value: null`) when it isn't.
|
||||
5. Keep the height while idle (`active: false`), so the content doesn't jump. A bar laid over content (the line-of-sight map) can be removed instead.
|
||||
6. One bar at a time: when a screen's own task and an app sync overlap, the same bar shows one of them, never two stacked bars.
|
||||
7. Waiting for the radio: when the user starts an action and the app waits for the radio, the control shows the 18×18 spinner (see [States](#9-states)) and the screen's top bar moves. Background traffic (polling, message sync, ACKs) doesn't; messages keep their own delivery status.
|
||||
|
||||
## 6. Sheets, dialogs and pages
|
||||
|
||||
What the code does:
|
||||
@@ -211,20 +231,40 @@ What the code does:
|
||||
|---|---|---|---|
|
||||
| Bottom sheet | `showMeshSheet` + `BottomSheetHeader` (28 calls in 17 files) | Choosing from a list, an item's actions, quick tools tied to the current screen | Language picker, notification mode, add contact/channel options, emoji and GIF pickers, node info, share contact, image actions |
|
||||
| Draggable sheet | `showModalBottomSheet` + `DraggableScrollableSheet` | Tall, scrollable panels that need a drag size | `ContactRoutingSheet` (`routing_sheet.dart`), image send preview |
|
||||
| Dialog | `showDialog` + `AlertDialog` (72 calls in 35 files) | Confirming an action, a short input (one to three fields), a short message | Disconnect (`showDisconnectDialog`), clear (`showConfirmClearDialog`), unsaved changes, edit node name, rename point |
|
||||
| Page | `Navigator.push(MaterialPageRoute(...))` | Anything with sections, many fields, its own save, or that the user stays in | App Settings, Repeater Settings, Themes, Theme editor, Message filter, Region management |
|
||||
| Dialog | `showDialog` + `AlertDialog` | Confirming an action, a short input (one to three fields) outside settings, a short message | Disconnect (`showDisconnectDialog`), clear (`showConfirmClearDialog`), unsaved changes, rename point |
|
||||
| Page | `Navigator.push(MaterialPageRoute(...))` | Every settings entry, and anything with sections, many fields, its own save, or that the user stays in | App Settings, Node Name, Radio Settings, Location, Contact Settings, Privacy, About, Repeater Settings, Themes, Theme editor, Message filter, Region management |
|
||||
|
||||
Rules for new UI:
|
||||
|
||||
1. **Confirmation or a single short input → dialog.** Title, one sentence, Cancel + one action.
|
||||
2. **Pick one of several options, or act on one item → sheet.** Use `showMeshSheet` and start the content with `BottomSheetHeader(title:, subtitle:)`. It handles the keyboard and navigation-bar insets. Use raw `showModalBottomSheet` only when you need `DraggableScrollableSheet`.
|
||||
3. **Forms with sections, live remote values, or anything that needs Save/Discard → page.** Guard unsaved changes with `PopScope` and a discard dialog, as `repeater_settings_screen.dart` does.
|
||||
4. Never stack a dialog on a sheet on a dialog. Close the sheet first, or move the flow to a page.
|
||||
1. **Settings → page.** A row in Settings, App Settings or a repeater screen that opens settings opens a page, even for a single field. See [Settings pages](#settings-pages).
|
||||
2. **Confirmation or a single short input → dialog.** Title, one sentence, Cancel + one action. Destructive or data-removing actions (clearing a chat, deleting a channel/contact, or removing single/bulk bookmarks) always use this `AlertDialog` pattern (`Cancel` + `scheme.error` destructive action button). Inside settings, dialogs only confirm actions (Reboot, Delete all paths, unsaved changes).
|
||||
3. **Pick one of several options, or act on one item → sheet.** Use `showMeshSheet` and start the content with `BottomSheetHeader(title:, subtitle:)`. It handles the keyboard and navigation-bar insets. Use raw `showModalBottomSheet` only when you need `DraggableScrollableSheet`.
|
||||
4. **Forms with sections, live remote values, or anything that needs Save/Discard → page.** Guard unsaved changes with `UnsavedChangesGuard` (built into `SaveToRadioPage`).
|
||||
5. Never stack a dialog on a sheet on a dialog. Close the sheet first, or move the flow to a page.
|
||||
|
||||
**Sheet layout.** `showMeshSheet` is the sheet: safe area on the top and sides, and the keyboard or navigation-bar inset on the bottom. Start the content with `BottomSheetHeader`. That widget is the handle and the title row (padding 20, 8, 8, 4 and a 36×4 handle, section 4). Do not add space above it, draw a second handle, or size the sheet with a fraction inside an `Align`; that leaves an empty band over the handle. The status-bar inset stays outside the sheet.
|
||||
|
||||
The manual path editor (`path_editor_sheet.dart`) uses that layout. The hop list and the hex path field stay pinned under the header, including while the keyboard is open. When the band under the header is shorter than the search field, as on a landscape phone with the keyboard open, those blocks and the repeater list scroll together instead of overflowing.
|
||||
|
||||
### Settings pages
|
||||
|
||||
Every settings entry opens its own page, even for one field. On a settings page, dialogs only confirm actions and sheets only pick a value. A visual chooser (**Pick on map** in Location) is its own page that returns a value to the form.
|
||||
|
||||
Layout follows App Settings: `SectionHeader` + `MeshCard` groups, an optional `MeshInfoCard` at the top, and `SettingsReveal` for sub-options that only apply while a switch is on. Text fields and dropdowns use the theme's input style; don't set a border per field.
|
||||
|
||||
| Stored | Saved | Examples |
|
||||
|---|---|---|
|
||||
| Only in the app | On each change; no Save button | App Settings, Message filter, Themes |
|
||||
| On a radio | Only on Save | Node Name, Radio Settings, Location, Contact Settings, Privacy, Repeater Settings |
|
||||
|
||||
Pages that save to a radio use `SaveToRadioPage` (`lib/widgets/unsaved_changes_guard.dart`). It adds `MeshSettingsTileTheme`, `RadioDisconnectedBanner`, the app bar Save, the leave warning, the connection check and the error snackbar.
|
||||
|
||||
- Show every setting the page saves, filled with the radio's last reported value.
|
||||
- Save appears when a field differs from the saved value and hides when it's changed back. It's disabled offline, while saving, or while a field is invalid (`canSave`).
|
||||
- Leaving with unsaved edits asks Cancel, Discard or Save; Save closes the page only on success.
|
||||
- After saving, the page stays open and a snackbar confirms. A failed save keeps the edits.
|
||||
- Validate all fields before sending anything.
|
||||
|
||||
## 7. Node search
|
||||
|
||||
Contact, repeater, room and user search all use `lib/utils/contact_search.dart`. Sort with `compareContactQueryRank`: names that start with the query, then other substring matches, then a public-key / hop-hash prefix. Use `rankLabeledKeyQuery` for a label that is not itself a contact, such as "my contact" on the share sheet. Do not filter with a separate name `contains`.
|
||||
@@ -233,25 +273,29 @@ That is the Contacts list and its group member picker, Discovery, Map node searc
|
||||
|
||||
## 8. App bars
|
||||
|
||||
- Title: a plain localized string, ellipsized on one line. Use `AppBarTitle` on top-level and settings screens; it adds the connected node name as a subtitle and battery/SNR indicators when there is room, dropping them in that order on narrow widths. Use `AdaptiveAppBarTitle` for a plain one-line title.
|
||||
- Title: a plain localized string, ellipsized on one line.
|
||||
- Settings and every page opened from it: a centred plain title, `AdaptiveAppBarTitle` with `centerTitle: true`.
|
||||
- Main tabs (Contacts, Channels, Map) and the screens that already use it: `AppBarTitle`, which adds the connected node name as a subtitle and battery/SNR indicators when there is room (dropping them in that order on narrow widths). It fills the bar's width, so it stays left-aligned; keep it that way.
|
||||
- Chats keep their own left-aligned title (see below).
|
||||
- Centre the title (`centerTitle: true`, `AGENTS.md`); 31 screens set it explicitly because the theme default is `false`. Chat screens (`chat_screen.dart`, `channel_chat_screen.dart`) deliberately use `centerTitle: false` for their two-line name + route title.
|
||||
- Actions: at most two icon buttons plus the overflow (`Icons.more_vert`) menu, for example `RadioStatsIconButton`, search, ⋮ in `chat_screen.dart`. Put everything else in the overflow menu.
|
||||
- Overflow menus:
|
||||
- Order: screen-specific items first, then a `PopupMenuDivider` separating the trailing app-level section — Connect/Disconnect (`connectionMenuItem`) immediately followed by Settings (`settingsMenuItem`) — and destructive items last if a screen has any. Omit the divider when no items precede the app-level section (for example, `MapScreen` while building a path trace). Main views use `mainOverflowTrailingItems(screenContext, menuContext, hasPrecedingItems:)` in `lib/widgets/connect_sheet.dart` so they stay in sync.
|
||||
- Visual & interaction rules: rely on `MeshTheme`'s `popupMenuTheme` (`surfaceContainerHigh`, `MeshRadii.md` border radius, and consistent `menuPadding`, margins, item padding, and elevation), separate sections with `PopupMenuDivider`, build every row with `MeshMenuItemRow` (20px icon slot, 12px gap, 2-line wrap + ellipsis), use `context.l10n.contacts_moreOptions` as the button `tooltip` on main views, and capture the screen `context` (not the `itemBuilder`'s `menuContext`) for `onTap` callbacks since menus pop before `onTap` runs. Destructive items use `MeshMenuItemRow(color: scheme.error)` so both icon and label turn red (Clear chat in `chat_screen.dart`; Clear / Delete channel in `channel_chat_screen.dart`).
|
||||
- Search: tapping search swaps the title for the field and hides all actions (`actions: _searching ? null : [...]`). The leading back arrow and the system back gesture close the search (`PopScope(canPop: !_searching)`) instead of leaving the screen.
|
||||
- Long operations: show progress as the app bar `bottom` (`SyncProgressAppBarBottom`, or a 4px `LinearProgressIndicator` for Refresh all in `repeater_settings_screen.dart`).
|
||||
- Long operations: show progress as the app bar `bottom` with the shared bar (see [Progress bars](#progress-bars)).
|
||||
|
||||
## 9. States
|
||||
|
||||
| State | How to show it |
|
||||
|---|---|
|
||||
| Loading, nothing to show yet | `Center(child: CircularProgressIndicator())`, only until the first data arrives; then show partial data (`channels_screen.dart`). |
|
||||
| Loading in place | Swap the control's icon for an 18×18 `CircularProgressIndicator(strokeWidth: 2)` and disable it (`_buildRefreshButton` in `repeater_settings_screen.dart`). |
|
||||
| Loading in place | Swap the control's icon for an 18×18 `CircularProgressIndicator(strokeWidth: 2)` and disable it (`_buildRefreshButton` in `repeater_settings_screen.dart`). A settings row that runs a radio command keeps its chevron and uses `MeshNavTile(busy: true)` while it waits: the chevron becomes the spinner and taps are ignored, with `SyncProgressAppBarBottom(busy: true)` in the app bar (Settings actions). |
|
||||
| Background sync | `SyncProgressAppBarBottom`. |
|
||||
| Waiting for the radio | The control's 18×18 spinner and the screen's top bar, moving. See [Progress bars](#progress-bars). |
|
||||
| Empty | `EmptyState` with an icon, a short title, and an action when there is an obvious next step. Use a separate "no results" state (`Icons.search_off`) when a search or filter hides everything. |
|
||||
| Error | A snackbar for a failed action. `ErrorRetryCard` for a failed load the user can retry. Never show raw exception text alone. |
|
||||
| Companion radio disconnected | Main and chat screens stay open, read-only ([offline mode](offline-mode.md)). Decide with `isRadioReadOnly(connector)` / `context.radioReadOnly` (`lib/utils/radio_guard.dart`): disable menu items (`PopupMenuItem(enabled: false)`, drop destructive colors) and buttons, hide FABs, and call `ensureRadioConnected(context)` as the safety net in handlers. The chat composer shows `OfflineComposerBar` in the same bubble and margins. Repeater screens stay open with `RadioDisconnectedBanner` at the top and disable radio-dependent actions. Settings rows that need the radio pass `onTap: null` and show `settings_requiresConnection` as the subtitle (`settings_screen.dart`). |
|
||||
| Companion radio disconnected | Main and chat screens stay open, read-only ([offline mode](offline-mode.md)). Decide with `isRadioReadOnly(connector)` / `context.radioReadOnly` (`lib/utils/radio_guard.dart`): disable menu items (`PopupMenuItem(enabled: false)`, drop destructive colors) and buttons, hide FABs, and call `ensureRadioConnected(context)` as the safety net in handlers. The chat composer shows `OfflineComposerBar` in the same bubble and margins. Repeater screens and the Settings pages that save to the radio stay open with `RadioDisconnectedBanner` at the top and disable radio-dependent actions, including Save. Settings rows that need the radio pass `onTap: null` and show `settings_requiresConnection` as the subtitle (`settings_screen.dart`). |
|
||||
| Feature unsupported by firmware | Disabled row with a subtitle that says why (`settings_requiresFirmware('v1.10')`). |
|
||||
| Remote value not fetched yet | See below. |
|
||||
|
||||
@@ -269,6 +313,7 @@ Follow the same pattern for any new remote-value screen.
|
||||
|
||||
- All user-facing strings go through `context.l10n` (`lib/l10n/l10n.dart`). Add keys to `lib/l10n/app_en.arb` first. No string literals in widgets, including fallbacks.
|
||||
- Keep strings short: labels are a few words, subtitles one sentence.
|
||||
- Settings row titles use Title Case in English ("Radio Stats", "About the App"; short words like "the", "and", "of" stay lowercase unless first). Other locales follow their own capitalization. Row descriptions (subtitles) have no trailing full stop in any locale. The main Settings page follows this; apply it to new and changed settings rows.
|
||||
- Keep established radio terms in English in every locale: Flood, Zero Hop, hop, SNR, RSSI, LoRa, advert, repeater names and CLI commands.
|
||||
- Never put text in a fixed-width box (`SizedBox(width: 80, child: Text(...))`). Use `Expanded`/`Flexible`, or let a `Row` wrap into a `Column`/`Wrap` when space runs out.
|
||||
- Labels must wrap or scale, never clip and never break mid-word:
|
||||
@@ -288,10 +333,13 @@ Follow the same pattern for any new remote-value screen.
|
||||
- [ ] Overflow menus rely on `MeshTheme.popupMenuTheme`, use `MeshMenuItemRow`, have a localized `tooltip`, place screen-specific items above a `PopupMenuDivider` followed by Connect/Disconnect and Settings (omitting any leading divider when empty), and place destructive items last in `scheme.error`; segmented buttons use `MeshSegmentLabel`.
|
||||
- [ ] Every `IconButton` and FAB has a localized `tooltip`.
|
||||
- [ ] Tap targets at least 48×48.
|
||||
- [ ] Right container: dialog for confirm/short input, `showMeshSheet` + `BottomSheetHeader` for choices and item actions, page for forms. No gap above the sheet handle.
|
||||
- [ ] Right container: page for every settings entry and for forms, dialog for confirm/short input, `showMeshSheet` + `BottomSheetHeader` for choices and item actions. No gap above the sheet handle.
|
||||
- [ ] Settings stored on a radio use `SaveToRadioPage` and save only on Save; settings stored in the app apply immediately.
|
||||
- [ ] Contact, repeater, room and user search uses `compareContactQueryRank`: prefix, then substring, then hop hash.
|
||||
- [ ] Loading, empty, error, offline and unknown-value states handled.
|
||||
- [ ] Top progress bars use the shared widgets (4px, theme colours); see [Progress bars](#progress-bars).
|
||||
- [ ] All strings in `app_en.arb`; checked in German or Portuguese at 1.3× and 2.0× on a narrow screen.
|
||||
- [ ] Settings row titles in Title Case (English); descriptions without a trailing full stop.
|
||||
- [ ] Light, dark and one custom theme checked.
|
||||
- [ ] This page updated if you introduced or changed a pattern.
|
||||
|
||||
@@ -299,22 +347,25 @@ Follow the same pattern for any new remote-value screen.
|
||||
|
||||
The current code does not yet follow this page everywhere:
|
||||
|
||||
- **App bar centring.** `MeshTheme._build` sets `centerTitle: false`, but `AGENTS.md` asks for centred titles and 31 screens override it. `contacts_screen.dart` does not, so its title is left-aligned while Channels and Settings are centred.
|
||||
- **App bar centring.** `MeshTheme._build` sets `centerTitle: false`, so screens opt in. One Settings page, `backup_restore_screen.dart`, uses `AppBarTitle(indicators: false, subtitle: false)` for a plain title, which stays left-aligned despite `centerTitle: true`; switch it to `AdaptiveAppBarTitle`. The main tabs and chats are left-aligned on purpose (see [App bars](#8-app-bars)).
|
||||
- **Disconnect icon-only error tint.** In overflow menus, Disconnect tints only the icon (`iconColor`), while Clear chat / Delete tint icon and label (`color`).
|
||||
- **Menu rows not using `MeshMenuItemRow`.** `channel_chat_screen.dart` bulk-select menu (Select all / Copy) puts a `ListTile` inside `PopupMenuItem`. `widgets/list_filter_widget.dart` and the group menu in `contacts_screen.dart` use plain `Text` items, which is acceptable for icon-less lists but does not limit wrapping.
|
||||
- **Settings toggles in two sizes.** `FeatureToggleRow` (`widgets/elements_ui.dart`, used in `settings_screen.dart` dialogs) uses a `bodyMedium` w600 title and `bodySmall` subtitle with a 32px refresh button. `MeshNavTile` and themed `SwitchListTile`s use `bodyLarge` w600 / `bodyMedium`. Only App Settings, Message Filter and Repeater Settings wrap their body in `MeshSettingsTileTheme`.
|
||||
- **Tile titles without `MeshSettingsTileTheme`.** Backup & Restore (`CheckboxListTile`) and Themes (`SwitchListTile`) do not wrap their body in it, so those titles are not semibold like the other settings rows.
|
||||
- **Bars inside content.** The map cache download bar (`map_cache_screen.dart`) uses a fixed `MeshPalette.blue`.
|
||||
- **Radio waits not shown yet.** `SaveToRadioPage` pages show the Save spinner but no top bar. Other radio actions are not reviewed yet.
|
||||
- **`ErrorRetryCard` is unused** and its fallback label is the hard-coded English `'Retry'` (`mesh_ui.dart`); screens show load errors in their own ways.
|
||||
- **Fixed-width label boxes.** `chat_screen.dart` `_buildInfoRow` (80px), `line_of_sight_map_screen.dart` endpoint label (54px, `fontSize: 12`), `channel_message_path_screen.dart` (72px, upper-cased `accentLabel` at its 11px default).
|
||||
- **11px text.** `MeshTheme.accentLabel()` without `fontSize` gives 11px in `channel_message_path_screen.dart`. The type scale's `labelSmall` (11) is used in `list_filter_widget.dart` section titles.
|
||||
- **Hard-coded colours.** `SyncProgressAppBarBottom` uses `Colors.red`, `Colors.blue` and `Colors.green`; `AppBarTitle` subtitle uses `Colors.grey[600]` at a literal 14 instead of `onSurfaceVariant`; `telemetry_location_map.dart` uses raw `Colors.*`. `MeshPalette.ink/bg/line` still appear directly in a few screen/widget files: map marker overlays (node name labels and shared-count badges in `path_map_scaffold.dart`, the hop badge on avatars in `channel_message_path_screen.dart`) and the `channels_screen.dart` and `channel_chat_screen.dart` community dots with an 8px icon. The path map chrome (`PathMapBottomPanel`, `PathMapDesktopControls`, `PathViewModeToggle` and the panel contents in `path_map_ui.dart` and both path map screens) uses `ColorScheme` roles: `surfaceContainerLow` background, `outlineVariant` border and dividers, `onSurface`/`onSurfaceVariant` text and icons, `primary` for active toggles and `tertiary` for warnings.
|
||||
- **Hard-coded colours.** `AppBarTitle` subtitle uses `Colors.grey[600]` at a literal 14 instead of `onSurfaceVariant`; `telemetry_location_map.dart` uses raw `Colors.*`. `MeshPalette.ink/bg/line` still appear directly in a few screen/widget files: map marker overlays (node name labels and shared-count badges in `path_map_scaffold.dart`, the hop badge on avatars in `channel_message_path_screen.dart`) and the `channels_screen.dart` and `channel_chat_screen.dart` community dots with an 8px icon. The path map chrome (`PathMapBottomPanel`, `PathMapDesktopControls`, `PathViewModeToggle` and the panel contents in `path_map_ui.dart` and both path map screens) uses `ColorScheme` roles: `surfaceContainerLow` background, `outlineVariant` border and dividers, `onSurface`/`onSurfaceVariant` text and icons, `primary` for active toggles and `tertiary` for warnings.
|
||||
- **Literal sizes instead of the theme.** About 300 literal `fontSize:` values in `lib/screens` and `lib/widgets` (most 12–14), e.g. `EmptyState` subtitle at 13.5; and 36 `BorderRadius.circular(<number>)` calls (8 and 12 most common) instead of `MeshRadii`.
|
||||
- **Navigation bar theme.** `navigationBarTheme` colours selected labels `onPrimary`, which is white-on-white in light mode; `QuickSwitchBar` overrides it. Any other `NavigationBar` would inherit the problem.
|
||||
- **Two badge styles.** `QuickSwitchBar` uses Material `Badge` capped at 99+; `UnreadBadge` caps at 9999+.
|
||||
- **Sheets without `showMeshSheet`.** Besides the draggable sheets, `chat_background.dart`, `map_screen.dart`, `theme_editor_screen.dart`, `repeater_cli_screen.dart`, `message_translation_button.dart` and `path_map_ui.dart` call `showModalBottomSheet` directly, so they skip the shared inset handling and most skip `BottomSheetHeader`.
|
||||
- **Large forms in dialogs.** `RadioSettingsDialog` (`widgets/radio_settings_dialog.dart`, nine inputs) and the contact settings dialog in `chat_screen.dart` are dialogs although they behave like forms.
|
||||
- **Repeater Settings guard.** `repeater_settings_screen.dart` has its own unsaved-changes dialog instead of `UnsavedChangesGuard`.
|
||||
- **Settings in dialogs.** App Settings still opens IPFS image links (`_IpfsImageLinksDialog`) and the raster tile source and endpoint as dialogs in `app_settings_screen.dart`, and the per-contact settings in `chat_screen.dart` are a dialog although they behave like a form.
|
||||
- **Dialog buttons.** `showDisconnectDialog` (`utils/dialog_utils.dart`) uses two `TextButton`s with no emphasis; `showConfirmClearDialog` uses a red `FilledButton`.
|
||||
- **Snackbars.** A few places still call `ScaffoldMessenger.showSnackBar` directly (`discovery_screen.dart`, `app_settings_screen.dart`, `message_filter_settings_screen.dart`, `region_management_screen.dart`, `helpers/image_send_flow.dart`) and so miss tap-to-dismiss and replace-instead-of-queue.
|
||||
- **Small tap targets.** `FeatureToggleRow` refresh (32px) and 40px buttons in `chat_screen.dart`, `channel_chat_screen.dart`, `reaction_chips.dart`, `snr_indicator.dart`, `path_map_ui.dart`; 44px in `routing_sheet.dart`.
|
||||
- **Small tap targets.** 40px buttons in `chat_screen.dart`, `channel_chat_screen.dart`, `reaction_chips.dart`, `snr_indicator.dart`, `path_map_ui.dart`; 44px in `routing_sheet.dart`.
|
||||
- **Unknown placeholders.** Repeater and companion stats screens use `—`; `line_of_sight_map_screen.dart` uses `--`.
|
||||
- **Missing tooltip.** The Contacts FAB (`contacts_screen.dart`) has no tooltip; about 18 of 111 `IconButton`s have no tooltip nearby.
|
||||
- **Stale doc comments.** `SectionHeader` is described as "mono" but uses the sans `accentLabel`; the `StatusChip` comment sits above `meshContrastRatio`.
|
||||
@@ -237,7 +237,7 @@ Each waypoint includes: name, lat/lon, type label, and public key hex.
|
||||
|
||||
The phone's own GPS is **never used**. All location data comes from the mesh:
|
||||
|
||||
1. **Device self-location**: Read from firmware device-info response. Set manually in Settings → Location, or updated automatically if the device has a GPS module.
|
||||
1. **Device self-location**: Read from firmware device-info response. Set manually in Settings → Location (type the coordinates or pick them on a map), or updated automatically if the device has a GPS module.
|
||||
2. **Remote node locations**: Extracted from advertisement packets received over the mesh. Encoded as integer lat/lon × 1,000,000.
|
||||
3. **Telemetry replies**: A GPS position in a node's telemetry (from **Update location** or the Telemetry screen) replaces its advert position until the node adverts again. Telemetry positions have about 11 m precision (Cayenne LPP).
|
||||
|
||||
|
||||
+46
-46
@@ -16,10 +16,12 @@ The settings screen is a scrollable list of cards:
|
||||
3. [Location](#location)
|
||||
4. [App Settings](#app-settings) (link to sub-screen)
|
||||
5. [Actions](#actions)
|
||||
6. [Backup & Restore and Export](#export)
|
||||
6. [Backup & Restore and Export Data](#backup--restore-and-export-data)
|
||||
7. [Debug](#debug)
|
||||
8. [About](#about)
|
||||
|
||||
Every entry opens its own page. Settings stored on the radio (Node Name, Radio Settings, Location, Contact Settings, Privacy) are sent only when you tap **Save**, which appears once something changes. Leaving with unsaved changes asks to discard or save. While disconnected, the page stays open with a banner and Save is disabled. A failed save keeps your edits.
|
||||
|
||||
---
|
||||
|
||||
## Device Info
|
||||
@@ -46,19 +48,25 @@ Battery shows an alert icon and orange text when at 15% or below. The toggle onl
|
||||
These settings are sent directly to the connected device firmware.
|
||||
|
||||
### Node Name
|
||||
- Opens a dialog with a text field (max 31 characters)
|
||||
- Sends the new name to the device
|
||||
- Confirmed via snackbar
|
||||
Name field with a byte counter (`x / 31`). Special characters and emojis take more than one byte. A longer name can be typed, but the counter turns red, the field says how many bytes it is over, and Save stays disabled. **Message length** updates as you type:
|
||||
- **Channel messages**: 158 bytes minus the name, which is sent as `Name: ` with each message (127 with a 31-byte name)
|
||||
- **Direct messages**: 156 bytes, independent of the name
|
||||
|
||||
### Radio Settings
|
||||
Opens a dialog pre-populated with the device's current radio settings. Contains:
|
||||
- **Preset dropdown**: Regional presets — selecting a preset immediately fills all fields below. Includes presets for Australia, Australia (Narrow), Australia (Mid), Australia SA WA QLD, Czech Republic, EU 433MHz, EU/UK (Long Range), EU/UK (Medium Range), EU/UK (Narrow), New Zealand, New Zealand (Narrow), Portugal 433, Portugal 869, numerous Russia city presets, Switzerland, USA Arizona, USA/Canada, and Vietnam
|
||||
- **Frequency** (MHz): Free text, validated 300–2500 MHz
|
||||
- **Bandwidth**: Dropdown (7.8 / 10.4 / 15.6 / 20.8 / 31.25 / 41.7 / 62.5 / 125 / 250 / 500 kHz)
|
||||
- **Spreading Factor**: SF5–SF12
|
||||
Opens a page pre-populated with the radio's current settings.
|
||||
|
||||
**Parameters**, in two cards:
|
||||
- **Presets**: Australia (four variants), Czech Republic, EU 433MHz, EU/UK (Long Range, Medium Range, Narrow), New Zealand (two variants), Portugal 433 and 869, Russian city presets, Slovakia, Switzerland, USA Arizona, USA Philly, USA Sacramento-Foothills, USA Southern California, USA/Canada and Vietnam. Selecting one fills in frequency, bandwidth, SF, CR and TX power. Shows **Custom** when the values match no preset
|
||||
- **Frequency** (MHz): 150-2500 MHz
|
||||
- **Bandwidth**: 7.8 / 10.4 / 15.6 / 20.8 / 31.25 / 41.7 / 62.5 / 125 / 250 / 500 kHz
|
||||
- **Spreading Factor**: SF5-SF12
|
||||
- **Coding Rate**: 4/5, 4/6, 4/7, 4/8
|
||||
- **TX Power** (dBm): Validated 0 to device max (typically 22 dBm)
|
||||
- **Client Repeat** toggle: Only shown on firmware v9+; requires frequency to be exactly 433.000, 869.000, or 918.000 MHz (the Off-Grid presets). Save is blocked with a warning if enabled on other frequencies
|
||||
- **TX Power** (dBm): -9 up to the radio's maximum (22 dBm if it doesn't report one)
|
||||
- **ID hash size**: 1, 2 or 3 bytes per node ID hash in the paths of flood packets this radio sends. Only shown when the firmware supports it
|
||||
|
||||
**Off-Grid Repeat Mode** (only shown when the firmware reports it): lets this radio repeat packets, for places without repeater coverage. It only works on the off-grid frequencies the radio reports (433.000, 869.495 or 918.000 MHz by default), so turning it on moves the frequency to the nearest one and likely disconnects you from the wider mesh. Nodes that talk to each other need the same frequency, bandwidth and SF; only CR can differ. Turning it off reverts to the previous frequency; if you can't reach the mesh afterwards, check the preset and parameters. Save is blocked with a warning on any other frequency.
|
||||
|
||||
**Save** sends the settings and checks that the radio reports them back; if not, a snackbar says so and the edits stay.
|
||||
|
||||
### Regions
|
||||
|
||||
@@ -72,30 +80,25 @@ Opens the radio statistics screen for the paired radio: noise floor, last RSSI,
|
||||
## Location
|
||||
|
||||
### Location
|
||||
Opens a dialog pre-populated with the device's current coordinates (if known):
|
||||
- Latitude and longitude fields (decimal, 6 decimal places). If only one field is provided, the other uses the device's current value
|
||||
- If GPS-capable hardware (detected via `gps` custom variable):
|
||||
- GPS Update Interval (seconds, 60–86399, default 900 = 15 minutes). Validated and sent separately before lat/lon
|
||||
- Enable GPS toggle (takes effect immediately, not deferred to Save)
|
||||
- Validation: lat ±90, lon ±180
|
||||
The location is shown on the map, used when you share your location, and sent in adverts when Advert Location is on (Privacy).
|
||||
|
||||
- **Latitude** / **Longitude** (decimal, 6 places). One empty field keeps the radio's value for that axis; both empty clears the location. Validation: ±90 / ±180
|
||||
- **Pick on map**: full-screen map with a centre pin; **Use this location** fills both fields
|
||||
- With GPS hardware (`gps` custom variable): **Enable GPS** keeps the location updated from the radio's GPS; **Update interval** (60-86399 s, default 900)
|
||||
|
||||
**Save** validates all fields, then sends the GPS switch (if changed), the interval and the coordinates.
|
||||
|
||||
### Contact Settings
|
||||
Five toggles controlling which node types are auto-added when heard:
|
||||
- Auto-add Chat Users
|
||||
- Auto-add Repeaters
|
||||
- Auto-add Room Servers
|
||||
- Auto-add Sensors
|
||||
- Overwrite Oldest (when contact list is full)
|
||||
- **Auto-add contacts**: users, repeaters, room servers and sensors. Newly heard nodes of the enabled types are added to the radio's contacts; others can be added later from Discovered Contacts
|
||||
- **Contact List Limits**:
|
||||
- **Overwrite oldest** (radio): when the radio's contact list is full, the oldest non-favorited contact is replaced
|
||||
- **Hop limit** (radio): dropdown with No limit (default), 1 (direct only) and 2-64. The radio only auto-adds contacts heard in fewer hops than this; contacts beyond it still appear in Discovered Contacts. Only shown when the firmware reports the setting
|
||||
- **Limit discovered contacts** (app, not the radio; saved with the rest): keeps up to 500 discovered contacts, removing the ones heard longest ago. When off, there's no limit
|
||||
|
||||
### Privacy
|
||||
Opens a dialog with controls for how the node shares telemetry and location data:
|
||||
- **Advert Location**: Toggle whether the node broadcasts its location in advertisements
|
||||
- **Multi-Ack**: Toggle multi-ack delivery confirmations
|
||||
- **Telemetry Base Mode**: Deny All / Allow by Contact / Allow All
|
||||
- **Telemetry Location Mode**: Deny All / Allow by Contact / Allow All
|
||||
- **Telemetry Environment Mode**: Deny All / Allow by Contact / Allow All
|
||||
|
||||
Settings take effect when saved. A snackbar confirms the update.
|
||||
- **Advert Location**: include the node's location in adverts. When on, **Auto Zero-Hop Advert On GPS Update** (app setting) expands below it
|
||||
- **Multi-ACKs**: the radio sends 2 acknowledgments (ACKs) instead of 1 when the ACK goes back over a direct path. Messages received by flood, or with no known route back, still get one. More reliable, more airtime
|
||||
- **Telemetry**: an info box explains that per-contact permissions are in each chat's Contact Settings; then the Base, Location and Environment modes (Deny All / Allow by Contact / Allow All)
|
||||
|
||||
---
|
||||
|
||||
@@ -200,20 +203,20 @@ On the Settings screen, below App Settings, **Message filter** opens a page to h
|
||||
|
||||
## Actions
|
||||
|
||||
One-tap device operations:
|
||||
One-tap device operations. While an action waits for the radio, its row shows a spinner and the app bar a progress bar. Each action ends with a short message.
|
||||
|
||||
| Action | Description |
|
||||
|---|---|
|
||||
| Sync Time | Sends current Unix timestamp to the device |
|
||||
| Sync Time | Sends the phone's time to the radio |
|
||||
| Refresh Contacts | Re-requests the full contact list |
|
||||
| Reboot Device | Confirmation dialog → reboots the device (shown in warning color) |
|
||||
| Delete All Paths | Confirmation dialog → clears all stored routing paths (shown in alert color) |
|
||||
| Reboot Device | Confirmation dialog → reboots the device; a message confirms the command was sent (shown in warning color) |
|
||||
| Delete All Paths | Confirmation dialog → clears the app's path history for all contacts, not the paths stored on the radio (shown in error color) |
|
||||
|
||||
---
|
||||
|
||||
## Backup & Restore and Export
|
||||
## Backup & Restore and Export Data
|
||||
|
||||
The settings card links to **Backup & Restore** and **Export** subpages.
|
||||
The settings card links to **Backup & Restore** and **Export Data** subpages.
|
||||
|
||||
### Backup & Restore
|
||||
|
||||
@@ -223,17 +226,14 @@ The private-key option is off by default because it changes the radio's identity
|
||||
|
||||
A password protects the backup file. Leave the password blank to create an unprotected file. Backups may contain your radio's private key, channel keys, messages and saved passwords, so store them carefully. Model settings are backed up, but model files are not; after restoring, the app offers to download selected models that are missing. Download progress appears in that prompt, and closing it cancels an active download. Received image files and cached map tiles are not included.
|
||||
|
||||
### GPX Export
|
||||
### Export Data
|
||||
|
||||
Three GPX export options (not available on web):
|
||||
Two sections:
|
||||
|
||||
| Option | Exports |
|
||||
|---|---|
|
||||
| Export Repeaters | Repeaters and Rooms with GPS coordinates |
|
||||
| Export Contacts | Chat contacts with GPS coordinates |
|
||||
| Export All | All contacts with GPS coordinates |
|
||||
- **Messages**: **Bookmarks** saves your bookmarked messages as a Markdown file
|
||||
- **Contact locations**: saves contacts with a known location as a GPX file for map apps: **Repeaters and Rooms**, **Users / Companions**, or **All contacts** (not available on web)
|
||||
|
||||
Each creates a `.gpx` file and opens the OS share sheet. Feedback via snackbar for four outcomes: success, no contacts with coordinates, feature not available (web), or error.
|
||||
Each opens the share sheet (or a save dialog on desktop). A snackbar reports success, nothing to export, not available, or an error.
|
||||
|
||||
---
|
||||
|
||||
@@ -256,4 +256,4 @@ Structured log entries (Info / Warning / Error), with tag, message, and timestam
|
||||
|
||||
## About
|
||||
|
||||
Shows the standard Flutter about dialog with app name, version, and legal notice.
|
||||
Opened from **About the App** in Settings. App icon, name, version and description; **Source code** (GitHub), **License** (MIT) and **Open-source licenses** (third-party libraries); **Credits**: **Contributors** (the GitHub contributors page) and the Open-Meteo credit; the legal notice. The version comes from the installed app and the notice uses the current year, so neither needs updating by hand.
|
||||
Reference in new issue
Block a user