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

Open Beginner friendly
#135 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, typescript
Domain
api, backend, frontend

Research direction

Read the three response branches in server/routes/workflow.py:591-596, 601-606, and 616-621, then compare their payloads with the standard session shape and WorkflowSessionState in web/src/api/types.ts:96-118. Check how WorkflowRunnerModal consumes the response in web/src; done when each named abort or skip branch returns a consistent session state, with relevant endpoint tests passing.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
1
Forks
1
Avg merge
4h 46m
Merged PRs (30d)
55

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from falbany/ProFiles

All issues in falbany/ProFiles

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.