builds: jump to the failed command via #error hash or button - #750
Draft
ericholscher wants to merge 3 commits into
Draft
builds: jump to the failed command via #error hash or button#750ericholscher wants to merge 3 commits into
ericholscher wants to merge 3 commits into
Conversation
Drop the unconditional scroll on polling finish. Trigger via the #error URL hash (deep-linkable from GitHub PR comments) or a Jump to failed command button on the old-style error banner. https://claude.ai/code/session_01WMqzCHGaaGEfiUpT8bpZPR
humitos
reviewed
Jun 1, 2026
humitos
left a comment
Member
There was a problem hiding this comment.
I think this behavior makes sense to me.
| this.commands = ko.observableArray(build.commands); | ||
| /** @computed {Boolean} Does the build have at least one failed command? */ | ||
| this.has_failed_command = ko.computed(() => { | ||
| return this.commands().some((command) => command.exit_code() > 0); |
Member
There was a problem hiding this comment.
Suggested change
| return this.commands().some((command) => command.exit_code() > 0); | |
| return this.commands().some((command) => command.exit_code() !== 0); |
Member
There was a problem hiding this comment.
Also, should we consider 183 for skip builds as a special case here?
| */ | ||
| set_selected_line_from_first_failed_command() { | ||
| const failed_command = ko.utils.arrayFirst(this.commands(), (command) => { | ||
| return command.exit_code() > 0; |
Member
There was a problem hiding this comment.
Suggested change
| return command.exit_code() > 0; | |
| return command.exit_code() !== 0; |
Comment on lines
+218
to
+222
| <a class="ko hidden ui inverted basic small button" | ||
| data-bind="css: { hidden: !has_failed_command() }, click: set_selected_line_from_first_failed_command"> | ||
| <i class="fad fa-arrow-down icon"></i> | ||
| {% trans "Jump to failed command" %} | ||
| </a> |
Member
There was a problem hiding this comment.
Can you add a screenshot showing how this looks?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
When a build fails, give the user a way to jump to the failed command without scrolling through the log — but only when they ask for it.
The earlier version of this PR scrolled unconditionally when polling finished, which @agjohnson pointed out was jarring: loading any failed build dragged you to the bottom of a potentially very long page whether or not that's what you came for. The trigger now has to come from the user:
#errorURL hash — opening/.../builds/123/#errorresolves to the first failed command, expands it, and scrolls. Intended for deep-linking from GitHub PR comments.build.erroris set).Both routes go through
set_selected_lineso the existing KO view logic runs (per @agjohnson's earlier review on #745): expand the command, mark the line, scroll into view, update the URL hash.A synthetic build-error notification (for the case where the build failed but no notifications were attached) is a possible follow-up.
Generated by Claude Code.