[GH-ISSUE #7923] Proposal: In-app notices for owners, published from GitHub #4355

Closed
opened 2026-10-22 04:05:57 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Gunterlie on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7923

Originally assigned to: @Gunterlie on GitHub.

What problem does this solve?

Marinara has no way to tell owners of existing installations about something important after they installed it. A security fix, a required manual step for Docker users, or a breaking change only reaches people who read GitHub, Discord or release notes.

The 2.5.0 proxy/tunnel problem showed this gap: launcher installs update themselves, but Docker and Android installs do not, and the in-app update card only appears when the owner clicks "Check for updates". Owners who are affected right now have no reason to look.

A notice channel only helps installations that already have it. Building it now means the next important message reaches everyone on that version or later, Docker included.

Proposed solution

A small, maintainer-edited notice file in this repository that the app fetches and shows to the owner.

The file (for example notices.json):

[
  {
    "id": "2026-10-proxy-auth",
    "level": "critical",
    "versions": "<=2.5.1",
    "title": "Security update available",
    "text": "If you use a reverse proxy or tunnel, update now or set a password.",
    "link": "https://github.com/Pasta-Devs/Marinara-Engine/releases"
  }
]
  • level: warning or critical only. There is no info level on purpose.
  • action (required): what the owner must do, in one sentence. expires (required): a date after which the app ignores the notice.
  • versions: a semver range; the notice shows only when the running version matches.
  • Only for things the owner must act on: security, "Docker users must do X", a migration or a breaking change that needs a manual step.

Where it lives: its own protected branch (for example notices), so maintainers can publish a warning within minutes through a normal PR, without a release or a main promotion. Fetched from raw.githubusercontent.com, so it works for every install type and has no tight API rate limit.

In the app:

  • Reuse the existing update-check plumbing in packages/server/src/routes/updates.routes.ts (fetch, cache, timeout) instead of new machinery. Fetch at start and every few hours; a failed fetch shows nothing and never blocks startup.
  • Reuse the existing top banner. packages/client/src/components/diagnostics/CsrfOriginWarningBanner.tsx (mounted in App.tsx) already is a fixed top alert bar with role="alert", an action button and a dismiss button. Extract its frame into one shared banner and render the CSRF warning, owner notices and the unsafe-access warning from #7911 through it, so they never stack on top of each other and the one-banner rule covers all of them (most severe wins).
  • Name it for what it becomes. Proposed structure (follows the existing components/ui/ and *-host patterns):
    • components/ui/AppBanner.tsx: the shared, improved banner (look, title, text, action, dismiss, severity).
    • components/layout/AppBannerHost.tsx: the single banner mounted in App.tsx; collects candidates and shows the most severe one.
    • components/diagnostics/use-csrf-origin-banner.ts: replaces CsrfOriginWarningBanner.tsx; only the CSRF probe, returning banner data or nothing. Notices and the #7911 access warning get matching small hooks.
    • Keep the existing ui.diagnostics.csrforiginwarningbanner.* translation keys so community locales keep working.
  • Improve that banner while sharing it. Today it has hard-coded colors and inline styles instead of theme tokens, one red look for everything, a position: fixed / zIndex: 9999 bar that covers the app header (worst on phones), session-only dismissal, aria-live="assertive" for every case, and dense technical text. The shared banner should:
    • use theme tokens and have two looks: warning and critical;
    • sit in the layout (push content down) instead of covering the header, and respect safe areas on mobile/PWA;
    • show a short title, one sentence and one primary action; technical details (such as .env lines) fold out on demand;
    • dismiss per notice id and persist it (session-only stays possible for diagnostics like CSRF);
    • announce only critical assertively; warning uses a polite live region;
    • follow marinara-design and be proven with screenshots at 390/768/1440 px in light and dark themes.
  • Show matching notices as a banner to the owner only. Remote visitors who are not signed in must never see notices.
  • warning notices can be dismissed per id. critical comes back until the app runs a version outside the range.
  • Reach installs that never restart. Many servers run for weeks, so launcher auto-update (which runs only at start) never applies a fix. The server keeps re-fetching on its schedule while it runs, and open browser tabs pick up new notices without a reload (poll the owner-only notice endpoint on an interval and when the tab becomes visible again).
  • Offer the fix from the banner. A notice can say "update required". On launcher (git) installs, show an "Update now" button that reuses the existing protected update/apply path; it must keep the existing owner/admin and loopback checks and must not restart while a generation is running. Docker and Android show the exact manual command or download link instead. Never update or restart automatically without the owner's click.
  • One setting / env flag turns remote notices off for people who want no outbound requests. Document it next to the existing update and catalog fetches.

No notice fatigue. If owners learn to close the banner without reading, the one notice that matters is lost. So:

  • Use it only when the owner must act and something bad happens if they do not: a security risk, data loss, or an update that breaks without a manual step.
  • Never use it for: new features, releases in general (the What's New modal and update card cover those), surveys, events, community news, tips, or "please star the repo".
  • The app enforces the shape: notices without action or expires, or with an unknown level, are ignored. It shows at most one banner at a time (the most severe); others wait.
  • The branch enforces review: a change to the notice file needs an approving review from a second maintainer (CODEOWNERS on the notices branch). The PR must say why the owner must act now.
  • Expect very few: a handful per year. If notices become frequent, revisit the rules before adding more.

Trust rules (this is remote content inside the app):

  • Render plain text only: no HTML, no markdown, no scripts.
  • Allow links only to github.com/Pasta-Devs/* and the project's own pages; drop anything else.
  • Validate the file strictly (schema, sizes, number of entries); ignore it entirely when it is invalid.
  • Never send installation data with the request beyond what a normal GET to GitHub sends.

Acceptance

  • A notice whose versions range matches the running version appears as a banner for the owner; a non-matching one does not.
  • A remote visitor without authentication never receives notice data (API and page).
  • Dismissed warning notices stay dismissed per id; critical notices return until the version leaves the range.
  • HTML, markdown and non-allowlisted links in the file are not rendered; an invalid file shows nothing.
  • Offline, slow or failing fetches do not delay startup or show errors to the owner.
  • The opt-out disables all notice requests.
  • Notices, the CSRF origin warning and the #7911 access warning share one banner component; when several apply, only the most severe shows.
  • Notices without action/expires, with an unknown level, or past expires are ignored; at most one banner shows at a time.
  • The notices branch requires a second maintainer's approval, and CONTRIBUTING.md documents when a notice is allowed and when it is not.
  • A server that has been running for days shows a newly published notice within the fetch interval, and an already-open tab shows it without a reload.
  • On a launcher install, "Update now" applies the update through the existing protected path only after the owner clicks; it is unavailable to remote visitors and waits for running generations.
  • Localized UI copy (English catalog) for the banner chrome; notice text itself stays as written.
  • Docs explain the channel, the branch, how to publish a notice and how to opt out; docs-i18n follow-up opened.

Alternatives considered

  • GitHub security advisories API: structured and official, but covers security only, needs an admin to publish, and is slower. Could be added later as a second source.
  • GitHub release notes: already shown in the update card, but only on click and only for the newest release, not per affected version.
  • Agent catalog (Marinara-Agents) notes: reaches installs at start today, but that channel is for packages; using it for project notices mixes concerns.
  • Community posts (Discord, Reddit, README): still needed, but reach only people who follow the project.

Additional context

Came out of the public-exposure planning in #7909. This does not help installations that are already out of date (they do not have the code yet); it prevents the same gap next time.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Gunterlie on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7923 Originally assigned to: @Gunterlie on GitHub. ## What problem does this solve? Marinara has no way to tell owners of existing installations about something important after they installed it. A security fix, a required manual step for Docker users, or a breaking change only reaches people who read GitHub, Discord or release notes. The 2.5.0 proxy/tunnel problem showed this gap: launcher installs update themselves, but Docker and Android installs do not, and the in-app update card only appears when the owner clicks "Check for updates". Owners who are affected right now have no reason to look. A notice channel only helps installations that already have it. Building it now means the next important message reaches everyone on that version or later, Docker included. ## Proposed solution A small, maintainer-edited notice file in this repository that the app fetches and shows to the owner. **The file** (for example `notices.json`): ```json [ { "id": "2026-10-proxy-auth", "level": "critical", "versions": "<=2.5.1", "title": "Security update available", "text": "If you use a reverse proxy or tunnel, update now or set a password.", "link": "https://github.com/Pasta-Devs/Marinara-Engine/releases" } ] ``` - `level`: `warning` or `critical` only. There is no `info` level on purpose. - `action` (required): what the owner must do, in one sentence. `expires` (required): a date after which the app ignores the notice. - `versions`: a semver range; the notice shows only when the running version matches. - Only for things the owner must act on: security, "Docker users must do X", a migration or a breaking change that needs a manual step. **Where it lives:** its own protected branch (for example `notices`), so maintainers can publish a warning within minutes through a normal PR, without a release or a `main` promotion. Fetched from `raw.githubusercontent.com`, so it works for every install type and has no tight API rate limit. **In the app:** - Reuse the existing update-check plumbing in `packages/server/src/routes/updates.routes.ts` (fetch, cache, timeout) instead of new machinery. Fetch at start and every few hours; a failed fetch shows nothing and never blocks startup. - **Reuse the existing top banner.** `packages/client/src/components/diagnostics/CsrfOriginWarningBanner.tsx` (mounted in `App.tsx`) already is a fixed top alert bar with `role="alert"`, an action button and a dismiss button. Extract its frame into one shared banner and render the CSRF warning, owner notices and the unsafe-access warning from #7911 through it, so they never stack on top of each other and the one-banner rule covers all of them (most severe wins). - **Name it for what it becomes.** Proposed structure (follows the existing `components/ui/` and `*-host` patterns): - `components/ui/AppBanner.tsx`: the shared, improved banner (look, title, text, action, dismiss, severity). - `components/layout/AppBannerHost.tsx`: the single banner mounted in `App.tsx`; collects candidates and shows the most severe one. - `components/diagnostics/use-csrf-origin-banner.ts`: replaces `CsrfOriginWarningBanner.tsx`; only the CSRF probe, returning banner data or nothing. Notices and the #7911 access warning get matching small hooks. - Keep the existing `ui.diagnostics.csrforiginwarningbanner.*` translation keys so community locales keep working. - **Improve that banner while sharing it.** Today it has hard-coded colors and inline styles instead of theme tokens, one red look for everything, a `position: fixed` / `zIndex: 9999` bar that covers the app header (worst on phones), session-only dismissal, `aria-live="assertive"` for every case, and dense technical text. The shared banner should: - use theme tokens and have two looks: `warning` and `critical`; - sit in the layout (push content down) instead of covering the header, and respect safe areas on mobile/PWA; - show a short title, one sentence and one primary action; technical details (such as `.env` lines) fold out on demand; - dismiss per notice `id` and persist it (session-only stays possible for diagnostics like CSRF); - announce only `critical` assertively; `warning` uses a polite live region; - follow `marinara-design` and be proven with screenshots at 390/768/1440 px in light and dark themes. - Show matching notices as a banner to the owner only. Remote visitors who are not signed in must never see notices. - `warning` notices can be dismissed per `id`. `critical` comes back until the app runs a version outside the range. - **Reach installs that never restart.** Many servers run for weeks, so launcher auto-update (which runs only at start) never applies a fix. The server keeps re-fetching on its schedule while it runs, and open browser tabs pick up new notices without a reload (poll the owner-only notice endpoint on an interval and when the tab becomes visible again). - **Offer the fix from the banner.** A notice can say "update required". On launcher (git) installs, show an "Update now" button that reuses the existing protected update/apply path; it must keep the existing owner/admin and loopback checks and must not restart while a generation is running. Docker and Android show the exact manual command or download link instead. Never update or restart automatically without the owner's click. - One setting / env flag turns remote notices off for people who want no outbound requests. Document it next to the existing update and catalog fetches. **No notice fatigue.** If owners learn to close the banner without reading, the one notice that matters is lost. So: - **Use it only when the owner must act** and something bad happens if they do not: a security risk, data loss, or an update that breaks without a manual step. - **Never use it for:** new features, releases in general (the What's New modal and update card cover those), surveys, events, community news, tips, or "please star the repo". - **The app enforces the shape:** notices without `action` or `expires`, or with an unknown `level`, are ignored. It shows at most one banner at a time (the most severe); others wait. - **The branch enforces review:** a change to the notice file needs an approving review from a second maintainer (CODEOWNERS on the notices branch). The PR must say why the owner must act now. - **Expect very few:** a handful per year. If notices become frequent, revisit the rules before adding more. **Trust rules (this is remote content inside the app):** - Render plain text only: no HTML, no markdown, no scripts. - Allow links only to `github.com/Pasta-Devs/*` and the project's own pages; drop anything else. - Validate the file strictly (schema, sizes, number of entries); ignore it entirely when it is invalid. - Never send installation data with the request beyond what a normal GET to GitHub sends. ## Acceptance - [ ] A notice whose `versions` range matches the running version appears as a banner for the owner; a non-matching one does not. - [ ] A remote visitor without authentication never receives notice data (API and page). - [ ] Dismissed `warning` notices stay dismissed per `id`; `critical` notices return until the version leaves the range. - [ ] HTML, markdown and non-allowlisted links in the file are not rendered; an invalid file shows nothing. - [ ] Offline, slow or failing fetches do not delay startup or show errors to the owner. - [ ] The opt-out disables all notice requests. - [ ] Notices, the CSRF origin warning and the #7911 access warning share one banner component; when several apply, only the most severe shows. - [ ] Notices without `action`/`expires`, with an unknown `level`, or past `expires` are ignored; at most one banner shows at a time. - [ ] The notices branch requires a second maintainer's approval, and `CONTRIBUTING.md` documents when a notice is allowed and when it is not. - [ ] A server that has been running for days shows a newly published notice within the fetch interval, and an already-open tab shows it without a reload. - [ ] On a launcher install, "Update now" applies the update through the existing protected path only after the owner clicks; it is unavailable to remote visitors and waits for running generations. - [ ] Localized UI copy (English catalog) for the banner chrome; notice text itself stays as written. - [ ] Docs explain the channel, the branch, how to publish a notice and how to opt out; docs-i18n follow-up opened. ## Alternatives considered - **GitHub security advisories API:** structured and official, but covers security only, needs an admin to publish, and is slower. Could be added later as a second source. - **GitHub release notes:** already shown in the update card, but only on click and only for the newest release, not per affected version. - **Agent catalog (Marinara-Agents) notes:** reaches installs at start today, but that channel is for packages; using it for project notices mixes concerns. - **Community posts (Discord, Reddit, README):** still needed, but reach only people who follow the project. ## Additional context Came out of the public-exposure planning in #7909. This does not help installations that are already out of date (they do not have the code yet); it prevents the same gap next time. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@Gunterlie commented on GitHub (Oct 21, 2026):

@Gunterlie is taking this, with agents. Plan: first the shared, improved AppBanner + AppBannerHost (replacing CsrfOriginWarningBanner), then the notice fetch and display.

<!-- gh-comment-id:6310511708 --> @Gunterlie commented on GitHub (Oct 21, 2026): @Gunterlie is taking this, with agents. Plan: first the shared, improved `AppBanner` + `AppBannerHost` (replacing `CsrfOriginWarningBanner`), then the notice fetch and display.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4355
No description provided.