Skip to content

Conversation

@nazarfil
Copy link
Contributor

@nazarfil nazarfil commented Dec 9, 2025

A short, meaningful PR description. Explain the goal of the PR and the ideas behind it.
Closed : HEXA-1455, HEXA-1442

Changes

Please list / describe the changes in the codebase for the reviewer(s).

  • Added html webapps rendering , to cover plain html and html with assets
  • Changed UI of the webapps page
  • Use file storage for bundled webapps, and store the zipped archive in database
  • add content field for webapps to register plain text content, for example forw ebaps as well

How/what to test

  • Create an HTML type webapp, add code, edit code, save the app and go to play page.
  • Create or adit a webapp of type Bundle, upload a webapp bundle containing html index page and related assets, you can compile any sample of react app.

Screenshots / screencast

Screen.Recording.2025-12-17.at.09.06.47.mov

@nazarfil nazarfil force-pushed the feat/html-and-react-app branch from 5662bc0 to a43b56a Compare December 10, 2025 08:55
@nazarfil nazarfil force-pushed the feat/extend-superset-instance branch from e072dd8 to b9822d4 Compare December 10, 2025 09:47
@nazarfil nazarfil force-pushed the feat/html-and-react-app branch from c4e7e1f to 96881a1 Compare December 10, 2025 09:56
Base automatically changed from feat/extend-superset-instance to main December 11, 2025 11:51
@nazarfil nazarfil changed the title Feat/html and react app feat: implement html and bundled webapps Dec 11, 2025
@nazarfil nazarfil force-pushed the feat/html-and-react-app branch 2 times, most recently from 6b79342 to a14edd2 Compare December 15, 2025 04:28
@nazarfil nazarfil requested a review from Copilot December 15, 2025 12:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements support for HTML and bundled webapps, expanding beyond the existing iFrame and Superset types. The implementation adds the ability to create webapps with plain HTML content or uploaded zip bundles containing complete web applications.

Key changes include:

  • Added HTML and Bundle webapp types with corresponding content storage fields
  • Implemented backend views to serve HTML content and bundle files
  • Created type-aware form fields with preview capabilities for different webapp types

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
frontend/src/webapps/features/WebappForm/WebappForm.tsx Added type-specific form fields (HTML editor, bundle uploader) with preview functionality
frontend/src/webapps/features/WebappIframe/WebappIframe.tsx Updated to construct URLs based on webapp type (HTML/Bundle/iFrame)
backend/hexa/webapps/models.py Added content and bundle fields to Webapp model, made url optional
backend/hexa/webapps/views.py Implemented views to serve HTML content and bundle files from webapps
backend/hexa/webapps/schema/mutations.py Added content input flattening logic to handle different webapp types
frontend/src/graphql/types.ts Updated GraphQL types to support WebappContentInput union type
backend/hexa/webapps/tests/ Added comprehensive test coverage for views and mutations
frontend/next.config.js Added rewrites to proxy webapp content requests to backend

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nazarfil nazarfil force-pushed the feat/html-and-react-app branch from c144c85 to 93d6db4 Compare December 15, 2025 15:35
@BLSQ BLSQ deleted a comment from Copilot AI Dec 15, 2025
@BLSQ BLSQ deleted a comment from Copilot AI Dec 15, 2025
@BLSQ BLSQ deleted a comment from Copilot AI Dec 15, 2025
@BLSQ BLSQ deleted a comment from Copilot AI Dec 15, 2025
@BLSQ BLSQ deleted a comment from Copilot AI Dec 15, 2025
@BLSQ BLSQ deleted a comment from Copilot AI Dec 15, 2025
@BLSQ BLSQ deleted a comment from Copilot AI Dec 15, 2025
@BLSQ BLSQ deleted a comment from Copilot AI Dec 16, 2025
@nazarfil nazarfil marked this pull request as ready for review December 16, 2025 15:36
@nazarfil nazarfil requested review from bramj and yolanfery December 16, 2025 15:36
This commit adds support for HTML and bundled React applications as new webapp types,
in addition to the existing iFrame and Superset types.

Changes include:
- Add HTML and BUNDLE webapp types to models and GraphQL schema
- Make url field optional (not needed for HTML/Bundle types)
- Add content field for HTML webapps
- Add bundle field for bundled React apps (stored as zip)
- Add type-aware form fields with preview functionality
- Add bundle upload with drag-and-drop support
- Add HTML editor with live preview
- Add webapp serving endpoints for HTML and Bundle types
- Extract webapp type label logic to helper function
- Add comprehensive tests for new functionality
- Add translations for new features
@nazarfil nazarfil force-pushed the feat/html-and-react-app branch from 11a953e to 471362f Compare December 17, 2025 08:14
"""
Directive to ensure exactly one field is provided in an input type.
"""
directive @oneOf on INPUT_OBJECT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

applies oneOf on InputType to only allow either content, bundle or html

Copy link
Contributor

@bramj bramj left a comment

Choose a reason for hiding this comment

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

As discussed yesterday: The UX is great and it's working well 👍

I was able to migrate the site https://github.com/BLSQ/site-pev-rdc-reports to a web app, and after making sure to build it with relative paths to the assets, it worked great!

The problem is: with the current implementation, every link from the web app is served by hitting a path like for example /bundle/assets/styles.css, and every call to /bundle/* will call the database of the .zip, extract it and return the correct file.
My fear is that when web apps start containing for example large json files to serve data, we'll start seeing performance issues soon (I suppose memory issues because of unzipping).

So we should explore an alternative approach such as unzipping on storage after upload and storing the bucket name on the web app. When serving the app we can then serve directly from the blob storage.

@yolanfery yolanfery removed their request for review December 23, 2025 09:06
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.

3 participants