Skip to content

Commit ad07758

Browse files
committed
Fix the app_url for notebooks
1 parent bc8bcd0 commit ad07758

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

rerun_py/src/python_bridge.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ fn version() -> String {
10961096

10971097
/// Get a url to an instance of the web-viewer
10981098
///
1099-
/// This may point to rerun.io/viewer or localhost depending on
1099+
/// This may point to app.rerun.io or localhost depending on
11001100
/// whether [`start_web_viewer_server()`] was called.
11011101
#[pyfunction]
11021102
fn get_app_url() -> String {
@@ -1106,13 +1106,16 @@ fn get_app_url() -> String {
11061106
}
11071107

11081108
let build_info = re_build_info::build_info!();
1109-
if let Some(short_git_hash) = build_info.git_hash.get(..7) {
1110-
format!("https://rerun.io/viewer/commit/{short_git_hash}")
1109+
1110+
if build_info.is_final() {
1111+
format!("https://app.rerun.io/version/{}", build_info.version)
1112+
} else if let Some(short_git_hash) = build_info.git_hash.get(..7) {
1113+
format!("https://app.rerun.io/commit/{short_git_hash}")
11111114
} else {
11121115
re_log::warn_once!(
1113-
"No valid git hash found in build info. Defaulting to rerun.io/viewer for app url."
1116+
"No valid git hash found in build info. Defaulting to app.rerun.io for app url."
11141117
);
1115-
"https://rerun.io/viewer".to_owned()
1118+
"https://app.rerun.io".to_owned()
11161119
}
11171120
}
11181121

0 commit comments

Comments
 (0)