-
Notifications
You must be signed in to change notification settings - Fork 31
feat: implement SPICE error handling and loading state in schematic viewer #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@Devesh36 is attempting to deploy a commit to the tscircuit Team on Vercel. A member of the Team first needs to authorize it. |
rushabhcodes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
imrishabh18
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apologies for inconvenience @imrishabh18 sirr |
imrishabh18
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be example fixtures for each of the cases of error which you are trying to handle
| error={spiceGenerationError} | ||
| onRetry={onRetry} | ||
| onCopyDetails={() => { | ||
| console.log("Error details copied to clipboard") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| console.log("Error details copied to clipboard") |
| onRetry={onRetry} | ||
| onCopyDetails={() => { | ||
| // Optional: show toast notification when copied | ||
| console.log("Error details copied to clipboard") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| console.log("Error details copied to clipboard") |
| ) | ||
| setIsLoading(false) | ||
| } | ||
| }, 10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the timeout configurable


This pull request introduces significant improvements to the SPICE simulation error handling and user experience in the schematic viewer. It adds a user-friendly error display component, a new loading state indicator, and enhances the retry logic for failed simulations. These changes make simulation errors much clearer and more actionable for users, and improve the overall UI responsiveness during simulation runs.
SPICE Simulation Error Handling and UI Improvements:
SpiceErrorDisplaycomponent that categorizes SPICE errors, provides user-friendly messages, suggestions, technical details, and actions such as retry and copy error details. This replaces the previous generic error display. [1] [2]SpiceErrorDisplayandLoadingStatecomponents into the simulation workflow, replacing plain text loading/error messages with more informative and visually appealing UI elements inSpicePlotandSpiceSimulationOverlay. [1] [2] [3]Retry Logic and Simulation State Management:
spiceRetryCounterstate and passing it to theuseSpiceSimulationhook, ensuring that retries trigger a new simulation run. [1] [2] [3] [4] [5]onRetryprop support to relevant components (SpicePlot,SpiceSimulationOverlay,SchematicViewer) to allow users to retry failed simulations directly from the UI. [1] [2] [3] [4] [5]New Components and Exports:
LoadingStateandSpiceErrorDisplaycomponents for use in other parts of the application or by consumers of the library. [1] [2]Miscellaneous UI and Code Quality Improvements:
type="button"to button elements and minor style/code cleanups. [1] [2] [3]These changes collectively provide a much better user experience when running and debugging SPICE simulations.

/fix #113