feat(cloud): add configurable Cloud-only WebUI notice banner

Cloud deployments need a way to tell readers what is happening to the
instance they are using (maintenance windows, service notices) without
shipping a release per notice.

Add a cloud.banner config block (switch, tone, dismissal, link targets and
per-language copy) and expose the resolved banner on the unauthenticated
/api/v1/system/info payload so the WebUI can render it before login. The
banner resolves to null on OSS deployments, so a self-hosted copy of
config.yaml never shows managed-service copy. Copy is plain text; only
absolute http(s) link targets are rendered.

The WebUI renders it once from the root layout, offsets the fixed app shell
and the wizard through --cloud-banner-height, and keeps a dismissal bound to
the notice it dismissed so new copy reappears.

Co-authored-by: multica-agent <[email protected]>
This commit is contained in:
RockChinQ
2026-10-21 16:26:43 +00:00
co-authored by multica-agent
parent 0d365c98d8
commit d45b0a3957
20 changed files with 747 additions and 7 deletions
@@ -5,6 +5,7 @@ import sqlalchemy
from .. import group
from .....utils import constants
from .....cloud.banner import resolve_cloud_banner
from .....entity.persistence.metadata import WorkspaceMetadata
from ...authz import Permission
from ...context import PrincipalType, RequestContext
@@ -219,6 +220,9 @@ class SystemRouterGroup(group.RouterGroup):
'edition': constants.edition,
'beta': is_beta,
'deployment_mode': 'cloud' if is_cloud else 'oss',
# Cloud-only instance notice. None on OSS deployments so a
# self-hosted copy of config.yaml can never surface it.
'cloud_banner': resolve_cloud_banner(self.ap),
'enable_marketplace': self.ap.instance_config.data.get('plugin', {}).get(
'enable_marketplace', True
),