← Back to Pull requests

feat(mobile): mani log, dupes on scan verdict, home screen #379

Closed
unknown closed this pull request without merging on Oct 20, 2026 02:52 UTC
View on GitHub
unknown unknown commented on Oct 19, 2026 13:02 UTC
Author

Stacked on #376 (retargets to dev after #376 merges). Refs #109.

What this adds (wave 2)


  • Home panel (Collection tab top): owned / wishlist / untried counts, Pick for me with the web's weighting (apps/mobile/src/lib/pick-for-me.ts mirrors apps/web/src/lib/pick-for-me.ts; the web's "Pair it" is not ported), one-tap Log today's mani with undo.

  • Mani log: new Manis tab (GET /api/manicures, paging, delete) with a Log a mani sheet (owned polishes with roles, date, notes); polish detail shows worn count / last worn / tried-untried and opens the sheet preselected (/manis?log=<shadeId>).

  • Scan verdict dupes: the "not owned" Rapid Add verdict calls GET /api/polishes/{id}/dupes and shows "You own N close dupes" with swatches (built in #376; wording now includes the count).

  • Stale-while-revalidate cache (AsyncStorage, per user, 7-day expiry, wiped on sign-out) for Collection page 1 per filter set, Home counts and the mani log; offline launch opens the saved data (the signed-in user + token endpoint are stored with the session). Pull-to-refresh on Collection and Manis.

  • CI: Mobile job also runs expo export for iOS + Android (Metro + Hermes bundle; verified locally).
  • Verification


    typecheck, lint and 37 mobile unit tests pass; expo export for both platforms passes. Verified in the Expo web preview against the local Functions host (dev bypass): Home counts, Pick for me, Log today's mani (then undone via the API; Teddy Girl's tried_at, which the mani log fills and never clears, was reset to null), Manis list, Log a mani sheet (opened and filled, not saved), near-dupe verdict ("Holo Taco — Highest Bidder" vs an owned dupe), and the offline restore (proxy stopped, reload → saved list + counts + "Showing your last saved list"). Not run: iOS Simulator (no Xcode), native camera.

    Note: Alert.alert is a no-op in the web preview, so Delete mani and the "Undo" alert after Log today's mani on the detail screen could only be checked by type-check there.

    Decisions needed


  • None new.
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    New Features
    Added a Mani log tab to record, browse, and delete manicure entries, including dates and notes.
    Added collection counts and “Pick for me,” with one-tap manicure logging and undo.
    Added access to saved collection and mani-log data when offline or a refresh fails. Saved data is cleared on sign-out.
    Added a shortcut to log a manicure from a polish’s detail page.
    Improvements
    Updated close-match verdicts to show the total number of similar shades.
    Chores
    * Mobile CI now exports the app for iOS and Android.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 357 lines (+267 / -90) across 4 files Reviewer: mattmck Review duration: 830m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 357 lines diff across 4 files
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.352
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #379"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.6% (MEDIUM) · Higher = larger blast radius
    42.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.8% · Safe to merge
    16.8%