Repository navigation
Conversation
fc48dc2 to
7464fc0
Compare
squashd
left a comment
There was a problem hiding this comment.
this looks awesome — tokyo night for the people!
mostly nits/suggestions, and one smol regression. i'm assuming the images will get removed 🙏
| fmt.Fprintln(&str, lipgloss.NewStyle().Bold(true).Render(context.LessonTitle)) | ||
| if context.BaseURL != "" { | ||
| fmt.Fprintf(&str, "%s %s\n", secondaryStyle.Render("Target:"), context.BaseURL) | ||
| } |
There was a problem hiding this comment.
Do you think we could add part of the override warning here? I like the simplification, just worried we'll have students who forgot they'd added an override
fmt.Printf("Using overridden base_url: %v\n", overrideBaseURL)
fmt.Printf("You can reset to the default with `bootdev config base_url --reset`\n\n")| heading := "Checks" | ||
| if isSubmit { | ||
| heading = "Checks not evaluated" | ||
| } |
| func printHTTPRequestResult(result api.HTTPRequestResult) string { | ||
| if result.Err != "" { | ||
| return fmt.Sprintf(" Err: %v\n\n", result.Err) | ||
| return fmt.Sprintf("%s\n%s\n", warningStyle.Render("Request error"), indentOutput(result.Err, 2)) |
There was a problem hiding this comment.
Is "Request" meant as the name of the step type? I wonder if this could make someone think they didn't get the request (but it waws their response that was malformed)
| if showAllDetails || (failed && m.finalized) { | ||
| dividerWidth := m.terminalWidth | ||
| if dividerWidth <= 0 { | ||
| dividerWidth = 80 | ||
| } |
| default: | ||
| return "" | ||
| } | ||
| expectedJSON, err := json.Marshal(expected) |
There was a problem hiding this comment.
clanker pointed out this would now be html-escaped
| if title == "Variables Missing" { | ||
| headingText = warningStyle.Render(title + ":") | ||
| } |
There was a problem hiding this comment.
nit: matching on the string feels iffy
| check := renderCheck(step, index, status) | ||
| check = renderStatus(status) + strings.TrimPrefix(check, status) | ||
| check = strings.ReplaceAll(check, "\n Expected:", "\n "+secondaryStyle.Render("Expected:")) | ||
| check = strings.ReplaceAll(check, "\n Actual:", "\n "+secondaryStyle.Render("Actual:")) | ||
| fmt.Fprintf(&str, "\n%s\n", indentOutput(check, 2)) |
There was a problem hiding this comment.
splitting on a string and reconstructing it for rendering feels a bit brittle. could it be set where it's built?


resolves bootdotdev/go-api-gate#8533.
Improve CLI output readability with numbered step headings, clearer grouping, and configurable colors.
--verbose.local-test --runfor previewing execution without grading.Color configuration
Colors can be configured through
bootdev config colorsor the config file.gray,red,green,magenta, andyellowtosecondary,fail,pass,accent, andwarning.header,subheader, andinformation.Existing color-name settings must be renamed to preserve custom colors.
Run — correct application
All 33 steps are displayed with commands, requests, and actual output, without checks or grading labels. Screenshots are browser-rendered captures of real local CLI output.
Full run output — correct application
Run — incorrect application
All 33 steps still appear. The changed checkout response is visible as output, but the run does not mark checks as passing or failing.
Full run output — incorrect application
Submit — passing checks
Passing — default
All 33 successful steps are summarized.
Passing — verbose
All 33 steps are expanded with checks, response bodies, and captured variables.
Full verbose submit output — all checks pass
Submit — failing check
Failing — default
Steps 1–15 remain compact. Step 16 expands to show the request and its expected/actual HTTP status, followed by the failure summary.
Failing — verbose
The successful steps, failing step, and later ungraded checks retain their detailed output. The final summary identifies step 16.
Full verbose submit output — failure at step 16