@vizzly-testing/cli 0.29.0 → 0.29.1

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.
@@ -110,11 +110,27 @@ export async function buildsCommand(options = {}, globalOptions = {}, deps = {})
110
110
  for (let build of builds) {
111
111
  let statusColor = getStatusColor(colors, build.status);
112
112
  let statusBadge = statusColor(build.status.toUpperCase());
113
- output.print(` ${colors.bold(build.name || build.id)} ${statusBadge}`);
113
+
114
+ // Approval badge
115
+ let approvalBadge = '';
116
+ if (build.approval_status && build.status === 'completed') {
117
+ approvalBadge = ` ${getApprovalBadge(colors, build.approval_status)}`;
118
+ }
119
+ output.print(` ${colors.bold(build.name || build.id)} ${statusBadge}${approvalBadge}`);
114
120
  let details = [];
115
121
  if (build.branch) details.push(build.branch);
116
122
  if (build.commit_sha) details.push(build.commit_sha.substring(0, 7));
117
123
  if (build.screenshot_count) details.push(`${build.screenshot_count} screenshots`);
124
+
125
+ // Comparison counts summary
126
+ let compParts = [];
127
+ let changed = build.changed_comparisons || 0;
128
+ let identical = build.identical_comparisons || 0;
129
+ let newCount = build.new_comparisons || 0;
130
+ if (changed > 0) compParts.push(`${changed} changed`);
131
+ if (newCount > 0) compParts.push(`${newCount} new`);
132
+ if (identical > 0) compParts.push(`${identical} identical`);
133
+ if (compParts.length > 0) details.push(compParts.join(' · '));
118
134
  if (details.length > 0) {
119
135
  output.print(` ${colors.dim(details.join(' · '))}`);
120
136
  }
@@ -171,7 +187,7 @@ function formatBuildForJson(build, includeComparisons = false) {
171
187
  let hasHoneydiff = clusterMetadata || ssimScore != null || gmsdScore != null || fingerprintHash;
172
188
  return {
173
189
  id: c.id,
174
- name: c.name,
190
+ name: c.name || c.current_name,
175
191
  status: c.status,
176
192
  diffPercentage: c.diff_percentage,
177
193
  approvalStatus: c.approval_status,
@@ -236,8 +252,17 @@ function displayBuild(output, build, verbose) {
236
252
  output.blank();
237
253
  output.labelValue('Comparisons', '');
238
254
  for (let comp of build.comparisons.slice(0, verbose ? 50 : 10)) {
239
- let statusIcon = getComparisonStatusIcon(colors, comp.status);
240
- output.print(` ${statusIcon} ${comp.name}`);
255
+ let resultIcon = getComparisonStatusIcon(colors, comp.result || comp.status);
256
+ let compName = comp.name || comp.current_name || comp.id;
257
+ let diffInfo = '';
258
+ if (comp.diff_percentage > 0) {
259
+ diffInfo = colors.dim(` (${comp.diff_percentage.toFixed(2)}%)`);
260
+ }
261
+ let classification = '';
262
+ if (verbose && comp.cluster_metadata?.classification) {
263
+ classification = colors.dim(` [${comp.cluster_metadata.classification}]`);
264
+ }
265
+ output.print(` ${resultIcon} ${compName}${diffInfo}${classification}`);
241
266
  }
242
267
  if (build.comparisons.length > (verbose ? 50 : 10)) {
243
268
  output.hint(` ... and ${build.comparisons.length - (verbose ? 50 : 10)} more`);
@@ -262,6 +287,23 @@ function getStatusColor(colors, status) {
262
287
  }
263
288
  }
264
289
 
290
+ /**
291
+ * Get colored approval badge
292
+ */
293
+ function getApprovalBadge(colors, approvalStatus) {
294
+ switch (approvalStatus) {
295
+ case 'approved':
296
+ case 'auto_approved':
297
+ return colors.brand.success('APPROVED');
298
+ case 'rejected':
299
+ return colors.brand.error('REJECTED');
300
+ case 'pending':
301
+ return colors.brand.warning('PENDING');
302
+ default:
303
+ return colors.dim(approvalStatus?.toUpperCase() || '');
304
+ }
305
+ }
306
+
265
307
  /**
266
308
  * Get icon for comparison status
267
309
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly-testing/cli",
3
- "version": "0.29.0",
3
+ "version": "0.29.1",
4
4
  "description": "Visual review platform for UI developers and designers",
5
5
  "keywords": [
6
6
  "visual-testing",