feat(electrobun): add CommsTab and TaskBoardTab to project card tabs

This commit is contained in:
Hibryda 2026-03-22 01:36:46 +01:00
parent 252fca70df
commit ec30c69c3e

View file

@ -51,6 +51,7 @@
cloneOf,
clonesAtMax = false,
onClone,
groupId = 'dev',
}: Props = $props();
// ── Agent session (reactive from store) ──────────────────────────
@ -91,7 +92,12 @@
// Track which project tabs have been activated (PERSISTED-LAZY pattern)
let activatedTabs = $state<Set<ProjectTab>>(new Set(['model']));
const ALL_TABS: ProjectTab[] = ['model', 'docs', 'context', 'files', 'ssh', 'memory'];
const ALL_TABS: ProjectTab[] = ['model', 'docs', 'context', 'files', 'ssh', 'memory', 'comms', 'tasks'];
// ── Load last session on mount ──────────────────────────────────────
$effect(() => {
loadLastSession(id);
});
function setTab(tab: ProjectTab) {
activeTab = tab;
@ -349,6 +355,32 @@
<MemoryTab />
</div>
{/if}
<!-- Comms tab (inter-agent messaging) -->
{#if activatedTabs.has('comms')}
<div
id="tabpanel-{id}-comms"
class="tab-pane"
style:display={activeTab === 'comms' ? 'flex' : 'none'}
role="tabpanel"
aria-label="Comms"
>
<CommsTab {groupId} agentId={id} />
</div>
{/if}
<!-- Tasks tab (kanban board) -->
{#if activatedTabs.has('tasks')}
<div
id="tabpanel-{id}-tasks"
class="tab-pane"
style:display={activeTab === 'tasks' ? 'flex' : 'none'}
role="tabpanel"
aria-label="Tasks"
>
<TaskBoardTab {groupId} agentId={id} />
</div>
{/if}
</div>
</article>