Skip to content

Marketing: show a member's own page whatever its status (frame /p/<public_id> or the preview link, not the stranger's slug) - #635

Merged
mayoalexander merged 1 commit into
iris/1.18.23from
wt/marketing-member-address
Nov 20, 2026
Merged

mayoalexander merged 1 commit into
iris/1.18.23from
wt/marketing-member-address

Conversation

@mayoalexander

Copy link
Copy Markdown

Issue for this PR

Closes # (no issue yet: reported live by Alex on 2026-11-20 from the Marketing tab)

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Marketing framed https://heyiris.io/p/<slug> for every pinned page. That's the address a stranger uses. For an unlisted page the slug 404s by design (fl-api #178589: only /p/<public_id> resolves), and a draft has no public address at all. So a member's own page showed "This page isn't published" inside the app (FL-007 freelabel-grid-plan, published + unlisted).

The rule this implements: inside IRIS Desktop a member sees their own page whatever its status; in a browser the page keeps its visibility.

  • Engine: new GET /iris/page-address?slug= (src/iris/page-address.ts). Using the member's own token, it finds the slug among the account's own pages (the same list page-pin checks), then returns:

    • published + public → /p/<slug> (one request, as before)
    • published + unlisted → /p/<public_id>
    • draft or private → the owner's preview link (?preview=true&token=, from fl-api's management fields, which fl-api only hands to someone who may manage the page)

    Every address is rebuilt on heyiris.io from the parts fl-api returned, never taken whole from the response. Anything unmeasurable falls back to the plain /p/<slug>, exactly what the tab did before.

  • App: iris-pinned-page.tsx asks for that address first, then runs the frame check, the frame and "Open in browser" against it. A sign-in's one-time #atlas_code moves onto the member's address (signedMemberUrl). memberFrameUrl only accepts heyiris.io /p/… with at most preview + token, so no other host, fragment or query gets framed.

  • Browser: unchanged. Nothing here changes what /p/<slug> serves.

Not fixed here (server, separate): a page bound to a dataset whose schema isn't settings.public gets no rows (iris.data.has(key) is false, with no error). FL-006/007 bind freelabel-cover-drafts, which lacks it, so they now render in the tab but without their data until that's addressed.

How did you verify your code works?

On iris-hive-001, clean worktree off iris/1.18.23, pinned bun 1.3.14 lockfile:

  • packages/app: iris-pinned-page-model.test.ts, 15 pass (5 new: unlisted, draft, refusals for other hosts/fragments/queries, sign-in code moved onto the member address)
  • packages/opencode: httpapi-iris-page-address.test.ts (7 new, through the real route) + page-pin + page-signin, 16 pass
  • bun run typecheck in both packages: 0 errors
  • Against production with a signed-in account, resolvePageAddress:
    freelabel-grid-plan     → https://heyiris.io/p/ef0faee2-…   kind=unlisted   (200)
    freelabel-cover-preview → https://heyiris.io/p/39297c5f-…   kind=unlisted   (200)
    freelabel-feed-preview  → https://heyiris.io/p/freelabel-feed-preview  kind=public
    https://heyiris.io/p/freelabel-grid-plan                    → 404 (browser still respects unlisted)
    

Not yet done: a compiled desktop preview clicked through by a person. That's the next step before release.

Screenshots / recordings

Before (Alex's screenshot): Marketing → "The grid, planned. The posts, daily." → This page isn't published · /p/freelabel-grid-plan is missing, a draft, or renamed. After: pending the desktop preview.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

🤖 Generated with Claude Code

An unlisted page's /p/<slug> 404s by design and a draft has no public
address, so Marketing showed 'This page isn't published' for a member's
own page (FL-007 freelabel-grid-plan, published + unlisted). The sidecar
now answers /iris/page-address with the member's address for their own
pages: /p/<slug> (public), /p/<public_id> (unlisted), or the owner's
preview link (draft/private), rebuilt on heyiris.io. The tab frames it
and moves a sign-in code onto it; the browser path is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mayoalexander
mayoalexander merged commit 96a45c9 into iris/1.18.23 Nov 20, 2026
1 of 6 checks passed
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.

1 participant