Repository navigation
feat: upgrade detectIncognito to v1.9.0 with all detection fixes - #100
Conversation
❌ Deploy Preview for clever-starlight-3034ea failed. Why did it fail? →
|
❌ Deploy Preview for fingerprint-oss failed. Why did it fail? →
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe package updates to 0.10.0. Bowser adds browser aliases and platform descriptors. ChangesBrowser detection updates
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant detectIncognito
participant navigator
participant IndexedDB
participant callback
detectIncognito->>navigator: inspect browser and storage APIs
detectIncognito->>IndexedDB: run browser-specific private-mode probe
IndexedDB-->>detectIncognito: return timing or error result
detectIncognito->>callback: resolve once with detection result
Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@macroscope-app review |
1 similar comment
|
@macroscope-app review |
|
Manual reviews triggered for commit All prior checks · these links stay valid even if you push more commits. |
|
Review triggered. The Approvability and Correctness checks are now running. Results will be posted when they complete. |
ApprovabilityVerdict: Needs human review This PR rewrites the core incognito detection algorithms - Chrome detection changes from storage quota to IndexedDB durability timing analysis, and Firefox detection is substantially rewritten. These are significant runtime behavior changes to the library's primary functionality that warrant human review. You can customize Macroscope's approvability policy. Learn more. |
- incognito: add hard-deadline watchdog to chromePrivateTest so a stalled IndexedDB transaction can never hang detectIncognito/getSystemInfo - incognito: guard indexedDB.open in try/catch for chrome and firefox paths - incognito: enforce resolve-only contract by replacing main().catch(reject) with a resolving fallback and removing the unused reject parameter - incognito: use a unique firefox fallback db name, close request.result before deleteDatabase, and handle onblocked - incognito: identifyChromium now falls back to vendored Bowser so Chromium-based browsers (Samsung Internet, Vivaldi, ...) are not reported as plain Chrome - bowser platforms: move Smart TV/NetCast detectors before the generic Android detectors so Android TV UAs resolve to tv instead of tablet
When the hard-deadline watchdog fires after the database is already open, deleteDatabase was called while a live connection (and its pending transactions) remained open, so the deletion was never scheduled and storage stayed contended. Hoist the connection reference into chromePrivateTest scope, close it (nulling the reference) before deleteDatabase from the watchdog and onblocked paths, and use a local conn inside onsuccess so all terminal paths release the handle.
|
@macroscope-app review |
|
Review triggered. The Approvability and Correctness checks are now running. Results will be posted when they complete. |
Upgrade
detectIncognitoto v1.9.0 with new per-browser private-mode detectionsrc/incognito.tsto use new detection strategies: Safari viastorage.getDirectory/IDB blob checks, Chrome via IndexedDB durability timing with wall-clock and hard timeouts, and Firefox viastorage.getDirectoryorInvalidStateErroron IDB open.detectIncognitonow always resolves instead of rejecting — unknown browsers default to non-private, and acallbackSettledguard prevents multiple resolutions.webkitTemporaryStorageandwebkitRequestFileSystemquota-based Chrome detection methods in favor of IndexedDB durability timing.Macroscope summarized 1f6b5af.