Skip to content

[stannesi] separate hosted landing and viewer routes#46

Merged
stannesi merged 2 commits into
mainfrom
thehive/prd-landing-viewer-route-split
Jun 7, 2026
Merged

[stannesi] separate hosted landing and viewer routes#46
stannesi merged 2 commits into
mainfrom
thehive/prd-landing-viewer-route-split

Conversation

@stannesi

@stannesi stannesi commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Follows up merged PR [stannesi] add hosted landing and viewer dashboard #44 after design review by separating the hosted app into / landing and /viewer/ workspace routes inside the same Vite deployment.
  • Adds small no-dependency route helpers with GitHub Pages /prd/ base-path support.
  • Adds package-derived outline panels for structured general-document, comic, and storyboard content instead of static/fake dashboard navigation.
  • Restyles the landing page and viewer workspace toward a cleaner premium dashboard direction while keeping current PRD behavior truthful.
  • Updates README, docs, roadmap, build status, next steps, and session handoff.

Scope

  • No manifest, schema, validator, CLI command, package export, npm package, Studio, Cloud, PRDc, AI assistant, account/library, payment, crypto, rights, universal viewer, or broad conversion changes.
  • No changeset; this is private web-app/docs/operator deployment work.

Validation

  • PATH="/opt/homebrew/bin:$PATH" node_modules/.bin/tsc -b apps/prd-viewer-web/tsconfig.json --pretty false
  • PATH="/opt/homebrew/bin:$PATH" pnpm exec vitest run apps/prd-viewer-web/src/viewerRoutes.test.ts apps/prd-viewer-web/src/viewerDocumentOutline.test.ts apps/prd-viewer-web/src/viewerDemoContent.test.ts apps/prd-viewer-web/src/viewerArchiveFiles.test.ts scripts/prepare-viewer-demo-assets.test.ts apps/prd-viewer-web/src/viewerRenderMode.test.ts apps/prd-viewer-web/src/viewerRenderMode.integration.test.ts
  • PATH="/opt/homebrew/bin:$PATH" pnpm viewer:demo:build
  • PATH="/opt/homebrew/bin:$PATH" pnpm docs:check -- --include-root-docs
  • git diff --check
  • PATH="/opt/homebrew/bin:$PATH" pnpm typecheck
  • PATH="/opt/homebrew/bin:$PATH" pnpm foundation:gate

Browser verification

  • / desktop landing verified in dark mode.
  • /viewer/ desktop workspace verified separately from landing.
  • Hosted sample buttons verified for document-basic, comic-basic, and storyboard-basic.
  • Package-derived outline panels verified for document/comic/storyboard samples.
  • Light mode verified on loaded viewer workspace.
  • Mobile landing and viewer routes verified as single-column layouts.
  • Browser console warnings/errors: none.
  • Manual file-picker/drop upload was not automated because the in-app browser API does not expose local file upload control; archive selection is covered by helper tests and hosted samples exercise the same package-open/render path after bytes are available.

Note

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88eb06fec5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

basePath: string
): string {
const normalizedBase = normalizeViewerBasePath(basePath);
return route === "viewer" ? `${normalizedBase}viewer/` : normalizedBase;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Serve the viewer route in the static build

In the GitHub Pages context I checked, .github/workflows/viewer-demo-pages.yml builds and uploads only the Vite dist directory with PRD_VIEWER_BASE_PATH=/prd/; a production build produces index.html and assets only, with no viewer/index.html or 404.html SPA fallback. Returning /prd/viewer/ here works after an in-app pushState, but a direct visit or refresh on the advertised /prd/viewer/ route asks Pages for a nonexistent file and 404s, so the hosted viewer route is not actually stable outside client-side navigation.

Useful? React with 👍 / 👎.


if (node.type === "heading") {
items.push({
id: node.id ?? `heading-${items.length + 1}`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid outline links to missing targets

Headings are allowed to omit id in the current content schema/types, and renderHeading(..., node.id) leaves those headings without a DOM id; generating heading-N here makes the new outline render a clickable #heading-N link that cannot scroll anywhere for valid packages with un-id'd headings. Either skip unaddressable headings or ensure the same generated id is applied when rendering the heading.

Useful? React with 👍 / 👎.

@stannesi stannesi merged commit 451f82b into main Jun 7, 2026
2 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