feat(app): clear cache in error page#17239
Conversation
There was a problem hiding this comment.
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
Platforminterface with an optionalclearCache()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.
There was a problem hiding this comment.
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.
Issue for this PR
Closes #17240
Type of change
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
If you do not follow this template your PR will be automatically rejected.