Skip to content

feat(pages): share authored HTML with isolated JavaScript - #24

Merged
alextnetto merged 7 commits into
mainfrom
feat/html-document-decks
Sep 23, 2026
Merged

alextnetto merged 7 commits into
mainfrom
feat/html-document-decks

Conversation

@alextnetto

@alextnetto alextnetto commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Outcome

The submitted HTML file is the durable presentation page. Pagent stores the original source in immutable revisions, renders its layout and inline JavaScript in an opaque-origin sandbox, and adds no slide structure/navigation. Existing structured REST decks keep working.

  • Keep exactly MCP write and read; durable writes now take title and html. Both transports advertise discoverable arguments and enforce strict per-type input rules.
  • Protect document POST delivery with exact renderer Origin, fresh existing authorization/revision checks, no-store responses and restrictive HTTP CSP. Tokens are not in frame URLs.
  • Full-viewport shared HTML, authored navigation, owner preview without visits, bridge-independent loading and recoverable errors.
  • Page visits/viewers/active time; unsupported HTML slide/completion metrics are null, not invented. Activity telemetry is best effort under authored code/CSP.
  • Preserve Anyone, Allowed email (Unverified; no inbox verification), and Authenticated access modes, admin boundaries and legacy slide analytics.
  • Update landing page, README, publishing skill, PRD, OpenAPI and migration-aware release runbook. Historical revisions are retained; version browsing/restore remains the explicit next milestone.

Verification

Candidate: 99392abf276388726e1000d21e1f0d6e500d0653.

  • 865 unit/integration tests, 102 files; 87.37% line coverage.
  • 59 end-to-end scenarios, one worker, after rebuilding the shipped MCP bundle.
  • Real stdio and HTTP MCP discovery regression: empty write schema reproduced, then corrected; invalid/mixed inputs rejected.
  • Compiler, lint, formatting, web/MCP builds, deploy layout and dependency audit passed.
  • Independent goal, code, security, context and hands-on QA gates passed at this SHA. Dual UX/UI gates retain the 45-position responsive matrix with precise unchanged-renderer continuity and six fresh direct image inspections; they do not claim entire web/deck trees are unchanged.
  • All three automated review findings fixed and regression-tested: NUL400 before persistence, eligible-revision slide rates, API-prefix protected frame/form CSP. Root also exercised live HTTP rejection and real-browser prefixed POST rendering.
  • Root manually exercised custom JS/keyboard, responsive HTML, all three access modes, owner preview, analytics, restrictive author CSP and document authorization errors.

No new dependency, service, queue or generalized rendering framework. Original checkout's six unrelated dirty files are untouched. Hosted CI and post-deploy production smoke are separate release gates.

Rollout and known limits

Migration 4 is additive. After it runs, recover by forward fix or a compatibility-preserving revert; never drop HTML data or migration history. Exact ALLOWED_ORIGINS is required for HTML frames in every environment; production origin has been verified.

Self-contained resources/inline JavaScript only. The browser sandbox is not a universal network-isolation guarantee; telemetry is not authenticated human proof. Chromium was exercised, not cross-browser/load certification.

Inherited PR23 analytics-query capacity and stale-410 interaction edge cases remain explicitly tracked in the PRD; this change does not claim to solve them.

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pagent Ready Ready Preview Sep 23, 2026 12:40am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T00:23:46.749747Z 446956d PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 446956dea4

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

Comment thread apps/api/decks/domain.ts
Comment thread apps/api/decks/analytics-aggregate.ts
Comment thread apps/web/csp.ts Outdated
@alextnetto

Copy link
Copy Markdown
Member Author

Production verification complete at 99392ab. Railway API deployment 7a1b773b-c3ac-445e-800e-009ea1af8946 is SUCCESS; Vercel production dpl_9pbxZT1JCjWb34iMLiFzQqvzMMtc is READY and serves pagent.link. Live smoke verified exact HTML + sandboxed authored JS, all three sharing modes, Unverified analytics, Resend email sign-in, normal OAuth/PKCE and both bearer MCP tools, immutable revisions, existing-session revocation, admin and updated landing/privacy. Synthetic page removed, refresh grant revoked, task session closed. Hosted CI: 865 unit/integration and 59 E2E passed. Version browsing/restore and inherited analytics scaling/stale410 follow-ups remain explicitly documented; this is Chromium functional verification, not cross-browser/load certification.

This branch is being deployed

1 in progress and 2 active deployments
Production — 99392abf Deployed Sep 23, 2026 by vercel[bot]
pagent / production — 99392abf Deployed Sep 23, 2026 by railway-app[bot]
Preview — 99392abf Deployed Sep 23, 2026 by vercel[bot]
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