Skip to content

feat: add report generation for assistant flows#210

Open
nic0laz wants to merge 1 commit intovxcontrol:masterfrom
nic0laz:feature/report-assistant-flows
Open

feat: add report generation for assistant flows#210
nic0laz wants to merge 1 commit intovxcontrol:masterfrom
nic0laz:feature/report-assistant-flows

Conversation

@nic0laz
Copy link

@nic0laz nic0laz commented Mar 16, 2026

Summary

Extend the report generator to support assistant-mode flows (chat-style flows without tasks). Previously the Report button was hidden for assistant flows, and generating a report showed only "No tasks available for this flow."

Backend

  • Add GraphQL query that returns all assistant logs for a flow across all its assistants, without requiring a specific
  • Implement resolver using existing + DB helpers
  • Regenerated gqlgen boilerplate ()

Frontend

  • ****: Extend with an optional parameter. When a flow has no tasks but has assistant logs, delegate to which formats / message pairs as readable Markdown sections
  • ****: Show the Report dropdown for all flows that have a flow object (not just task-based ones); pass from context into the report generator
  • ****: When a flow has no tasks, fetch all assistant logs via the new query. Supports both the inline Report dropdown and the standalone report page (including PDF download)
  • ****: Add query and generated Apollo hooks

Test plan

  • Task-based flow: Report button still appears and generates correct Markdown/PDF
  • Assistant flow: Report button now appears and generates a conversation-style report
  • Assistant flow web view (): Renders conversation correctly
  • Assistant flow PDF download: Generates valid PDF from conversation
  • Flow with no tasks and no assistant logs: Shows graceful empty state

Generated with Claude Code

Extend the report generator to support assistant-mode flows
(chat-style flows without tasks).

Backend:
- Add allAssistantLogs(flowId: ID!) GraphQL query that returns
  all assistant logs for a flow across all its assistants
- Implement resolver using existing DB helpers
- Regenerate gqlgen boilerplate

Frontend:
- report.ts: Extend generateReport() with optional
  assistantLogs parameter; add generateAssistantReport()
  that formats message/answer pairs as readable markdown
- flow.tsx: Show the Report dropdown for all flows (not just
  task-based ones); pass assistantLogs from FlowProvider
  context into the report generator
- flow-report.tsx: Fetch assistant logs via the new
  allAssistantLogs query when a flow has no tasks; pass
  them to generateReport() for the standalone report page
- types.ts: Add AllAssistantLogsDocument query and
  generated hooks for the new backend query

Before this change, clicking Report on an assistant flow
produced No tasks available for this flow and the Report
button was hidden entirely. Now it correctly renders the
conversation as a structured Markdown/PDF document.
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