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#8011
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/7935
Author: @Gunterlie
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @Gunterlie
Base:
staging← Head:chore/app-banner-7923📝 Commits (5)
18f5570refactor(client): replace CSRF origin banner with shared AppBanner host7c7f47erefactor(client): overlay AppBanner instead of re-laying out the shelldfa0245docs(client): fix banner hook extension in directory map2beaa33fix(client): give the CSRF banner its own Copy key4647dbffix(client): sort CSRF banner Copy key📊 Changes
7 files changed (+248 additions, -226 deletions)
View changed files
📝
packages/client/.instructions.md(+1 -1)📝
packages/client/src/App.tsx(+2 -2)➖
packages/client/src/components/diagnostics/CsrfOriginWarningBanner.tsx(+0 -220)➕
packages/client/src/components/diagnostics/use-csrf-origin-banner.tsx(+114 -0)➕
packages/client/src/components/layout/AppBannerHost.tsx(+46 -0)➕
packages/client/src/components/ui/AppBanner.tsx(+81 -0)📝
packages/client/src/localization/locales/en.json(+4 -3)📄 Description
Linked issue
Part of #7923 and #7911 (parent #7909). Prep slice; no new banners are added here.
Why this change
#7911 (access warning on every page) and #7923 (owner notices) both need to show a banner across the whole app. The only banner today,
CsrfOriginWarningBanner, is a one-off: inline styles, hard-coded colours, always red, always assertive, session-only dismissal. Adding two more one-offs would mean three banners that can stack on top of each other and each shout at screen readers. This PR turns it into one shared banner and one mount point that shows only the most severe banner at a time, then moves the CSRF warning onto it with the same behaviour.What changed
components/ui/AppBanner.tsx: shared banner withwarningandcriticallooks, theme classes, collapsed "Details" (native<details>), 44 px targets, safe-area top padding.role="alert"(critical) /role="status"(warning) wraps only title + body, so Details and Copy are not announced.components/layout/AppBannerHost.tsx: single mount point (where the CSRF banner was inApp.tsx); picks the most severe candidate. Dismissal per banner id — warning inlocalStorage, critical insessionStorage(same as before for CSRF).components/diagnostics/use-csrf-origin-banner.tsx: the old probe logic, returns a critical banner candidate. Copy button unchanged (now viacopyToClipboard, timer cleared on unmount). The long "auto-trusted ranges" text moved into Details.CsrfOriginWarningBanner.tsx. Existingui.diagnostics.csrforiginwarningbanner.*keys reused; two new English keys (ui.app.banner.details,ui.app.banner.dismiss); two keys that lost their only user removed.FloatingWindowpositions and the iOS keyboard layout, which use viewport coordinates. Push layout can come later with a measured banner height if a banner needs it.amber-*, because--warningis read in the CSS but never defined in any theme. Upgrade path: define a--warningtheme token and switch the banner to it.Validation
pnpm check(full) andpnpm localization:checkpass locally.git grep CsrfOriginWarningBannerreturns nothing.Opus review (fix-then-ship) and local CodeRabbit (2 findings: copy timer, amber colours) — all addressed except the token, see the ponytail note above.
Local CodeRabbit rerun, 4 findings: wrong file extension in
.instructions.md(fixed); amber colours (see ponytail note). Not changed, with reasons:lorebook.editor.batch.copyand the fragmentedcsrforiginwarningbanner.*sentence keys: both are unchanged from staging. Renaming them would drop existing community translations; regrouping the CSRF copy into whole-sentence keys belongs in a separate localization change.--destructive, as the old banner did; no change in colour behaviour.pnpm checkpasses locallyContainer (Docker / Podman) built and ran without issue
Ran the app, clicked through the changes manually
Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
Above manual verification completed (describe below)
Read and followed
CONTRIBUTING.mdManual verification notes
CSRF_TRUSTED_ORIGINS), in light and dark theme.CSRF_TRUSTED_ORIGINS=…line and shows "Copied".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 in light and dark, collapsed and expanded, were taken locally with the probe stubbed to an untrusted origin. They are not attached here (the CLI cannot upload images); a maintainer can add them, or the manual checks above cover the same states.
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.