[Enhancement] Implement Dynamic Loading States and Inline Validation for Model Configuration Forms

未关闭
#235 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@bnyashwanth 已经在做这个了。

开始于 2026年1月16日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
react
领域
frontend

调研方向

首先定位配置 UI、其中的 Submit 或 Run 按钮、数值参数字段,以及它们触发的异步 API 调用。通过检查已禁用的按钮和加载指示器、针对超出范围值的即时验证消息,以及响应返回后的成功或失败通知,手动验证这项工作。

由索引模型根据 Issue 内容生成。

描述

Issue Description

Description

Currently, the user interface for configuring and submitting AI model parameters lacks sufficient visual feedback. When a user submits a configuration or inputs data, there is a lack of real-time validation and no "loading" indicator during asynchronous API calls.
This can lead to a confusing user experience, duplicate submissions, and uncertainty regarding whether a process is running.


Impact

Providing immediate visual feedback ensures that the application feels responsive and professional.
It prevents users from making input errors before submission and stops "double-submission" bugs by disabling buttons during the loading state.


Proposed Changes

I propose adding a robust feedback loop to the configuration UI:

  • Button Loading States: * Update the "Submit" or "Run" buttons to display a spinner and become disabled once clicked.
    Revert to the active state only after a response (Success/Error) is received from the backend.
  • Inline Form Validation: * Add real-time validation for numerical inputs (e.g., Learning Rate must be between 0 and 1).
  • Highlight fields in red with a brief error message if the input is invalid.
  • Toast Notifications: * Implement "Success" or "Failure" toast notifications (snackbars) to confirm that a background task has started or failed.

Technical Implementation Suggestion
  • Introduce an isLoading state variable to manage the UI transition during API calls.
  • Use conditional rendering for the button content: {isLoading ? : 'Run Model'}.
  • (If applicable) Integrate a lightweight notification library like react-hot-toast or use the project's existing UI framework components.

Verification Plan
  • Manual Test: Click the submit button and verify it becomes disabled and shows a spinner.
  • Validation Test: Enter an out-of-range value in a parameter field and verify the error message appears immediately.
  • Network Test: Simulate a slow network connection to ensure the loading state persists until the data is returned.
主要语言
Python
星标
103
派生
143
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

AOSSIE-Org/Devr.AI 的其他 Issue

查看 AOSSIE-Org/Devr.AI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。