platform icon indicating copy to clipboard operation
platform copied to clipboard

feat(chunter): render chat markdown and tracker links

Open ignatremizov opened this issue 6 months ago • 1 comments

Summary

This PR updates chat message display so plain-text messages with markdown-like content render with the existing markdown parser instead of showing raw syntax. The conversion is limited to plain markup; existing rich editor markup is returned unchanged so stored formatting remains compatible.

It also linkifies standalone tracker issue identifiers such as APP-123 to the current workspace tracker route. The linkification preserves the text users typed, normalizes the identifier only for the link target/title, and skips existing links, inline code, branch-name fragments, and full URLs to avoid noisy false positives.

Testing

  • node common/scripts/install-run-rush.js update --recheck
  • ./node_modules/.bin/jest src/__tests__/markdown.test.ts --config jest.config.js --runInBand from plugins/chunter-resources
  • ./node_modules/.bin/eslint src/markdown.ts src/__tests__/markdown.test.ts from plugins/chunter-resources
  • git diff --check
  • node common/scripts/install-run-rush.js build --to @hcengineering/chunter-resources

Notes

  • Existing rich editor markup is not reparsed, which avoids changing already-structured chat content.
  • Plain text without markdown-like syntax or tracker issue identifiers remains unchanged.
  • Checklist markdown is normalized into ordinary list items with visible [x] or [ ] markers because the message viewer does not render task-list nodes in this display path.
  • Tracker links are generated from the browser location for the current workspace. In non-browser contexts, identifiers remain unlinked.
  • The new direct dependency is limited to @hcengineering/text-markdown for @hcengineering/chunter-resources, with matching Rush lockfile metadata.

ignatremizov avatar May 25 '26 15:05 ignatremizov

Connected to Huly®: UBERF-16478

huly-github-staging avatar May 25 '26 15:05 huly-github-staging