From e7e2d8c6b721fb35c917c0864861e3688812e737 Mon Sep 17 00:00:00 2001 From: Andre Padez Date: Sat, 15 Aug 2026 00:12:32 +0100 Subject: [PATCH] feat(settings): show our versioning, not Apple's marketing string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The row read '1.0.0 (2026081501)'. The first half has said 1.0.0 for every build ever made here and conveys nothing — nobody maintains it, and it cannot distinguish two builds. What identifies a build is the date-stamped number OAS assigns and writes into CFBundleVersion before signing. So the row now shows exactly that, dotted for reading: 2026.08.15.01. The same string the install page shows, which is the point — 'is the thing on my phone the thing on the site?' becomes a question you answer by looking rather than by remembering which link you tapped. A build that never went through OAS has no such number. Anything that is not exactly ten digits is shown verbatim as 'dev (…)' rather than sliced into a fake date. Co-Authored-By: Claude Opus 5 --- src/settings/SettingsScreen.tsx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/settings/SettingsScreen.tsx b/src/settings/SettingsScreen.tsx index 02e328b..39ee3e0 100644 --- a/src/settings/SettingsScreen.tsx +++ b/src/settings/SettingsScreen.tsx @@ -76,6 +76,26 @@ export type SettingsScreenProps = { * No tabs. The tabbed variant exists for pages with several named sections to choose between; this * one has the app's own section and About, and a row of two pills is chrome rather than navigation. */ +/** + * Which build this is, in OUR versioning rather than Apple's. + * + * `1.0.0` is a marketing string nobody maintains — it has said 1.0.0 for every build ever made here and + * conveys nothing. What identifies a build is the date-stamped number OAS assigns and writes into + * CFBundleVersion before signing, which is also what the install page shows. Showing the same string in + * both places is the whole point: it makes "is the thing on my phone the thing on the site?" answerable + * by looking, rather than by remembering which link was tapped. + * + * Dotted for reading, stored undotted — 2026081501 becomes 2026.08.15.01. + * + * A build that has not been through OAS (a cable install, a Metro run) has no such number, so anything + * that is not exactly ten digits is shown verbatim instead of being mangled into a fake date. + */ +function buildLabel(): string { + const raw = Constants.nativeBuildVersion ?? ''; + if (!/^\d{10}$/.test(raw)) return raw ? `dev (${raw})` : 'dev'; + return `${raw.slice(0, 4)}.${raw.slice(4, 6)}.${raw.slice(6, 8)}.${raw.slice(8)}`; +} + export const SettingsScreen = ({ title, onClose, @@ -166,7 +186,7 @@ export const SettingsScreen = ({ */} - {`${Constants.expoConfig?.version ?? '1.0.0'} (${Constants.nativeBuildVersion ?? 'dev'})`} + {buildLabel()} {onShowCredits ? (