refactor: retire the brand before mantra, and keep the three records of it

Phase 0 of docs/curated-to-mantra.md, item 2. The app has been Mantra since
before this repository had a docs/ directory, and four things still said Torch,
the brand before it: the theme composable, `TorchTheme`, at 116 sites; the
user agent, `UserAgent.APP_NAME` and `CLIENT_NAME`; two error strings a user
could actually be shown ("tell X to use Torch", "finished setting up Torch");
and iOS, where `Config.xcconfig` built `PRODUCT_NAME=Torch` under the bundle id
`ac.aux.compose.Aux` and the project's product reference was still `Aux.app` --
two brands ago. All four now say Mantra.

**This is done natively, before anything is pulled from the fork, so that the
fork's theme maps onto a name that means something.** The Curated fork retired
Torch itself in d26cf6c7 (`TorchTheme` -> `CuratedTheme`, later `CurareTheme`).
The pull rewrites every fork commit into this repository's names, and until
now the only honest target for `CurareTheme` was `TorchTheme` -- the brand
before last -- which would have had every pulled screen wrapping itself in a
name the app stopped using long ago. `MantraTheme` is what the rewrite maps to
from here; docs/scripts/curated-unbrand.py's theme, `UserAgent` and iOS rules
are changed in this commit for that reason, and the comment that said "change
here if Phase 0 renames it" goes with them. Retiring Torch as part of the pull
instead -- by taking the rewritten d26cf6c7 -- was rejected because that commit
would then be a fork commit renaming something the fork never had, and because
the iOS half of the debt was never the fork's to pay.

**The user agent went last, and the reason it could go at all is written where
the next reader will look.** `CLIENT_NAME` is the `client` tag on every relay
list this app publishes, which is why it was left alone when the top bar was
fixed: it goes on the wire, so it read as a network identity question. It is
attribution and nothing derives from it, which is the difference between it
and the two `mantra/` hash tags that must never move; the comment on the
`HomeScreen` bar and the paragraph in material-design-conformance.md that both
said "still says Torch" now say that, in order, rather than describing a state
this commit ends.

**Three records keep the old name on purpose.** material-design-conformance.md:278
records a finding -- the top bar once read "Torch" while the window title read
"Mantra" -- and changing it would falsify the record. The paragraph at :654 is
rewritten rather than deleted because it was a statement of current state, and
the current state changed. `NavigationRoutingTest`'s "Introducing... Torch"
fixture is the string a stranded user actually saw, and the test is about the
stranding. Nothing else in the tree says Torch.

**iOS is unverified.** The build gates the apple targets behind `isMacOsX` and
this was built on linux; the xcconfig and pbxproj edits are the same shape the
fork's went through, and this is the first time this repository has named
itself there. Build it on a Mac before believing it.

:composeApp:compileDebugKotlinAndroid and :composeApp:compileKotlinJvm clean;
:composeApp:jvmTest 736 tests, 0 failures; :composeApp:testDebugUnitTest 403
tests, 0 failures; :composeApp:m3Audit all budgets met.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kgothatso Ngako
2026-09-13 11:42:36 +02:00
parent b796a32be3
commit 4681ac1a03
74 changed files with 161 additions and 155 deletions

View File

@@ -43,11 +43,11 @@ _RULES = [
(r'\bCurareShapes\b', 'MantraShapes'),
(r'\bCurareConverters\b', 'MantraConverters'),
(r'\bdefaultCurareDir\b', 'defaultMantraDir'),
(r'\bCurareTheme\b', 'TorchTheme'), # Mantra's theme is still TorchTheme; change here if Phase 0 renames it
(r'\bCurareTheme\b', 'MantraTheme'),
(r'Res\.string\.curare\b', 'Res.string.mantra'),
(r'<string name="curare">Curare</string>', '<string name="mantra">Mantra</string>'),
(r'const val APP_NAME = "Curare"', 'const val APP_NAME = "Torch"'), # and here
(r'const val CLIENT_NAME = "Curare"', 'const val CLIENT_NAME = "Torch"'), # and here
(r'const val APP_NAME = "Curare"', 'const val APP_NAME = "Mantra"'),
(r'const val CLIENT_NAME = "Curare"', 'const val CLIENT_NAME = "Mantra"'),
(r'APP_DIR_NAME = "curated"', 'APP_DIR_NAME = "mantra"'),
(r'rootProject\.name = "Curare"', 'rootProject.name = "Mantra"'),
(r'namespace = "to\.curare\.android"', 'namespace = "press.mantra.android"'),
@@ -68,17 +68,17 @@ _RULES = [
(r'\bCuratedShapes\b', 'MantraShapes'),
(r'\bCuratedConverters\b', 'MantraConverters'),
(r'\bdefaultCuratedDir\b', 'defaultMantraDir'),
(r'\bCuratedTheme\b', 'TorchTheme'),
(r'const val APP_NAME = "Curated"', 'const val APP_NAME = "Torch"'),
(r'const val CLIENT_NAME = "Curated"', 'const val CLIENT_NAME = "Torch"'),
(r'\bCuratedTheme\b', 'MantraTheme'),
(r'const val APP_NAME = "Curated"', 'const val APP_NAME = "Mantra"'),
(r'const val CLIENT_NAME = "Curated"', 'const val CLIENT_NAME = "Mantra"'),
(r'rootProject\.name = "Curated"', 'rootProject.name = "Mantra"'),
(r'namespace = "com\.it\.curated\.android"', 'namespace = "press.mantra.android"'),
(r'applicationId = "com\.it\.curated"', 'applicationId = "press.mantra.android"'),
# ios: Mantra never left Torch / ac.aux.compose.Aux (see the plan's Phase 0)
(r'PRODUCT_NAME=Curare\b', 'PRODUCT_NAME=Torch'), (r'PRODUCT_NAME=Curated\b', 'PRODUCT_NAME=Torch'),
(r'PRODUCT_BUNDLE_IDENTIFIER=to\.curare\b', 'PRODUCT_BUNDLE_IDENTIFIER=ac.aux.compose.Aux'),
(r'PRODUCT_BUNDLE_IDENTIFIER=com\.it\.curated\b', 'PRODUCT_BUNDLE_IDENTIFIER=ac.aux.compose.Aux'),
(r'\bCurare\.app\b', 'Torch.app'), (r'\bCurated\.app\b', 'Torch.app'),
# ios: Mantra is `Mantra` / press.mantra.ios since the plan's Phase 0
(r'PRODUCT_NAME=Curare\b', 'PRODUCT_NAME=Mantra'), (r'PRODUCT_NAME=Curated\b', 'PRODUCT_NAME=Mantra'),
(r'PRODUCT_BUNDLE_IDENTIFIER=to\.curare\.ios', 'PRODUCT_BUNDLE_IDENTIFIER=press.mantra.ios'),
(r'PRODUCT_BUNDLE_IDENTIFIER=com\.it\.curated\b', 'PRODUCT_BUNDLE_IDENTIFIER=press.mantra.ios'),
(r'\bCurare\.app\b', 'Mantra.app'), (r'\bCurated\.app\b', 'Mantra.app'),
# string keys carrying the brand: `_` is a word character, so \b never fires inside them
(r'sign_in_is_not_yet_available_while_curare_is', 'sign_in_is_not_yet_available_while_mantra_is'),
(r'sign_in_is_not_yet_available_while_curated_is', 'sign_in_is_not_yet_available_while_mantra_is'),