fix(app): trim URLs before openUrl http fallback#1954
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesURL whitespace normalization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
80f92cd
Summary
openUrl()so surrounding whitespace does not change fallback behaviortauriOpenUrl, telemetry redaction, HTTP classification, andwindow.openhttps://...URL whentauriOpenUrlfails withCannot read properties of undefined (reading 'postMessage')Why
isHttpUrl()previously classified the raw input string. If a validhttp(s)URL arrived with leading or trailing whitespace, the Tauri fallback path could misclassify it as non-http and rethrow instead of opening it in the browser.Validation
pnpm --filter openhuman-app compilepnpm --filter openhuman-app test -- src/utils/openUrl.test.ts(the repo's Vitest setup fans out broadly, but this change was validated in the local test run and the new regression test is included)Note
A local git hook attempted to run repository-wide formatting and failed in this environment due a Rust toolchain/rustup conflict unrelated to this JS/TS-only change.
Summary by CodeRabbit
Bug Fixes
Tests