mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8023
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7952
Author: @Gunterlie
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @Gunterlie
Base:
staging← Head:feat/owner-notices-7923📝 Commits (7)
81fe369feat: show maintainer notices to owners from the notices branch (#7923)ce0e309Merge remote-tracking branch 'origin/staging' into feat/owner-notices-79239ea0752fix(notices): harden notices fetch, range parsing and link check342228ffix(server): rate-limit the owner notices route058b195fix(notices): check hourly and on startup only7fe563arefactor(notices): call them Marinara notices; explain them and warn before turning them offd46626afix(notices): show notices to IP_ALLOWLIST peers; document the kept cache📊 Changes
12 files changed (+428 additions, -2 deletions)
View changed files
📝
.env.example(+11 -0)📝
CONTRIBUTING.md(+48 -0)📝
docs/CONFIGURATION.md(+22 -0)📝
packages/client/src/components/layout/AppBannerHost.tsx(+2 -1)➕
packages/client/src/components/layout/use-marinara-notice-banners.tsx(+69 -0)📝
packages/client/src/localization/locales/en.json(+1 -0)📝
packages/server/src/config/runtime-config.ts(+4 -0)📝
packages/server/src/middleware/rate-limit.ts(+6 -0)📝
packages/server/src/routes/index.ts(+2 -0)➕
packages/server/src/routes/notices.routes.ts(+151 -0)📝
packages/server/src/routes/updates.routes.ts(+1 -1)➕
scripts/regressions/marinara-notices.regression.ts(+111 -0)📄 Description
Linked issue
Closes #7923 (parent #7909).
Why this change
Marinara has no way to tell owners of existing installations about something they must act on — a security fix, a manual step for Docker users, a breaking change. The 2.5.0 proxy/tunnel problem showed the gap: launcher installs update themselves, Docker and Android do not, and the update card only appears when the owner clicks "Check for updates". This adds a small, maintainer-edited notices file that every install built from this version on fetches and shows to the owner, with strict rules so the channel is not used for news and owners keep reading it.
What changed
packages/server/src/routes/notices.routes.ts: fetchesnotices.jsonfrom thenoticesbranch (raw.githubusercontent.com) at start and every hour (10 s timeout), validates it strictly and serves matching notices atGET /api/noticesto owners only (local non-proxied, trusted peers, admin secret, or signed-in users); everyone else gets an empty list. A missing file or branch shows nothing and never blocks startup.id,level(warning|critical),versions,title,text,action,expires; length caps; plain text only;linkkept only when it starts withhttps://github.com/Pasta-Devs/. Version ranges reusecompareVersionsfromupdates.routes.ts.use-marinara-notice-banners.tsx: feeds the sharedAppBannerHost(one banner at a time, most severe wins); asks once when the page loads and then every hour; the route is rate-limited to 10 requests per minute.MARINARA_NOTICES_ENABLED=false, with a warning in.env.exampleanddocs/CONFIGURATION.md(new "Marinara notices" section: what they are, how they work, why they are safe);MARINARA_NOTICES_URLfor forks.SettingsPanel.tsx; notices show theiractiontext and a link instead.CONTRIBUTING.md"Marinara Notices" (format, example, rules against notice fatigue, how to retire or re-show a notice),docs/CONFIGURATION.md,.env.example.scripts/regressions/marinara-notices.regression.ts.Validation
pnpm checkandpnpm localization:checkpass locally;marinara-noticesregression passes.>= 2.5.0(space after operator) now matches; body read as a stream and stopped at the size cap (content-lengthchecked first),redirect: "error"; links with a user name/password dropped; docs say invalid JSON keeps the last good notices. Owner gate, plain-text rendering, link allowlist bypasses, timers and polling were checked and found correct.noticesfield; size cap while reading).d46626a87(allowlisted peers without a password now see notices viatrustedPeer; docs describe the kept cache on a failed download); 3 rejected with reasons in the threads (critical dismissal is per session by design; docs-i18n follows after merge; client request only reaches the local server). Route rate-limited (CodeQL).compareVersionstreats prerelease suffixes (2.5.1-beta) wrongly; this is existing code and releases use plainX.Y.Z.Before or soon after merge (maintainer): create the
noticesbranch withnotices.json=[]and protect it (maintainers only, one approving review, no force push). Until it exists, every install gets a 404 and shows nothing — safe, but the docs describe the protected branch.Out of scope: the "Update now" button from the issue (the update flow lives inside
SettingsPanel.tsx). A[docs-i18n] docs/CONFIGURATION.mdfollow-up is needed after merge.pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
noticesbranch, the app starts normally and shows no banner.MARINARA_NOTICES_URLshows awarningand acriticalnotice on the owner's computer, in light and dark theme, at phone and desktop width.warningstays hidden after reload, and acriticalnotice comes back in a new session.MARINARA_NOTICES_ENABLED=falsestops all fetches.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)UI evidence (if applicable)
Screenshots at 390 / 768 / 1440 px, light and dark, warning and critical, were taken locally with a test notices file. The CLI cannot attach images.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.