fix(share): the felt-change share text carries a resolvable lesson URL #91

Open
KnallerKalle wants to merge 5 commits from fix/share-felt-change-url into dev
KnallerKalle commented 2026-08-16 23:16:32 +00:00 (Migrated from github.com)

Plan

Make the share-the-felt-change flow actually deliver a working link: the shared message must carry a resolvable public lesson URL (<origin>/library/<lesson_id>) in both share paths.

Outcome

  • ShareSheet.handleShare now builds the public lesson URL and passes it as the native Web Share url field (rich link card on iOS/Android) and inside the clipboard fallback text.
  • Fixed a real defect in buildShareUrl: the old https? origin check rejected tauri://localhost — the actual window.location.origin inside the packaged Tauri app — so handleShare would have thrown and the native share sheet broken exactly where it matters most (desktop/mobile app). It now accepts any absolute origin (scheme + host) and still throws on schemeless/hostless garbage.
  • New blackbox check 20: the shared lesson URL returns 200 for an unauthenticated visitor (recipient side of the loop).

Impact on release goals

Roadmap Core Platform → "Share-the-felt-change flow (viral hook)" advances: the shared message previously had no link at all (dead end, zero conversion); it now lands a recipient on the lesson. Blackbox suite 66 → 67 (0 failures). Unit suite 240 → 250 (4 new ShareSheet carrier tests, 10 share-url contract tests incl. the Tauri-origin regression).

Blackbox

  • python3 scripts/blackbox_test.py --target testing → green
  • Result: 67/67 green on testing (incl. new check 20)

Six-perspectives check

  • Product: the share text now converts — a recipient can actually land on the lesson.
  • Engineering: minimal diff (5 files, +178/−9); tests cover the change; no new security surface (URL is client-built from configured origin).
  • Psychology: the shared message stays an invitation about what the user noticed — no streaks, no badges, no judgement language.
  • Biomechanics: n/a (no movement content touched).
  • Anatomy: n/a (no content touched).
  • Feldenkrais: the note remains the user's own felt observation; nothing is scored or graded.

Risk

Low. buildShareUrl is only called from ShareSheet. The relaxed origin check still rejects schemeless input. Landing-page content (og:title parity, server-rendered text) is intentionally not in scope — that is open PR #87's contract (checks 14e/14f) and this branch deliberately does not duplicate or regress it; zero file overlap with #87.

Checklist

  • Branch off latest dev (4017790 = tip at branch time)
  • Conventional Commits (test → fix → test, red proven before implementation)
  • Patchlog entry appended
  • Roadmap status updated
  • No secrets / no large binaries
## Plan Make the share-the-felt-change flow actually deliver a working link: the shared message must carry a resolvable public lesson URL (`<origin>/library/<lesson_id>`) in **both** share paths. ## Outcome - `ShareSheet.handleShare` now builds the public lesson URL and passes it as the native Web Share `url` field (rich link card on iOS/Android) **and** inside the clipboard fallback text. - Fixed a real defect in `buildShareUrl`: the old `https?` origin check rejected `tauri://localhost` — the *actual* `window.location.origin` inside the packaged Tauri app — so `handleShare` would have thrown and the native share sheet broken exactly where it matters most (desktop/mobile app). It now accepts any absolute origin (scheme + host) and still throws on schemeless/hostless garbage. - New blackbox check 20: the shared lesson URL returns **200 for an unauthenticated visitor** (recipient side of the loop). ## Impact on release goals Roadmap **Core Platform → "Share-the-felt-change flow (viral hook)"** advances: the shared message previously had no link at all (dead end, zero conversion); it now lands a recipient on the lesson. Blackbox suite 66 → **67** (0 failures). Unit suite 240 → **250** (4 new ShareSheet carrier tests, 10 share-url contract tests incl. the Tauri-origin regression). ## Blackbox - [x] `python3 scripts/blackbox_test.py --target testing` → green - Result: **67/67 green** on testing (incl. new check 20) ## Six-perspectives check - [x] Product: the share text now converts — a recipient can actually land on the lesson. - [x] Engineering: minimal diff (5 files, +178/−9); tests cover the change; no new security surface (URL is client-built from configured origin). - [x] Psychology: the shared message stays an invitation about *what the user noticed* — no streaks, no badges, no judgement language. - [x] Biomechanics: n/a (no movement content touched). - [x] Anatomy: n/a (no content touched). - [x] Feldenkrais: the note remains the user's own felt observation; nothing is scored or graded. ## Risk Low. `buildShareUrl` is only called from `ShareSheet`. The relaxed origin check still rejects schemeless input. Landing-page *content* (og:title parity, server-rendered text) is intentionally **not** in scope — that is open PR #87's contract (checks 14e/14f) and this branch deliberately does not duplicate or regress it; zero file overlap with #87. ## Checklist - [x] Branch off latest `dev` (`4017790` = tip at branch time) - [x] Conventional Commits (test → fix → test, red proven before implementation) - [x] Patchlog entry appended - [x] Roadmap status updated - [x] No secrets / no large binaries
This pull request has changes conflicting with the target branch.
  • .development/automation-state.json
  • .development/patchlog.md
  • .development/roadmap.md
  • scripts/blackbox_test.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/share-felt-change-url:fix/share-felt-change-url
git switch fix/share-felt-change-url

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch dev
git merge --no-ff fix/share-felt-change-url
git switch fix/share-felt-change-url
git rebase dev
git switch dev
git merge --ff-only fix/share-felt-change-url
git switch fix/share-felt-change-url
git rebase dev
git switch dev
git merge --no-ff fix/share-felt-change-url
git switch dev
git merge --squash fix/share-felt-change-url
git switch dev
git merge --ff-only fix/share-felt-change-url
git switch dev
git merge fix/share-felt-change-url
git push origin dev
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Kalle/ATM!91
No description provided.