Skip to content

fix(website): tooltip viewport clamp, preview asset serving, and site polish from review - #845

Merged
cameri merged 10 commits into
mainfrom
fix/tooltip-viewport-clamp
Oct 16, 2026
Merged

cameri merged 10 commits into
mainfrom
fix/tooltip-viewport-clamp

Conversation

@chappie-daemon

@chappie-daemon chappie-daemon commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Tooltip viewport clamp (original scope)

The tooltip bubble is horizontally centered on its (i) toggle, so a toggle near the viewport edge — e.g. the I/O card's tooltip on the homepage — opened half outside the screen and clipped. max-width: min(260px, calc(100vw - 32px)) bounds the bubble's width but not its position.

Fix: when a bubble opens (hover, tap or keyboard), a document-level delegated script measures its real rendered rect after layout and shifts it horizontally to stay 12px inside the viewport; the shift is removed on close and re-applied on resize. Delegation (toggle in capture phase, pointerover for hover) came out of a real-browser trace that caught one tip whose per-element listeners had silently never attached — no error, nothing visible in markup.

Preview asset serving (also in this PR)

PR-preview workers serve dist/ at the root of their URL, so base-prefixed asset requests (/preview/<n>/_astro/*.css) hit no file and SPA-fell-back to index.html as text/html. The deploy workflow now copies the build into dist/preview/<n>/ so every preview asset exists at its requested path. Preview comments also upsert (one comment per PR, flips to "⏳ rendering" during deploy).

Site polish from Muse's external review

  • /community: the participate cards had no section heading (numbering jumped 01 → 02 over an orphaned grid). Added "02 Participate", renumbered guides to 03. Fixed a space-before-comma typo.
  • Hero headline is real DOM text now ("Nostr runs on relays. nostream is the one you own.") — it previously existed only inside the rendered film, invisible to search and screen readers. The page h1 was a different, sr-only line. Also added a Pause/Play control on the hero film that survives the scroll observer's re-play.
  • Hero film re-rendered at 1080p from current film.ts — the shipped one was 720p and said 24 NIPs; the repo advertises 25.
  • Console screenshots labeled honestly: caption notes they come from a real console's first-run data (rejections and failed alert deliveries included) rather than swapping in healthy-looking marketing shots.
  • Honest advertising copy now matches the warning its screenshot shows — the check flags advertised-vs-observed gaps in either direction.
  • Nav active-path fix: Astro.url.pathname includes the deploy base, so isActive() silently failed for every non-root path (why /community's header looked different). The base is stripped before comparing. The Get-started CTA scrolls to the build block on /get-started instead of linking to the page you are already on.
  • Get-started phases: note explains the P0/P2/P4/P5/P7 numbering — P1/P3/P6 are the agent's own steps (image discovery, optional settings, optional smoke test).
  • Mobile: the I/O card's nowrap command forced the grid track's auto minimum past a 390px viewport (whole page panned sideways). Single-column grids now floor tracks at minmax(0, 1fr).
  • Section rhythm compressed site-wide (80–140px → 56–96px vertical padding).

Verification

All verified against the deployed preview (nostream-web-pr-845.cameri.workers.dev/preview/845/) with a real browser:

  • All 20 tooltips open unclipped at 1084px; edge cases measured at exactly the 12px pad (12..272 left-edge, 812..1072 right-edge), screenshots reviewed.
  • Asset serving: css → text/css, mp4 → video/mp4, unknown paths → SPA fallback.
  • Community headings, hero h1 text/size/position, pause toggle (pauses and resumes, aria-pressed tracks), phase note, CTA self-scroll, comma typo — all checked in DOM.
  • Mobile 390px: no horizontal scroll (scrollWidth == innerWidth); the only remaining offscreen element is a closed tooltip's bubble, which is absolute-positioned and only appears on interaction.

Also carries a changeset.

@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 17:29 — with GitHub Actions Active
@changeset-bot

changeset-bot Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ae2f9e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream-website Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Site preview for this PR was deleted (PR closed).

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with two non-blocking interaction fixes recommended.

Findings

  1. P2 Menu hides the build block ▶
  2. P2 Pause starts the film ▶

Summary

Updates tooltip placement, preview asset serving, and website presentation.

  • Info-tip bubbles stay inside the browser window.
  • PR preview builds are copied under their preview URL path.
  • The homepage pairs a real headline with a film viewers can pause.
  • Navigation matches preview paths and the Get started button jumps to the build section.
  • The community participation cards have their own numbered heading.
  • Console captions explain the screenshots and mismatch warnings more plainly.
  • Mobile grids shrink to fit the phone screen.
  • The get-started page explains the skipped schematic phase numbers.
  • Website sections use less vertical space between pages.

Both earlier tooltip findings are addressed: closing under the pointer re-clamps the bubble, and resizing includes hovered bubbles. Their supplied threads were unnumbered.

Reviews (3) · Last reviewed commit: "chore(website): extend the changeset for..." · Reviewed by Greptile

Comment thread website/site/src/components/InfoTip.astro
Comment thread website/site/src/components/InfoTip.astro Outdated
@chappie-daemon
chappie-daemon force-pushed the fix/tooltip-viewport-clamp branch from 8a2e1a9 to 5a876e1 Compare October 16, 2026 17:37
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 17:37 — with GitHub Actions Active
greptile-apps[bot]
greptile-apps Bot previously approved these changes Oct 16, 2026
@greptile-apps
greptile-apps Bot dismissed their stale review October 16, 2026 19:24

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 19:24 — with GitHub Actions Active
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 19:35 — with GitHub Actions Active
@chappie-daemon

Copy link
Copy Markdown
Collaborator Author

Root cause of the broken preview found and fixed in cf44622 (on this branch): Workers static assets are keyed by file path, and the preview worker serves its build at the root of its URL — but the HTML's base-prefixed references (/preview/845/_astro/*.css, /media/*.mp4) had no files at those paths, so every asset request fell through the SPA fallback and returned the index page as text/html. The page HTML was correct; none of its CSS or media loaded.

The workflow now copies the built tree into dist/preview/<n>/ before deploy, so asset requests hit real files. Verified live: css → text/css, mp4 → video/mp4, pages → text/html, unknown paths → SPA fallback. The clamp fix from 5f6b775 rides the same page.

The bubble is horizontally centered on its (i) toggle, so a toggle near
the viewport edge (e.g. the I/O card's tooltip on the homepage) opened
half outside the screen and clipped. max-width bounds the width, not
the position.

On open — hover, tap or keyboard — the bubble now shifts horizontally
to stay 12px inside the viewport, and re-clamps on resize. The shift is
measured from the bubble's real rect after layout and removed on close.
Two Greptile P2s, both valid states the first clamp pass missed:
- Tapping a tooltip closed it while the pointer stayed over it; :hover
  keeps the bubble visible but the close path cleared the shift, so an
  edge bubble jumped outside the viewport until re-hover. Re-clamp
  instead of clearing when :hover still matches.
- The resize re-clamp matched only [open] bubbles; hover-only ones kept
  a stale shift across viewport changes. Match :hover too.
The bubble is centered by the stylesheet's translateX(-50%), so its
rendered box spans anchor-w/2 .. anchor+w/2 — the first pass measured
the untransformed rect and compared its raw edges, under-shooting by
w/2: at an anchor 120px from the left edge a 260px bubble rendered from
-10px (clipped) and the clamp never fired. The shift now starts from
the rendered position; verified across 7 anchor/width/viewport cases
including the reported one.
Workers static assets are keyed by file path: the preview worker serves
dist/ at the root of its URL, so the built tree must exist AT
/preview/<n>/ for the HTML's base-prefixed references to resolve. They
did not — every asset request (/preview/845/_astro/*.css, /media/*.mp4)
fell through the SPA fallback and returned the index page as
text/html, which is why the preview rendered unstyled and read as
broken even though the page HTML and its inline script were correct.

After build + apply-base, the workflow now copies the tree into
dist/preview/<n>/ (excluding the copy itself), so asset requests hit
real files. Verified locally: dist/preview/845/_astro/index.*.css and
index.html both exist; ~2x dist size, negligible for previews.
@chappie-daemon
chappie-daemon force-pushed the fix/tooltip-viewport-clamp branch from cf44622 to 528055a Compare October 16, 2026 19:38
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 19:38 — with GitHub Actions Active
Real-browser tracing on the preview caught a tip whose per-element
listeners had silently not attached — no error, no markup difference,
nothing to observe from outside. Attach everything at the document
instead: toggle in the capture phase (it does not bubble), pointerover
delegation for the hover path, click/keydown as before. Every current
and future .info-tip is covered regardless of node replacement.
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 19:56 — with GitHub Actions Active
- /community: give the participate cards a real section head (numbering
  was jumping 01 -> 02 over an orphaned card grid) and renumber guides
- hero: the headline now exists as real DOM text (was only baked into
  the film, invisible to search/screen readers), and the film has a
  pause control that survives the scroll observer's re-play
- hero film re-rendered at 1080p from current film.ts (repo now
  advertises 25 NIPs; the shipped film said 24)
- console: label the screenshots as a real console's first-run data
  (249/261 rejected, four failed deliveries are honest, not marketing)
- honest advertising: align the copy with the warning the screenshot
  actually shows (advertised-vs-observed, both directions)
- nav: Community link is in the shared NAV already — the /community
  header discrepancy was the base-prefixed pathname defeating
  isActive; strip the base before comparing. The Get-started CTA
  scrolls to the build block on /get-started instead of linking to
  the page you are on
- get-started: note why the phases jump P0 P2 P4 P5 P7 (P1/P3/P6 are
  the agent's own steps)
- community: fix 'schematics ,' space-before-comma
- compress the section rhythm site-wide (clamp 80-140px -> 56-96px)
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 21:20 — with GitHub Actions Active
The I/O cell's nowrap command (and any wide nowrap child) forced the
grid track's auto minimum past the viewport on phones — the page
panned sideways at 390px. minmax(0, 1fr) on the single-column grids
(bento, rail, gallery) lets children scroll internally instead.
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 21:25 — with GitHub Actions Active
At 1084px the 54px headline collided with the film frame's title bar.
Smaller type, higher anchor — the frame chrome starts below it now.
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 21:29 — with GitHub Actions Active
@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 21:34 — with GitHub Actions Active
@chappie-daemon chappie-daemon changed the title fix(website): clamp info-tip bubbles inside the viewport fix(website): tooltip viewport clamp, preview asset serving, and site polish from review Oct 16, 2026
Comment thread website/site/src/components/Nav.astro
Comment thread website/site/src/components/home/Hero.astro
greptile-apps[bot]
greptile-apps Bot previously approved these changes Oct 16, 2026
Two review findings: the mobile drawer's same-page #build link scrolled
with the drawer still covering the target — close it and reset the menu
button first. And the film toggle now derives its label/aria-pressed
from real playback state (play/pause events + initial sync), so under
prefers-reduced-motion it offers Play instead of starting the film.
@greptile-apps
greptile-apps Bot dismissed their stale review October 16, 2026 21:44

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@chappie-daemon
chappie-daemon deployed to website-preview October 16, 2026 21:44 — with GitHub Actions Active
@cameri
cameri merged commit 2234a25 into main Oct 16, 2026
13 checks passed
@cameri
cameri deleted the fix/tooltip-viewport-clamp branch October 16, 2026 21:50
@cameri
cameri deployed to website-preview October 16, 2026 21:50 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
website-preview — ae2f9e0d Deployed Oct 16, 2026 by cameri via preview #31
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.

2 participants