Skip to content

Display 'No Data' if the list is empty#393

Merged
albertcht merged 1 commit into
hypervel:0.3from
bluehaha:yushing/fix-loading
May 20, 2026
Merged

Display 'No Data' if the list is empty#393
albertcht merged 1 commit into
hypervel:0.3from
bluehaha:yushing/fix-loading

Conversation

@bluehaha
Copy link
Copy Markdown
Contributor

@bluehaha bluehaha commented May 20, 2026

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3306d488-ee0d-462a-974e-ecf1d1717811

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 20, 2026

Greptile Summary

This PR fixes a bug where the "no data" empty-state message was never shown when the Batches or Failed Jobs list was empty on first load. The root cause was an early return in the periodic-refresh handler that skipped setting ready = true, leaving the loading spinner visible indefinitely.

  • In both batches/index.vue and failedJobs/index.vue, this.ready = true is now set before the early return that fires when autoLoadsNewEntries is off, the call is a refresh, and the API returns an empty result set.
  • dist/app.js is updated to reflect the compiled output of the two source changes.

Confidence Score: 5/5

Safe to merge — the change is a minimal, targeted fix that resolves an indefinite loading spinner on empty lists without altering any other data-flow path.

Both source changes are identical one-liners that add a missing this.ready = true before an early return. The fix correctly targets the initial-poll scenario where ready was never flipped to true when the server returned an empty collection. No other logic is touched, and the same pattern is applied consistently across both affected components.

No files require special attention.

Important Files Changed

Filename Overview
src/horizon/resources/js/screens/batches/index.vue Adds this.ready = true before the early return when a refresh finds no batches, fixing an infinite loading spinner on first load with an empty list.
src/horizon/resources/js/screens/failedJobs/index.vue Same fix as batches: sets this.ready = true before early-returning when a refresh returns zero jobs, so the "There aren't any failed jobs." message is rendered instead of the loading spinner.
src/horizon/dist/app.js Compiled/minified build artifact updated to reflect the Vue source changes.

Reviews (1): Last reviewed commit: "fix: display 'No Data' if the list is em..." | Re-trigger Greptile

@albertcht albertcht merged commit 63fd9b3 into hypervel:0.3 May 20, 2026
9 checks passed
@albertcht albertcht added the bug Something isn't working label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants