Skip to content

[Fix] Preserve stage accordion state and avoid UI flicker on tour mutation - #48

Merged
AnastasiaRakuta merged 1 commit into
devfrom
fix/stage-accordion-persistence
Oct 14, 2026
Merged

AnastasiaRakuta merged 1 commit into
devfrom
fix/stage-accordion-persistence

Conversation

@AnastasiaRakuta

@AnastasiaRakuta AnastasiaRakuta commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • User Experience
    • Competition stages now expand after a status change or successful form submission, making the updated stage easier to find.
    • Stage and tour updates refresh in the background while keeping existing content visible, reducing interruptions during routine changes.
    • Loading indicators appear when content is not yet available; existing stages and tours remain visible during refreshes.

@AnastasiaRakuta AnastasiaRakuta self-assigned this Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9eecc4b7-3095-442a-bbc7-19b9fe98e0bb
📥 Commits

Reviewing files that changed from the base of the PR and between fc75b58 and fc9868f.

📒 Files selected for processing: 3
  • src/pages/org/Competitions/components/CompetitionStagesSection.tsx
  • src/pages/org/Competitions/components/StageCard.tsx
  • src/pages/org/Competitions/components/StageToursSection.tsx

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

📝 Walkthrough

Competition stage and tour sections now refresh data silently after selected actions. Stage cards use expansion state managed by their parent, and loading indicators appear only when no existing content is available.

Changes: Competition sections

Layer / File(s) Summary
Stage tree loading and expansion
src/pages/org/Competitions/components/CompetitionStagesSection.tsx, src/pages/org/Competitions/components/StageCard.tsx
The section tracks expanded stage IDs and supports silent tree reloads. Status changes and successful form submissions expand the affected stage. StageCard receives its expansion state and toggle callback as props. The loading placeholder and disabled create button apply only when loading with no stages.
Tour refresh behavior
src/pages/org/Competitions/components/StageToursSection.tsx
Tour refreshes after status actions, form submissions, and reorder success are silent. The loading indicator appears only when loading with no tours.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to fc986

No actionable regression remains identified in the stage expansion or silent-refresh changes. The PR is mergeable after normal checks.

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 describes the main changes: preserving the stage accordion state and preventing UI flicker during tour mutations.
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 3…
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 docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sonarqubecloud

Copy link
Copy Markdown

@AnastasiaRakuta
AnastasiaRakuta merged commit 4fea7aa into dev Oct 14, 2026
4 checks passed
@AnastasiaRakuta
AnastasiaRakuta deleted the fix/stage-accordion-persistence branch October 14, 2026 10:01
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