feat(chunter): render chat markdown and tracker links#10888
Open
ignatremizov wants to merge 1 commit into
Open
feat(chunter): render chat markdown and tracker links#10888ignatremizov wants to merge 1 commit into
ignatremizov wants to merge 1 commit into
Conversation
Parse plain-text chat messages through the existing markdown parser when they contain markdown-like syntax, then link standalone tracker issue identifiers to the current workspace tracker route. Existing rich editor markup remains unchanged so stored formatting is preserved. Changes: - Add a chunter-resources display-markup helper that detects plain markup, parses markdown-like content, and normalizes checklist nodes into visible list markers for message display. - Link standalone tracker issue identifiers with dynamic prefixes while preserving typed text and normalizing link targets. - Avoid linkification inside existing links, inline code, branch-name fragments, and full URLs to reduce false positives. - Apply the helper in ChatMessagePresenter for original and translated messages. - Add focused Jest coverage for markdown parsing, rich-markup passthrough, checklist preservation, tracker links, and false-positive suppression. - Add @hcengineering/text-markdown as a direct chunter-resources workspace dependency with matching Rush lockfile metadata. Validation: - ./node_modules/.bin/jest src/__tests__/markdown.test.ts --config jest.config.js --runInBand - ./node_modules/.bin/eslint src/markdown.ts src/__tests__/markdown.test.ts - git diff --check - node common/scripts/install-run-rush.js build --to @hcengineering/chunter-resources Signed-off-by: Ignat Remizov <ignat@ignatremizov.com>
|
Connected to Huly®: UBERF-16478 |
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.
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-123to 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 --runInBandfromplugins/chunter-resources./node_modules/.bin/eslint src/markdown.ts src/__tests__/markdown.test.tsfromplugins/chunter-resourcesgit diff --checknode common/scripts/install-run-rush.js build --to @hcengineering/chunter-resourcesNotes
[x]or[ ]markers because the message viewer does not render task-list nodes in this display path.@hcengineering/text-markdownfor@hcengineering/chunter-resources, with matching Rush lockfile metadata.