Repository navigation
Todo
Labels
type: enhancement 💅🏼New feature or request
Description
Problem
The chat Home (#29) covers sending, streaming, the first start of the chat pod and a missing model. A person still loses a reply when the page reloads partway through, cannot get back to an earlier conversation, and sees too little when something fails.
Proposal
- Reconnecting: after a reload or a dropped connection during a reply, the chat shows what pi has written so far and follows the rest. This needs backend work, not just UI: the stream is tied to the request that sent the message, no route lets a new request follow a reply that is still running, and a second send gets 409
busy. Add a resume route to the bridge (internal/chatbridge) and the gateway (internal/gateway/chat). Also check what happens to pi's run when the browser disconnects partway through. - Past conversations: list them and reopen one, for example in a side panel on the chat Home.
GET /api/chat/conversationslists them newest first andGET /api/chat/conversations/{id}loads one, so this is UI work. - Errors: a refused model call, a rate limit, a pi process that died and a pod that failed to start each get a plain message and a way to try again. The routes already tell apart busy (409), too many conversations replying at once (429), pi failed (502), not running (409) and no app (404). A refused model call or a rate limit ends the stream with an
errorchunk carrying pi's message. - One chat app per person: Run pi behind a chat endpoint: RPC bridge in the pod and gateway routes #28 intended this, but nothing enforces it. The gateway uses the person's newest running chat app on each request, so a second app changes where requests go. Refuse a second chat app.
- Idle stop: a streaming reply counts as activity, so the pod is not stopped in the middle of one. The chat routes already mark the app as in use for the whole length of a stream; this is untested. A stopped pod starts again on the next message (Chat is Home, with the current Home moved to the Apps page #29), and the conversation is still there.
Out of scope
- Approvals, steering a running reply, attachments and a preview pane. Each waits on design.
Definition of done
- A reply longer than the idle limit finishes.
- Reloading in the middle of a reply shows the reply so far and its end.
- Following a running reply from a new request works through the gateway, with a test in the bridge and in the gateway.
- Each error above has a test and a message a person can act on.
- A person can reopen an earlier conversation.
- A person cannot create a second chat app.
- Docs: using chat, and what an admin must set up for it.
Metadata
Metadata
Assignees
Labels
type: enhancement 💅🏼New feature or request
Type
Fields
Priority
None yet
Start date
None yet
Target date
None yet
Size
None yet
Activity
[-]Chat: pod start, missing model, idle stop, reconnect and errors[/-][+]Chat: reconnect, past conversations, errors, idle stop and one app per person[/+]