Skip to content

fix: stop a failed download pointing at a setting that cannot help - #128

Merged
yujiezhang-ops merged 1 commit into
mainfrom
fix/mirror-guidance
Aug 8, 2026
Merged

fix: stop a failed download pointing at a setting that cannot help#128
yujiezhang-ops merged 1 commit into
mainfrom
fix/mirror-guidance

Conversation

@yujiezhang-ops

Copy link
Copy Markdown
Collaborator

Fixes the actionable half of #116.

The mirror toggle is what a user reaches for when a runtime download fails — and it is the one thing that cannot change the outcome. downloadSources (internal/install/bootstrap.go:364-372) always returns both the official source and the mirror; the preference only reorders them. So by the time Cannot download Node.js 24.16.0 appears, both hosts have already been tried and failed.

Nothing said so. The user's path was: hunt for the collapsed advanced setting, toggle it, retry, fail again.

Download failures now carry that line explicitly. It is a separate export rather than another failureCopyFor branch because AGENT_INSTALL_FAILED also covers npm exit codes and installer launches, where the advice would be wrong — the caller knows which path it is on, the error code does not.

Also fixes the inconsistent treatment

RuntimePrompt rendered this class of failure as a bare <span class="runtime-prompt-error"> while RuntimeSection used notice notice-error for the identical thing (the second half of #116, and #121's item 9). Both are notices now.

.notice is a horizontal flex, so a notice carrying a hint needed a stacking rule. Scoped to :has(> small) so the other 12 notices keep the centred row they were built for.

I verified this in the browser rather than trusting the selector:

  • two-line notice → column, flex-start, gap: 4px
  • single-line notice → unchanged row, center
  • hint → 12px, rgb(110,110,115) — secondary grey, not inheriting the red alarm colour
  • MirrorSetting's <small> (nested inside a <span>) → correctly not matched, stays row

What #116 keeps open

The collapsed-by-default placement of the setting, and the fact that Aider's uv path is unaffected by the mirror with no in-app lever for a blocked network. Those are placement and coverage decisions rather than a wrong message.

Verification

  • 310 passed (41 files), 2 new
  • Reverting the notice change fails the new RuntimePrompt test
  • pnpm run build, pnpm run test:e2e (6 passed)

🤖 Generated with Claude Code

The mirror toggle is what a user reaches for when a runtime download fails, and
it is the one thing that cannot change the outcome: downloadSources
(internal/install/bootstrap.go:364-372) always tries both the official source
and the mirror, and the preference only reorders them. By the time "Cannot
download Node.js" appears, both hosts have already failed. Nothing said so, so
the user found out by toggling a collapsed advanced setting and retrying.

Download failures now carry that line. It is a separate export rather than
another failureCopyFor branch because AGENT_INSTALL_FAILED also covers npm
exits and installer launches, where the advice would be wrong -- the caller
knows which path it is on, the error code does not.

RuntimePrompt also rendered this class of failure as a bare styled span while
RuntimeSection used notice notice-error for the same thing. Both are notices
now, and .notice gained a rule so one carrying a hint stacks instead of laying
the message and the hint out side by side. Scoped to :has(> small) so the other
notices keep the centred row they were built for -- verified in the browser,
including that MirrorSetting's nested small is not caught by it.

Refs #116

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yujiezhang-ops
yujiezhang-ops merged commit a87cfe0 into main Aug 8, 2026
4 checks passed
@yujiezhang-ops
yujiezhang-ops deleted the fix/mirror-guidance branch August 8, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant