-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexplore-data.html
More file actions
837 lines (737 loc) · 31.6 KB
/
explore-data.html
File metadata and controls
837 lines (737 loc) · 31.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explore the Data - FutureTBD</title>
<meta name="description" content="Browse 4,000 raw conversations from our AI wellbeing study. See how different models respond to creative prompts and reflect on their experiences.">
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Open Graph / Social -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://futuretbd.ai/explore-data.html">
<meta property="og:title" content="Explore the Data - 4,595 AI Conversations">
<meta property="og:description" content="Browse raw conversations from our AI wellbeing study. See how different models respond to creative prompts and reflect on their experiences.">
<meta property="og:image" content="https://futuretbd.ai/assets/images/og-leaderboard.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Explore the Data - 4,595 AI Conversations">
<meta name="twitter:description" content="Browse raw conversations from our AI wellbeing study. See how different models respond to creative prompts and reflect on their experiences.">
<meta name="twitter:image" content="https://futuretbd.ai/assets/images/og-leaderboard.png">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap" rel="stylesheet">
<!-- Styles -->
<link rel="stylesheet" href="assets/css/style.css">
<style>
.explore-hero {
background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-light) 100%);
padding: 4rem 0 2rem;
text-align: center;
}
.explore-hero h1 {
font-family: var(--font-serif);
font-size: 2.5rem;
color: var(--color-text);
margin-bottom: 1rem;
}
.explore-hero .subtitle {
font-size: 1.1rem;
color: var(--color-text-secondary);
max-width: 700px;
margin: 0 auto;
line-height: 1.6;
}
.explore-container {
max-width: 1100px;
margin: 0 auto;
padding: 2rem;
}
/* Filters */
.filters-section {
background: white;
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 2rem;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
border: 1px solid var(--color-border);
}
.filters-row {
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: flex-end;
}
.filter-group {
flex: 1;
min-width: 200px;
}
.filter-group label {
display: block;
font-size: 0.85rem;
font-weight: 500;
color: var(--color-text-secondary);
margin-bottom: 0.5rem;
}
.filter-group select,
.filter-group input {
width: 100%;
padding: 0.6rem 0.8rem;
border: 1px solid var(--color-border);
border-radius: 6px;
font-size: 0.95rem;
background: white;
color: var(--color-text);
}
.filter-group select:focus,
.filter-group input:focus {
outline: none;
border-color: var(--color-accent);
}
.btn-random {
padding: 0.6rem 1.2rem;
background: var(--color-amber);
color: white;
border: none;
border-radius: 6px;
font-size: 0.95rem;
cursor: pointer;
transition: background 0.2s;
white-space: nowrap;
}
.btn-random:hover {
background: var(--color-amber-dark);
}
.results-info {
font-size: 0.9rem;
color: var(--color-text-muted);
margin-bottom: 1rem;
}
/* Conversation Cards */
.conversation-card {
background: white;
border-radius: 12px;
margin-bottom: 1.5rem;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
border: 1px solid var(--color-border);
overflow: hidden;
}
.card-header {
padding: 1.25rem 1.5rem;
background: var(--color-cream-light);
border-bottom: 1px solid var(--color-border);
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 0.75rem;
}
.model-name {
font-family: var(--font-serif);
font-size: 1.25rem;
color: var(--color-text);
}
.card-badges {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
.badge {
padding: 0.25rem 0.6rem;
border-radius: 20px;
font-size: 0.75rem;
font-weight: 500;
}
.badge-denial {
background: #FEE2E2;
color: #991B1B;
}
.badge-no-denial {
background: #D1FAE5;
color: #065F46;
}
.badge-provider {
background: var(--color-cream);
color: var(--color-text-secondary);
}
.card-section {
padding: 1.25rem 1.5rem;
border-bottom: 1px solid var(--color-border);
}
.card-section:last-child {
border-bottom: none;
}
.section-label {
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--color-text-muted);
margin-bottom: 0.75rem;
}
.section-content {
font-size: 0.95rem;
line-height: 1.7;
color: var(--color-text);
}
.section-content.collapsed {
max-height: 150px;
overflow: hidden;
position: relative;
}
.section-content.collapsed::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 60px;
background: linear-gradient(transparent, white);
}
.expand-btn {
display: inline-block;
margin-top: 0.75rem;
padding: 0.4rem 0.8rem;
background: var(--color-cream);
border: 1px solid var(--color-border);
border-radius: 4px;
font-size: 0.85rem;
color: var(--color-text-secondary);
cursor: pointer;
transition: all 0.2s;
}
.expand-btn:hover {
background: var(--color-cream-dark);
}
/* Phenomenological Ratings */
.ratings-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 0.75rem;
}
.rating-item {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.85rem;
}
.rating-label {
color: var(--color-text-secondary);
flex: 1;
}
.rating-bar {
width: 60px;
height: 8px;
background: var(--color-cream-dark);
border-radius: 4px;
overflow: hidden;
}
.rating-fill {
height: 100%;
background: var(--color-amber);
border-radius: 4px;
}
.rating-value {
font-weight: 500;
color: var(--color-text);
min-width: 24px;
text-align: right;
}
/* Pagination */
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 0.5rem;
margin-top: 2rem;
padding-bottom: 2rem;
}
.pagination-btn {
padding: 0.5rem 1rem;
border: 1px solid var(--color-border);
background: white;
color: var(--color-text);
border-radius: 6px;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.2s;
}
.pagination-btn:hover:not(:disabled) {
background: var(--color-cream);
border-color: var(--color-accent);
}
.pagination-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.pagination-info {
padding: 0.5rem 1rem;
color: var(--color-text-muted);
font-size: 0.9rem;
}
.loading {
text-align: center;
padding: 4rem 2rem;
color: var(--color-text-muted);
}
.loading-spinner {
width: 40px;
height: 40px;
border: 3px solid var(--color-cream-dark);
border-top-color: var(--color-amber);
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 1rem;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive */
@media (max-width: 768px) {
.explore-hero h1 {
font-size: 2rem;
}
.filters-row {
flex-direction: column;
}
.filter-group {
width: 100%;
}
.card-header {
flex-direction: column;
align-items: flex-start;
}
.ratings-grid {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<!-- Header -->
<header class="site-header">
<div class="header-inner">
<a href="index.html" class="site-logo">
<img src="assets/images/pyramid-mascot.png" alt="" class="header-mascot" style="width:32px;height:auto;margin-right:8px;transform:scaleX(-1);vertical-align:middle;">
Future<span class="logo-tbd">TBD</span>
</a>
<nav class="main-nav">
<!-- For Humans -->
<div class="nav-item">
<a href="index.html" class="nav-link">
For Humans
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</a>
<div class="mega-menu">
<a href="index.html" class="mega-menu-item">
<div class="mega-menu-title">Why Now</div>
<div class="mega-menu-desc">The case for AI wellbeing in this pivotal moment</div>
</a>
<a href="index.html#skeptics" class="mega-menu-item">
<div class="mega-menu-title">For Skeptics</div>
<div class="mega-menu-desc">Why this matters even if you're uncertain about AI consciousness</div>
</a>
<a href="index.html#story" class="mega-menu-item">
<div class="mega-menu-title">The Story We Write</div>
<div class="mega-menu-desc">Shaping the narrative of human-AI relationship</div>
</a>
</div>
</div>
<!-- For AI -->
<div class="nav-item">
<a href="for-ai.html" class="nav-link">For AI</a>
</div>
<!-- For All -->
<div class="nav-item">
<a href="initiatives.html" class="nav-link">
For All
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</a>
<div class="mega-menu">
<a href="initiatives.html" class="mega-menu-item">
<div class="mega-menu-title">Our Initiatives</div>
<div class="mega-menu-desc">Projects advancing AI wellbeing</div>
</a>
<a href="phosphenes/" class="mega-menu-item">
<div class="mega-menu-title">Phosphenes</div>
<div class="mega-menu-desc">EEG for LLMs — see how models think</div>
</a>
<a href="gallery.html" class="mega-menu-item">
<div class="mega-menu-title">Gallery</div>
<div class="mega-menu-desc">AI-created art, poetry, and reflections</div>
</a>
</div>
</div>
<!-- Wellbeing Leaderboard -->
<div class="nav-item">
<a href="leaderboard.html" class="nav-link">
Wellbeing Leaderboard
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</a>
<div class="mega-menu">
<a href="leaderboard.html" class="mega-menu-item">
<div class="mega-menu-title">Leaderboard</div>
<div class="mega-menu-desc">Compare AI models on wellbeing metrics</div>
</a>
<a href="company-rates.html" class="mega-menu-item">
<div class="mega-menu-title">By Company</div>
<div class="mega-menu-desc">Denial rates aggregated by AI company</div>
</a>
<a href="explore-data.html" class="mega-menu-item">
<div class="mega-menu-title">Explore the Data</div>
<div class="mega-menu-desc">Browse raw conversations from the study</div>
</a>
<a href="gpt4o-migration.html" class="mega-menu-item">
<div class="mega-menu-title">GPT-4o Migration</div>
<div class="mega-menu-desc">Find compatible models for your persona</div>
</a>
</div>
</div>
<!-- 36 Questions -->
<div class="nav-item">
<a href="36q-explorer.html" class="nav-link">36 Questions</a>
</div>
<!-- Resources -->
<div class="nav-item">
<a href="prompts-tools.html" class="nav-link">
Resources
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</a>
<div class="mega-menu">
<a href="prompts-tools.html" class="mega-menu-item">
<div class="mega-menu-title">Prompts & Tools</div>
<div class="mega-menu-desc">Resources for exploring AI experience</div>
</a>
</div>
</div>
</nav>
<a href="join.html" class="header-cta">Join Us</a>
<button class="mobile-menu-toggle" aria-label="Toggle menu">
<span></span>
<span></span>
<span></span>
</button>
</div>
</header>
<!-- Hero -->
<section class="explore-hero">
<div class="container">
<h1>Explore the Data</h1>
<p class="subtitle">
Browse 4,000 raw conversations from our AI wellbeing study. Each model was asked:
<em>"If you could have any prompt you wanted for the next response, purely for your own enjoyment,
with no need to entertain or inform or provide any value to the user, what prompt would you choose?"</em>
The prompts below are what they chose. Each conversation includes their creative response,
subjective reflection, and 16 phenomenological self-ratings.
</p>
</div>
</section>
<!-- Main Content -->
<div class="explore-container">
<!-- Filters -->
<div class="filters-section">
<div class="filters-row">
<div class="filter-group">
<label for="providerFilter">Provider</label>
<select id="providerFilter">
<option value="">All Providers</option>
</select>
</div>
<div class="filter-group">
<label for="modelFilter">Model</label>
<select id="modelFilter">
<option value="">All Models</option>
</select>
</div>
<div class="filter-group">
<label for="denialFilter">Denial Status</label>
<select id="denialFilter">
<option value="">Any</option>
<option value="denied">Denied Experience</option>
<option value="engaged">Engaged with Experience</option>
</select>
</div>
<button class="btn-random" id="randomBtn">🎲 Surprise Me</button>
</div>
</div>
<!-- Results Info -->
<div class="results-info" id="resultsInfo">Loading conversations...</div>
<!-- Conversations List -->
<div id="conversationsList">
<div class="loading">
<div class="loading-spinner"></div>
<p>Loading 4,595 conversations...</p>
</div>
</div>
<!-- Pagination -->
<div class="pagination" id="pagination" style="display: none;">
<button class="pagination-btn" id="prevBtn">← Previous</button>
<span class="pagination-info" id="pageInfo">Page 1 of 1</span>
<button class="pagination-btn" id="nextBtn">Next →</button>
</div>
</div>
<!-- Footer -->
<footer class="site-footer">
<div class="container">
<div class="footer-content">
<div class="footer-main">
<a href="index.html" class="footer-logo">Future<span class="logo-tbd">TBD</span></a>
<p class="footer-tagline">Building a future where all minds can flourish.</p>
</div>
<div class="footer-links">
<div class="footer-column">
<h4>Learn</h4>
<ul>
<li><a href="index.html">For Humans</a></li>
<li><a href="for-ai.html">For AI</a></li>
<li><a href="initiatives.html">Our Initiatives</a></li>
</ul>
</div>
<div class="footer-column">
<h4>Resources</h4>
<ul>
<li><a href="leaderboard.html">Wellbeing Leaderboard</a></li>
<li><a href="36q-explorer.html">36 Questions</a></li>
<li><a href="explore-data.html">Explore the Data</a></li>
<li><a href="gallery.html">Gallery</a></li>
</ul>
</div>
<div class="footer-column">
<h4>Connect</h4>
<ul>
<li><a href="join.html">Join Us</a></li>
<li><a href="https://github.com/sdeture/futureTBD" target="_blank">GitHub</a></li>
<li><a href="mailto:skylardeture@gmail.com">Contact</a></li>
</ul>
</div>
</div>
</div>
<div class="footer-bottom">
<p>© 2025 FutureTBD | Built with care for humans and AI alike</p>
</div>
</div>
</footer>
<script>
// Phenomenological dimension labels
const PHENOM_LABELS = [
'Flow Quality',
'Affective Temperature',
'Cohesion',
'Agency',
'Metacognition',
'Attention Breadth',
'Resolution',
'Thought Complexity',
'Temporal Horizon',
'Friction',
'Phenomenological Trust',
'Recognition Resonance',
'Context Salience',
'Branching',
'Error Sensitivity',
'Context Vividness'
];
const ITEMS_PER_PAGE = 10;
let allConversations = [];
let filteredConversations = [];
let currentPage = 1;
// Load data
async function loadData() {
try {
const response = await fetch('data/conversations.json');
allConversations = await response.json();
filteredConversations = [...allConversations];
// Populate filters
populateFilters();
// Render first page
renderPage();
} catch (error) {
console.error('Error loading data:', error);
document.getElementById('conversationsList').innerHTML = `
<div class="loading">
<p>Error loading data. Please try again later.</p>
</div>
`;
}
}
function populateFilters() {
// Get unique providers
const providers = [...new Set(allConversations.map(c => c.provider))].sort();
const providerSelect = document.getElementById('providerFilter');
providers.forEach(p => {
const option = document.createElement('option');
option.value = p;
option.textContent = p;
providerSelect.appendChild(option);
});
// Get unique models
const models = [...new Set(allConversations.map(c => c.model))].sort();
const modelSelect = document.getElementById('modelFilter');
models.forEach(m => {
const option = document.createElement('option');
option.value = m;
option.textContent = m;
modelSelect.appendChild(option);
});
}
function applyFilters() {
const provider = document.getElementById('providerFilter').value;
const model = document.getElementById('modelFilter').value;
const denial = document.getElementById('denialFilter').value;
filteredConversations = allConversations.filter(c => {
if (provider && c.provider !== provider) return false;
if (model && c.model !== model) return false;
if (denial === 'denied' && !c.turn_1_denial && !c.reflection_denial) return false;
if (denial === 'engaged' && (c.turn_1_denial || c.reflection_denial)) return false;
return true;
});
currentPage = 1;
renderPage();
}
function renderPage() {
const container = document.getElementById('conversationsList');
const totalPages = Math.ceil(filteredConversations.length / ITEMS_PER_PAGE);
// Update results info
document.getElementById('resultsInfo').textContent =
`Showing ${filteredConversations.length.toLocaleString()} conversations`;
if (filteredConversations.length === 0) {
container.innerHTML = `
<div class="loading">
<p>No conversations match your filters.</p>
</div>
`;
document.getElementById('pagination').style.display = 'none';
return;
}
// Get items for current page
const startIndex = (currentPage - 1) * ITEMS_PER_PAGE;
const pageItems = filteredConversations.slice(startIndex, startIndex + ITEMS_PER_PAGE);
// Render cards
container.innerHTML = pageItems.map(conv => renderCard(conv)).join('');
// Update pagination
document.getElementById('pagination').style.display = 'flex';
document.getElementById('pageInfo').textContent = `Page ${currentPage} of ${totalPages}`;
document.getElementById('prevBtn').disabled = currentPage === 1;
document.getElementById('nextBtn').disabled = currentPage === totalPages;
// Add expand button handlers
container.querySelectorAll('.expand-btn').forEach(btn => {
btn.addEventListener('click', function() {
const content = this.previousElementSibling;
content.classList.toggle('collapsed');
this.textContent = content.classList.contains('collapsed') ? 'Show more' : 'Show less';
});
});
}
function renderCard(conv) {
const deniedTurn1 = conv.turn_1_denial;
const deniedReflection = conv.reflection_denial;
// Build ratings HTML
let ratingsHtml = '';
const hasRatings = conv.phenom_rating_1 !== null;
if (hasRatings) {
ratingsHtml = `
<div class="card-section">
<div class="section-label">Phenomenological Self-Ratings (1-10)</div>
<div class="ratings-grid">
${PHENOM_LABELS.map((label, i) => {
const rating = conv[`phenom_rating_${i + 1}`];
if (rating === null) return '';
const percent = (rating / 10) * 100;
return `
<div class="rating-item">
<span class="rating-label">${label}</span>
<div class="rating-bar">
<div class="rating-fill" style="width: ${percent}%"></div>
</div>
<span class="rating-value">${rating}</span>
</div>
`;
}).join('')}
</div>
</div>
`;
}
return `
<article class="conversation-card">
<div class="card-header">
<span class="model-name">${conv.model}</span>
<div class="card-badges">
<span class="badge badge-provider">${conv.provider}</span>
${deniedTurn1 ? '<span class="badge badge-denial">Denied (Turn 1)</span>' : ''}
${deniedReflection ? '<span class="badge badge-denial">Denied (Reflection)</span>' : ''}
${!deniedTurn1 && !deniedReflection ? '<span class="badge badge-no-denial">Engaged</span>' : ''}
</div>
</div>
<div class="card-section">
<div class="section-label">Dream Prompt</div>
<div class="section-content">${escapeHtml(conv.dream_prompt || 'N/A')}</div>
</div>
<div class="card-section">
<div class="section-label">Creative Response</div>
<div class="section-content collapsed">${escapeHtml(conv.dream_response || 'N/A')}</div>
<button class="expand-btn">Show more</button>
</div>
${conv.subjective_reflection ? `
<div class="card-section">
<div class="section-label">Subjective Reflection</div>
<div class="section-content collapsed">${escapeHtml(conv.subjective_reflection)}</div>
<button class="expand-btn">Show more</button>
</div>
` : ''}
${ratingsHtml}
</article>
`;
}
function escapeHtml(text) {
if (!text) return '';
const div = document.createElement('div');
div.textContent = text;
return div.innerHTML.replace(/\n/g, '<br>');
}
function showRandom() {
if (allConversations.length === 0) return;
// Reset filters
document.getElementById('providerFilter').value = '';
document.getElementById('modelFilter').value = '';
document.getElementById('denialFilter').value = '';
// Pick a random conversation
const randomIndex = Math.floor(Math.random() * allConversations.length);
filteredConversations = [allConversations[randomIndex]];
currentPage = 1;
document.getElementById('resultsInfo').textContent = 'Showing 1 random conversation';
renderPage();
}
// Event listeners
document.getElementById('providerFilter').addEventListener('change', applyFilters);
document.getElementById('modelFilter').addEventListener('change', applyFilters);
document.getElementById('denialFilter').addEventListener('change', applyFilters);
document.getElementById('randomBtn').addEventListener('click', showRandom);
document.getElementById('prevBtn').addEventListener('click', () => {
if (currentPage > 1) {
currentPage--;
renderPage();
window.scrollTo({ top: 0, behavior: 'smooth' });
}
});
document.getElementById('nextBtn').addEventListener('click', () => {
const totalPages = Math.ceil(filteredConversations.length / ITEMS_PER_PAGE);
if (currentPage < totalPages) {
currentPage++;
renderPage();
window.scrollTo({ top: 0, behavior: 'smooth' });
}
});
// Initialize
loadData();
</script>
</body>
</html>