kyd-shared-badge 0.3.66 → 0.3.68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kyd-shared-badge",
3
- "version": "0.3.66",
3
+ "version": "0.3.68",
4
4
  "private": false,
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -113,11 +113,11 @@ const SharedBadgeDisplay = ({ badgeData, chatProps, headless }: { badgeData: Pub
113
113
  const tabs = useMemo(() => {
114
114
  const arr = [
115
115
  { key: 'overview', label: 'Overview' },
116
- { key: 'resume', label: 'Resume' },
117
- { key: 'role', label: 'Role Fit & Coaching' },
118
116
  { key: 'technical', label: 'KYD Technical' },
119
117
  { key: 'risk', label: 'KYD Risk' },
120
118
  { key: 'ai', label: 'KYD AI' },
119
+ { key: 'role', label: 'Role Fit & Coaching' },
120
+ { key: 'resume', label: 'Resume' },
121
121
  { key: 'appendix', label: 'Appendix' }
122
122
  ];
123
123
  return arr;
@@ -185,14 +185,12 @@ const AppendixTables: React.FC<AppendixTableProps> = ({ type, sources, searchedA
185
185
  if (type !== 'business_rules') return;
186
186
  const key = sortableBusinessHeaders[header as keyof typeof sortableBusinessHeaders];
187
187
  if (!key) return;
188
- setSortBy(prev => {
189
- if (prev === key) {
190
- setSortDir(d => (d === 'asc' ? 'desc' : 'asc'));
191
- return prev;
192
- }
188
+ if (sortBy === key) {
189
+ setSortDir(d => (d === 'asc' ? 'desc' : 'asc'));
190
+ } else {
191
+ setSortBy(key);
193
192
  setSortDir('asc');
194
- return key;
195
- });
193
+ }
196
194
  };
197
195
 
198
196
  // Build quick lookup: category -> KYD Pillar (e.g., Technical or Risk)
@@ -69,7 +69,7 @@ export default function RiskCard({
69
69
  <div className="hidden group-hover:block absolute z-30 right-0 top-full mt-2 w-80">
70
70
  <div style={{ background: 'var(--content-card-background)', border: '1px solid var(--icon-button-secondary)', color: 'var(--text-main)', padding: 10, borderRadius: 6 }}>
71
71
  <div style={{ fontWeight: 600 }}>{title}</div>
72
- <div style={{ fontSize: 12, color: 'var(--text-secondary)' }}>Score: {pctGood}% (higher is better)</div>
72
+ <div style={{ fontSize: 12, color: 'var(--text-secondary)' }}>Score: {100 - pctGood}% (lower is better)</div>
73
73
  <div style={{ marginTop: 6, fontSize: 12, color: 'var(--text-secondary)' }}>{tooltipText || description}</div>
74
74
  </div>
75
75
  </div>
@@ -93,7 +93,7 @@ export default function RiskCard({
93
93
  <div className="hidden group-hover:block absolute z-30 left-1/2 -translate-x-1/2 top-full mt-2 w-80">
94
94
  <div style={{ background: 'var(--content-card-background)', border: '1px solid var(--icon-button-secondary)', color: 'var(--text-main)', padding: 10, borderRadius: 6 }}>
95
95
  <div style={{ fontWeight: 600 }}>{title}</div>
96
- <div style={{ fontSize: 12, color: 'var(--text-secondary)' }}>Score: {pctGood}% (higher is better)</div>
96
+ <div style={{ fontSize: 12, color: 'var(--text-secondary)' }}>Score: {100 - pctGood}% (lower is better)</div>
97
97
  <div style={{ marginTop: 8, fontSize: 12, color: 'var(--text-secondary)' }}>{tooltipText || description}</div>
98
98
  </div>
99
99
  </div>
package/src/types.ts CHANGED
@@ -49,6 +49,7 @@ export type User = {
49
49
  assessments: PublicBadgeData[];
50
50
  connectedAccounts?: { name: string; url: string | null; handle: string | null; observedAt?: string }[];
51
51
  userPendingRetryBadgeId?: string;
52
+ createdAt?: string;
52
53
  };
53
54
 
54
55
  export interface SummaryScore {
@@ -487,5 +488,9 @@ export interface AssessmentTimeseries {
487
488
  final_percent: TimeseriesPoint[];
488
489
  genres: Record<string, TimeseriesPoint[]>;
489
490
  categories: Record<string, TimeseriesPoint[]>;
491
+ // New: daily request counts aggregated from S3 request logs
492
+ online_activity?: TimeseriesPoint[];
493
+ // New: dynamic skills categories counts over time (per assessment date)
494
+ skills_categories?: Record<string, TimeseriesPoint[]>;
490
495
  }
491
496