Conversation
Policy PDFs stripped table formatting because neither the server-side (trust portal / all-policies bundle) nor the client-side (policy page Download as PDF) renderer handled Tiptap table/tableRow/tableCell/ tableHeader nodes. The server renderer fell through to a default case that rendered cells as stacked paragraphs; the client renderer had no default and dropped tables entirely. Adds a renderTable helper to both renderers that draws a jsPDF grid with borders, a shaded header row, cell padding, text wrapping, and colspan support. Includes unit tests covering header + data rows, colspan, and empty tables. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
File upload endpoints were rejecting valid Content-Type values like `application/pdf;charset=utf-8` or `application/pdf\n` with a 400 "Invalid MIME type format" error, because each DTO enforced the regex /^[a-zA-Z0-9\-]+\/[a-zA-Z0-9\-\+\.]+$/ with no trim or parameter strip. Extracts a shared `IsMimeTypeField` decorator (+ `normalizeMimeType` helper) that: - strips RFC 7231 media-type parameters (`;charset=...`) and whitespace - lowercases the value before validation and persistence - matches the RFC 6838 restricted-name-chars grammar Applied to all four upload DTOs: - attachments/upload-attachment.dto.ts - tasks/dto/upload-attachment.dto.ts - task-management/dto/upload-task-item-attachment.dto.ts - org-chart/dto/upload-org-chart.dto.ts Also removes dead `BLOCKED_MIME_TYPES` constants from two DTOs — the actual blocklist lives in `attachments.service.ts` and operates on the already-lowercased fileType. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…t (CS-166) After a user disconnects an integration (e.g. GitHub), tasks that were marked 'failed' by that connection's check runs stayed stuck on 'failed' forever, because nothing re-evaluates the task's automation state on disconnect. In addition, the task detail "App Automations" panel kept showing historical failed runs from the disconnected connection, and the 12-hour task-schedule job would re-mark done-then-overdue tasks as failed using those stale runs. Three changes, all reading-side filters + one re-evaluation on disconnect: 1. ConnectionService.disconnectConnection and deleteConnection now call reevaluateFailedTasksAfterDisconnect, which re-derives each affected failed task's target status from its remaining non-disconnected automations. Uses a local mirror of the scheduler's getTargetStatus. 2. CheckRunRepository.findByTask excludes runs from disconnected connections so the UI no longer counts stale "failed" history. 3. task-schedule.ts includes the same connection-status filter on its integrationCheckRuns include. Check run rows are preserved for audit trail (matching the existing soft-delete design for IntegrationConnection itself). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Follow-up to the CS-221 review: extractTextFromContent joins nested text nodes with no delimiter, so a cell containing two paragraphs (e.g. "Retention Period" and "30 days") rendered as the single concatenated string "Retention Period30 days". hardBreak nodes had the same problem. Adds an extractCellText helper to both renderers that joins top-level block children with \n and converts hardBreak to \n. splitTextToSize respects embedded newlines, so the cell wraps into separate visual rows. Regression test asserts the concatenated strings do NOT appear in the rendered PDF buffer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Expands extractCellText to treat bulletList / orderedList / listItem as line-break boundaries, not just top-level block children. Previously a cell whose only block was a bulletList with two items rendered as "AlphaBeta" because recursion concatenated listItem text with no delimiter. Now it renders as "Alpha\nBeta" and splitTextToSize wraps each item to its own visual line. Adds regression tests for: - bullet list items in a cell - cell text longer than the column width (wraps) - 50-row table that forces a mid-table page break - content following a table on the same page (yPosition advances) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
List items inside a cell were rendered as indistinguishable plain-text lines, because the cell extractor joined listItem children with \n but never prepended a marker. The top-level list renderer already uses "•" for bulletList and "1.", "2." for orderedList — the cell path now matches so a cell with a list reads as a list, not as unlabeled lines. Adds regression test asserting (a) each item's text is present, (b) the WinAnsi bullet byte (0x95, jsPDF's encoding of U+2022) appears in a bulletList cell, and (c) numbered prefixes appear in an orderedList cell. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(pdf): render Tiptap tables in policy PDF exports (CS-221)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Two follow-ups to cubic's review on PR #2577: 1. Make the latest-run-per-checkId selection in deriveTargetStatusForTask order-independent: compare run.createdAt instead of trusting the caller's orderBy. Matches the scheduler's getTargetStatus. 2. Wrap reevaluateFailedTasksAfterDisconnect in try/catch at both call sites (disconnectConnection, deleteConnection). The primary disconnect has already persisted by the time re-evaluation runs; a transient DB error during this best-effort cleanup must not surface to the caller. Adds regression tests: (a) reverse-sorted input still picks newest run per checkId, (b) disconnect resolves successfully even when the runs query throws. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…t-cleanup fix(integrations): clear stale task status after connection disconnect (CS-166)
…tion fix(api): accept MIME types with parameters or whitespace (CS-217)
Contributor
|
🎉 This PR is included in version 3.23.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.
Summary by cubic
Adds full Tiptap table support to policy PDF exports (CS-221), fixes stale task status after integration disconnects (CS-166), and accepts MIME types with parameters/whitespace in uploads (CS-217) to improve PDFs, task accuracy, and file upload UX.
tablenodes with borders, header fill, text wrapping, andcolspan; join paragraphs/hardBreaks with newlines and render list items in cells with bullet/number markers; handle long tables with correct row height and mid-table page breaks; added regression tests.checkId, best-effort); added tests and made re-eval order-independent and error-tolerant.IsMimeTypeFieldto strip parameters/whitespace, lowercase, and validate RFC 6838; applied to upload DTOs inattachments,tasks,task-management, andorg-chart; removed dead blocklists; added tests.Written for commit 0f2244f. Summary will update on new commits.