fix: ui state sync, curl escaping, SSR theme hydration, error boundary reset#611
Open
Markadrian6399 wants to merge 1 commit into
Open
fix: ui state sync, curl escaping, SSR theme hydration, error boundary reset#611Markadrian6399 wants to merge 1 commit into
Markadrian6399 wants to merge 1 commit into
Conversation
…heme, add resetKeys to error boundary - ApiRequestPanel: sync editableBody via useEffect when requestBody prop changes - ApiRequestPanel: escape double quotes in header values inside generateCurl - useTheme: initialise sysDark to false to prevent SSR/hydration mismatch - AnchorErrorBoundary: add resetKeys prop + getDerivedStateFromProps to auto-reset error state Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@Markadrian6399 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useEffectto reseteditableBodyand clear JSON validation errors when therequestBodyprop changes, fixing stale textarea content when switching between endpoints.generateCurlnow have"escaped to\"before interpolation, preventing syntactically invalid curl commands.sysDarknow initialises tofalse(server-safe) and is updated on the client insideuseEffect, eliminating the hydration mismatch that occurred when the server rendereddark=falsebut the client immediately switched todark=true.resetKeys?: unknown[]prop andgetDerivedStateFromPropslogic (standard React pattern) that automatically clears the caught error state when any key value changes, unblocking users stuck on the error screen after the parent swaps in a new component tree.Test plan
ApiRequestPanel— textarea should update to new body each time"toApiRequestPanel— generated curl should have\"and be validuseThemein an SSR environment (e.g. Next.js) — no hydration mismatch warning in consoleAnchorErrorBoundarywithresetKeys, then change a key value — error screen should clear automaticallycloses #508
closes #509
closes #510
closes #511