Skip to content

Commit 383e838

Browse files
Fix claim count mismatch, remove Brain Quest All Neurons, improve chat
- Cell Library now includes orphaned Supabase claims not in the Google Sheet, fixing 3/3 profile count showing only 2 in My Cells - Remove All Neurons side panel from Brain Quest (Cell Library handles it) - Chat: add timestamps, default to bottom-left, solid input background Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7072ff8 commit 383e838

File tree

3 files changed

+58
-289
lines changed

3 files changed

+58
-289
lines changed

src/components/CellLibraryPanel.vue

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,12 @@ const cells = computed(() => {
9393
taskMap.set(t.segment_id, t);
9494
}
9595
96+
const sheetSegIds = new Set<string>();
97+
9698
// Use queue items as the base list (from the Google Sheet)
9799
if (queue.items.length > 0) {
98-
return queue.items.map((item, idx) => {
100+
const sheetCells = queue.items.map((item, idx) => {
101+
sheetSegIds.add(item.segId);
99102
const task = taskMap.get(item.segId);
100103
return {
101104
segId: item.segId,
@@ -114,6 +117,26 @@ const cells = computed(() => {
114117
isStale: staleSet.value.has(item.segId),
115118
};
116119
});
120+
121+
// Include Supabase tasks not in the sheet (orphaned claims)
122+
const extraTasks = backend.tasks
123+
.filter(t => !sheetSegIds.has(t.segment_id))
124+
.map(t => ({
125+
segId: t.segment_id,
126+
index: '',
127+
nucCoords: t.nucleus_coords || '',
128+
somaCoords: t.soma_coords || '',
129+
notes: t.notes || '',
130+
taskId: t.id,
131+
status: t.status,
132+
assignedTo: t.assigned_to,
133+
finalSegId: t.final_segment_id,
134+
completedByName: null as string | null,
135+
currentSegId: latestRootMap.value.get(t.segment_id) || null,
136+
isStale: staleSet.value.has(t.segment_id),
137+
}));
138+
139+
return [...sheetCells, ...extraTasks];
117140
}
118141
119142
// Fallback: use Supabase tasks directly

src/components/ChatPanel.vue

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const collapsed = ref(false);
2222
2323
// ── Drag state ──
2424
const panelEl = ref<HTMLDivElement | null>(null);
25-
const posX = ref<number | null>(null); // null = use CSS default (bottom-right)
25+
const posX = ref<number | null>(null); // null = use CSS default (bottom-left)
2626
const posY = ref<number | null>(null);
2727
const isDragging = ref(false);
2828
let dragStart = { mx: 0, my: 0, px: 0, py: 0 };
@@ -147,6 +147,10 @@ function rankColor(rank: string): string {
147147
}
148148
}
149149
150+
function msgTime(d: Date): string {
151+
return d.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' });
152+
}
153+
150154
// ── Send message ──
151155
function send() {
152156
const text = messageInput.value.trim();
@@ -231,6 +235,7 @@ function toggleCollapse() {
231235
</div>
232236

233237
<div v-else-if="msg.type === 'message'" class="nge-chat-msg">
238+
<span class="nge-chat-msg-time">{{ msgTime(msg.dateTime) }}</span>
234239
<span class="nge-chat-msg-trophy" v-if="trophyMap[msg.name]">{{ trophyMap[msg.name] }}</span>
235240
<span class="nge-chat-msg-name" :style="{ color: rankColor(msg.rank) }">{{ shortName(msg.name) }}</span>
236241
<template v-for="(part, pi) in msg.parts" :key="pi">
@@ -281,7 +286,7 @@ function toggleCollapse() {
281286
.nge-chat-float {
282287
position: fixed;
283288
bottom: 36px;
284-
right: 8px;
289+
left: 8px;
285290
z-index: 9000;
286291
display: flex;
287292
flex-direction: column;
@@ -420,6 +425,14 @@ function toggleCollapse() {
420425
}
421426
.nge-chat-msg:hover { background: rgba(255, 255, 255, 0.03); border-radius: 3px; }
422427
428+
.nge-chat-msg-time {
429+
font-size: 9px;
430+
color: #445;
431+
margin-right: 4px;
432+
flex-shrink: 0;
433+
}
434+
.nge-chat-msg:hover .nge-chat-msg-time { color: #667; }
435+
423436
.nge-chat-msg-trophy { font-size: 10px; margin-right: 1px; }
424437
425438
.nge-chat-msg-name {
@@ -484,14 +497,16 @@ function toggleCollapse() {
484497
485498
/* ── Input ── */
486499
.nge-chat-input-wrap {
487-
padding: 3px 4px;
500+
padding: 4px 4px;
488501
flex-shrink: 0;
502+
background: rgba(8, 10, 20, 0.92);
503+
border-top: 1px solid rgba(100, 180, 255, 0.08);
489504
}
490505
491506
.nge-chat-input {
492507
width: 100%;
493-
background: rgba(255, 255, 255, 0.06);
494-
border: 1px solid rgba(100, 180, 255, 0.1);
508+
background: rgba(20, 24, 40, 0.9);
509+
border: 1px solid rgba(100, 180, 255, 0.15);
495510
border-radius: 4px;
496511
padding: 5px 8px;
497512
color: #e0e4ec;
@@ -502,7 +517,7 @@ function toggleCollapse() {
502517
box-sizing: border-box;
503518
}
504519
.nge-chat-input:focus { border-color: rgba(74, 158, 255, 0.3); }
505-
.nge-chat-input::placeholder { color: #445; }
520+
.nge-chat-input::placeholder { color: #556; }
506521
.nge-chat-input:disabled { opacity: 0.3; }
507522
508523
/* Empty state */

0 commit comments

Comments
 (0)