For developers · Interfaces
Phone access
On this page
"Fragen an mich" on the phone (#1687): the desktop app serves a small web app to phones in the same local network. A phone pairs once by scanning a QR code: the phone icon in the top bar or "Pair a phone" in the status bar opens Settings → Notifications & feedback → Phone with the code already shown (#1836); once a phone is paired, the status bar shows how many and both open that page without a new pairing. After that the phone lists the questions waiting for you and answers a question card (or comments on an item without one) through the same path as the desktop's card. It can be put on the home screen and then opens like an app.
- Home screen (#1855): below the list a card offers to put the page on the home screen. Where
the browser offers its own install prompt (
beforeinstallprompt, Chromium in a secure context) it shows an "Install" button; otherwise it names the steps for the phone's system (iPhone/iPad: Safari's Share menu, Android: the browser menu), chosen byinstallWayinsrc/mobile/model.ts. Over the plain-HTTP local address Android adds a shortcut that opens in the browser; iPhone/iPad open it full screen from the manifest (/manifest.webmanifest,display: standalone). The card disappears once the page runs from the home screen.
- Where it runs: in the desktop app (
src-tauri/src/mobile.rs), so only while the app runs. The server and the desktop's half of the protocol are in the core (crates/core/src/mobile/), the cryptography, the labels and the phone's client incrates/mobile-protocol, which the native app uses as well; the phone page ismobile.htmlwithsrc/mobile/, built into the app with the main window. - Off by default: no port is open until you press "Pair a phone". The access listens while a pairing is open (10 minutes) or at least one phone is paired; unpairing the last phone, or a pairing nobody completed, closes the port again.
- Local network only: it listens on all IPv4 interfaces, on port 47823 when free (otherwise
another free port, which it keeps), and drops connections from addresses outside the private
ranges (
10/8,172.16/12,192.168/16), link-local and loopback. Access on the go follows later through an end-to-end encrypted relay, with the same encryption. - What the phone can do: read the questions of every account and repository the desktop shows under "Fragen an mich", answer a card (choices, yes/no, text, "explain better", a note), and post a comment on an item without a card. Like the desktop's cards (#1876) it can also close the issue (an optional reason is posted first, after a short confirmation), put an item off until later (1 hour, tomorrow morning, 1 week; the desktop's "Later") and, on a task, tick its checklist and mark it done (optionally closing the issue) or hand it back to the orchestrator with a note. A closed or finished item leaves the desktop list at once and the phone list with its next check; the window says "Closed on <phone>", "Done on <phone>" or "Handed back … on <phone>". A refused close names the reason (no right to close, open prerequisites on the forge). The comment that finishes a task uses the desktop's words in the phone's language. Since #1895 it can also list the repositories with their autopilot, switch the autopilot of one on or to paused, and look at its running and latest sessions (see "Orchestrator" under "Protocol"). Nothing else: no settings, no tokens, no transcripts.
- Desktop only, on purpose: forwarding a question to someone else (it picks people from the forge and lets the local AI draft the note), trusting a contribution's author (an app-wide security setting), the AI answer assist and bringing back a snoozed item (the phone does not list snoozed items).
- Same list as the desktop (#1839): the core leaves out what the desktop list leaves out
(switched-off repos, snoozed items, items answered in the app) and gives every item its
place(ListPlaceincrates/core/src/sync/counts.rs):questionfor the list,approvalfor the approvals' bundle,otherfor repos without the autopilot, which the phone folds away and does not count, like the desktop's "N more". The page's title carries the same count as the tray. - No notifications yet: the page is served over plain HTTP on a local address, which is no secure context. Phone browsers offer notifications, push, service workers and the home-screen badge only in a secure context: Android (Chrome and others) needs HTTPS for all of them, and iPhone/iPad (iOS 16.4 and later) needs HTTPS and the page added to the home screen. So the phone only refreshes while it is open (see "Answered once" below) and when it comes to the front. Notifications arrive with the encrypted relay, which serves the page over HTTPS and can send Web Push.
Answered once#
A question is answered once, whichever client answers it (#1873). The phone's answer is posted
by the desktop app through the same path as the window's card (answer_card in
src-tauri/src/answer.rs), so the core sees every answer:
- Desktop at once: every step of an answer from any client (sending, answered, failed) goes to
every window as the
answeredevent with the item, the core's mark after the step and where the answer came from (AnsweredBy:computer,phonewith the phone's name,forge). The window's answer marks (src/state/answered.tsx,answerMarks.ts) follow it, so a phone's answer hides the question in the desktop list the moment it is sent, the window says "Answered on <phone>", and a failed post brings it back with "The answer from <phone> was not sent". A window that opens later reads the marks withget_answer_marks. - Phone within seconds: the open page asks every 3 seconds with the
synccall whether the list changed. The reply carries the list's version, a fingerprint of exactly the list the phone would get (list_versionincrates/core/src/mobile/mod.rs), and the list itself only when the phone's version differs; an unchanged check is a few bytes. Every change counts without bookkeeping: a poll, an answer from any client, a failed post, a snooze running out, a repo switched off. An answer on the desktop therefore leaves the phone's list within about 3 seconds. An open question the desktop no longer lists says "This question is no longer open" and offers no sending. Checks only run while the page is in the front; no new port, service or relay. - No second answer: one answer per item runs at a time (
ItemLocksincrates/core/src/answer_lock.rs); a second one waits, then is refused while the first one's mark covers the question. Right before posting, the core reads the issue's comments once and refuses when the account already answered this block in the marker format (another computer, the browser). The refused client is toldalready_answeredand where: the window says "Already answered on <phone>" (or "in Gitoodo on this computer", or "the answer is already in the issue"), the phone "Already answered on <computer>" and so on, and its card goes away. A post that fails takes the mark back on every client, so the question can be answered again.
Protocol#
A browser on a local address gets no trusted HTTPS, so every request is encrypted end to end instead. Base64url without padding throughout; labels are ASCII.
Pairing offer (QR code). http://<ip>:<port>/#pair=<base64url(json)> with
{"v":3,"m":1,"k":<desktop public key>,"t":<token>,"x":<expiry, unix seconds>} (v the desktop's
protocol version, m the oldest phone version it serves; see "Compatibility"). k is a fresh X25519
key for this one pairing, t 16 random bytes. The part after # never reaches a server; the
page removes it from the address and the history at once.
Pairing request. The phone makes its own X25519 key p and computes
proof = HMAC-SHA256(t, "gitoodo-mobile-v1 pair proof" || p)key = HKDF-SHA256(ikm = X25519(phone, k), salt = t, info = "gitoodo-mobile-v1 device key" || p || k), 32 bytes
and sends POST /api/pair {"v":<agreed version>,"m":<its oldest>,"p":…,"h":proof,"c":seal(key, "gitoodo-mobile-v1 pair", {"name","ts"})}.
The desktop checks the proof first (a request without the token leaves the pairing open), then
derives the same key (the pairing's private key is used up by this), opens the hello, checks its
time, stores the device and answers {"c":seal(key, "gitoodo-mobile-v1 paired", {"device","host"})}.
Calls. POST /api/call {"v":<agreed version>,"m":<its oldest>,"d":<device id>,"c":seal(key, "gitoodo-mobile-v1 call <id>", call)}
with call = {"id":<16 random bytes>,"ts":<unix ms>,"op":…,"args":…}; ops are sync
(since: the list version the phone shows, or null; replies {"version","items","protocol","caps"},
items left out when the version is since, protocol the desktop's {"version","min"} and
caps its capabilities, see "Compatibility"), questions (the plain list without a
version), answer (account, repo, number, kind, block, answers, note), comment
(account, repo, number, kind, body), and since #1876 close (the item and reason),
finish (the item, finish: {"done":{"close":…}} or "hand_back", lead, note, label),
tick (the item, index, text, checked; replies the new checklist) and snooze (account,
repo, number, until in unix seconds). Each one runs through the same path as the desktop's
command (close_card, finish_card, tick_card in src-tauri/src/answer.rs, the hub's snooze),
under the same per-item lock as answers. The reply is
{"c":seal(key, "gitoodo-mobile-v1 reply <id>", {"re":<call id>,"ok",…})}; the phone accepts
only a reply that names its call. A refused call carries "ok":false and the category in error;
already_answered adds "data":{"by":{"via":"computer"|"phone"|"forge","name":…}} (name only
for a phone). An op the desktop does not know is refused for that call alone with unsupported.
Orchestrator (#1895). Three ops let a paired phone see the orchestrator and steer it per
repository, built from the same sources as the window's sidebar and worker list
(crates/core/src/mobile/orchestrator.rs, the app side in src-tauri/src/mobile.rs):
repos(no args) replies{"orchestrator","dispatcher","repos":[…]}:orchestratorisfalsein direct mode (thenreposis empty),dispatcherwhether the dispatcher answered. Each repo is{"account","repo","state","autopilot","running","waiting","stalled","poll_failed"}withstateactive,pausedorobserved(the stored state oforchestration.jsonfirst, as the window's switch); a repo switched off in the settings is not listed.sessions(account,repo) replies{"account","repo","state","running":[…],"recent":[…]}. A session is{"number","title","state","since","secs","host","hint"}:stateisworking,needs_you,at_prompt,held,limitedordisk_pausedfor a running worker andin_review,needs_humanorstalledfor the latest ones (at most 10);sinceandsecsare unix seconds and the running time,hinta code ({"kind":"stall","cause","runs"},{"kind":"pull","number"},{"kind":"limit","until"}). No transcript, no comment text, no token.autopilot(account,repo,on) takes the window's step:active→paused(on: false),paused→active,observed→activewith backlogaskas the switch adopts a repo, anything else unchanged. It writes through the same store paths asset_repo_stateandadopt_repo(src-tauri/src/labels.rs), sets an activated repo up on the forge in the background like the window (prepare_repo), and replies{"state","autopilot"}. The window gets therepo-steeredevent with the phone's name, reads the states again and says "Autopilot paused for <repo> on <phone>" (or "switched on").
Refusals of these ops: unknown_repo (an account that is not connected or a repository the desktop
does not list), no_right (a repository switched off in the settings, which the phone may neither
see nor change), direct_mode (no orchestrator); a failed write carries the desktop command's
category (store). sync adds "orchestrator":<version> in orchestrator mode, a fingerprint of
what repos and every repo's sessions show without the running times
(orchestrator_version): when it changes the phone asks those again. The model is read without
starting the classifier and without waiting more than 2 seconds, so a busy classifier never delays
the questions.
Versions. The protocol version is 3 since #1895 (the orchestrator ops), 2 since #1876 (the
item actions); #1873's sync op was added within 1. The version sits in the QR code and in every
request. The keys, the labels and the pairing stay valid across versions, so a paired phone does
not pair again. Which versions meet is "Compatibility" below.
Sealing. ChaCha20-Poly1305 with a random 12-byte nonce: seal = base64url(nonce || ciphertext || tag),
the label as associated data. Both sides check the same test vector
(crates/mobile-protocol/src/crypto.rs, src/mobile/crypto.test.ts), and a sealed reply both
the page and the native app's client open (crates/mobile-protocol/src/phone/tests.rs).
Refusals carry a category only, never forge text: 401 unpaired (unknown device or a
message that does not open), 401 clock (more than 2 minutes off), 401 replay (a call id seen
within the window), 410 pairing (no open pairing), 409 full (10 phones), 400 malformed,
400 outdated (a phone below the desktop's oldest version: update the app, or reload the page)
and 400 desktop_outdated (a phone that speaks only versions newer than the desktop's: update
Gitoodo on the computer). Both version refusals add "protocol":{"version","min"}, the desktop's
range.
Compatibility#
A phone from the App Store or Google Play cannot reload like the page, and the stores take days to
review a release, so for a while after every release the phone and the desktop are different
builds. The rules live in crates/mobile-protocol/src/compat.rs (both Rust ends) and
src/mobile/protocol.ts (the page).
- A window, not one version. Each end has
VERSION(the newest it speaks) andMIN_PEER(the oldest of the other end it still talks to), today3and1. Both send them:vandmin the QR code and in every request. They talk in the lowervwhen that lies in the other end's window, or in the desktop'sVERSIONfor a newer phone whosemreaches down to it (negotiate). The desktop answers every phone inMIN_PEER..=VERSIONin that version's own shape (shape_replyincrates/core/src/mobile/mod.rs;orchestratorinsynconly from3). A phone below the window getsoutdated, a phone above itdesktop_outdated. - Capabilities.
synclists what the desktop offers beyondsync,questions,answerandcomment:item_actions(close,finish,tick,snooze) andorchestrator(repos,sessions,autopilot) andpush(thepushop, #1897). The phone shows only what is listed; for a desktop before the window, which lists nothing, the version implies them (implied), and the native app's client fills them in.pushcame with the window, so a desktop that lists nothing never has it (Capability::LISTED_ONLY): the app hands its push address only to a desktop that listspush. An op the desktop does not know fails alone withunsupported, never the session. - Tolerant reading. Both ends ignore fields they do not know (no
deny_unknown_fields), and an unknown enum value falls back instead of failing: an unknown capability is left out, an item of an unknown place is shown among the other repos. - On the phone. A phone inside the window works normally; when
syncnames a newer desktop version, the list shows a dismissible banner "A newer version of the app is available" ("… of this page", with "Reload", in the browser).outdatedin the app replaces the list with a screen that says the computer no longer supports this version and to update the app from its store;desktop_outdatedwith one that says to update Gitoodo on the computer, and "Try again". The page in a browser offers "Reload" foroutdated, which loads the desktop's own page. - Desktops before the window answer another version with a bare
outdated(noprotocol). The native app then tries one version lower, down to itsMIN_PEER, and saysdesktop_outdatedonce none is left (step_downincrates/mobile-protocol/src/phone.rs). Store builds from before the window read only a QR code of their own version, so they cannot pair with a newer desktop; once paired they keep working with it, because it serves their version.
Changing the protocol. An additive change (a new field in a reply, a new optional argument, a
new value of an enum the phone reads tolerantly) keeps VERSION. A new op is a new capability:
add it to Capability and to OPS, list it in sync, and gate the phone's UI on it. Removing or
retyping a field, a new required argument or a new envelope raises VERSION in compat.rs and
src/mobile/protocol.ts together; the desktop keeps serving the old shape (shape_reply) and
MIN_PEER stays, so the window covers at least the two versions before the current one, and
always every version a store build still in review or in use speaks.
Retiring a version. Raise MIN_PEER only once the store builds that speak the version are
replaced (the App Store and Google Play report the share per build) and at least two releases
after the version was superseded. Remove its shape_reply branch and its fixture in the same
change; such a phone then sees the screen that asks it to update.
The test that guards it. crates/mobile-protocol/compat/v<N>.json records every call and
reply of each served version, written when the version was current. The core's
crates/core/src/mobile/compat_tests.rs opens every recorded call in its version and checks that
the replies the desktop builds today still carry every recorded field with the same type;
crates/mobile-protocol/src/compat/tests.rs and src/mobile/compat.test.ts read the recorded
replies as the current phone would and check that both sides name the same window. A fixture
must exist for exactly MIN_PEER..=VERSION: raising VERSION records a new one, retiring
removes one.
Push#
Push notifications to the phone's app (#1897): when the desktop shows a system notification for a
new question or approval, it also tells every paired phone whose app registered for pushes. A
push to an iPhone goes through Apple's push service (APNs), to an Android phone through Firebase
Cloud Messaging (FCM). Both need keys of the publisher's accounts, which must not ship inside an
app anyone can unpack. A small push relay holds them instead (crates/push-relay, the program
gitoodo-push-relay); the desktop and the phone app speak only to the relay.
Data flow.
- The phone's app gets its push token from the system and registers it at the relay:
POST /v1/register{"v":1,"platform":"apns"|"fcm","env":"production"|"sandbox","token":…}. The relay answers{"v":1,"grant":…}: base64url ofHMAC-SHA256(secret, "gitoodo-push-relay grant v1\n<platform>\n<env>\n<token>"). It stores nothing. - The app hands
{"platform","env","token","grant"}to the desktop: aspushin the hello of the pairing request, or later (a renewed token, another relay) with the call oppush(argsthe same object,nullstops pushes to this phone; replies{"relay":<address>}, so an app registered at another relay registers again). The pairing offer names the relay inr. The desktop keeps the push address only inmobile.json. - On a new question or approval the desktop sends
POST /v1/push{"v":1,"platform","env","token","grant","kind":"question"|"approval","c":…}per phone.cisseal(device key, "gitoodo-mobile-v1 push <device id>", content)withcontent = {"v":1,"kind","account","repo","number","title","count","ts"}(title at most 120 characters; a summary of several new questions hascountand no item). With "Show the question in the notification" off,cis left out and the push only says "new question" or "new approval". - The relay checks the grant and its limits and passes the push on. APNs gets an alert the app
localizes (
loc-keyGITOODO_PUSH_QUESTION/GITOODO_PUSH_APPROVAL,title-loc-keyGITOODO_PUSH_TITLE) and{"gitoodo":{"v":1,"k":kind,"c":…}}, withmutable-contentwhencis there, so the app's notification extension opens it. FCM gets a data message{"gitoodo":"1","k":kind,"c":…}with high priority; the app opens it and shows the notification. A push not delivered within a day expires.
What the relay sees: the push token, the grant, the platform, the kind, whether content is there, and the ciphertext. Never a repository, a question, an account, a name or a key of the pairing: the device key never leaves the desktop's keychain and the phone. Apple and Google see the same, plus what they always see of a push (the app and the device). The relay keeps no file and logs one JSON line per request with event, platform, kind and outcome, never a token, a grant or content.
Abuse protection. The relay sends only to a token with its grant, so whoever pushes must hold what the phone's app handed to its paired desktop. Limits per window of ten minutes: 30 pushes per phone (grant), 600 pushes and 30 registrations per sender address. Bodies are capped at 16 KB, ciphertext at 3 KB, tokens have to look like tokens of their platform.
Answers to the desktop. 202 sent; 403 grant (a grant of another relay or of an old
secret) and 410 gone (the push service no longer knows the token) make the desktop forget that
phone's push address until the app sends a new one; 429 rate, 502 upstream,
503 unavailable (the relay has no key for that platform) and 400 malformed leave it. The
desktop logs mobile_push with device id, kind and outcome category.
Settings. Settings → Notifications & feedback → Phone shows per phone with the app a switch
for push notifications and one for showing the question in them; both are on after pairing. The
relay's address is a setting there too: empty means the Gitoodo relay
(https://push.gitoodo.com, DEFAULT_RELAY in crates/core/src/mobile/push.rs), any other
https:// address a relay of your own (http:// only for 127.0.0.1/localhost, for trials).
Running a relay. The relay is one program without state. It listens on plain HTTP; put a
reverse proxy with TLS in front of it and set GITOODO_RELAY_TRUST_PROXY=1, so the limits count
the real sender. Configuration comes from the environment, keys from files (see
crates/push-relay/src/config.rs):
| Variable | Meaning |
|---|---|
GITOODO_RELAY_LISTEN | listen address, default 127.0.0.1:8787 |
GITOODO_RELAY_SECRET_FILE | at least 32 bytes of random secret for the grants; changing it makes every phone register again |
GITOODO_RELAY_TRUST_PROXY | 1 behind a reverse proxy |
GITOODO_RELAY_APNS_KEY_FILE, …_APNS_KEY_ID, …_APNS_TEAM_ID, …_APNS_TOPIC | the APNs auth key (.p8), its key id, the developer team id and the app's bundle id |
GITOODO_RELAY_FCM_ACCOUNT_FILE | the Firebase service account JSON file (role "Firebase Cloud Messaging API Admin") |
GITOODO_RELAY_APNS_URL, …_APNS_SANDBOX_URL, …_FCM_URL | other push service addresses, for local trials |
At least one of APNs and FCM is needed; GET /health answers which are configured. Build it with
cargo build --release -p gitoodo-push-relay. A relay of your own only reaches an app built
with your own keys (the bundle id and Firebase project the keys belong to).
Gitoodo service rollout (decision for #1897). The GbR's service will use
https://push.gitoodo.com on its own small server or container, with DNS and a TLS reverse proxy.
This is the intended default address, not a promise that the service is already operating.
The server and desktop code can be merged before the phone apps: provisioning the APNs key,
Firebase project and service account, installing their keys on the server, and enabling real
delivery are deferred until the phone apps are ready. At that stage the setup is to be performed
through browser automation, with the account owner signing in interactively when needed.
Provider keys stay on the server. Until rollout, integration tests use a local relay with mocked
push services; users can configure their own compatible relay as described above.
Tests. crates/push-relay/src/tests.rs checks grants, limits and the requests to mocked APNs
and FCM; crates/push-relay/tests/e2e.rs runs a relay on a local port, lets the desktop's code
(gitoodo_core::mobile::push::deliver) send through it and opens the content the mocked APNs got
with the device key. The FCM tests sign with a throwaway RSA key they make at
run time, so no private key sits in the tree.
Keys and files#
- The device key lives in the system keychain under
mobile-device-<id>(gitoodo.testaccessin the test build,src-tauri/src/keychain.rs), cached in memory while the app runs. mobile.jsonin the config folder holds the port and per phone its id, name, pairing time and last activity, since #1897 also the phone app's push address (token and grant), the two push switches and the relay address. Never exported with the settings backup; the push address goes only to the relay.- On the phone, the device id, key and the desktop's name stay in the browser's storage for that address. A new address (another IP from the router) means pairing again; "Unpair on this phone" forgets them there, "Unpair" in the settings removes the key on the desktop.
- The native app keeps them, with the desktop's address, as one entry in the system's secure
store instead (
src-mobile/src/secure.rs): the iOS keychain (this app's access group, not synced) or the Android Keystore (a Keystore key encrypts the entry in the app's private preferences). The page in the app never sees the key.
Security notes#
- Without the QR code nobody can pair, read or answer; a recorded request cannot be replayed, and a passive listener in the network sees only ciphertext.
- The page itself loads over plain HTTP. Someone who can change traffic in your network at the moment the phone loads the page could serve it altered and read what it stores. The phone page is therefore meant for your own Wi-Fi; unpair phones you no longer use. The relay over HTTPS removes this for the page.
- The native app has no such gap: its page is part of the installed app, never loaded from the network, and the key stays in Rust and the system's secure store. Only the sealed requests go over plain HTTP, the same ciphertext as from the page. It accepts only a pairing code that names an address of the local network or the phone itself.
- Answers sent from the phone are the same comments the desktop writes, under your account.
- Logs name the device id, the operation and the outcome category (
mobile_paired,mobile_call,mobile_call_refused,mobile_unpaired,mobile_push), never a key, a push token, a question, an answer or a repository. The frequentsyncchecks and thereposandsessionsreads log at debug level when they succeed.
Mac App Store and Microsoft Store#
The sandboxed Mac build needs com.apple.security.network.server for the listening socket
(Entitlements.appstore.plist, Entitlements.appstore.keychain.plist); the MSIX package already
has privateNetworkClientServer. The first listen may bring up the system firewall's question
whether Gitoodo may accept incoming connections; allow it for private networks.
Native app#
The same phone page also comes as an installed app for iOS and Android (#1885, groundwork in #1893), built with Tauri 2's mobile targets. It does everything the page does (#1894): it lists and answers the questions, comments, closes, puts items off and finishes tasks, with the same refusals and "Already answered on …", and it notifies new questions with sound (see "Notifications" below).
- Pairing by camera: "Scan QR code" opens the camera (Tauri's barcode scanner plugin) behind
the page, which shows a frame and "Cancel" on top; the scanned code is the same address the page
would open. The first scan asks for the camera, with the texts of
cameraUsageand, for the calls in the Wi-Fi,localNetworkUsageinsrc/i18n/mobile.ts(iOS:src-mobile/gen/apple/gitoodo-mobile_iOS/<lang>.lproj/InfoPlist.strings, kept equal bysrc/i18n/mobilePermissions.test.ts; Android's camera question is the system's own). A refused camera points to the system settings; without a camera (a simulator) or its permission, "Enter the address instead" takes the address shown below the QR code. - One page, two platforms: the screens stay
src/mobile/for both.src/mobile/platform.tstells them apart (Tauri's bridge in the window) and gives them aPlatformwith aSession: the page pairs from the address and calls withsrc/mobile/crypto.ts; the app's (src/mobile/appPlatform.ts, loaded only in the app) calls four commands ofsrc-mobile:paired,pair(the scanned address and the phone's name, "iPhone · App"),call(op and arguments) andforget. Rust reads the code (crates/mobile-protocol/src/phone.rs), pairs, seals every call and opens its reply (crates/mobile-protocol/src/client.rs), so the page never holds the key. The app shows no "Add to home screen" card; a desktop outside the app's protocol window asks to update the app or the computer's Gitoodo rather than reload ("Compatibility"). - Layout:
src-mobile/is its own Tauri crate (gitoodo-mobile) next to the desktop'ssrc-tauri/, a workspace member so the usual Rust gates lint and test it. It holds the webview, the protocol client and the secure store: no server, tray, sidecar, autostart orgitoodo-core. Only its commands (capabilities/default.jsonandcapabilities/notify.json, listed inbuild.rs) and, on iOS and Android, the scanner's scan, cancel, permission and settings calls (capabilities/scanner.json), the notification permission, haptics and the app eventopen-item(capabilities/notify.json), the app's version and opening exactly the privacy policy and legal notice in the browser (capabilities/links.json) are reachable from the page.tauri.conf.jsonembedsdist-mobile/, whichnpm run build:mobile(Vite--mode mobile-app, part ofnpm run build) fills with the phone page alone, and opensmobile.html. - Generated projects:
src-mobile/gen/apple(Xcode project and itsproject.yml) andsrc-mobile/gen/android(Gradle project) come fromtauri ios initandtauri android initand are checked in; their own.gitignorefiles keep build output out. Their build steps call back throughnpm run tauri:mobile(one line inproject.yml/project.pbxprojand inbuildSrc/…/BuildTask.kt), so the Tauri CLI usessrc-mobileinstead ofsrc-tauri; after a newinit, set that again.project.ymlis the source of the Xcode project and itsInfo.plist(localisations, camera and local network texts): after a change runxcodegen generate --spec project.ymlinsrc-mobile/gen/apple(with emptyExternals/andassets/folders if no build made them yet). The unsigned simulator build has no signature to carry entitlements, so the keychain would refuse it;project.ymllinksgitoodo-mobile_iOS/simulator.entitlements(the application identifier) into the simulator binary instead, as Xcode does for its own simulator builds. Device builds take theirs from the signature. The app icons come fromassets/brand/gitoodo-app-icon.png(npm run tauri:mobile -- icon assets/brand/gitoodo-app-icon.png --ios-color "#ffffff"; keep only the four PNG filestauri.conf.jsonnames insrc-mobile/icons). The App Store refuses an icon with an alpha channel (ITMS-90717), so after generating, flatten the iOS ones:for f in src-mobile/gen/apple/Assets.xcassets/AppIcon.appiconset/*.png; do magick "$f" -background white -alpha remove -alpha off "PNG24:$f"; done. - Identifier:
de.gitoodo.app.mobile, derived from the desktop'sde.gitoodo.app; the Android package is the same.scripts/check-identifier.pycompares the Tauri config, the Xcode project and the Gradle file withcrates/core/src/paths.rs. - Build and start (
scripts/mobile.ts; unsigned for the simulator, the Android debug key for the emulator, no signing identity needed):npm run mobile:ios: macOS with Xcode and the Rust targetaarch64-apple-ios-sim(x86_64-apple-ioson Intel). Builds, boots a simulator (GITOODO_IOS_SIMULATOR, name or UDID; otherwise a booted iPhone or the newest one), shows it (Simulator.app, or Device Hub from Xcode 27), installs and starts the app.npm run mobile:android: Android SDK with platform tools, an NDK, the emulator and a system image, an emulator image (avdmanager create avd …), a JDK 17 or later and the Rust targetaarch64-linux-android(x86_64-linux-androidon Intel).ANDROID_HOMEandNDK_HOMEdefault to Android Studio's places and the newest NDK. Builds a debug APK for one ABI, starts the emulator (GITOODO_ANDROID_AVD, otherwise a running one or the first image), installs and starts the app.- Anything else goes to the Tauri CLI:
npm run tauri:mobile -- ios dev,npm run tauri:mobile -- android build, …
Pairing#
- One scan: iOS asks for the local network only when the app first connects into it, and
that first connection fails while its question shows. The client
(
crates/mobile-protocol/src/client.rs,pair) therefore tries the same offer again every second for up to 60 s (PAIR_PATIENCE) as long as the desktop is unreachable and the offer is valid; a refusal of the desktop ends it at once. After 2.5 s the page explains the system's question (pairingNetwork). - Android 17: with target SDK 37 Android blocks the local network without the runtime
permission
ACCESS_LOCAL_NETWORK.pairasks for it first (WatchPlugin.kt,localNetwork; older versions answer yes); refused, pairing stops withlocal_network, and the page explains it with a button to the settings. Google Play wants a declaration for the permission in the Play Console. - Feedback: paired, the app shows a check that draws itself with the desktop's name for two
seconds, plays the Gitoodo chime (
src/mobile/chime.m4a,scripts/mobile-chime.py) and gives the system's success haptic; a sent answer gives it too. A pull on the list refreshes it with a tick when it is far enough.
Notifications#
New questions and approvals arrive as local notifications with sound; there is no push service
and no server in between (src-mobile/src/watch.rs decides, src-mobile/src/notify.rs shows).
- Turning on: a card under the list offers them once ("Never miss a question"); "Turn on"
asks the system, "Later" puts the card away (the settings sheet offers them again). The choice
stays on the phone (
localStorage); the page sends the words in the phone's language withwatch_switch. Unpairing turns them off. - Watching: while the app is not in the front (the system's suspend and resume events), Rust
asks the paired desktop every 15 s (
CHECK_SECS) withsyncand the last version, so an unchanged list costs one small reply. A waiting item (question, approval) whose key (account, repository, number, start of the wait) the phone has not shown yet is notified, at most four at a time; one that leaves the list takes its notification back. The very first check of a phone only learns the list. What the page shows in the front counts as seen (seen.jsonin the app's data folder: keys only, never a title), and coming to the front clears the notifications. - Tap: opens the app on the item (
take_open, the eventopen-item). - Android: the channel "Questions for me" (high importance,
res/raw/gitoodo_chime.wav, vibration, private on the lock screen) and the small iconic_stat_gitoodo. While notifications are on, a foreground service of typeconnectedDevice(WatchService.kt, started byWatchPlugin.kt) keeps the process and its checks alive with a silent, minimal notification; Play asks for a declaration with a short video of turning it on. Checked on Android 11 (Mi A3): the checks go on every 15 s with the app in the background, with the screen off and in forced Doze (dumpsys deviceidle force-idle). Notifications are not grouped: Android hides a grouped notification without a summary. "Do not disturb" holds them back like any app's unless the user makes Gitoodo an exception. - iOS: the sound is
gitoodo_chime.cafin the bundle (iOS plays none without a named file). iOS suspends an app soon after it leaves the front, so it notifies only until then; notifications for a closed app need push (#1897, #1898).
Settings#
The "…" button in the header opens a sheet: notifications on or off (or the way to the system
settings when they are refused), the privacy policy (the website's section #phone-app in the
phone's language) and the legal notice in the browser, the open-source licences, the app's
version, and unpairing with a second step. The header shows the connection in one line: "Connected to …" with a green dot, or
"No connection to …" with a grey one, never both. Android's back button and a browser's back
close an open item or the sheet (each is a history step).
Stores#
- Privacy manifest:
gitoodo-mobile_iOS/PrivacyInfo.xcprivacy: no tracking, no collected data, file timestamps (C617.1) as the only API with a required reason (the Rust standard library'sstaton the app's own files). After adding a crate or plugin, check the binary again:nm -u <app binary> | grep -E '_(f?stat|statfs|getattrlist|mach_absolute_time)'andNSUserDefaults. - Android manifest: no TV launcher, no file provider,
allowBackup="false"(the pairing lives in the keystore and cannot move to another phone anyway). - Data safety / privacy labels: questions and answers go end-to-end encrypted to the user's own computer only, which the stores do not count as collected. On Android the barcode scanner's library sends diagnostics to its vendor (device or installation identifiers, app information and performance), which the Data safety form has to name.
- Licences: the third-party code the app ships and its licences, under "Open-source
licences" in the settings (
Licences.tsx, loaded as a separate chunk only when opened). The listsrc/mobile/licenses.jsoncomes fromnode scripts/mobile-licenses.mjs(its header names what it needs): the Rust crates ofsrc-mobileon Android and iOS (normal dependencies, with the licence files they ship; a crate without one gets the standard text of a licence it offers fromscripts/licenses/, its authors as the copyright holders), the npm packages of the page's bundle (from a build's source maps) and the Maven libraries of the Android release build (the licence their POM names, Apache 2.0 text once).src/mobile/licenses.test.tsfails once a listed crate or npm version is no longer locked: run the script again.