INNER CODE UNIT · Go
openCmd
career-ops-hq/career-ops · dashboard/main.go:254
func openCmd(target string) tea.Cmd {
return func() tea.Msg {
if err := openWithDefaultApp(target); err != nil {
// Issue 3913: the dashboard runs with tea.WithAltScreen(), so a
// message on stderr is never visible. Report the failure back to
// the pipeline screen, which flashes it in the help bar.
return screens.PipelineOpenFailedMsg{Target: target, Err: err.Error()}
}
return nil
}
}
// runGeneratePDF shells out to node generate-pdf.mjs in the career-ops root,
// opens the resulting PDF on success, and reports the outcome back to the
// pipeline screen as a PipelinePDFGeneratedMsg. Runs in a tea.Cmd goroutine,
// so the UI stays responsive while Chromium renders.
func runGeneratePDF(msg screens.PipelineGeneratePDFMsg) tea.Cmd {
return func() tea.Msg {