server: workflow respond endpoint omits fields on abort/skip branches while TS types promise the full session state

Đang mở Phù hợp với người mới
#135 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, typescript
Lĩnh vực
api, backend, frontend

Hướng nghiên cứu

Đọc ba nhánh phản hồi trong server/routes/workflow.py:591-596, 601-606 và 616-621, rồi so sánh payload của chúng với cấu trúc phiên chuẩn và WorkflowSessionState trong web/src/api/types.ts:96-118. Kiểm tra cách WorkflowRunnerModal sử dụng phản hồi trong web/src; hoàn tất khi mỗi nhánh hủy hoặc bỏ qua được nêu đều trả về trạng thái phiên nhất quán và các bài kiểm thử endpoint liên quan đều đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Problem

Three response branches of POST /api/workflow/respond return only {session_id, status, final_message, steps} — omitting current_index, ask_prompt, ask_message, notify_message, notice_message, last_output, filename, pattern (server/routes/workflow.py:591-596, 601-606, 616-621):

  • "no" on a post-launch ask (returns status: "completed")
  • "no" abort pre-launch (status: "aborted")
  • "skip" of the final pre step (status: "completed")

The client declares the full WorkflowSessionState (web/src/api/types.ts:96-118) and WorkflowRunnerModal does setSession(next) then reads session.current_index in ~15 render paths (lines 315, 366, 380, 388, 466, 559…). Terminal status hides the gates today, so the blast radius is latent — but the step list loses its "current step" anchor, and any future read (e.g. last_output on the completed branch) silently gets undefined.

Suggested fix

Return the full standard shape from those three branches (they already have every field available); or narrow the TS type to a union with a terminal variant. The full-shape option is the smaller, safer change.

Ngôn ngữ chính
Python
Star
1
Fork
1
Merge trung bình
4 giờ 46 phút
Pull request đã merge (30 ngày)
55

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của falbany/ProFiles

Tất cả issue của falbany/ProFiles

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.