Skip to content

feat(viewer): full-page standalone view for surface direct links#132

Merged
benvinegar merged 1 commit into
mainfrom
feat/standalone-surface-direct-link
Jun 25, 2026
Merged

feat(viewer): full-page standalone view for surface direct links#132
benvinegar merged 1 commit into
mainfrom
feat/standalone-surface-direct-link

Conversation

@benvinegar

Copy link
Copy Markdown
Member

What & why

Visiting a bare /s/:id direct link now opens a full-page standalone view of that one surface — title and parts only, no sidebar, session feed, or comment thread — with a small "made with sideshow" watermark beneath it.

/s/:id used to render a standalone surface page. Two refactors left it resolving into the session feed instead:

This restores the standalone view within the current architecture.

How

  • state.ts — a standaloneSurface signal + bootstrap() entry point. A bare surface route (surfaceId, no session) fetches the surface and enters standalone mode; applyRoute toggles it on back/forward. Falls back to the board if the surface can't be fetched.
  • App.tsx — renders StandaloneView (the one surface + watermark) instead of the board chrome, and titles the tab after the surface.
  • Card.tsx — a standalone prop strips the version dropdown, "updated" meta, comment thread, and scroll/URL observer — keeping the iframe registration so parts render in the same sandboxed frames sized by the same resize bridge.
  • styles.css — centered single-surface layout + watermark.

No server change: bare /s/:id still serves the SPA shell with link-preview metadata (#130); the viewer picks the layout from the route. Works under the deployed /u/:user prefix via appPath/basePath.

Updated the url-routing e2e test (it pinned the old feed behavior) and added a changeset (minor).

Notes

  • The standalone view is a snapshot — it doesn't live-update if the surface is revised while open (a reload shows the latest). Easy to wire up later if wanted.

Validation

  • typecheck, lint, format:check, full build — all clean.
  • Unit suite: 232 pass.
  • e2e: chromium passed all url-routing / embed-stream / public-read specs including the new standalone test (asserts #standalone present, no #sessionList, no comment thread, watermark href, URL stays /s/:id, authored HTML renders only inside the sandboxed iframe). Webkit couldn't launch in the local sandbox (missing system libs); runs in the separate CI job.

🤖 Generated with Claude Code

Visiting a bare /s/:id URL now opens a full-page standalone view of that
one surface — title and parts only, no sidebar, session feed, or comment
thread — with a small "made with sideshow" watermark beneath it, instead
of resolving the link into its session's stream.

The route used to render a standalone surface page; #125 (multi-part
surfaces) and #130 (link-preview SPA shell) left bare /s/:id resolving to
the feed. This restores the standalone view within the new architecture:

- state: a `standaloneSurface` signal + `bootstrap()` entry point. A bare
  surface route (surfaceId, no session) fetches the surface and enters
  standalone mode; `applyRoute` toggles it on back/forward. Falls back to
  the board if the surface can't be fetched.
- App: renders `StandaloneView` (the one surface + watermark) instead of
  the board chrome, and titles the tab after the surface.
- Card: a `standalone` prop strips the version dropdown, "updated" meta,
  comment thread, and scroll/URL observer — keeping the iframe
  registration so parts render in the same sandboxed frames sized by the
  same resize bridge.
- styles: centered single-surface layout + watermark.

No server change: bare /s/:id still serves the SPA shell with link-preview
metadata (#130); the viewer picks the layout from the route. Works under
the deployed /u/:user prefix via appPath/basePath.

Updated the url-routing e2e test (it pinned the feed behavior) and added a
changeset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benvinegar benvinegar force-pushed the feat/standalone-surface-direct-link branch from 5de60c9 to f019863 Compare June 25, 2026 02:25
@benvinegar benvinegar merged commit f5e89d7 into main Jun 25, 2026
9 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