Skip to content

✨ Enhancement: Add Visual Loading Spinners for Long-Running GDB Commands#128

Open
Jayant-kernel wants to merge 1 commit intoc2siorg:mainfrom
Jayant-kernel:feat/loading-spinners
Open

✨ Enhancement: Add Visual Loading Spinners for Long-Running GDB Commands#128
Jayant-kernel wants to merge 1 commit intoc2siorg:mainfrom
Jayant-kernel:feat/loading-spinners

Conversation

@Jayant-kernel
Copy link

✨ Enhancement: Add Visual "Loading" Spinners for Long-Running GDB Commands (#127)

This Pull Request fixes #127.

Description

Previously, when a user clicked any execution control button (Run, Reverse, Next) in the DebugHeader, the frontend immediately fired off the axios request to the GDB backend but provided zero visual feedback. This caused users to think the application was broken, resulting in them clicking the buttons multiple times and spamming the backend with duplicate GDB directives.

This PR solves the problem by introducing asynchronous UI state management during GDB executions.

  • Added a global isLoading boolean state to the root DataContext.jsx.

  • Wrapped the <TerminalComp /> Axios cycle with setIsLoading(true) on initialization and setIsLoading(false) on resolution or exception.

  • Updated DebugHeader.jsx to intercept clicks when isLoading === true, effectively disabling rapid presses.

  • Implemented a sleek, rotating <FaSpinner /> CSS animation that temporarily replaces the debug controls while the backend thinks, providing immediate, explicit feedback.


Additional context

cc: @charithccmc @Ammoniya ready for review!

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.

✨ Enhancement: Add Visual "Loading" Spinners for Long-Running GDB Commands

1 participant