feat(v3): project-level tabs + clean AgentPane + ProjectHeader info bar

- ProjectBox: Claude|Files|Context tab bar switching content area
- ProjectFiles.svelte: project-scoped markdown file viewer
- ProjectHeader: CWD (ellipsized from start) + profile as info text
- AgentPane: removed DIR/ACC toolbar, CWD+profile now props from parent
- ClaudeSession: passes project.profile to AgentPane
This commit is contained in:
Hibryda 2026-03-08 02:32:00 +01:00
parent e2fda3f742
commit f2aa514845
5 changed files with 297 additions and 115 deletions

View file

@ -5,6 +5,8 @@
import ClaudeSession from './ClaudeSession.svelte';
import TerminalTabs from './TerminalTabs.svelte';
import TeamAgentsPanel from './TeamAgentsPanel.svelte';
import ProjectFiles from './ProjectFiles.svelte';
import ContextPane from '../Context/ContextPane.svelte';
interface Props {
project: ProjectConfig;
@ -17,6 +19,9 @@
let accentVar = $derived(PROJECT_ACCENTS[slotIndex % PROJECT_ACCENTS.length]);
let mainSessionId = $state<string | null>(null);
type ProjectTab = 'claude' | 'files' | 'context';
let activeTab = $state<ProjectTab>('claude');
</script>
<div
@ -31,10 +36,40 @@
onclick={onactivate}
/>
<div class="project-session-area">
<ClaudeSession {project} onsessionid={(id) => mainSessionId = id} />
{#if mainSessionId}
<TeamAgentsPanel {mainSessionId} />
<div class="project-tabs">
<button
class="ptab"
class:active={activeTab === 'claude'}
onclick={() => activeTab = 'claude'}
>Claude</button>
<button
class="ptab"
class:active={activeTab === 'files'}
onclick={() => activeTab = 'files'}
>Files</button>
<button
class="ptab"
class:active={activeTab === 'context'}
onclick={() => activeTab = 'context'}
>Context</button>
</div>
<div class="project-content-area">
{#if activeTab === 'claude'}
<div class="content-pane">
<ClaudeSession {project} onsessionid={(id) => mainSessionId = id} />
{#if mainSessionId}
<TeamAgentsPanel {mainSessionId} />
{/if}
</div>
{:else if activeTab === 'files'}
<div class="content-pane">
<ProjectFiles cwd={project.cwd} projectName={project.name} />
</div>
{:else if activeTab === 'context'}
<div class="content-pane">
<ContextPane onExit={() => {}} />
</div>
{/if}
</div>
@ -46,7 +81,7 @@
<style>
.project-box {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-rows: auto auto 1fr auto;
min-width: 30rem;
scroll-snap-align: start;
background: var(--ctp-base);
@ -60,13 +95,50 @@
border-color: var(--accent);
}
.project-session-area {
.project-tabs {
display: flex;
gap: 0;
background: var(--ctp-mantle);
border-bottom: 1px solid var(--ctp-surface0);
flex-shrink: 0;
}
.ptab {
padding: 0.25rem 0.75rem;
background: transparent;
border: none;
border-bottom: 2px solid transparent;
color: var(--ctp-overlay1);
font-size: 0.7rem;
font-weight: 500;
cursor: pointer;
text-transform: uppercase;
letter-spacing: 0.04em;
transition: color 0.1s, border-color 0.1s;
}
.ptab:hover {
color: var(--ctp-text);
}
.ptab.active {
color: var(--ctp-text);
border-bottom-color: var(--accent);
font-weight: 600;
}
.project-content-area {
overflow: hidden;
position: relative;
min-height: 0;
}
.content-pane {
display: flex;
height: 100%;
overflow: hidden;
}
.project-terminal-area {
height: 16rem;
min-height: 8rem;