fix(jira): replace hand-rolled markdownToAdf with marklassian library for proper table support#556
Conversation
… for proper table support
|
⚙️ On it — checking the CI failures for feature/jira-adf-table-support Progress: [██░░░░░░░░] 24% (iteration 17/70) 🔧 CI Fix Update (1 min) I've identified that the CI failure is due to a transient npm registry error (403 Forbidden for Last updated: iteration 17 · respond-to-ci |
CI Failure AnalysisRoot CauseThe This occurred during the Local VerificationAll CI pipeline steps pass locally:
Action Taken
|
|
✨ On it — checking the feature/jira-adf-table-support branch Progress: [███░░░░░░░] 31% (iteration 22/70) 🔍 Code Review Update (1 min) Last updated: iteration 22 · review |
nhopeatall
left a comment
There was a problem hiding this comment.
LGTM — clean replacement of hand-rolled markdown→ADF converter with a well-scoped library, preserving the module boundary via re-export pattern.
What I verified:
marklassianreturnsAdfDocument(typed{ version: 1, type: "doc", content: AdfNode[] }) which is compatible with all existing callers that acceptunknown- The re-export from
src/pm/jira/adf.tsmeans all 6 callers (adapter, acknowledgments, caching, etc.) continue importing from the same path — no import changes needed markedv15.0.12 already in the lock file is compatible with marklassian's peer dep (^15.0.6 || ^16.0.0) — no duplicate installs- The
adfToPlainTexttable rendering correctly: iterates rows/cells inline, inserts| --- |separator after the first row, trims cell text, handles empty cells - All 36 tests pass, including roundtrip tests that exercise both directions
- CI green (lint, typecheck, unit tests, integration tests)
Summary
markdownToAdf()implementation insrc/pm/jira/adf.tswith a re-export from themarklassianlibrary, which correctly converts markdown tables (and other elements like links, strikethrough) to valid ADFadfToPlainText()withtable,tableRow,tableHeader, andtableCellnode handling so that ADF tables round-trip correctly to markdown table formattests/unit/pm/jira/adf.test.tsto cover table conversion, link marks, and round-trip scenariosProblem
Markdown tables in Jira comments were rendering as raw ASCII instead of formatted tables. The previous hand-rolled
markdownToAdf()had no table or link handling — table syntax fell through to a paragraph node and was sent to Jira verbatim.Test plan
adf.test.tstests pass (including new table, link, and roundtrip tests)adapter.test.tstests pass (no regressions)Card
https://trello.com/c/699f3d7117b9248cd60bd189
🤖 Generated with Claude Code