Skip to content

refactor(webui): inline deployment creation & rename schedule → deployment#58

Open
heimanba wants to merge 1 commit into
mainfrom
refactor/deployment-inline-create
Open

refactor(webui): inline deployment creation & rename schedule → deployment#58
heimanba wants to merge 1 commit into
mainfrom
refactor/deployment-inline-create

Conversation

@heimanba

Copy link
Copy Markdown
Contributor

改动概述

将定时任务创建从独立页面移到 Composer 内联弹窗,/deployments 路由变为纯管理页面。同时将所有 schedule 命名统一为 deployment

交互变化

操作
创建定时任务 点「定时」→ 跳转 /schedule 页面 → 填表单 点「定时」→ 弹出 Popover → 选时间 → 创建 → 引导前往管理页
管理定时任务 /schedule(创建+管理混合页) /deployments(纯管理:列表、暂停、运行、删除)

具体改动

  • DeploymentButton (原 ScheduleButton):创建表单内联为 Popover,自动从输入框取 prompt,自动生成任务名称
  • DeploymentCenter (原 ScheduleCenter):移除创建表单,只保留管理列表
  • 路由/schedule/deployments,TopBar 标签「定时」→「定时任务」
  • 全量重命名:组件、文件、CSS 类名、工具函数、类型名全部从 schedule 改为 deployment
  • Bug 修复
    • useId() 解决两个实例的重复 HTML id
    • try/catch/finally 防止 API 异常时按钮永久禁用
    • 移动端 popover 动画与 transform 居中冲突
  • 运行按钮改进:Play 图标 + 文字标签 + 所有操作按钮增加 hover tooltip

…yment

- Move deployment creation from /schedule page into an inline popover
  on the DeploymentButton, so users never leave the composer context
- /deployments route is now a pure management page (list, pause, run, delete)
- Rename all schedule references to deployment:
  - ScheduleButton → DeploymentButton, ScheduleCenter → DeploymentCenter
  - lib/schedule.ts → lib/deployment.ts, CSS schedule-* → deploy-*
  - Route /schedule → /deployments, TopBar label '定时' → '定时任务'
- Add success state with 'go to deployments' navigation after creation
- Improve run button: Play icon + label + hover tooltip on all actions
- Fix: useId() for unique form element ids (two instances in DOM)
- Fix: try/catch/finally on API calls to prevent stuck busy state
- Fix: mobile popover animation vs transform conflict

Change-Id: I99e7ae5bc3256fe558675aaa4fb6bb1d301c7854
Co-developed-by: OpenCode <noreply@opencode.ai>
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.

1 participant