Standardize status/error UX and API request structure (Step 3 & 4)#36
Merged
rad1092 merged 2 commits intoFeb 15, 2026
Merged
Conversation
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.
Motivation
error+error_detailJSON format.Description
bitnet_tools/ui/app.jsinto clear concerns and introduced a common fetch wrapperpostJson, a busy toggletoggleBusy, and unified error UI helpersshowError/clearErrorto propagateuserMessage+detailto the UI.intentinput andintentActionsregion, amodeGuidearea, an error display area with collapsible details inbitnet_tools/ui/index.html, and corresponding styles inbitnet_tools/ui/styles.css.postJsonandtoggleBusy, and status messages were centralized in theSTATUSconstant to standardize displayed status strings.Handler._error_payloadhelper inbitnet_tools/web.pyand updated POST/GET error returns to emit{ "error": <msg>, "error_detail": <detail> }so client and server share a stable error contract.Testing
pytest -qand all tests passed (26 passed).python -m bitnet_tools.cli ui --host 0.0.0.0 --port 8765and executed an automated Playwright smoke script that exercised the intent input and captured a screenshot atartifacts/ui-step3-4-standardized.png, which validated the new status/error UI and intent-action behavior.Codex Task