Skip to content

feat [SCRUM-28]: implement PDF export with node selection and AI summary support#73

Merged
Dinuka-Nonis merged 15 commits into
developfrom
feature/scrum-28-export-pdf
Apr 20, 2026
Merged

feat [SCRUM-28]: implement PDF export with node selection and AI summary support#73
Dinuka-Nonis merged 15 commits into
developfrom
feature/scrum-28-export-pdf

Conversation

@Heshan1478

Copy link
Copy Markdown
Contributor

Summary

This PR implements the "Export as PDF" feature for the frontend. Users can now select specific chat nodes and export them as a structured PDF document, with optional inclusion of AI-generated summaries.


What Changed

PDF Export Implementation

  • Integrated PDF generation using html2canvas and jsPDF
  • Replaced previous html2pdf.js approach with a more flexible rendering method
  • Generates downloadable PDF file (collee-export-YYYY-MM-DD.pdf)

Node Selection Workflow

  • Introduced selection mode for exporting nodes
  • Users can:
    • Select multiple nodes
    • Include/exclude AI summaries per node
  • Automatically preselects the clicked node when export is initiated

UI Enhancements

  • Added node-level ⋯ menu in IdeaNode
    • Export as PDF (functional)
    • Export as Text (placeholder)
  • Added checkboxes for:
    • Node selection
    • AI summary inclusion (only when available)
  • Implemented click-outside behavior for menu

Sticky Action Bar

  • Displays during export selection mode
  • Includes:
    • "Select nodes to export" label
    • Cancel button
    • Export PDF button

Data Handling

  • Iterates selected nodes in canvas order
  • Includes:
    • Node title
    • Chat messages
    • AI summary section (if selected)

State Management

  • Centralized selection state in CanvasWorkspace
  • Clean exit handling:
    • Reset selection on cancel/export
    • Exit selection mode after export

🔗 SCRUM Ticket

https://forkly.atlassian.net/browse/SCRUM-28?atlOrigin=eyJpIjoiNjYwZjY0NDU4OGY3NGQzMjhiYWM4MjRkOTAyODA1MDgiLCJwIjoiaiJ9


Testing Steps

  1. Open the chat canvas
  2. Click ⋯ on any node
  3. Select "Export as PDF"
  4. Verify:
    • Selection mode is activated
    • Node is preselected
    • Summary checkbox appears if available
  5. Select multiple nodes
  6. Click "Export PDF"
  7. Confirm:
    • PDF downloads successfully
    • Contains correct nodes and content
  8. Click "Cancel" and ensure state resets correctly

Checklist

  • Code follows the project's style guidelines
  • Self-reviewed my own code
  • Added/updated comments where necessary
  • No new warnings or errors introduced
  • Tested locally with docker compose up --build
  • All CI checks pass

@Dinuka-Nonis
Dinuka-Nonis merged commit 2ff053a into develop Apr 20, 2026
12 checks passed
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.

3 participants