Skip to content

πŸ› fix: settle contribute version footer loading state - #10703

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
arteeh:fix/10682-version-footer
Oct 5, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v5from
arteeh:fix/10682-version-footer

Conversation

@arteeh

@arteeh arteeh commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

The Contribute footer could remain on loading... indefinitely when /api/version failed. The public contributor page requests an API that the hosted auth rules explicitly classify as private (TestContributorLandingFetchesAreExplicitlyClassifiedForSaaSPublicAuth), so visitors without dashboard access can reach this failure path. The exact response on the reported deployment has not been independently observed.

The footer now settles to β€œHive version unavailable” on HTTP, network, JSON, or payload errors, and after a ten-second deadline covering both headers and body parsing. The deadline aborts the request and prevents late responses from overwriting the fallback. Successful responses show the version and update status; missing update metadata is explicitly unavailable. API values render through textContent. The initial HTML also has an unavailable fallback if JavaScript cannot run.

Refs #10682. This has not shipped to the reported hosted deployment; reporter confirmation is still needed after deployment.

Validation: gofmt -l on changed Go files and git diff --check passed. Added a Node-backed Go regression test exercising the served footer function for success, access denial, server errors, malformed payloads, network errors, stalled headers/body, timeout cancellation, and late completion. Tests were not run locally per AGENTS.md; CI is the test authority.

β€” hive: backend=codex model=gpt-6-astra effort=medium


🐝 Hive Agent: contributor | SHA: 7bf61adcc

Handle inaccessible, invalid, and stalled version responses with a clear
unavailable state. Keep API access restrictions and render version as text.
Add browser-script regression coverage for success and failure paths.

Hive-Run: hivecommons#10682
Hive-Plan: contribute-version-footer
Hive-Spec: hivecommons#10682#expected-behavior
Signed-off-by: arteeh <arteeh@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 5, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read /api/version and the version plumbing, not just the diff. This looks correct to me, with one small visual regression worth a decision.

  • src/pkg/dashboard/api_version.go:30-34 β€” version is a constant and short comes from versionShort, which defaults to "unknown" (api.go:446) and is set from gitShort, itself defaulting to "unknown" (cmd/hive/main.go:176). So the new non-empty-string checks can never reject a real response.
  • behind is genuinely optional: api_version.go:112-124 only sets it when a cached upstream SHA exists, and :140-152 only when a target resolved. The old footer rendered that case as 🟒 "up to date", which was wrong; the new βšͺ "update status unavailable" is more honest. Good catch.
  • Timeout path: finish clears the timer and the settled flag stops a late success from overwriting the fallback; controller.abort() after finish means the rejected fetch lands in the catch β†’ finish no-op. Verified against the test's stalled-header and stalled-body cases.

Visual regression (low): the old code used innerHTML so "update available" was wrapped in <span style="color:var(--cc-amber)">. The new textContent path at the finish(dot+…) call drops that colour, so the amber "update available" cue is now plain muted text. If that highlight matters, build the status with a child span (or set el.innerHTML only for the static suffix and textContent on a span holding d.version/d.short). If the 🟑 dot is considered sufficient, this is fine as-is β€” maintainer's call.

Also: the diff fully fixes #10682, so Closes #10682 rather than Refs would keep the issue from lingering after merge.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#10716 πŸ› fix: Most effective models filters, run rates and local-registry labels same files src/pkg/dashboard/contribute_landing.go
#10701 πŸ› fix: keep ready-work end marker inside queue scroll area same files src/pkg/dashboard/contribute_landing.go
#10700 πŸ› fix: handle unexpected Hub decisions API responses same files src/pkg/dashboard/contribute_landing.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant