You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resources/PhoropterContext.txt was a hand-copied snapshot of phoropter's README, and it drifted: it still has the old doctor line (changed upstream in phoropter 744eb71) and the old opt-in line (changed in 2738e5d). phoropter.ai itself already loads its README at runtime, so there's a live, published copy to point at.
What changes
New PhoropterContext loader: fetches https://phoropter.ai/README.md, accepts it only if it's HTTP 200 and contains the ## Response notes section (so an error page can't become the context), caches the last good fetch, and resolves fresh → cached → bundled.
PhoropterViewModel starts that fetch once per phoropter session, at the first choice someone makes, so never before consent and never for someone who hasn't begun. Later calls reuse it.
PhoropterContext.txt is deliberately untouched. It's now only the cold-start, no-network fallback, so this PR doesn't change the bundled content at all.
CLAUDE.md says where the context lives: edit phoropter's README, not this repo.
PRIVACY.md names phoropter.ai as a host the app downloads from once you begin. The request carries no conversation content; like any request, it reveals network metadata such as the IP address to the host.
Trade-off
A README edit reaches iOS when phoropter.ai deploys, with no app release and no App Store review in between, the same way it reaches the web client today. The network cost is new in name only: the phoropter phase already needs the network for every /api/plain call.
Testing
New PhoropterContextTests cover the resolution order (fresh wins; cache when the fetch fails; bundle when nothing else; an unusable fetch is passed over) and check that the bundled copy itself passes the usability check. 24 tests pass locally, run as CI runs them. The live README currently passes the check and already carries the new opt-in wording.
iOS used to carry a hand-copied PhoropterContext.txt, which drifted
from the README phoropter.ai serves. Now it fetches that same README
once per phoropter session, keeps the last good copy, and falls back
to the bundled file only on a cold start without network. One source;
nothing to propagate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The view model is created while the consent screen may still be up, so
fetching at init could reach phoropter.ai before consent. Now the fetch
starts on first use — the first choice someone makes — which is always
after consent, and never for someone who hasn't begun. (Thanks, Copilot.)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PhoropterView can start a new phoropter flow by calling vm.startOver(), but that method reuses this view model and does not clear phoropterContext. After the first run, the next session therefore reuses the completed task instead of performing the documented fresh fetch once for that session. Clear this task when startOver() resets the session (or recreate the view model for that path).
The phoropter context is now a runtime dependency on phoropter.ai;
say so plainly, where the next one will trip over it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Clear and cancel cached task when starting a new session
Lightward/Phoropter/PhoropterViewModel.swift:31
This task is cached for the lifetime of the view model rather than the phoropter session. startOver() creates a new persisted Session via store.reset() but leaves this property populated, so the next first choice reuses the old result instead of performing the promised once-per-session fetch and may retain stale context. Clear (and, if still running, cancel) this task when starting over.
The 1.0.0 train is closed in App Store Connect, so TestFlight rejects
new builds under it (the deploy after #22 failed with a 409). 1.1.0
carries #22 and #23.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"No personal information" overclaimed: any request to GitHub Pages
carries the source IP. Narrowed per Copilot's suggestion.
Co-Authored-By: Claude Opus 5.5 (1M context) <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
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.
Why
Resources/PhoropterContext.txtwas a hand-copied snapshot of phoropter's README, and it drifted: it still has the old doctor line (changed upstream in phoropter744eb71) and the old opt-in line (changed in2738e5d). phoropter.ai itself already loads its README at runtime, so there's a live, published copy to point at.What changes
PhoropterContextloader: fetcheshttps://phoropter.ai/README.md, accepts it only if it's HTTP 200 and contains the## Response notessection (so an error page can't become the context), caches the last good fetch, and resolves fresh → cached → bundled.PhoropterViewModelstarts that fetch once per phoropter session, at the first choice someone makes, so never before consent and never for someone who hasn't begun. Later calls reuse it.PhoropterContext.txtis deliberately untouched. It's now only the cold-start, no-network fallback, so this PR doesn't change the bundled content at all.CLAUDE.mdsays where the context lives: edit phoropter's README, not this repo.PRIVACY.mdnames phoropter.ai as a host the app downloads from once you begin. The request carries no conversation content; like any request, it reveals network metadata such as the IP address to the host.Trade-off
A README edit reaches iOS when phoropter.ai deploys, with no app release and no App Store review in between, the same way it reaches the web client today. The network cost is new in name only: the phoropter phase already needs the network for every
/api/plaincall.Testing
New
PhoropterContextTestscover the resolution order (fresh wins; cache when the fetch fails; bundle when nothing else; an unusable fetch is passed over) and check that the bundled copy itself passes the usability check. 24 tests pass locally, run as CI runs them. The live README currently passes the check and already carries the new opt-in wording.🤖 Generated with Claude Code