fix(graph): improve text normalization in TeamGraphAdapter
- Enhanced text processing to clean up raw task ID hashes and replace pipe separators with dashes. - Ensured consistent formatting for comments and inbox messages.
This commit is contained in:
parent
828e8d3371
commit
8cf2d41568
1 changed files with 7 additions and 1 deletions
|
|
@ -886,7 +886,13 @@ export class TeamGraphAdapter {
|
||||||
kind: 'inbox' | 'comment',
|
kind: 'inbox' | 'comment',
|
||||||
max = 52
|
max = 52
|
||||||
): string | undefined {
|
): string | undefined {
|
||||||
const normalized = text?.replace(/\s+/g, ' ').trim();
|
let normalized = text?.replace(/\s+/g, ' ').trim();
|
||||||
|
// Clean up raw task ID hashes like "#363e78de done|sent to review" → "done | sent to review"
|
||||||
|
if (normalized) {
|
||||||
|
normalized = normalized.replace(/#[a-f0-9]{6,}\s*/gi, '').trim();
|
||||||
|
// Clean pipe separators
|
||||||
|
normalized = normalized.replace(/\|/g, ' - ');
|
||||||
|
}
|
||||||
const prefix = kind === 'comment' ? '\u{1F4AC}' : '\u{2709}';
|
const prefix = kind === 'comment' ? '\u{1F4AC}' : '\u{2709}';
|
||||||
if (!normalized) return prefix;
|
if (!normalized) return prefix;
|
||||||
const clipped =
|
const clipped =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue