refactor(pages): drop the public-page banner, mark public on the Share button
Links
- Issue: SUPER-2418
Summary
- Delete
PagePublicBanner— the 36px strip under the page header that appeared when an owner made a page public. - The header's Share button now renders a
Globeinstead ofShare2whenvisibility === "everyone", so the public-state signal survives at zero vertical cost.
Why / Context
The banner rendered under exactly one condition:
: isOwner && page.visibility === "everyone" ? <PagePublicBanner ... /> : null
So it already only existed for global pages, and everything in it was already one click away in the Share popover:
| Banner element | Where it already lives |
|---|---|
| Globe + "this page is live at <url>" | Share popover → General access → "Anyone with the link" (same Globe icon) |
| Copy link | Share popover header, top-right — identical button, identical handler |
| Share settings | Called setShareOpen(true) — the popover the Share button already opens |
PageSharePopover also auto-copies the link the moment you switch a page off just_me, so the banner's Copy link was redundant even at the one moment it would have been most useful. Net: a permanent 36px of chrome on both the desktop pages pane and the web viewer, buying nothing the header didn't already have.
How It Works
The banner slot below the header now serves only PageVersionBanner. The only thing genuinely lost was a persistent "this is public" indicator — the page detail header had no other one — so the Share button picks it up via the Globe icon that PageCard in the pages grid and the visibility select in the popover already use.
Design Decisions
- Globe on the Share button instead of a badge next to the title: reuses an icon already carrying this exact meaning in two other places, and adds no layout.
- The globe shows for everyone, not just the owner: the banner was
isOwner &&-gated, but a viewer benefits more than the owner from knowing a page is world-readable.PageSharePopoveris alreadyeditable={isOwner}, so non-owners get a read-only popover and no new affordance is exposed.
Manual QA Checklist
UI Components
- Public page (
everyone), as owner: no banner; Share button shows a globe - Public page, as a non-owner org member: globe shows; Share popover opens read-only
-
organdjust_mepages: Share button still shows the share icon - Flipping visibility in the popover swaps the icon without a reload
- Version preview still renders
PageVersionBannerin the slot the public banner used to share - Copy link in the popover still works; switching to public still auto-copies
Surfaces
- Desktop pages detail pane (
/pages/$slug) - Web viewer (
/page/[slug])
Testing
bun run typecheck— 42/42 tasks passbun run lint:fix— clean, 8209 files, no fixesbun run check:i18n— 0 missing in all 17 locales;compile --strictpassesbunx sherif— no issuesbun run test— 36 desktop failures, pre-existing: allcreateWorktree/getCurrentBranch/hasUnpushedCommitstests that fail because the suite is running inside a git worktree. Verified by stashing this change and re-running: identical7586 pass / 36 fail.
Known Limitations
Not verified in a running desktop build — this needs a public page plus a dev build picking up the packages/ui change. The diff is a conditional icon swap and a deletion, and PagePublicBanner had no other referrers or tests, but flagging it rather than implying CDP verification happened.
Notes
i18n: "Share settings" and "This page is live at <0>{0}</0>" are dropped across all 17 catalogs (119 deletions). "Copy link", "Copied", and "Could not copy the link" stay — PageSharePopover still uses them.
Summary by cubic
Removes the public-page banner and marks public pages on the Share button instead, in both the page header and the desktop workspace pane. Fixes SUPER-2418.
- A single
PageShareButton— with acompactvariant used in the workspace pane'sPagePaneHeaderExtras— shows aGlobeicon whenvisibility === "everyone". - The icon shows for viewers too, with the popover staying read-only for non-owners.
PageShareButtonowns the popover and the sharedusePendingVisibilityhook, so the public icon flips optimistically when visibility changes instead of waiting for the server round-trip.- Adds a visually hidden "This page is public" label to both Share triggers so the public-state signal is reachable by screen readers.
- Removes
PagePublicBannerand the now-unusedShare settingsandThis page is live atstrings from all 17 locale catalogs, addingShare page (public)andThis page is publicin their place. - Deletes the network-bound git author name test in
packages/host-service, which called the real GitHub API and flaked during slow network conditions.
Summary by CodeRabbit
-
New Features
- Added a dedicated page-sharing control that clearly indicates when a page is public, with compact and labeled display options.
- Page visibility changes now show an optimistic update while the change is being saved.
-
Updates
- Replaced the “Share settings” label with “Share page (public)” across supported languages.
- Removed the public-page banner beneath the page header, including its live URL and copy-link action.