Clarify "this/these app(s)/website(s)" referent in prompts#110
Merged
Conversation
Reflection prompts referred to "this website"/"these apps" without an on-screen antecedent, leaving the referent floating. Two fixes: - Singular "this website"/"this app": resolved to the real site/app name at render time during an in-the-moment intervention (e.g. "Why are you visiting reddit.com"). New displayTargetName() strips scheme/www./path and hard-caps length with an ellipsis so a long host or app label can't blow out the one-line prompt; withTargetName() does the substitution and falls back to the generic wording when no name is known (e.g. on the dashboard). Threaded as targetName through InteractionCommon → InteractionModeSwitch → Question. App names aren't yet available in the web layer on Android, so app prompts fall back until a native bridge supplies the label. - Plural "these websites"/"these apps": reworded to stand on their own ("spend less time online", "a calmer relationship with your phone") rather than lean on a missing antecedent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PXc1Er1qHuVWM5BN9XnLh
Review follow-up: applying the real site/app name to a question's `prompt` baked a specific host into permanently saved answers (e.g. HT3 "Instead of visiting reddit.com I take a walk"), which then reads wrong out of its moment on the dashboard — a stale, site-specific log rather than the timeless reflection it's meant to be. Restrict substitution to the displayed question text (`t`), which is never stored; leave `prompt` (which becomes answer.val) generic. The visible in-the-moment win is kept and saved history stays timeless. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PXc1Er1qHuVWM5BN9XnLh
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reflection prompts referred to "this website"/"these apps" without an
on-screen antecedent, leaving the referent floating. Two fixes:
Singular "this website"/"this app": resolved to the real site/app name
at render time during an in-the-moment intervention (e.g. "Why are you
visiting reddit.com"). New displayTargetName() strips scheme/www./path
and hard-caps length with an ellipsis so a long host or app label can't
blow out the one-line prompt; withTargetName() does the substitution and
falls back to the generic wording when no name is known (e.g. on the
dashboard). Threaded as targetName through InteractionCommon →
InteractionModeSwitch → Question. App names aren't yet available in the
web layer on Android, so app prompts fall back until a native bridge
supplies the label.
Plural "these websites"/"these apps": reworded to stand on their own
("spend less time online", "a calmer relationship with your phone")
rather than lean on a missing antecedent.
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_018PXc1Er1qHuVWM5BN9XnLh