feat(viewer): full-page standalone view for surface direct links#132
Merged
Conversation
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>
5de60c9 to
f019863
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Visiting a bare
/s/:iddirect 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/:idused to render a standalone surface page. Two refactors left it resolving into the session feed instead:/s/:id?part=N, dropping the whole-surface page./s/:idto serve the viewer SPA (for link-preview metadata), which then resolved the link into its session and dropped you in the feed.This restores the standalone view within the current architecture.
How
state.ts— astandaloneSurfacesignal +bootstrap()entry point. A bare surface route (surfaceId, no session) fetches the surface and enters standalone mode;applyRoutetoggles it on back/forward. Falls back to the board if the surface can't be fetched.App.tsx— rendersStandaloneView(the one surface + watermark) instead of the board chrome, and titles the tab after the surface.Card.tsx— astandaloneprop 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/:idstill serves the SPA shell with link-preview metadata (#130); the viewer picks the layout from the route. Works under the deployed/u/:userprefix viaappPath/basePath.Updated the
url-routinge2e test (it pinned the old feed behavior) and added a changeset (minor).Notes
Validation
typecheck,lint,format:check, fullbuild— all clean.url-routing/embed-stream/public-readspecs including the new standalone test (asserts#standalonepresent, 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