Skip to content

fix: show loading state when switching adaptor docs#4462

Open
elias-ba wants to merge 3 commits intomainfrom
fix/docs-panel-stale-on-adaptor-switch
Open

fix: show loading state when switching adaptor docs#4462
elias-ba wants to merge 3 commits intomainfrom
fix/docs-panel-stale-on-adaptor-switch

Conversation

@elias-ba
Copy link
Contributor

@elias-ba elias-ba commented Feb 25, 2026

Description

This PR fixes the docs panel showing stale content when switching a job's adaptor. The useDocs hook didn't reset its state to null (loading) when fetching a new uncached adaptor, so the previous adaptor's docs stayed visible until the new ones loaded.

Closes #4461

Validation steps

  1. Open a workflow and select a job
  2. Open the docs panel
  3. Change the job's adaptor to a different one
  4. Verify "Loading docs..." appears while the new docs are fetched

Additional notes for the reviewer

AI Usage

  • I have used Claude Code
  • I have used another model
  • I have not used AI

Pre-submission checklist

  • I have performed an AI review of my code (we recommend using /review with Claude Code)
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

The useDocs hook didn't reset docs state to null when fetching a new
uncached adaptor, so the panel showed stale docs from the previous
adaptor until the new ones loaded.
@theroinaochieng theroinaochieng requested review from theroinaochieng and removed request for taylordowns2000 February 26, 2026 08:31
Copy link
Collaborator

@josephjclark josephjclark left a comment

Choose a reason for hiding this comment

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

Great!

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.42%. Comparing base (dbd5f3f) to head (46d2395).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4462      +/-   ##
==========================================
- Coverage   89.47%   89.42%   -0.06%     
==========================================
  Files         425      425              
  Lines       20213    20213              
==========================================
- Hits        18086    18075      -11     
- Misses       2127     2138      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

Status: New Issues

Development

Successfully merging this pull request may close these issues.

Docs panel shows stale content when switching adaptors

2 participants