Skip to content

Commit befa7fb

Browse files
jamesarichclaude
andauthored
docs: update repo/developer/in-app docs and repair the screenshot pipeline for 2.8.0 (#5775)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 988db08 commit befa7fb

75 files changed

Lines changed: 814 additions & 129 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.skills/compose-ui/strings-index.txt

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.skills/new-branch/SKILL.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ This replaces the ad-hoc prose that used to be retyped at the start of every ses
1616
1. **Clean worktree.** If `git status --porcelain` is non-empty, ask the user before proceeding.
1717
2. **Upstream remote present.** `git remote -v` must list `upstream` pointing at
1818
`meshtastic/Meshtastic-Android`. If only `origin` exists on a fork, treat `origin` as upstream.
19-
3. **Submodules initialised.** `core/proto/src/main/proto` must be populated — see AGENTS.md
20-
workspace bootstrap rules.
21-
4. **Secrets bootstrapped.** If `local.properties` is missing, copy `secrets.defaults.properties`
19+
3. **Secrets bootstrapped.** If `local.properties` is missing, copy `secrets.defaults.properties`
2220
(required for `google` flavor builds).
2321

2422
## Standard Recipe
@@ -30,10 +28,7 @@ git fetch upstream --prune --tags
3028
# 2. Create the branch from upstream/main (never from a local stale main)
3129
git switch -c <branch-name> upstream/main
3230

33-
# 3. Ensure submodules track the new base
34-
git submodule update --init --recursive
35-
36-
# 4. Sanity check
31+
# 3. Sanity check
3732
git --no-pager log -1 --oneline
3833
```
3934

@@ -58,7 +53,6 @@ When the user says *"rebase #NNNN"* or *"dust off PR NNNN"*:
5853
git fetch upstream --prune
5954
gh pr checkout <NNNN> # checks out the PR head locally
6055
git rebase upstream/main
61-
git submodule update --init --recursive
6256
# Resolve conflicts, then:
6357
git push --force-with-lease
6458
```
@@ -67,7 +61,6 @@ Never use plain `--force`. Always `--force-with-lease` to avoid clobbering colla
6761

6862
## Post-Branch Checklist
6963
- [ ] Branch name follows conventional prefix.
70-
- [ ] Submodules up to date.
7164
- [ ] `local.properties` exists.
7265
- [ ] `ANDROID_HOME` exported (see AGENTS.md workspace bootstrap).
7366
- [ ] Optional: run `./gradlew assembleDebug` once to catch environment regressions before editing.

.skills/project-overview/SKILL.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Module directory, namespacing conventions, environment setup, and troubleshootin
55

66
- **Build System:** Gradle (Kotlin DSL). JDK 21 REQUIRED. Target SDK: API 36. Min SDK: API 26.
77
- **Flavors:** `fdroid` (OSS only) · `google` (Maps + DataDog analytics)
8-
- **Android-only Modules:** `core:barcode` (CameraX). Shared contracts abstracted into `core:ui/commonMain`.
8+
- **Android-only Modules:** `core:barcode` (CameraX), `feature:widget` (Glance home-screen widget), `feature:car` (Android Auto via the Car App Library, `google` flavor only), and `baselineprofile` (Macrobenchmark). Shared contracts are abstracted into `core:ui/commonMain`.
99

1010
## Codebase Map
1111

@@ -16,7 +16,6 @@ Module directory, namespacing conventions, environment setup, and troubleshootin
1616
| `config/` | Detekt static analysis rules (`config/detekt/detekt.yml`) and Spotless formatting config (`config/spotless/.editorconfig`). |
1717
| `docs/` | Architecture docs and agent playbooks. See `docs/kmp-status.md` and `docs/roadmap.md` for current status. |
1818
| `core/model` | Domain models and common data structures. |
19-
| `core:proto` | Protobuf definitions (Git submodule). |
2019
| `core:common` | Low-level utilities, I/O abstractions (Okio), and common types. |
2120
| `core:database` | Room KMP database implementation. |
2221
| `core:datastore` | Multiplatform DataStore for preferences. |
@@ -28,13 +27,15 @@ Module directory, namespacing conventions, environment setup, and troubleshootin
2827
| `core:navigation` | Shared navigation keys/routes for Navigation 3 using `@Serializable sealed interface` hierarchies. `DeepLinkRouter` for typed backstack synthesis, and `MeshtasticNavSavedStateConfig` with `subclassesOfSealed()` for automatic polymorphic backstack persistence. |
2928
| `core:ui` | Shared Compose UI components (`MeshtasticAppShell`, `MeshtasticNavDisplay`, `MeshtasticNavigationSuite`, `AlertHost`, `SharedDialogs`, `PlaceholderScreen`, `MainAppBar`, dialogs, preferences) and platform abstractions. |
3029
| `core:service` | KMP service layer; Android bindings stay in `androidMain`. |
30+
| `core:takserver` | Meshtastic ↔ TAK (ATAK/iTAK) bridge — local CoT server and CoT ⇄ mesh conversion. |
3131
| `core:prefs` | KMP preferences layer built on DataStore abstractions. |
3232
| `core:barcode` | Barcode scanning (Android-only). |
3333
| `core:nfc` | NFC abstractions (KMP). Android NFC hardware implementation in `androidMain`. |
3434
| `core/ble/` | Bluetooth Low Energy stack using Kable. |
3535
| `core/resources/` | Centralized string and image resources (Compose Multiplatform). |
3636
| `core/testing/` | Shared test doubles, fakes, and utilities for `commonTest` across all KMP modules. |
37-
| `feature/` | Feature modules (e.g., `settings`, `map`, `messaging`, `node`, `intro`, `connections`, `firmware`, `wifi-provision`, `widget`). All are KMP except `widget`. Use `meshtastic.kmp.feature` convention plugin. |
37+
| `feature/` | Feature modules (e.g., `settings`, `map`, `messaging`, `node`, `intro`, `connections`, `firmware`, `wifi-provision`, `discovery`, `docs`, `widget`, `car`). Most are KMP and use the `meshtastic.kmp.feature` convention plugin; `widget` (Glance) and `car` (Android Auto, `google` flavor only) are Android-only. |
38+
| `baselineprofile/` | Macrobenchmark Baseline Profile generation for `:androidApp` (AOT-compiled cold-start journey). Android-only. |
3839
| `feature/wifi-provision` | KMP WiFi provisioning via BLE (Nymea protocol). Uses `core:ble` Kable abstractions. |
3940
| `feature/firmware` | Fully KMP firmware update system: Unified OTA (BLE + WiFi), native Nordic Secure DFU protocol (pure KMP), USB/UF2 updates, and `FirmwareRetriever` with manifest-based resolution. Desktop is a first-class target. |
4041
| `desktopApp/` | Compose Desktop application. Thin host shell relying on feature modules for shared UI. Full Koin DI graph, TCP, Serial/USB, and BLE transports. Versioning via `config.properties` + `GitVersionValueSource`. |
@@ -66,12 +67,7 @@ Agents **MUST** perform these steps automatically at the start of every session
6667
```
6768
All `./gradlew` invocations must include `ANDROID_HOME` in the environment. If the SDK cannot be found, ask the user for the path.
6869

69-
2. **Proto submodule:** `core/proto/src/main/proto` is a Git submodule containing Protobuf definitions. It must be initialized or builds will fail with proto generation errors:
70-
```bash
71-
git submodule update --init
72-
```
73-
74-
3. **Init secrets:** If `local.properties` does not exist, copy `secrets.defaults.properties` to `local.properties`. Without this the `google` flavor build fails:
70+
2. **Init secrets:** If `local.properties` does not exist, copy `secrets.defaults.properties` to `local.properties`. Without this the `google` flavor build fails:
7571
```bash
7672
[ -f local.properties ] || cp secrets.defaults.properties local.properties
7773
```

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You are an expert Android/KMP engineer. Maintain architectural boundaries, use M
3838
- **CMP Over Android:** Use `compose-multiplatform` constraints. Pre-format floats with `NumberFormatter.format()`. Use `MeshtasticNavDisplay` and `NavigationBackHandler`.
3939
- **Zero Lint Tolerance:** Task is incomplete if `detekt` or `spotlessCheck` fails.
4040
- **Verify Before Push:** Treat any "push" as verify-then-push. CI has failed repeatedly due to skipped local checks.
41-
- **Never Touch Protos or Secrets:** `core/proto` is an upstream submodule. Secrets are git-ignored.
41+
- **Never Touch Protos or Secrets:** Protobuf models come from the upstream `org.meshtastic:protobufs` Maven dependency (pinned in `gradle/libs.versions.toml`) — bump the version upstream, never hand-edit generated proto. Secrets are git-ignored.
4242
- **Privacy First:** Never log or expose PII, location, or cryptographic keys.
4343
</rules>
4444

CLAUDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
2222
JDK 21 is required. **Bootstrap before any Gradle task** (don't wait to be told) — full details in `.skills/project-overview/SKILL.md`:
2323
```bash
2424
[ -z "$ANDROID_HOME" ] && export ANDROID_HOME="$HOME/Library/Android/sdk" # often unset in agent workspaces
25-
git submodule update --init # proto submodule; builds fail without it
2625
[ -f local.properties ] || cp secrets.defaults.properties local.properties # google flavor fails without it
2726
```
2827

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@ This is a tool for using Android (and Compose Desktop) with open-source mesh rad
1515

1616
If you have questions or feedback please [Join our discussion forum](https://github.com/orgs/meshtastic/discussions) or the [Discord Group](https://discord.gg/meshtastic). We would love to hear from you!
1717

18+
## Features
1819

20+
Highlights from the latest release:
21+
22+
- **Full-text message search** across your conversation history.
23+
- **Mesh network discovery** to surface nodes and channels around you.
24+
- **Android Auto** support for hands-free use while driving (`google` flavor).
25+
- **Air-quality telemetry** — PM1.0, PM2.5, PM10, and CO₂ readings from supported sensors.
26+
- **Device hardware links** via [msh.to](https://msh.to) for quick access to hardware details.
27+
- **App Functions / system-AI integration** so on-device assistants can trigger common workflows.
1928

2029
## Get Meshtastic
2130

@@ -76,7 +85,7 @@ The app follows modern Android development practices, built on top of a shared K
7685
- **State Management:** Unidirectional Data Flow (UDF) with ViewModels, Coroutines, and Flow.
7786
- **Dependency Injection:** Koin with Koin Annotations (K2 Compiler Plugin).
7887
- **Navigation:** JetBrains Navigation 3 (Multiplatform routing with RESTful deep linking).
79-
- **Data Layer:** Repository pattern with Room KMP (local DB), DataStore (prefs), and Protobuf (device comms).
88+
- **Data Layer:** Repository pattern with Room KMP (local DB), DataStore (prefs), and Protobuf (device comms). Protobuf models are consumed from the upstream `org.meshtastic:protobufs` Maven artifact, pinned in `gradle/libs.versions.toml`.
8089

8190
### Bluetooth Low Energy (BLE)
8291
The BLE stack uses a multiplatform interface-driven architecture. Platform-agnostic interfaces live in `commonMain`, utilizing the **Kable** multiplatform BLE library to handle device communication across all supported targets (Android, Desktop). This provides a robust, Coroutine-based architecture for reliable device communication while remaining fully KMP compatible. See [core/ble/README.md](core/ble/README.md) for details.
@@ -106,7 +115,6 @@ Each module has its own README with details on its responsibilities, API surface
106115
| [core/nfc](core/nfc/README.md) | NFC support |
107116
| [core/prefs](core/prefs/README.md) | Legacy preference helpers |
108117
| [core/barcode](core/barcode/README.md) | Barcode / QR scanning |
109-
| [core/proto](core/proto/README.md) | Protobuf submodule wrapper |
110118
| [feature/messaging](feature/messaging/README.md) | Messaging UI feature |
111119
| [feature/map](feature/map/README.md) | Map UI feature |
112120
| [feature/node](feature/node/README.md) | Node detail UI feature |
@@ -115,8 +123,11 @@ Each module has its own README with details on its responsibilities, API surface
115123
| [feature/intro](feature/intro/README.md) | Onboarding / intro UI feature |
116124
| [feature/wifi-provision](feature/wifi-provision/README.md) | Wi-Fi provisioning UI feature |
117125
| [feature/connections](feature/connections/README.md) | Device discovery & connection management (BLE / USB / TCP) |
126+
| [feature/discovery](feature/discovery) | Mesh network discovery |
118127
| [feature/docs](feature/docs/README.md) | In-app documentation browser with Chirpy AI assistant |
119128
| [feature/widget](feature/widget/README.md) | Android home-screen Glance widget (live mesh stats) |
129+
| [feature/car](feature/car) | Android Auto integration (Car App Library, `google` flavor) |
130+
| [baselineprofile](baselineprofile/README.md) | Macrobenchmark Baseline Profile generation for `:androidApp` |
120131

121132
## Translations
122133

core/resources/src/commonMain/composeResources/values/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@
453453
<string name="dns">DNS</string>
454454
<!-- DOC -->
455455
<string name="doc_clear_search">Clear search</string>
456+
<string name="doc_keywords_android_auto">android auto,car,head unit,driving,hands free,messaging</string>
457+
<string name="doc_keywords_app_functions">system ai,gemini,assistant,functions,automation,voice</string>
456458
<string name="doc_keywords_connections">bluetooth,usb,tcp,pairing,serial,wifi</string>
457459
<string name="doc_keywords_desktop">desktop,linux,macos,windows,serial</string>
458460
<string name="doc_keywords_discovery">discovery,topology,network,scan,neighbor</string>
@@ -474,6 +476,8 @@
474476
<string name="doc_search_placeholder">Search documentation…</string>
475477
<string name="doc_section_developer">Developer Guide</string>
476478
<string name="doc_section_user">User Guide</string>
479+
<string name="doc_title_android_auto">Android Auto</string>
480+
<string name="doc_title_app_functions">App Functions</string>
477481
<string name="doc_title_connections">Connections</string>
478482
<string name="doc_title_desktop">Desktop App</string>
479483
<string name="doc_title_discovery">Discovery</string>

docs/assets/screenshots/README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,52 @@
11
# Screenshots
22

3-
This directory contains screenshot assets referenced by the documentation pages.
3+
This directory is the **single source of truth** for screenshot assets referenced by the
4+
documentation pages. It is consumed by both:
45

5-
Screenshots are sourced from the Compose Preview Screenshot Testing reference images
6-
in `screenshot-tests/src/screenshotTestDebug/reference/`. Light-mode variants are
7-
copied here for use by the Jekyll docs site and in-app documentation browser.
6+
- the **Jekyll docs site** (markdown references `../../assets/screenshots/{name}.png`), and
7+
- the **in-app docs browser**`:feature:docs:syncDocsToComposeResources` bundles this
8+
directory into compose resources at `files/docs/assets/screenshots/`.
9+
10+
`DocImageWiringTest` (in `:feature:docs`) fails the build if a doc page references an image
11+
that is not present here.
812

913
## Updating Screenshots
1014

11-
After changing a UI component, regenerate reference images and copy them here:
15+
Most screenshots are generated from the Compose Preview Screenshot Testing reference images
16+
in `screenshot-tests/src/screenshotTestDebug/reference/`. After changing a UI component:
1217

1318
```bash
14-
./gradlew :screenshot-tests:updateDebugScreenshotTest
19+
./gradlew :screenshot-tests:updateDebugScreenshotTest # regenerate reference images
20+
./gradlew :screenshot-tests:copyDocsScreenshots # refresh this directory
1521
```
1622

17-
Then copy the relevant light-mode PNGs from the reference directory. The
18-
`copyDocsScreenshots` task automates bulk copying based on the manifest:
23+
`copyDocsScreenshots` copies **only** the light-mode reference images that have a semantic
24+
alias in `screenshot-tests/docs-screenshot-aliases.properties`, renaming them on the way.
25+
Commit the refreshed PNGs together with the reference-image changes.
1926

20-
```bash
21-
./gradlew :screenshot-tests:copyDocsScreenshots
22-
```
27+
## Adding a Screenshot for a New Doc Page
28+
29+
1. Add (or reuse) a `Preview*`/`*Preview` composable with representative mock data in the
30+
feature module, and a `Screenshot*` wrapper in `screenshot-tests` (see
31+
`DiscoveryScreenshotTests.kt` for the pattern). If the component renders timestamps, give
32+
it a `timeTextOverride`-style parameter so renders stay deterministic across machines.
33+
2. Make sure the test class is covered by `screenshot-tests/docs-screenshots-manifest.txt`.
34+
3. Map the semantic name in `screenshot-tests/docs-screenshot-aliases.properties`:
35+
`{page-id}_{description}.png=Screenshot{Name}_Light_{hash}_0.png`
36+
4. Run the two Gradle tasks above and reference the image from the doc page.
2337

2438
## Naming Convention
2539

2640
```
2741
{page-id}_{description}.png
2842
```
2943

30-
Examples:
31-
- `onboarding_welcome.png`
32-
- `connections_bluetooth_scan.png`
33-
- `firmware_disclaimer.png`
44+
Examples: `onboarding_welcome.png`, `connections_bluetooth_scan.png`, `discovery_preset_result.png`.
3445

3546
## Guidelines
3647

37-
- PNG format, light-mode only (dark variants live in reference directory)
48+
- PNG format, light-mode only (dark variants live in the reference directory)
3849
- Name screenshots to match the docs page they appear in
3950
- Keep filenames lowercase with underscores
40-
51+
- A few screenshots (`connections_wifi_*.png`) are manual captures with no CST source yet;
52+
they are hand-maintained until matching previews exist
102 KB
Loading
8.06 KB
Loading

0 commit comments

Comments
 (0)