Repository navigation
fix(home): stop telling customers their real repairs are examples - #78
Merged
Merged
Conversation
Found in the native development build against a live backend: the customer home screen rendered the «datos de ejemplo» notice UNCONDITIONALLY. With mock data off and the server answering — real repairs, real orders, the server's own figures on screen — the app still said none of it was real. The order detail screen had the same defect, with its own wording about an endpoint that «requiere el contrato de autenticación web» — a sentence that stopped being true when the native auth contract shipped. Every other screen that shows this notice already gates it on `useMockData`: the shop, the product, the order list and the login all check. These two did not, and nothing caught it because the test suite runs with mock data ON, where an unconditional notice and a correct one look identical. So the regression test is its own file, with the flag mocked before the screen is imported — the condition is module-level, and re-requiring the screen inside the existing suite hands React a second copy of itself. Who this costs: the person whose phone is being repaired, reading a repair screen that tells them the status they just read is made up. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found in the native development build against a live backend: the customer home screen rendered the «datos de ejemplo» notice unconditionally. With mock data off and the server answering — real repairs, real orders, the server's own figures on screen — the app still said none of it was real.
The order detail screen had the same defect, with wording about an endpoint that «requiere el contrato de autenticación web» — a sentence that stopped being true when the native auth contract shipped.
Why nothing caught it
Every other screen with this notice already gates it on
useMockData: shop, product, order list, login. These two did not — and the test suite runs with mock data on, where an unconditional notice and a correct one look identical.So the regression test lives in its own file with the flag mocked before the screen is imported: the condition is module-level, and re-requiring the screen inside the existing suite hands React a second copy of itself (that attempt failed with
Cannot read properties of null (reading 'use'), which is what sent it to its own file).Who this costs
The person whose phone is being repaired, reading a repair screen that tells them the status they just read is made up.
Checks
tsc --noEmitclean,eslint0 errorsexpo exportios + android passexpo-doctorreports fresh upstream patch drift (expo, expo-network, expo-router, expo-sharing) — unrelated to this change, handled in a separate maintenance PR🤖 Generated with Claude Code