terminal user interface to jujutsu. Focused on speed and clarity
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

Catch errors that occur when rendering the status (this mostly happens immidiately after removing a commit)

+19 -10
+19 -10
jj_tui/bin/show_view.ml
··· 9 9 10 10 let statusStream = Stream.create () 11 11 let lastMessage = ref None 12 - let push_status status = 13 - lastMessage:=Some status; 12 + 13 + let push_status status = 14 + lastMessage := Some status; 14 15 Stream.push statusStream status 16 + ;; 15 17 16 18 (** pushes the last message to the queue again to re-render everything *) 17 19 let re_render () = !lastMessage |> Option.iter push_status ··· 61 63 Promise.terminate_after ~seconds:0. !current_computation; 62 64 current_computation 63 65 := Flock.fork_as_promise (fun () -> 64 - [%log debug "Rendering status view with: %a" pp_status_state msg]; 65 - viewState 66 - $= 67 - match msg with 68 - | File_preview (rev, file) -> 69 - render_file_preview (rev, file) 70 - | Graph_preview rev -> 71 - render_graph_preview rev) 66 + try 67 + [%log debug "Rendering status view with: %a" pp_status_state msg]; 68 + viewState 69 + $= 70 + match msg with 71 + | File_preview (rev, file) -> 72 + render_file_preview (rev, file) 73 + | Graph_preview rev -> 74 + render_graph_preview rev 75 + with 76 + | _ -> 77 + [%log 78 + warn 79 + "preview render failed. If this happens once it's probably just because \ 80 + a node was deleted. If it keeps happening and the user can't see anything, obviously this is important"]) 72 81 done 73 82 ;; 74 83