Skip to content

feat: app-grade viewport for hosted HTML apps - #127

Merged
shiaho777 merged 1 commit into
mainfrom
feat/site-appify-viewport
Sep 14, 2026
Merged

shiaho777 merged 1 commit into
mainfrom
feat/site-appify-viewport

Conversation

@shiaho777

Copy link
Copy Markdown
Owner

Fixes #126

Summary

  • New html_site.appify_index_html(): merges into an existing viewport meta (or inserts one after <head>) forcing width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover, preserving any other viewport keys.
  • Applied at serve time in GET /a/{id}/site/{file} for .html/.htm — retro-fixes all ~100 already-uploaded apps without re-upload, and keeps content_hash/app ids stable.
  • URL apps are unaffected (we do not control third-party HTML — their chrome color and zoom come from the site's own head).

Test plan

  • pytest tests/ — 340 passed
  • New tests: viewport merge preserves extra keys, missing viewport inserted, binary/headless content untouched

Generated with Devin

Hosted pages get a patched viewport meta at serve time: width=device-width,
maximum-scale=1, user-scalable=no, viewport-fit=cover. Installed Web Clips
then render edge-to-edge under iOS chrome without pinch zoom instead of
feeling like a browser page. Applies to all existing uploads since it runs
in the /site/ route, not at upload time.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@shiaho777
shiaho777 merged commit 3704633 into main Sep 14, 2026
3 checks passed
@shiaho777
shiaho777 deleted the feat/site-appify-viewport branch September 14, 2026 14:42
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.

feat: app-grade viewport for hosted HTML apps

1 participant