Skip to content

feat(app): clear cache in error page#17239

Open
neriousy wants to merge 4 commits intoanomalyco:devfrom
neriousy:feat/clear-cache-error-page
Open

feat(app): clear cache in error page#17239
neriousy wants to merge 4 commits intoanomalyco:devfrom
neriousy:feat/clear-cache-error-page

Conversation

@neriousy
Copy link
Contributor

@neriousy neriousy commented Mar 12, 2026

Issue for this PR

Closes #17240

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Users often have problems with corrupted cache which obstructs them to use OpenCode
For easy cache clearing on error page user will be able to clear the cache

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Make app throw error
click clear cache

Screenshots / recordings

2026-03-12.21-42-44.mp4

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@neriousy neriousy requested a review from adamdotdevin as a code owner March 12, 2026 20:44
Copilot AI review requested due to automatic review settings March 12, 2026 20:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a “Clear cache” action to the app’s error page to help users recover from corrupted client-side state/cache, with implementations for both the web app and the Tauri desktop app.

Changes:

  • Extend the Platform interface with an optional clearCache() API and implement it for web + desktop.
  • Add “Clear cache” UI/state handling to the error page (including disabling some actions while clearing).
  • Add i18n strings for the new error-page action across supported locales.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/desktop/src/index.tsx Adds desktop clearCache() implementation (clears Tauri store + webview browsing data) and refactors storage logic into a disk helper.
packages/desktop/src/bindings.ts Removes trailing whitespace from the generated bindings file.
packages/app/src/pages/error.tsx Adds “Clear cache” button and clearing state management on the error page.
packages/app/src/entry.tsx Implements web clearCache() (localStorage, Cache Storage, cookie reset, reload).
packages/app/src/context/platform.tsx Extends Platform type with optional clearCache().
packages/app/src/i18n/ar.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/br.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/bs.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/da.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/de.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/en.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/es.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/fr.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/ja.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/ko.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/no.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/pl.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/ru.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/th.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/tr.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/zh.ts Adds translation for error.page.action.clearCache.
packages/app/src/i18n/zht.ts Adds translation for error.page.action.clearCache.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@neriousy neriousy marked this pull request as draft March 12, 2026 20:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@neriousy neriousy marked this pull request as ready for review March 12, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]:Clear cache for desktop/webapp

2 participants