claude-code-templates 1.20.1 → 1.20.3

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.
@@ -244,6 +244,33 @@ class DashboardPage {
244
244
  </div>
245
245
  </div>
246
246
 
247
+ <!-- Activity Heatmap Section -->
248
+ <div class="activity-heatmap-section">
249
+ <div class="section-title">
250
+ <h2 id="activity-total">Loading activity...</h2>
251
+ <div class="heatmap-settings" style="position: relative;">
252
+ <span class="heatmap-settings-text">Activity settings</span>
253
+ <span class="heatmap-settings-icon">⚙️</span>
254
+ <div class="heatmap-settings-dropdown" id="heatmap-settings-dropdown">
255
+ <div class="heatmap-setting-group">
256
+ <label class="heatmap-setting-label">Activity Metric</label>
257
+ <div class="heatmap-metric-selector">
258
+ <div class="heatmap-metric-option messages active" data-metric="messages">
259
+ Messages
260
+ </div>
261
+ <div class="heatmap-metric-option tools" data-metric="tools">
262
+ Tools
263
+ </div>
264
+ </div>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ <div id="activity-heatmap-container">
270
+ <!-- ActivityHeatmap component will be mounted here -->
271
+ </div>
272
+ </div>
273
+
247
274
  <!-- Session Timer Section -->
248
275
  <div class="session-timer-section">
249
276
  <div class="section-title">
@@ -412,6 +439,28 @@ class DashboardPage {
412
439
  }
413
440
  }
414
441
 
442
+ // Initialize ActivityHeatmap if available
443
+ const activityHeatmapContainer = this.container.querySelector('#activity-heatmap-container');
444
+ if (activityHeatmapContainer && typeof ActivityHeatmap !== 'undefined') {
445
+ try {
446
+ this.components.activityHeatmap = new ActivityHeatmap(
447
+ activityHeatmapContainer,
448
+ this.dataService
449
+ );
450
+ await this.components.activityHeatmap.initialize();
451
+ } catch (error) {
452
+ console.warn('ActivityHeatmap initialization failed:', error);
453
+ // Show fallback content
454
+ activityHeatmapContainer.innerHTML = `
455
+ <div class="heatmap-empty-state">
456
+ <div class="heatmap-empty-icon">📊</div>
457
+ <div class="heatmap-empty-text">Activity heatmap not available</div>
458
+ <div class="heatmap-empty-subtext">Please try refreshing the page</div>
459
+ </div>
460
+ `;
461
+ }
462
+ }
463
+
415
464
  // Initialize Charts with data if available
416
465
  await this.initializeChartsAsync();
417
466
 
@@ -950,6 +999,11 @@ class DashboardPage {
950
999
  try {
951
1000
  this.dataService.clearCache();
952
1001
  await this.loadInitialData();
1002
+
1003
+ // Refresh heatmap if available
1004
+ if (this.components.activityHeatmap) {
1005
+ await this.components.activityHeatmap.refresh();
1006
+ }
953
1007
  } catch (error) {
954
1008
  console.error('Error refreshing data:', error);
955
1009
  this.stateService.setError('Failed to refresh data');
@@ -15,12 +15,12 @@
15
15
  <script src="components/HeaderComponent.js"></script>
16
16
  <script src="components/Charts.js"></script>
17
17
  <!-- Dashboard.js removed - deprecated architecture -->
18
+ <script src="components/ActivityHeatmap.js"></script>
18
19
  <script src="components/SessionTimer.js"></script>
19
20
  <script src="components/ConversationTable.js"></script>
20
21
  <script src="components/ToolDisplay.js"></script>
21
22
  <script src="components/Sidebar.js"></script>
22
23
  <script src="components/DashboardPage.js"></script>
23
- <script src="components/AgentsPage.js"></script>
24
24
  <script src="components/App.js"></script>
25
25
 
26
26
  <!-- main.js removed - deprecated architecture -->
@@ -7850,6 +7850,476 @@
7850
7850
  }
7851
7851
  }
7852
7852
 
7853
+ /* Activity Heatmap Styles */
7854
+ .activity-heatmap-section {
7855
+ margin: 24px 0;
7856
+ }
7857
+
7858
+ .activity-heatmap-section .section-title {
7859
+ display: flex;
7860
+ justify-content: space-between;
7861
+ align-items: center;
7862
+ margin-bottom: 20px;
7863
+ padding-bottom: 12px;
7864
+ border-bottom: 1px solid var(--border-primary);
7865
+ }
7866
+
7867
+ .activity-heatmap-section .section-title h2 {
7868
+ color: var(--text-primary);
7869
+ font-size: 1.1rem;
7870
+ margin: 0;
7871
+ font-weight: 600;
7872
+ letter-spacing: -0.01em;
7873
+ }
7874
+
7875
+ .heatmap-settings {
7876
+ display: flex;
7877
+ align-items: center;
7878
+ gap: 6px;
7879
+ color: var(--text-secondary);
7880
+ font-size: 0.8rem;
7881
+ cursor: pointer;
7882
+ padding: 6px 10px;
7883
+ border-radius: 6px;
7884
+ transition: all 0.2s ease;
7885
+ border: 1px solid transparent;
7886
+ }
7887
+
7888
+ .heatmap-settings:hover {
7889
+ background: var(--bg-tertiary);
7890
+ color: var(--text-primary);
7891
+ border-color: var(--border-primary);
7892
+ }
7893
+
7894
+ .heatmap-settings-icon {
7895
+ font-size: 0.7rem;
7896
+ opacity: 0.8;
7897
+ }
7898
+
7899
+ .heatmap-settings-dropdown {
7900
+ position: absolute;
7901
+ top: 100%;
7902
+ right: 0;
7903
+ background: var(--bg-primary);
7904
+ border: 1px solid var(--border-primary);
7905
+ border-radius: 6px;
7906
+ box-shadow: 0 8px 24px rgba(1, 4, 9, 0.7);
7907
+ padding: 12px;
7908
+ z-index: 1000;
7909
+ min-width: 200px;
7910
+ display: none;
7911
+ }
7912
+
7913
+ .heatmap-settings-dropdown.show {
7914
+ display: block;
7915
+ }
7916
+
7917
+ .heatmap-setting-group {
7918
+ margin-bottom: 12px;
7919
+ }
7920
+
7921
+ .heatmap-setting-group:last-child {
7922
+ margin-bottom: 0;
7923
+ }
7924
+
7925
+ .heatmap-setting-label {
7926
+ color: var(--text-primary);
7927
+ font-size: 0.75rem;
7928
+ font-weight: 500;
7929
+ margin-bottom: 6px;
7930
+ display: block;
7931
+ }
7932
+
7933
+ .heatmap-metric-selector {
7934
+ display: flex;
7935
+ gap: 8px;
7936
+ }
7937
+
7938
+ .heatmap-metric-option {
7939
+ flex: 1;
7940
+ padding: 6px 10px;
7941
+ background: var(--bg-secondary);
7942
+ border: 1px solid var(--border-primary);
7943
+ border-radius: 4px;
7944
+ font-size: 0.75rem;
7945
+ cursor: pointer;
7946
+ text-align: center;
7947
+ transition: all 0.2s ease;
7948
+ color: var(--text-secondary);
7949
+ }
7950
+
7951
+ .heatmap-metric-option:hover {
7952
+ border-color: var(--text-accent);
7953
+ color: var(--text-primary);
7954
+ }
7955
+
7956
+ .heatmap-metric-option.active {
7957
+ background: var(--text-accent);
7958
+ border-color: var(--text-accent);
7959
+ color: #000;
7960
+ font-weight: 500;
7961
+ }
7962
+
7963
+ .heatmap-metric-option.messages.active {
7964
+ background: rgb(249, 115, 22);
7965
+ border-color: rgb(249, 115, 22);
7966
+ }
7967
+
7968
+ .heatmap-metric-option.tools.active {
7969
+ background: rgb(147, 51, 234);
7970
+ border-color: rgb(147, 51, 234);
7971
+ }
7972
+
7973
+ .activity-heatmap-container {
7974
+ background: var(--bg-secondary);
7975
+ border: 1px solid var(--border-primary);
7976
+ border-radius: 8px;
7977
+ padding: 24px;
7978
+ overflow: hidden;
7979
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
7980
+ }
7981
+
7982
+ .heatmap-header {
7983
+ display: flex;
7984
+ justify-content: flex-end;
7985
+ align-items: center;
7986
+ margin-bottom: 20px;
7987
+ }
7988
+
7989
+ .heatmap-legend {
7990
+ display: flex;
7991
+ align-items: center;
7992
+ gap: 10px;
7993
+ font-size: 0.8rem;
7994
+ color: var(--text-secondary);
7995
+ }
7996
+
7997
+ .heatmap-legend-text {
7998
+ margin-right: 2px;
7999
+ font-weight: 500;
8000
+ }
8001
+
8002
+ .heatmap-legend-scale {
8003
+ display: flex;
8004
+ gap: 3px;
8005
+ }
8006
+
8007
+ .heatmap-legend-square {
8008
+ width: 11px;
8009
+ height: 11px;
8010
+ border-radius: 3px;
8011
+ border: 1px solid var(--border-secondary);
8012
+ transition: all 0.2s ease;
8013
+ }
8014
+
8015
+ .heatmap-legend-square:hover {
8016
+ border-color: var(--text-accent);
8017
+ transform: scale(1.1);
8018
+ }
8019
+
8020
+ .heatmap-legend-square.level-0 {
8021
+ background: #21262d;
8022
+ }
8023
+
8024
+ .heatmap-legend-square.level-1 {
8025
+ background: rgba(249, 115, 22, 0.25);
8026
+ }
8027
+
8028
+ .heatmap-legend-square.level-2 {
8029
+ background: rgba(249, 115, 22, 0.45);
8030
+ }
8031
+
8032
+ .heatmap-legend-square.level-3 {
8033
+ background: rgba(249, 115, 22, 0.65);
8034
+ }
8035
+
8036
+ .heatmap-legend-square.level-4 {
8037
+ background: rgb(249, 115, 22);
8038
+ }
8039
+
8040
+ .heatmap-legend-more {
8041
+ margin-left: 2px;
8042
+ font-weight: 500;
8043
+ }
8044
+
8045
+ .heatmap-grid {
8046
+ display: grid;
8047
+ grid-template-columns: auto 1fr;
8048
+ gap: 12px;
8049
+ align-items: start;
8050
+ width: 100%;
8051
+ }
8052
+
8053
+ .heatmap-months {
8054
+ position: relative;
8055
+ height: 16px;
8056
+ font-size: 0.75rem;
8057
+ color: var(--text-secondary);
8058
+ margin-bottom: 8px;
8059
+ grid-column: 2;
8060
+ font-weight: 500;
8061
+ }
8062
+
8063
+ .heatmap-month {
8064
+ position: absolute;
8065
+ top: 0;
8066
+ text-align: left;
8067
+ white-space: nowrap;
8068
+ overflow: visible;
8069
+ }
8070
+
8071
+ .heatmap-weekdays {
8072
+ display: grid;
8073
+ grid-template-rows: repeat(7, 1fr);
8074
+ gap: 3px;
8075
+ font-size: 0.75rem;
8076
+ color: var(--text-secondary);
8077
+ align-self: start;
8078
+ padding-top: 22px;
8079
+ font-weight: 500;
8080
+ }
8081
+
8082
+ .heatmap-weekday {
8083
+ height: 11px;
8084
+ display: flex;
8085
+ align-items: center;
8086
+ justify-content: end;
8087
+ padding-right: 6px;
8088
+ }
8089
+
8090
+ .heatmap-weeks {
8091
+ display: grid;
8092
+ grid-template-columns: repeat(auto-fit, minmax(11px, 1fr));
8093
+ gap: 3px;
8094
+ align-self: start;
8095
+ width: 100%;
8096
+ }
8097
+
8098
+ .heatmap-week {
8099
+ display: flex;
8100
+ flex-direction: column;
8101
+ gap: 3px;
8102
+ }
8103
+
8104
+ .heatmap-day {
8105
+ width: 11px;
8106
+ height: 11px;
8107
+ border-radius: 3px;
8108
+ border: 1px solid #1c2128;
8109
+ cursor: pointer;
8110
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
8111
+ position: relative;
8112
+ }
8113
+
8114
+ .heatmap-day:hover {
8115
+ border-color: var(--text-accent);
8116
+ transform: scale(1.15);
8117
+ z-index: 10;
8118
+ box-shadow: 0 0 0 1px var(--text-accent);
8119
+ }
8120
+
8121
+ /* Activity level colors - Clean orange gradient */
8122
+ .heatmap-day.level-0 {
8123
+ background: #21262d;
8124
+ }
8125
+
8126
+ .heatmap-day.level-1 {
8127
+ background: rgba(249, 115, 22, 0.4);
8128
+ border-color: rgba(249, 115, 22, 0.45);
8129
+ }
8130
+
8131
+ .heatmap-day.level-2 {
8132
+ background: rgba(249, 115, 22, 0.55);
8133
+ border-color: rgba(249, 115, 22, 0.6);
8134
+ }
8135
+
8136
+ .heatmap-day.level-3 {
8137
+ background: rgba(249, 115, 22, 0.75);
8138
+ border-color: rgba(249, 115, 22, 0.8);
8139
+ }
8140
+
8141
+ .heatmap-day.level-4 {
8142
+ background: rgb(249, 115, 22);
8143
+ border-color: rgb(249, 115, 22);
8144
+ }
8145
+
8146
+ /* Purple theme for tools mode */
8147
+ .heatmap-day.level-1.tools-mode {
8148
+ background: rgba(147, 51, 234, 0.4);
8149
+ border-color: rgba(147, 51, 234, 0.45);
8150
+ }
8151
+
8152
+ .heatmap-day.level-2.tools-mode {
8153
+ background: rgba(147, 51, 234, 0.55);
8154
+ border-color: rgba(147, 51, 234, 0.6);
8155
+ }
8156
+
8157
+ .heatmap-day.level-3.tools-mode {
8158
+ background: rgba(147, 51, 234, 0.75);
8159
+ border-color: rgba(147, 51, 234, 0.8);
8160
+ }
8161
+
8162
+ .heatmap-day.level-4.tools-mode {
8163
+ background: rgb(147, 51, 234);
8164
+ border-color: rgb(147, 51, 234);
8165
+ }
8166
+
8167
+ /* Purple theme for legend squares in tools mode */
8168
+ .activity-heatmap-container.tools-mode .heatmap-legend-square.level-1 {
8169
+ background: rgba(147, 51, 234, 0.4);
8170
+ }
8171
+
8172
+ .activity-heatmap-container.tools-mode .heatmap-legend-square.level-2 {
8173
+ background: rgba(147, 51, 234, 0.55);
8174
+ }
8175
+
8176
+ .activity-heatmap-container.tools-mode .heatmap-legend-square.level-3 {
8177
+ background: rgba(147, 51, 234, 0.75);
8178
+ }
8179
+
8180
+ .activity-heatmap-container.tools-mode .heatmap-legend-square.level-4 {
8181
+ background: rgb(147, 51, 234);
8182
+ }
8183
+
8184
+ .heatmap-tooltip {
8185
+ position: absolute;
8186
+ background: #000;
8187
+ color: white;
8188
+ padding: 10px 14px;
8189
+ border-radius: 6px;
8190
+ font-size: 0.8rem;
8191
+ white-space: nowrap;
8192
+ z-index: 1000;
8193
+ pointer-events: none;
8194
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
8195
+ opacity: 0;
8196
+ transition: opacity 0.2s ease;
8197
+ border: 1px solid rgba(255, 255, 255, 0.1);
8198
+ }
8199
+
8200
+ .heatmap-tooltip.show {
8201
+ opacity: 1;
8202
+ }
8203
+
8204
+ .heatmap-tooltip-date {
8205
+ font-weight: 600;
8206
+ margin-bottom: 4px;
8207
+ color: white;
8208
+ }
8209
+
8210
+ .heatmap-tooltip-activity {
8211
+ color: rgba(255, 255, 255, 0.8);
8212
+ font-size: 0.75rem;
8213
+ }
8214
+
8215
+ .heatmap-empty-state {
8216
+ text-align: center;
8217
+ padding: 60px 40px;
8218
+ color: var(--text-secondary);
8219
+ border: 2px dashed var(--border-primary);
8220
+ border-radius: 8px;
8221
+ background: var(--bg-tertiary);
8222
+ }
8223
+
8224
+ .heatmap-empty-icon {
8225
+ font-size: 2.5rem;
8226
+ margin-bottom: 12px;
8227
+ opacity: 0.6;
8228
+ }
8229
+
8230
+ .heatmap-empty-text {
8231
+ font-size: 1rem;
8232
+ margin-bottom: 8px;
8233
+ font-weight: 500;
8234
+ color: var(--text-primary);
8235
+ }
8236
+
8237
+ .heatmap-empty-subtext {
8238
+ font-size: 0.85rem;
8239
+ opacity: 0.8;
8240
+ line-height: 1.4;
8241
+ }
8242
+
8243
+ /* Loading state for heatmap */
8244
+ .heatmap-loading {
8245
+ display: flex;
8246
+ align-items: center;
8247
+ justify-content: center;
8248
+ padding: 60px;
8249
+ gap: 12px;
8250
+ color: var(--text-secondary);
8251
+ }
8252
+
8253
+ .heatmap-loading-spinner {
8254
+ width: 20px;
8255
+ height: 20px;
8256
+ border: 2px solid var(--border-primary);
8257
+ border-top: 2px solid var(--text-accent);
8258
+ border-radius: 50%;
8259
+ animation: spin 1s linear infinite;
8260
+ }
8261
+
8262
+ /* Responsive adjustments */
8263
+ @media (max-width: 768px) {
8264
+ .activity-heatmap-container {
8265
+ padding: 20px 16px;
8266
+ overflow-x: auto;
8267
+ }
8268
+
8269
+ .heatmap-grid {
8270
+ min-width: 700px;
8271
+ }
8272
+
8273
+ .heatmap-settings {
8274
+ font-size: 0.75rem;
8275
+ padding: 4px 8px;
8276
+ }
8277
+
8278
+ .activity-heatmap-section .section-title {
8279
+ flex-direction: column;
8280
+ align-items: flex-start;
8281
+ gap: 12px;
8282
+ }
8283
+
8284
+ .heatmap-header {
8285
+ justify-content: center;
8286
+ margin-bottom: 16px;
8287
+ }
8288
+
8289
+ .heatmap-legend {
8290
+ font-size: 0.75rem;
8291
+ gap: 8px;
8292
+ }
8293
+
8294
+ .heatmap-loading {
8295
+ padding: 40px;
8296
+ }
8297
+
8298
+ .heatmap-empty-state {
8299
+ padding: 40px 20px;
8300
+ }
8301
+ }
8302
+
8303
+ @media (max-width: 480px) {
8304
+ .activity-heatmap-section {
8305
+ margin: 16px -10px;
8306
+ }
8307
+
8308
+ .activity-heatmap-container {
8309
+ border-radius: 0;
8310
+ border-left: none;
8311
+ border-right: none;
8312
+ }
8313
+
8314
+ .heatmap-weekdays {
8315
+ font-size: 0.7rem;
8316
+ }
8317
+
8318
+ .heatmap-months {
8319
+ font-size: 0.7rem;
8320
+ }
8321
+ }
8322
+
7853
8323
  </style>
7854
8324
  </head>
7855
8325
  <body>