feat: persist task lane user responses to backend
Add PUT /ai-sessions/{id}/task-lane endpoint that saves the full task
lane state (AI questions/actions + user's in-progress responses) to
the pending_task_lane JSONB column. TaskLane debounce-saves to the
backend every 2s after changes. On session load, user responses are
restored from the backend into sessionStorage so TaskLane picks them
up on mount. Users can now close the browser, come back later, and
find their task lane exactly where they left it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -110,6 +110,14 @@ export const aiSessionsApi = {
|
||||
return response.data
|
||||
},
|
||||
|
||||
async saveTaskLane(sessionId: string, data: {
|
||||
questions: Array<{ text: string; context?: string }>;
|
||||
actions: Array<{ label: string; command?: string | null; description?: string }>;
|
||||
responses: Array<Record<string, unknown>>;
|
||||
}): Promise<void> {
|
||||
await apiClient.put(`/ai-sessions/${sessionId}/task-lane`, data)
|
||||
},
|
||||
|
||||
async pauseSession(sessionId: string): Promise<void> {
|
||||
await apiClient.post(`/ai-sessions/${sessionId}/pause`)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user