Fix/consolidate spinner components#13901
Open
Prithvi1994 wants to merge 2 commits intoOpenHands:mainfrom
Open
Conversation
…not\n\nThe `binaryornot` library uses byte-frequency heuristics to detect binary\nfiles. These heuristics incorrectly classify valid UTF-8 text files that\ncontain dense CJK (Chinese/Japanese/Korean) characters as binary, causing\n`OHEditor.view()` and `read()` to return `ERROR_BINARY_FILE` for perfectly\nreadable markdown and source files.\n\nFix: attempt a UTF-8 decode of the raw bytes before consulting `is_binary()`.\nIf the file decodes cleanly as UTF-8, it is definitively text regardless of\nwhat binaryornot reports. Only fall through to `is_binary()` when the UTF-8\ndecode raises `UnicodeDecodeError` (i.e. the file is genuinely not UTF-8 text).\n\nAffected call sites:\n- `openhands/runtime/action_execution_server.py` — `read()` method\n- `openhands/runtime/impl/cli/cli_runtime.py` — `read()` and `edit()` methods\n\nFixes OpenHands#13517\n
…component Replaces 12 different spinner implementations with a single reusable Spinner component supporting configurable sizes (xs, md, lg, xl) and optional label text. Fixes OpenHands#12550
b3eafd7 to
a60081c
Compare
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
Consolidates 12 different spinner/loading implementations across the frontend into a single reusable
Spinnercomponent.Problem
The frontend had 12 different spinner implementations using:
loader.tsx)animate-spin(loading-spinner.tsx)LoaderCircleicons (agent-loading.tsx,conversation-loading.tsx)@heroui/reactSpinner (branch/repo loading states, microagent)This created:
Solution
Created a unified
Spinnercomponent atsrc/components/shared/spinner.tsxsupporting:xs(h-3),sm(h-4),md(h-6),lg(h-8),xl(h-16)animate-spin rounded-full border-2 border-t-transparent border-primary)Migrated all 12 consumers to use the new component.
Files Changed
frontend/src/components/shared/spinner.tsxTypeScript
All type checks pass with no new errors.
Fixes #12550