@link-assistant/hive-mind 1.23.3 → 1.23.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 1.23.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 28b7f22: Add code duplication detection with jscpd
8
+ - Add .jscpd.json configuration for JavaScript code duplication detection
9
+ - Add jscpd (^4.0.5) as devDependency
10
+ - Add npm script: `npm run check:duplication`
11
+ - Integrate code duplication check into CI workflow
12
+ - Set 11% threshold baseline (current codebase level)
13
+
14
+ ## 1.23.4
15
+
16
+ ### Patch Changes
17
+
18
+ - 22a1940: fix: display skip/fail reasons in merge queue Telegram messages (#1294)
19
+
20
+ Previously, when PRs were skipped or failed during merge queue processing, the Telegram message only showed the PR number without explaining why it was skipped. This left users unable to understand what action was required to resolve the issue.
21
+
22
+ Now the merge queue displays the reason for each skipped or failed PR in both:
23
+ - Progress messages (during processing)
24
+ - Final report messages (after completion)
25
+
26
+ Example output:
27
+
28
+ ```
29
+ Results:
30
+ ⏭️ #1241 (Issue #1240): PR has merge conflicts
31
+ ⏭️ #1257 (Issue #1256): PR has merge conflicts
32
+ ```
33
+
34
+ This change follows UX best practices for error messages by:
35
+ - Showing the specific reason for each failure
36
+ - Using clear, human-readable language
37
+ - Helping users understand what action is needed
38
+
3
39
  ## 1.23.3
4
40
 
5
41
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "1.23.3",
3
+ "version": "1.23.5",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -19,6 +19,7 @@
19
19
  "test:usage-limit": "node tests/test-usage-limit.mjs",
20
20
  "lint": "eslint 'src/**/*.{js,mjs,cjs}'",
21
21
  "lint:fix": "eslint 'src/**/*.{js,mjs,cjs}' --fix",
22
+ "check:duplication": "jscpd .",
22
23
  "format": "prettier --write \"**/*.{js,mjs,json,md}\"",
23
24
  "format:check": "prettier --check \"**/*.{js,mjs,json,md}\"",
24
25
  "changeset": "changeset",
@@ -59,6 +60,7 @@
59
60
  "eslint-config-prettier": "^10.1.8",
60
61
  "eslint-plugin-prettier": "^5.5.4",
61
62
  "husky": "^9.1.7",
63
+ "jscpd": "^4.0.5",
62
64
  "lint-staged": "^16.2.7",
63
65
  "prettier": "^3.6.2"
64
66
  },
@@ -462,15 +462,17 @@ export class MergeQueueProcessor {
462
462
  message += `${statusEmoji} ${update.current}\n\n`;
463
463
  }
464
464
 
465
- // Show errors/failures inline so user gets immediate feedback (Issue #1269)
466
- const failedItems = update.items.filter(item => item.status === MergeItemStatus.FAILED && item.error);
467
- if (failedItems.length > 0) {
468
- message += `⚠️ *Errors:*\n`;
469
- for (const item of failedItems.slice(0, 3)) {
470
- message += ` \\#${item.prNumber}: ${this.escapeMarkdown(item.error.substring(0, 60))}${item.error.length > 60 ? '...' : ''}\n`;
465
+ // Show errors/failures/skips inline so user gets immediate feedback (Issue #1269, #1294)
466
+ // Include both FAILED and SKIPPED items with their reasons
467
+ const problemItems = update.items.filter(item => (item.status === MergeItemStatus.FAILED || item.status === MergeItemStatus.SKIPPED) && item.error);
468
+ if (problemItems.length > 0) {
469
+ message += `⚠️ *Issues:*\n`;
470
+ for (const item of problemItems.slice(0, 5)) {
471
+ const statusEmoji = item.status === MergeItemStatus.FAILED ? '❌' : '⏭️';
472
+ message += ` ${statusEmoji} \\#${item.prNumber}: ${this.escapeMarkdown(item.error.substring(0, 50))}${item.error.length > 50 ? '...' : ''}\n`;
471
473
  }
472
- if (failedItems.length > 3) {
473
- message += ` _...and ${failedItems.length - 3} more errors_\n`;
474
+ if (problemItems.length > 5) {
475
+ message += ` _...and ${problemItems.length - 5} more issues_\n`;
474
476
  }
475
477
  message += '\n';
476
478
  }
@@ -538,7 +540,14 @@ export class MergeQueueProcessor {
538
540
  message += `*Results:*\n`;
539
541
  for (const item of report.items) {
540
542
  const issueRef = item.issueNumber ? ` \\(Issue \\#${item.issueNumber}\\)` : '';
541
- message += `${item.emoji} \\#${item.prNumber}${issueRef}\n`;
543
+ // Issue #1294: Show skip/fail reason so users understand what action is required
544
+ let reasonText = '';
545
+ if (item.error && (item.status === MergeItemStatus.SKIPPED || item.status === MergeItemStatus.FAILED)) {
546
+ // Truncate long reasons and escape for MarkdownV2
547
+ const truncatedReason = item.error.length > 50 ? item.error.substring(0, 47) + '...' : item.error;
548
+ reasonText = `: ${this.escapeMarkdown(truncatedReason)}`;
549
+ }
550
+ message += `${item.emoji} \\#${item.prNumber}${issueRef}${reasonText}\n`;
542
551
  }
543
552
  }
544
553