Skip to content

fix: preserve catalog order when launching a lab - #43

Merged
xcoulon merged 2 commits into
codeready-toolchain:masterfrom
xcoulon:frontend-preserve-catalog-ordering
Oct 15, 2026
Merged

xcoulon merged 2 commits into
codeready-toolchain:masterfrom
xcoulon:frontend-preserve-catalog-ordering

Conversation

@xcoulon

@xcoulon xcoulon commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

The visibleRefs array was sorting entries with existing setups before
entries without, causing a launched lab to jump to the top of the list.
Now catalog order is preserved and only orphan setups are prepended.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Summary by CodeRabbit

  • Updates
    • Catalog entries now appear in filtered catalog order, with orphaned setup references listed first.
    • Cleanup lists preserve catalog order instead of prioritizing entries with existing setups.

The visibleRefs array was sorting entries with existing setups before
entries without, causing a launched lab to jump to the top of the list.
Now catalog order is preserved and only orphan setups are prepended.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 33adbcf2-5d09-4fac-8d01-f0576f076233
📥 Commits

Reviewing files that changed from the base of the PR and between 563226b and b40be33.

📒 Files selected for processing: 1
  • frontend/src/InteractiveLabsPage.tsx
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

💤 Files with no reviewable changes: 1
  • frontend/src/InteractiveLabsPage.tsx

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

⏰ Context from checks skipped due to timeout: 3
  • GitHub Check: Test
  • GitHub Check: Build Image
  • GitHub Check: Lint
🧰 Additional context used
🔀 Multi-repo context codeready-toolchain/toolchain-e2e

Linked repositories findings

codeready-toolchain/toolchain-e2e

  • The dashboard E2E suite checks product-card presence and launches the OpenShift card by text, but does not assert catalog/list ordering. The ordering change should not break these tests. [::codeready-toolchain/toolchain-e2e::] (test/e2e/devsandbox-dashboard/fresh_signup_test.go:117-119, performSignup)
  • No InteractiveLabs, visibleRefs, or lab-catalog references were found in the sibling E2E suite, so no paired E2E update is indicated by the existing tests. [::codeready-toolchain/toolchain-e2e::]

Walkthrough

The page now lists orphaned setup references before filtered catalog entries. Catalog entries retain their catalog order regardless of setup status. Tests cover regular rows and cleanup rows.

Changes

Catalog Row Ordering

Layer / File(s) Summary
Update visible row ordering
frontend/src/InteractiveLabsPage.tsx, frontend/src/InteractiveLabsPage.test.tsx
The page lists orphaned setup references before filtered catalog entries. Filtered catalog entries retain catalog order. Tests cover regular rows, orphan rows, and receipt-only cleanup rows.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested labels: bug, test

Merge Risk: ⚪ Minimal · up to b40be

This change keeps catalog entries in their catalog order when a lab is launched, so a launched lab no longer jumps to the top of the list. No merge-blocking risk was identified.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: preserving catalog order when launching a lab.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

@coderabbitai coderabbitai Bot added bug Something isn't working test labels Oct 15, 2026
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
@xcoulon
xcoulon merged commit 6e5ae58 into codeready-toolchain:master Oct 15, 2026
4 checks passed
@xcoulon
xcoulon deleted the frontend-preserve-catalog-ordering branch October 15, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants