mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #165] [MERGED] Add a "refresh app" button to advanced settings to force a refresh from within client #4489
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#4489
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/165
Author: @amauragis
Created: 4/21/2026
Status: ✅ Merged
Merged: 4/21/2026
Merged by: @SpicyMarinara
Base:
main← Head:force-refresh-btn📝 Commits (1)
437b694Add forced refresh button📊 Changes
5 files changed (+94 additions, -21 deletions)
View changed files
📝
packages/client/src/App.tsx(+5 -7)📝
packages/client/src/components/panels/SettingsPanel.tsx(+42 -0)📝
packages/client/src/hooks/use-chats.ts(+1 -1)➕
packages/client/src/lib/browser-runtime.ts(+46 -0)➖
packages/client/src/lib/cache-reset.ts(+0 -13)📄 Description
This pull request refactors and improves the app’s logic for clearing browser caches and unre/gistering service workers, centralizing this functionality in a new
browser-runtimemodule. It also introduces a user-facing "Refresh App" button in the advanced settings panel, allowing users to manually clear caches and force a SPA reload without losing local data.The reason for adding the manual refresh is to allow pinned SPAs on iOS to be refreshed (as they wouldn't have access to a refresh button.
What changed
**Browser runtime and cache management improvements:
browser-runtimemodule (browser-runtime.ts) that providesclearBrowserRuntimeCachesand a newforceRefreshSpafunction, both of which handle unregistering service workers and clearing all browser caches in a robust, reusable way.clearBrowserRuntimeCachesimplementation fromcache-reset.ts, consolidating all related logic in the new module.clearBrowserRuntimeCachesand related cache management to use the newbrowser-runtimemodule across the codebase (App.tsx,use-chats.ts). [1] [2]User interface enhancements:
forceRefreshSpato clear caches and reload the app. The button provides user feedback and disables itself during the refresh operation to prevent duplicate actions. [1] [2] [3]Version recovery improvements:
App.tsxto useforceRefreshSpa, ensuring consistent cache-clearing and reload behavior when recovering from version mismatches.## Why this changeValidation
pnpm checkManual verification notes
Docs and release impact
UI evidence (if applicable)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.