Working in the repoTrace and verify changes safely

Set up and verify the app

Each command includes its purpose, expected result, and safety boundary.

  1. 01

    Confirm branch and local work

    Verify the intended feature branch and preserve uncommitted work before any edit.

    git status --short --branch
    Expected
    A non-main branch and only understood changes.
    Safety
    Never discard or overwrite unknown user changes.
  2. 02

    Confirm canonical baseline

    Know which main commit the change is based on.

    git rev-parse main && git merge-base HEAD main
    Expected
    The audit initially points to 262db109; later audits must show their actual commit.
    Safety
    Read-only.
  3. 03

    Inspect Xcode schemes

    Confirm schemes/targets before choosing a focused command.

    xcodebuild -project 'Alva Online Trading.xcodeproj' -list
    Expected
    Shared scheme: Alva Online Trading.
    Safety
    Read-only aside from Xcode caches.
  4. 04

    Build for iPhone 17

    Validate app compilation after routing or UI work.

    IOS_SCHEME='Alva Online Trading' IOS_DESTINATION='platform=iOS Simulator,name=iPhone 17' ./scripts/verify-ios.sh
    Expected
    BUILD SUCCEEDED.
    Safety
    Uses simulator/build artifacts; does not require live production APIs.
  5. 05

    Run focused app tests

    Run the repository's configured test action after focused local checks.

    IOS_SCHEME='Alva Online Trading' IOS_DESTINATION='platform=iOS Simulator,name=iPhone 17' IOS_ACTION=test ./scripts/verify-ios.sh
    Expected
    Relevant unit/snapshot foundation tests pass.
    Safety
    Use deterministic fixtures; never point tests at production.
  6. 06

    Generate deterministic snapshots

    Review SwiftUI previews and portfolio snapshot output visually.

    ./scripts/generate-snapshots.sh
    Expected
    Generated files appear only in ignored snapshot-images/.
    Safety
    Mock/sample data only; never commit generated snapshots unless the repository formally adopts baselines.
  7. 07

    Open simulator control

    Inspect layout, interaction, Dynamic Type, and dark/light behavior in a booted simulator.

    ./scripts/serve-sim.sh
    Expected
    Local viewer at http://localhost:3200.
    Safety
    Local development only; stop the process when finished.
  8. 08

    Check patch hygiene

    Catch whitespace errors and confirm the change remained scoped.

    git diff --check && git diff --stat
    Expected
    No diff-check errors and an explainable file list.
    Safety
    Read-only.

Change checklist

Leave a short proof for every decision that can affect routing, data, KYC, or production configuration.

  1. 01
    Name the behavior and lane

    State whether the target is reachable, gated, dormant, legacy, or WIP and which product mode exposes it.

    Proof

    A route/feature-flag citation from ContentView or AppExperience.

  2. 02
    Trace entry and exit

    Follow the user action through AppTab/AppRoute/sheet/fullScreenCover and identify back/pop behavior.

    Proof

    A short before/after route trace and one focused navigation test when behavior changes.

  3. 03
    Find the real state owner

    Label each value as local @State, parent Binding, owned @StateObject, observed shared object, AppStorage, or repository state.

    Proof

    The owner and lifetime are written in the PR description.

  4. 04
    Declare provenance and fallback

    For every displayed value, identify live/cached/hybrid/mock/simulated source, cache, fallback, freshness, and persistence.

    Proof

    No UI field is described generically as live when its section is mixed.

  5. 05
    Check capability impact

    Run the behavior for Not Started, Submitted, and Approved demo states before touching Trade, Portfolio, Buy/Sell, deposit, or withdrawal.

    Proof

    Submitted stays locked; Approved demo never calls live financial infrastructure.

  6. 06
    Protect environment boundaries

    Confirm product mode, runtime environment, social backend, and identity provider independently.

    Proof

    Staging/production still reject demo identity and configuration failures remain visible.

  7. 07
    Localize and make state accessible

    Use the existing English/Indonesian copy structure, non-color status cues, meaningful labels, comfortable targets, and Reduce Motion behavior.

    Proof

    Both languages and relevant accessibility settings are manually checked.

  8. 08
    Add characterization before refactor

    Lock existing calculations, routing, error, empty, loading, and cancellation behavior before extracting architecture.

    Proof

    Focused tests fail on the old bug or guard the preserved behavior.

  9. 09
    Verify the real compact layout

    Build and inspect an iPhone 17 simulator in dark/light mode; use deterministic snapshots when the view supports them.

    Proof

    No clipping, cramped chips/buttons, unsafe-area issue, or hidden interaction state.

  10. 10
    Leave an auditable handoff

    Record files, tests, product-code impact, risks, and any stale control-room cards.

    Proof

    The onboarding generator passes and changed evidence hashes are intentionally refreshed.