fix: add fallback and min webview#2089
Conversation
Greptile SummaryThis PR adds compatibility fixes for older Android WebView versions, addresses three related gaps: a
Confidence Score: 5/5All three fallback paths are correctly guarded and cleaned up; no changed code path introduces wrong behavior or data loss. The changes are defensive compatibility shims. The ResizeObserver fallback correctly mimics the disconnect interface, the clipboard fallback properly falls through to an error alert, and the WebView check is read-only and display-only. No logic errors or data mutations were found on any of the new paths. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[App startup - index.html] --> B{WebView major >= 84?}
B -- No --> C[setStartupMessage: WebView too old]
B -- Yes --> D[Load app normally]
C --> D
D --> E[terminalManager: open terminal]
E --> F{typeof ResizeObserver === 'function'?}
F -- Yes --> G[new ResizeObserver - handleResize]
F -- No --> H[setInterval 500ms - handleResize fallback]
G --> I[terminalFile._resizeObserver = observer]
H --> J[terminalFile._resizeObserver = mock disconnect]
D --> K[fileBrowser: copyuri action]
K --> L{cordova.plugins.clipboard available?}
L -- Yes --> M[cordova clipboard.copy url]
L -- No --> N{navigator.clipboard.writeText available?}
N -- Yes --> O[await navigator.clipboard.writeText url]
N -- No --> P[alert: clipboard not available]
M --> Q[alert: copied to clipboard]
O --> Q
Reviews (2): Last reviewed commit: "fix" | Re-trigger Greptile |
This comment was marked as outdated.
This comment was marked as outdated.
|
Some Translation files are missing keys I think 🤔, they are unsynchronized probably. |
Hm, Btw thats not introduced in this pr |
No description provided.