Skip to content

feat: persistent tip thank-you, feedback/rating rows and 1.0.0 release prep - #43

Merged
Juuro merged 8 commits into
mainfrom
feat/tip-jar-persistent-thank-you
Sep 19, 2026
Merged

Juuro merged 8 commits into
mainfrom
feat/tip-jar-persistent-thank-you

Conversation

@Juuro

@Juuro Juuro commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Thank-you bubble in the tip jar previously vanished once the user left and re-entered the screen.
  • Persist the last tip purchase date (logweight_last_tip_purchase_date) and show the bubble on every visit for 7 days after the last tip.
  • Logic lives in Core as TipThankYouPolicy (pure UserDefaults, no StoreKit). TipJarStore records the transaction's purchaseDate on both purchase paths; TipJarView keys off store.showsThankYou.

Notes

  • Stores only a date, no health data.
  • Tips bought before this change have no stored date, so the bubble appears from the next tip.

Test plan

  • swift test in Packages/LogWeightCore (108 pass, incl. 5 new TipThankYouPolicyTests)
  • iOS scheme builds
  • Manual: buy a tip, go back to Settings, reopen tip jar → bubble still shown

🤖 Generated with Claude Code

The thank-you bubble only showed right after purchase and vanished when
leaving and re-entering the tip jar. Persist the last tip purchase date and
show the note for 7 days afterwards.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A verified tip purchase can fail to show the thank-you section immediately if the device clock is behind the transaction purchaseDate (clock-skew regression introduced by gating on showsThankYou).

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds a Core-level policy for persisting and re-displaying the Tip Jar thank-you note for 7 days after the last tip, so the UI stays consistent across leaving/re-entering the screen.

Changes:

  • Introduces TipThankYouPolicy (UserDefaults-based) to record last tip purchase date and decide thank-you visibility within a 7‑day window.
  • Records the transaction purchaseDate on both StoreKit purchase paths in TipJarStore, and drives the UI off store.showsThankYou.
  • Adds unit tests covering the thank-you visibility window and boundary/future-date behavior.
File Description
Packages/​LogWeightCore/​Tests/​LogWeightCoreTests/​TipThankYouPolicyTests.swift Adds tests for the thank-you visibility policy (no tip, inside/outside window, future date).
Packages/​LogWeightCore/​Sources/​LogWeightCore/​Support/​TipThankYouPolicy.swift Implements the UserDefaults-backed 7-day visibility policy.
Packages/​LogWeightCore/​Sources/​LogWeightCore/​Settings/​SettingsKeys.swift Adds a new canonical SettingsKey for last tip purchase date storage.
App/​iOS/​Views/​TipJarView.swift Switches thank-you section visibility to store.showsThankYou so it persists across navigation.
App/​iOS/​Support/​TipJarStore.swift Records tip purchase dates and exposes showsThankYou to drive the view.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread App/iOS/Support/TipJarStore.swift
Juuro and others added 3 commits September 19, 2026 15:21
Settings gets a Feedback section: a prefilled mailto draft (app, iOS and
device model only, no health data) with clipboard fallback when no mail
app exists, and a deep link to the App Store review page. Documented in
Privacy.md and localized in all 11 locales.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Curate store scenes to three, cover all 11 App Store locales, derive
kg/lb from the region's measurement system, and match the History tab
label in every locale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Update the logic to show thank-you message based on transaction date.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

It bundles an entire undescribed user-facing Feedback feature alongside the stated tip-jar change plus StoreKit, screenshot, and cross-platform UI-test infrastructure edits, which warrants human review of the full scope.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (1)

Comment thread App/Shared/Views/SettingsView.swift
Juuro and others added 4 commits September 19, 2026 16:28
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Capture scripts now write to per-locale keys so the three English
storefront variants get their own directories. Screenshot test cases
only treat the US region as imperial, since en-GB displays kg.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace the en set with en-GB, en-US and en-CA and add screenshots for
fr, es, it, nl, pt-BR, ja, ko, zh-Hans and zh-Hant.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Juuro
Juuro requested a balanced review from Copilot September 19, 2026 14:35
@Juuro Juuro changed the title feat(tipjar): keep thank-you note visible for a week after a tip feat: persistent tip thank-you, feedback/rating rows and 1.0.0 release prep Sep 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The change bundles multiple undescribed features plus manual release-version edits that bypass the documented release-please/CI flow and a screenshot unit-default that diverges from the app's own .metric rule, all needing human judgment.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
Resolved since last review (1)

/// non-`.metric` measurement system.
func launchApp(seed: String? = nil) {
let unit = Locale.current.region?.identifier == "DE" ? "kg" : "lb"
let unit = Locale.current.measurementSystem == .us ? "lb" : "kg"
/// into the app process the same way `-AppleLanguages` did).
func launchApp(seed: String? = nil, extraArguments: [String] = []) {
let unit = Locale.current.region?.identifier == "DE" ? "kg" : "lb"
let unit = Locale.current.measurementSystem == .us ? "lb" : "kg"
Comment thread project.yml
CODE_SIGN_STYLE: Automatic
VERSIONING_SYSTEM: apple-generic
MARKETING_VERSION: "0.5.0" # x-release-please-version
MARKETING_VERSION: "1.0.0" # x-release-please-version

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But when i merged the last release please pr the bump did fail.

@Juuro
Juuro merged commit 9127790 into main Sep 19, 2026
6 checks passed
@Juuro
Juuro deleted the feat/tip-jar-persistent-thank-you branch September 19, 2026 14:55
This was referenced Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants