Skip to content

[Jamie] Fix RecursionCard: ScoreBadge hardcoded loading/error, displayLatest fallback, canExpand fallback - #5136

Open
pitoi wants to merge 2 commits into
masterfrom
swarm/swarm-change-1358dacf
Open

[Jamie] Fix RecursionCard: ScoreBadge hardcoded loading/error, displayLatest fallback, canExpand fallback#5136
pitoi wants to merge 2 commits into
masterfrom
swarm/swarm-change-1358dacf

Conversation

@pitoi

@pitoi pitoi commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Fixes 22 failing unit tests in RecursionBox.test.tsx. Three bugs in the deferred-fetch refactor:

  1. ScoreBadge is called with hardcoded isLoading={false} / error={null} — making score-loading and score-error unreachable.
  2. displayLatest uses summaryLatest unconditionally while collapsed, ignoring hook data — cards show "no runs yet" when entry.latestRun isn't set.
  3. canExpand ignores rawAttempts.length while collapsed — expand toggle never appears when fixChainDepth/latestRun aren't set but hook data is available.

…yLatest fallback, canExpand fallback

Fixes 22 failing unit tests in `RecursionBox.test.tsx`. Three bugs in the deferred-fetch refactor:

1. `ScoreBadge` is called with hardcoded `isLoading={false}` / `error={null}` — making `score-loading` and `score-error` unreachable.
2. `displayLatest` uses `summaryLatest` unconditionally while collapsed, ignoring hook data — cards show "no runs yet" when `entry.latestRun` isn't set.
3. `canExpand` ignores `rawAttempts.length` while collapsed — expand toggle never appears when `fixChainDepth`/`latestRun` aren't set but hook data is available.
@pitoi pitoi added the jamie Automated PR opened by Jamie label Aug 23, 2026 — with Hive Chat PM
…ist hook to pass correct arguments and stabilize fetch calls in tests
@pitoi pitoi added the system label Aug 23, 2026 — with Hive Chat PM
@github-actions

Copy link
Copy Markdown

Test environment is now live.

View it at: https://hive-preview-7.sphinx.chat

Database expires at: Aug 23, 2026, 7:50 AM UTC

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

Labels

jamie Automated PR opened by Jamie system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant