Commit Graph

231 Commits

Author SHA1 Message Date
Daniel Arantes Loverde
21250ec2b9 [signing] Restore LC provisioning profiles and sync project.yml
I reverted project.pbxproj earlier to drop Xcode's objectVersion churn
and wiped the manual signing config with it. Restored.

- project.pbxproj: back to the LC Prov profile set (Dev/Dist for the app,
  Dev/Dist Push for NotificationService), CODE_SIGN_STYLE = Manual on all
  targets - byte-identical to fix/signing/notification-extension-distribution.
- project.yml: was still pointing at the old 'PediFoods Dev/Dist Prov
  Prof' names and CODE_SIGN_STYLE Automatic for the extension. Synced to
  the same LC Prov set so 'xcodegen generate' reproduces the signing
  instead of reverting it. Verified: regenerating from this project.yml
  yields the same CODE_SIGN_* / PROVISIONING_PROFILE_SPECIFIER settings.
2026-08-27 10:38:28 -03:00
Daniel Arantes Loverde
57103c637a [auth-payment-login-lockout] Make auth intro a clean screen with a back button
App Review rejected the 2026-08 build: tapping checkout as a guest
switched root to .auth, which replaced the whole UI with LoginView as the
NavigationStack root - no nav bar, no back, no dismiss. User was trapped.

- LoginView: rebuilt as a static screen in LCENavigationView with a back
  button that sets root = .main, a 'Criar conta' and an 'Entrar' button,
  and 'Termos de Uso' / 'Politica de Privacidade' links. Added #Preview.
- Forced .preferredColorScheme(.light) and fixed DS colors (the app has
  no dark theme, so system dark mode was inverting the nav bar / title).
- Removed the entry-reveal animation machinery (heroVisible/textVisible/
  buttonVisible/token/prepare flags across LoginView, AuthFlowView,
  ContentView) - dead since guest browsing shipped and the root cause of
  the 2026-08-06 'content stuck hidden' bug.
- enterAuthFlow() is now just root = .auth.
- UITestSupport.ensureLoggedIn taps 'Entrar' (new label).
- ProfileLoggedOutFlowTests: new test covering the choices and the way
  back out of .auth.
- Localizable.xcstrings: catalog caught up to the new/removed strings.
2026-08-27 10:31:39 -03:00
Daniel Arantes Loverde
662f7d6ebd Merge branch 'fix/home/header-categories-spacing' 2026-08-24 15:51:45 -03:00
Daniel Arantes Loverde
d969cca8b3 [lcenavigationview-adoption] Center Orders empty-state text, not left
Previous fix's VStack-level .frame(maxWidth: .infinity, alignment:
.leading) fixed the width but over-applied .leading to the empty
text too. Give it its own centered frame instead, matching the
isLoading/errorMessage branches right above it.
2026-08-24 15:30:37 -03:00
Daniel Arantes Loverde
033613ac40 [lcenavigationview-adoption] Fix Orders empty state shrinking to content width
The empty-orders branch ("Nenhum pedido encontrado.") had no
.frame(maxWidth: .infinity), unlike the loading/error branches -
ScrollView sizes to its content's intrinsic width, so the whole
container (and its background) shrank to the text's width, leaving
the real black window visible on both sides. Forces the VStack (and
ScrollView) to always fill width regardless of which branch renders.
2026-08-24 15:24:52 -03:00
Daniel Arantes Loverde
29c80d06af [lcenavigationview-adoption] Suppress glass button chrome via .buttonStyle(.plain)
Cascades .buttonStyle(.plain) down from each LCENavigationView
instance instead of waiting on the LCEssentials package fix
(committed separately, unpublished: LC_Essentials commit 8b0f650) to
be released and this repo's Package.resolved bumped. Overrides
iOS 26's automatic Liquid Glass chrome on LCENavigationView's
internal nav buttons - including the invisible backfilled mirror
button on whichever side has no real action - without affecting any
button that already sets its own explicit style closer to itself.
2026-08-24 15:18:57 -03:00
Daniel Arantes Loverde
18497b017a [lcenavigationview-adoption] Fix black nav bar background, add Cart title wrap
setNavigationBarBackgroundColor was never called on the 15 screens
adopted in 3456184, so it stayed at the default .clear and the real
window background (black) showed through. Set it to
AppColors.backgroundLight on all of them, matching each screen's own
actual content background. Also wraps CartView's title in
LCENavigationView for consistency with the rest of the app - no
setLeftButton since Cart is a tab root, no back button needed.

The other reported bug (empty right-button slot rendering a visible
glass circle) is fixed in LCEssentials itself (separate repo,
commit 8b0f650 on fix/navigation/liquid-glass-button-chrome) but
won't take visual effect here until that's published and this
repo's Package.resolved is bumped to point at it.
2026-08-24 14:50:46 -03:00
Daniel Arantes Loverde
afa5b87da0 Fix again 2026-08-24 14:40:25 -03:00
Daniel Arantes Loverde
345618426f [lcenavigationview-adoption] Adopt LCENavigationView across 15 screens
Standardizes the back button to a single shared component
(AppBackButtonIcon, 32x32/14pt) instead of ~16 hand-duplicated
52x52/24pt copies, and wires each screen through LCENavigationView
per this project's mandatory-usage rule. Home and Store Detail
intentionally excluded - both have bespoke header designs (collapsing
header, hero-image overlay) this change would visually disrupt.
2026-08-24 14:35:48 -03:00
Daniel Arantes Loverde
dae3b6f9d5 Fix header space 2026-08-24 14:03:36 -03:00
Daniel Arantes Loverde
394d53df91 [home-header-spacing] Remove redundant top padding above Categorias
contentTopSpacing (18pt) was stacked on top of the content VStack's
own 24pt inter-section spacing, giving header-to-Categorias a wider
gap (42pt) than every other section-to-section gap in Home (24pt).
Dropping it to 0 makes the gap consistent with the rest of the
screen.
2026-08-24 13:35:32 -03:00
59ec6ffd6f Merge pull request 'feature/push/opt-in-prompts' (#43) from feature/push/opt-in-prompts into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#43
2026-08-24 11:57:48 -03:00
Daniel Arantes Loverde
be38499759 [logged-out-auth-intro] Merge main into opt-in-prompts, keep enterAuth-closure UX
ProfileLoggedOutView conflict: kept this branch's simpler
enterAuth()-closure version over main's inline-embedded LoginView
(fix/profile/logged-out-auth-intro, predates the login-entry-
animation-bug fix). That bug was the actual reason the separate-
screen approach looked broken; it's already fixed here
(decisions/2026-08-06-login-entry-animation-bug.md), so the simpler
pattern works without re-threading a root binding through
MainTabView/ProfileLoggedOutView, which this branch deliberately
removed in favor of the closure. Ported the location-usage-
description Portuguese copy and the entitlements additions
(aps-environment, location.push) from main.
2026-08-24 11:48:27 -03:00
Daniel Arantes Loverde
9cb3654eb8 [logged-out-auth-intro] Merge into main, resolve entitlements/pbxproj conflicts
Union of both branches' entitlements (aps-environment + location.push
from this branch, App Attest CDhash opt-in from PR #41). Signing
settings resolved to Manual/Apple Distribution/AppStore profile -
this branch independently introduced the same Automatic/Apple
Development regression as PR #41 (see e93ccd2); one line
(PROVISIONING_PROFILE_SPECIFIER) merged silently to the broken value
without a marked conflict, caught by manual review and corrected
alongside the marked conflicts.
2026-08-24 11:42:00 -03:00
Daniel Arantes Loverde
e93ccd2f45 [app-attest-env] Restore Distribution/Manual signing on Release after PR #41
PR #41's App Attest environment fix (0bfdbb5) changed the Release
config's code signing from Manual/Apple Distribution/AppStore
provisioning profile to Automatic/Apple Development/no profile -
described in its own commit message as switching "local signing to
automatic" for App Attest testing, but applied to the same
config CI archives from for App Store submission. Automatic signing
needs an interactive Apple ID session (headless CI can't do that -
see docs/ci-cd/macos-runner-appstore-delivery.md section 2), and an
Apple Development identity can't produce an App-Store-uploadable
archive. Restores the prior signing settings, keeps the App Attest
environment fix itself untouched.
2026-08-24 11:40:15 -03:00
Daniel Arantes Loverde
3f09589f32 [app-attest-env] Merge production-environment fix into opt-in-prompts, port to flat layout
Resolves the App Attest env/entitlements changes onto the flattened
PediFoods.xcodeproj structure (Darwin/PediFoods.xcodeproj no longer
exists on this branch). Also restores Release signing to Manual /
Apple Distribution / AppStore provisioning profile - the merged-in
fix had switched it to Automatic / Apple Development, which breaks
headless CI archiving.
2026-08-24 11:39:23 -03:00
0c398157a7 Merge pull request 'fix/app-attest/production-environment' (#41) from fix/app-attest/production-environment into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#41
2026-08-24 11:04:18 -03:00
Daniel Arantes Loverde
2a934483fd [coverage-85] Add HomeFiltersFlowTests, fix stuck activeModal on interactive sheet dismiss
FiltersModalView.swift was 0% covered. Reaching it via guest mode hit
the backend's App Attest simulator-bypass rejection (403
APP_ATTEST_VERIFICATION_FAILED on /api/public/session, confirmed via
curl - a pre-existing, out-of-repo backend issue already documented in
decisions/2026-08-06-ui-test-account-and-app-attest-bypass.md), which
kept the guest address picker stuck showing a load-error sub-screen.

While chasing that, found a real bug in ContentView.swift:
.sheet(item: $appState.activeModal) had no onDismiss, so an
interactive swipe-to-dismiss never reset the bound item to nil -
anyone who swipes the address picker away without picking a location
leaves appState.activeModal stuck non-nil, silently breaking the next
modal presentation app-wide. Fixed with
onDismiss: { appState.activeModal = nil }.

Rewrote HomeFiltersFlowTests to use the authenticated QA account
instead of guest mode, routing around the backend-blocked guest wall
entirely. Also fixed a separate, real XCUITest issue: a plain .tap()
on the filter icon (inside Home's .offset()-transformed collapsing
header) reliably produced "Computed hit point {-1, -1}" - fixed via
coordinate(withNormalizedOffset:).tap().

Verified: HomeFiltersFlowTests passed clean across 2 consecutive
isolated runs. Full-suite regression run could not be completed this
round - the local environment stopped completing any instrumented
test launch afterward (reproduced across background/foreground,
clean DerivedData, simulator reboot, decoupled build/test, process
cleanup), unrelated to these changes. Documented in
decisions/2026-08-11-coverage-push-to-85-percent-status.md, with a
next-session TODO to run the full suite once the environment recovers.
2026-08-12 22:41:26 -03:00
Daniel Arantes Loverde
b68cd92307 [batch-f] Extend CardSelectionSheet test into PaymentCardView
testConfirmarEPagarWithCreditCardOpensCardSelectionWithoutSubmitting now
also taps CardSelectionSheet's "Adicionar novo cartão", which opens
PaymentCardView (CheckoutView.swift's own card-entry form - a distinct
struct from AddCardFormView.swift, which is a separate screen reached
from Profile -> Meus Cartões and already covered). Doesn't fill or
submit anything, just reaches the form and dismisses back through both
sheets.

Extracted the shared "x" close-button dismiss logic (used by both
CardSelectionSheet and PaymentCardView) into a private
dismissViaCloseButton helper.

Verified stable across 2 consecutive class-level runs.
2026-08-12 10:43:47 -03:00
Daniel Arantes Loverde
fff087c402 [batch-f] Add CardSelectionSheet test, fix product-row plus-button bug
Adds testConfirmarEPagarWithCreditCardOpensCardSelectionWithoutSubmitting:
selecting Cartão de Crédito and tapping "Confirmar e Pagar" opens
CardSelectionSheet (a separate struct in CheckoutView.swift) rather than
submitting an order - confirmed by reading
CheckoutView+Logic.handleConfirmPaymentTap(), which returns early before
any order-creation code when useInAppPayment && paymentMethod ==
.creditCard. Dismissed via the sheet's own close button, never selects a
card or submits anything, consistent with the earlier explicit user
direction not to create real order data during this coverage push.

Real bug found and fixed: reachCheckoutWithOneItem's product "+" button
selector (app.buttons.matching(identifier: "plus")) is the same class
of bug already fixed for the tab bar's cart icon - once a product's
quantity is > 0, its outer Button's identifier moves off itself onto a
nested Image (the row's own quantity Text takes over the Button's
accessible identity). This broke today specifically because the
standing QA account's cart has genuinely accumulated real quantities
across many runs, eventually leaving no untouched (quantity == 0)
product for the old selector to find - confirmed via screenshot showing
the "+" controls clearly rendered on screen while the buttons-only
query found nothing. Fixed by targeting the nested Image's identifier
directly (app.images.matching(identifier: "plus")), same fix pattern as
the cart-tab icon. This is shared by all three tests in the file via
reachCheckoutWithOneItem.

Also bumped two real-network timeouts based on trace evidence (not
guesses): store-detail load 15s -> 25s, OTP-request-to-Verificação-screen
15s -> 25s in UITestSupport.ensureLoggedIn.

Verified: the new test passes consistently in isolation and alongside
the other two tests in the class. One remaining flake
(testAddProductToCartAndReachCheckout hitting "Login never completed"
when run back-to-back with two other real-login tests in the same
invocation) confirmed via isolated rerun to be real backend load from
three consecutive real login/logout cycles, not a code regression -
passes cleanly alone.
2026-08-11 17:23:25 -03:00
Daniel Arantes Loverde
77bf276a5f [batch-f] Extend Checkout coverage: payment method selection + Alterar
Adds testCheckoutPaymentMethodSelectionAndAddressAlterar, exercising
CheckoutView's payment-method row selection and the address picker's
"Alterar" entry point without ever tapping "Confirmar e Pagar" -
deliberately not submitting a real order (explicit user direction:
cover the screen, don't create real order data in the QA account).

Extracted the shared reach-checkout steps from
testAddProductToCartAndReachCheckout into a private helper,
reachCheckoutWithOneItem, reused by both tests.

Fixed the same "not hittable" Back-button bug (already documented in
UITestSupport.swift) inline here too - tapping a Back button that
exists but is mid pop-transition throws a fatal, uncatchable failure;
needs an .isHittable check with a short poll, not just .exists.

Verified stable across 2 consecutive class-level runs.
2026-08-11 15:43:59 -03:00
Daniel Arantes Loverde
7702836fe7 migration 2026-08-11 13:22:02 -03:00
Daniel Arantes Loverde
c4d6998595 [push-deeplink-routing-contract] Generalize push tap routing to DeepLinkDestination
Replace order_status-only NotificationCenter path with a single
DeepLinkDestination enum + PushDeepLinkParser, decoded once in
PushNotificationCoordinator and dispatched via ContentView.route(to:).
Also fixes NotificationService reading userInfo["image"] instead of
the guide's stale "imageUrl" key.
2026-08-05 15:19:18 -03:00
Daniel Arantes Loverde
7dd4cda1a4 [push/opt-in-prompts] Implement push notifications client integration
Build the full client half of docs/api/push-notifications-integration-guide.md:
OS permission + APNs device-token registration and pipeline wiring, profile
notifications/biometric-login toggles on the Ver Perfil screen reflecting
server truth, order-tracking opt-in fallback prompt, profile-cache refresh
on every mutation, a Notification Service Extension for rich/image push,
the Push Notifications capability, targeting-attributes sync, campaign open
tracking, and tap-to-order deep linking with foreground notification display.
2026-08-04 11:33:56 -03:00
Daniel Arantes Loverde
f4b2cce849 [logged-out-auth-intro] Embed login flow directly in logged-out profile tab 2026-08-02 09:42:22 -03:00
Daniel Arantes Loverde
0bfdbb5c31 [app-attest-env] Opt-in app attest via CDhash and switch local signing to automatic 2026-07-31 14:20:55 -03:00
Daniel Arantes Loverde
6187dc1907 [app-attest-env] Clear stale App Attest key on local DCError, not just server 403
Root cause of the permanent stuck-at-challenge symptom: a stale
appAttestKeyId in Keychain (Secure Enclave key invalidated by an app
reinstall or signing change) makes generateAssertion fail every time
with DCError code 2 (invalidInput). Only NetworkError 403 was clearing
the stored key, so this local rejection was never recovered from -
every guest-authed call kept retrying the same broken key forever.
Catch DCError here too and fall through to fresh attestation.
2026-07-31 14:09:41 -03:00
Daniel Arantes Loverde
e9e3e9da1f [app-attest-env] Log the actual error behind guest-session App Attest failures
Guest session handshake fails silently after the challenge step - no
console output, just a generic "could not load" message in the UI.
DCAppAttestService errors (generateKey/attestKey/generateAssertion)
propagate up uncaught by anything that logs them. Add explicit logging
at each step so the real thrown error is visible instead of debugging
blind.
2026-07-31 14:05:29 -03:00
Daniel Arantes Loverde
0cf3ab7b4f [app-attest-env] Fix App Attest environment mismatch for distribution builds
com.apple.developer.devicecheck.appattest-environment was hardcoded to
"development" for every build, including the App Store/TestFlight
distribution build. Apple's App Attest servers validate this claim
against how the app was actually signed/distributed, so a "development"
claim on a real distribution build fails - guest session handshake
never gets past the challenge step, no store/city data ever loads.
Parameterized per configuration: development for Debug, production for
Release, via an APP_ATTEST_ENVIRONMENT build setting.
2026-07-31 13:41:31 -03:00
32f12d6c0e Merge pull request '[2026-07-resubmission] Add missing location usage description' (#40) from fix/app-review/2026-07-resubmission into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#40
2026-07-31 12:01:51 -03:00
69002f4754 Merge branch 'main' into fix/app-review/2026-07-resubmission 2026-07-31 12:01:42 -03:00
Daniel Arantes Loverde
246208b515 [2026-07-resubmission] Add missing location usage description
App Store Connect flagged a validation warning: code references a
location API (guest store locator) but Info.plist has no
NSLocationWhenInUseUsageDescription, which would cause an App Review
rejection if left unaddressed. Added via INFOPLIST_KEY_* build setting
since this target generates its Info.plist from build settings rather
than a static file.
2026-07-31 11:58:41 -03:00
e1e21c1e28 Merge pull request '[macos-runner] Don't auto-submit for review after upload' (#39) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#39
2026-07-31 11:53:23 -03:00
dd5760e3e9 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 11:53:14 -03:00
Daniel Arantes Loverde
c6ebd5db2b [macos-runner] Don't auto-submit for review after upload
Binary upload itself succeeded - the only failure was
upload_to_app_store's default auto-submission colliding with an
existing in-progress review submission. CI should deliver the build;
submitting for review stays a deliberate manual step in App Store
Connect.
2026-07-31 11:52:24 -03:00
e738688e36 Merge pull request '[macos-runner] Fix build number bump - agvtool was silently no-oping' (#38) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#38
2026-07-31 11:38:09 -03:00
1bd23a800b Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 11:38:00 -03:00
Daniel Arantes Loverde
007227f0ea [macos-runner] Fix build number bump - agvtool was silently no-oping
Upload rejected with "bundle version must be higher than previously
uploaded version: 1" - agvtool new-version requires VERSIONING_SYSTEM =
apple-generic, which this project never sets, so it did nothing every
run despite reporting success. Pass CURRENT_PROJECT_VERSION directly
via xcargs instead, parameterized from the job's run number.
2026-07-31 11:36:50 -03:00
90385bd020 Merge pull request 'ci/gitea-actions/macos-runner' (#37) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#37
2026-07-31 11:14:22 -03:00
abeb2fa83c Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 11:14:14 -03:00
Daniel Arantes Loverde
57a4ad3086 [macos-runner] Set manual signing on the app target's Release configuration
Baked directly into the project instead of overriding at build time -
no tool can programmatically edit this project's .pbxproj (xcodeproj
gem can't parse its format), and a command-line xcargs override applies
to the whole build graph, breaking the SPM package's own targets which
must stay on Automatic. Debug config left untouched so local Xcode
development still uses automatic signing.
2026-07-31 11:12:59 -03:00
Daniel Arantes Loverde
7445561e5c [macos-runner] Revert update_code_signing_settings - unusable on this project format
The xcodeproj gem can't parse PediFoods.xcodeproj's .pbxproj (newer
Xcode format than any released gem version supports), so the runtime
override always fails with a misleading "very old project file" error.
Signing config for the app target needs to live in the checked-in
project settings instead (set once via Xcode's GUI), since no
command-line override can be scoped to a single target without also
breaking the SPM package's own ephemeral targets.
2026-07-31 10:54:04 -03:00
ceda06acc1 Merge pull request '[macos-runner] Disable credential helper and askpass for checkout clone' (#36) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#36
2026-07-31 10:44:44 -03:00
f03db25058 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 10:44:36 -03:00
Daniel Arantes Loverde
28f145f392 [macos-runner] Disable credential helper and askpass for checkout clone
17-minute hang on git clone, far past the http.lowSpeedLimit abort
threshold, isn't explained by a data-transfer stall. Now that the VM has
a real GUI session (auto-login), git-credential-osxkeychain could be
popping a GUI dialog nobody's there to dismiss, bypassing
GIT_TERMINAL_PROMPT. Disable the credential helper and force askpass to
fail immediately instead of prompting.
2026-07-31 10:41:36 -03:00
dece29e8b4 Merge pull request '[macos-runner] Scope manual signing to the app target only' (#35) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#35
2026-07-31 10:21:35 -03:00
0dab971a93 Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 10:21:27 -03:00
Daniel Arantes Loverde
cfa054a593 [macos-runner] Scope manual signing to the app target only
Blanket xcargs (CODE_SIGN_STYLE=Manual etc.) applied to every target in
the build, including the SPM package's own generated targets (PediFoods,
pedi-foods_PediFoods) which explicitly reject provisioning profiles and
need to stay Automatic. Use update_code_signing_settings scoped to just
"PediFoods App" instead, guarded behind DEVELOPMENT_TEAM being set so
Bitrise's existing automatic-signing path is untouched.
2026-07-31 10:20:33 -03:00
e00a62c5c6 Merge pull request '[macos-runner] Pass DEVELOPMENT_TEAM into xcargs for SPM package targets' (#34) from ci/gitea-actions/macos-runner into main
Reviewed-on: Loverde-Company-LTDA/Pedi-Foods-Skip#34
2026-07-31 10:06:16 -03:00
9351cbd31c Merge branch 'main' into ci/gitea-actions/macos-runner 2026-07-31 10:06:08 -03:00