Skip to content

[stannesi] separate hosted landing and viewer routes#45

Closed
stannesi wants to merge 3 commits into
mainfrom
thehive/prd-landing-viewer-dashboard
Closed

[stannesi] separate hosted landing and viewer routes#45
stannesi wants to merge 3 commits into
mainfrom
thehive/prd-landing-viewer-dashboard

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.

stannesi commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by clean PR #46. PR #45 was opened from the pre-squash PR #44 branch and included already-merged files in the comparison; #46 is based on current main and contains only the route-split redesign revision.

@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: 7210e667fe

ℹ️ 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".

const currentPath = `${window.location.pathname}${window.location.hash}`;

if (currentPath !== nextPath) {
window.history.pushState(null, "", nextPath);

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 Add a static fallback for the viewer route

When deployed by .github/workflows/viewer-demo-pages.yml to GitHub Pages, this pushes /prd/viewer/ into history. The Vite build uploaded by that workflow only emits index.html, assets, and examples, with no viewer/index.html or 404.html fallback, so refreshing or sharing a deep link to /prd/viewer/ is served by Pages as a 404 before React can route it. Use hash routing or include a static fallback/rewrite for the viewer route.

Useful? React with 👍 / 👎.

{items.map((item) => (
<li key={`${item.kind}-${item.id}`}>
<a
href={`#${item.id}`}

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 Only link outline items to rendered anchors

For supported packages that produce root document, comic panel, storyboard frame, or generated heading outline items, many of these href targets are never rendered as matching DOM IDs: the structured document article has no id, visual panel/frame rows only use React key, and headings without authored IDs get synthetic outline IDs that are not applied to the rendered heading. In those cases clicking the new outline entries just changes the URL hash without scrolling or selecting anything, so either render matching IDs or avoid anchor links for non-anchorable items.

Useful? React with 👍 / 👎.

@stannesi stannesi closed this Jun 5, 2026
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