Skip to content

docs(proposals): web pages the model writes, for the agent and Studio - #2313

Merged
AnishSarkar22 merged 1 commit into
MODSetter:devfrom
AnishSarkar22:feat/studio-html-design
Oct 21, 2026
Merged

AnishSarkar22 merged 1 commit into
MODSetter:devfrom
AnishSarkar22:feat/studio-html-design

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What

A proposal and ADR 0066 for web pages the model writes as HTML, on the two paths Word and PDF already have:

  • Agent threads: the agent writes the page under outputs/, taught by a new surfsense-html skill, and saves it with a new tool, surfsense_save_page, as a versioned Studio artifact with screenshots drawn by Electron.
  • Studio's Web page button: split by writes_script() as Word is. A model at the agent's bar writes the page in one call, checked for structure with up to three attempts; one below it keeps today's template, until the model ladder shows whether it can write pages too.
  • Every html artifact runs in a frame with no network: a CSP stored in the page and inserted by the viewer, no allow-popups, and subframe navigation to other origins refused.
  • One design guide both paths read, with motion rules adapted from anatomy (MIT).

Docs only. No code changes.

Why

Today every web page, from Studio or the agent, is plain-text sections escaped into a template with no style or script, so even the strongest models produce an unstyled page. Separately, the viewer's frame can still make requests, open popups and navigate itself, each a way for a page built from untrusted sources to carry their content off the machine.

Fixes #

How to test

  • python scripts/check_docs.py
  • Read docs/proposals/model-written-web-pages.md and docs/adr/0066-web-pages-are-html-the-model-writes-without-network.md.

High-level PR Summary

This proposal introduces the ability for AI models to generate complete HTML web pages with custom CSS, JavaScript, and SVG, replacing the current plain-text template approach. The change affects both agent threads (via a new surfsense-html skill and surfsense_save_page tool) and Studio's Web page button (splitting behavior by model capability). All HTML artifacts run in a hardened sandboxed frame with a Content Security Policy that prevents network access, ensuring pages built from untrusted sources cannot exfiltrate data. The proposal includes versioning, screenshot generation via Electron, and a shared design guide for consistent page styling.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 docs/adr/0066-web-pages-are-html-the-model-writes-without-network.md
2 docs/proposals/model-written-web-pages.md
3 docs/adr/README.md

Need help? Join our Discord

Proposes letting a model at the agent's bar write a web page as HTML,
through a new agent tool and skill and Studio's Web page button, run in
a viewer frame with no network. ADR 0066 records the decision.
@vercel

vercel Bot commented Oct 21, 2026

Copy link
Copy Markdown

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@AnishSarkar22
AnishSarkar22 merged commit e7bc4b1 into MODSetter:dev Oct 21, 2026
26 of 29 checks passed
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: MODSetter/SurfSense/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5a66ec0-075d-4bf1-a828-b42dced87f11
📥 Commits

Reviewing files that changed from the base of the PR and between 13f16c3 and fe791ad.

📒 Files selected for processing: 3
  • docs/adr/0066-web-pages-are-html-the-model-writes-without-network.md
  • docs/adr/README.md
  • docs/proposals/model-written-web-pages.md
+-----------------------------+
| Reviewing code like a boss. |
+-----------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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