{"record":{"id":"540278896e8ae433","repo":"Hmbown/CodeWhale","slug":"browser-opening-is-unsupported-on-this-platform","errorCode":null,"errorMessage":"browser opening is unsupported on this platform","messagePattern":"browser opening is unsupported on this platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/utils.rs","lineNumber":655,"sourceCode":"    }\n\n    #[cfg(target_os = \"windows\")]\n    {\n        let mut cmd = Command::new(\"cmd\");\n        cmd.args([\"/C\", \"start\", \"\", url]);\n        Ok(cmd)\n    }\n\n    #[cfg(not(any(\n        target_os = \"macos\",\n        all(target_os = \"linux\", not(target_env = \"ohos\")),\n        target_os = \"windows\",\n        target_os = \"netbsd\",\n        target_os = \"freebsd\",\n        target_os = \"openbsd\",\n        target_os = \"dragonfly\"\n    )))]\n    Err(anyhow::anyhow!(\n        \"browser opening is unsupported on this platform\"\n    ))\n}\n\n/// Spawn a tokio task with panic supervision.\n///\n/// Wraps the future in `AssertUnwindSafe` + `catch_unwind`. On panic:\n/// 1. Logs the panic with the task name and caller location via `tracing::error!`.\n/// 2. Writes a crash dump to `~/.codewhale/crashes/<timestamp>-<name>.log`.\n///\n/// The returned `JoinHandle` resolves to `()` — the panic is caught and\n/// handled internally so the parent process stays alive.\npub fn spawn_supervised<F>(\n    name: &'static str,\n    location: &'static std::panic::Location<'static>,\n    future: F,\n) -> tokio::task::JoinHandle<()>\nwhere","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/utils.rs#L637-L673","documentation":"browser_open_command is implemented per-platform via cfg attributes (macOS `open`, Windows `explorer`, BSD variants, etc.). On any target outside the supported cfg list, it falls through to this unconditional error: opening a browser is simply not implemented for that platform.","triggerScenarios":"Calling open_url on an OS not covered by the cfg blocks (e.g. Redox, Solaris/illumos, Haiku, or any unusual target), including cross-compiling the TUI for such a target and invoking the URL-open path.","commonSituations":"Running the TUI on exotic Unix variants or in environments compiled for an unsupported target; users on less common distros reporting that link-opening fails.","solutions":["Open the URL manually by copying it from the UI.","Add a cfg arm for your platform in browser_open_command (e.g. `xdg-open` for your Unix flavor) and rebuild.","Run the TUI on a supported platform (macOS, Windows, Linux, *BSD) where an opener is implemented."],"exampleFix":"// before\n// no arm for target_os = \"solaris\"\n// after\n#[cfg(target_os = \"solaris\")]\n{\n    let mut command = Command::new(\"xdg-open\");\n    command.arg(url);\n    return Ok(command);\n}","handlingStrategy":"fallback","validationCode":"const SUPPORTED: bool = cfg!(any(\n    target_os = \"macos\", target_os = \"linux\", target_os = \"windows\",\n    target_os = \"netbsd\", target_os = \"freebsd\", target_os = \"openbsd\",\n    target_os = \"dragonfly\"));\nif !SUPPORTED { eprintln!(\"copy the URL manually: {url}\"); }","typeGuard":null,"tryCatchPattern":"match open_url(url) {\n    Err(e) if e.to_string().contains(\"unsupported on this platform\") => {\n        eprintln!(\"copy this URL into a browser: {url}\");\n    }\n    Err(e) => report(e),\n    Ok(()) => {}\n}","preventionTips":["Check platform support before advertising clickable links in the UI.","Always display the URL text so manual opening is possible.","Contribute a cfg arm for your platform if it has an opener binary."],"tags":["platform","unsupported","browser"],"backgroundTag":"unsupported-platform","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}