// AppShell.jsx — full product mock of the SourceWeaver app, // rendered in the green/black/white palette. function AppShellMock({ initialTab = 'workspace', initialSubTab = 'content' }) { // Animate the "Broken" head item walking through merge-queue states, // matching the real product's lifecycle: Queued → Syncing → Rebasing → Testing → Broken. const [tick, setTick] = React.useState(0); const [activeTab, setActiveTab] = React.useState(initialTab); React.useEffect(() => { const id = setInterval(() => setTick((t) => t + 1), 2400); return () => clearInterval(id); }, []); return (
preview
{activeTab === 'workspace' ? ( ) : ( )}
); } function AppTopBar({ activeTab, onTabChange }) { const tabs = [ { id: 'workspace', label: 'WORKSPACE' }, { id: 'workflows', label: 'WORKFLOWS' }, { id: 'mergequeue', label: 'MERGE QUEUE' }, { id: 'settings', label: 'SETTINGS' }, ]; return (
S sourceweaver / Auth & SSO / OAuth fallback for self-hosted SSO 3 of 5
{tabs.map(t => ( ))}
); } function AppSidebar() { const tree = [ { kind: 'folder-open', id: 'FLDR-100', title: 'Auth & SSO', open: true }, { kind: 'Extension', id: 'FEAT-001', title: 'OAuth fallback for self-hosted SSO', overlay: 'pulse-amber', child: 1, active: true, questions: 2 }, { kind: 'LocalOffer',id: 'TASK-002', title: 'Add provider config schema', overlay: 'check-green', child: 2 }, { kind: 'LocalOffer',id: 'TASK-003', title: 'Implement token exchange', overlay: 'dot-blue', child: 2 }, { kind: 'BugReport', id: 'BUG-004', title: 'Refresh-token loop on 401', overlay: 'pulse-amber', child: 2 }, { kind: 'folder', id: 'FLDR-200', title: 'Git-based workflows', open: true }, { kind: 'Extension', id: 'FEAT-005', title: 'Multi-repo workspace switcher', overlay: 'dot-purple', child: 1 }, { kind: 'LocalOffer',id: 'TASK-006', title: 'Build per-project workflow registry', overlay: 'check-green', child: 1 }, { kind: 'LocalOffer',id: 'TASK-007', title: 'Implement workflow file loader', overlay: 'dot-blue', child: 1 }, { kind: 'BugReport', id: 'BUG-008', title: 'SignalR reconnect storm under load', overlay: 'error-red', child: 1 }, { kind: 'folder', id: 'FLDR-300', title: 'Infrastructure', open: false }, ]; return ( ); } function ChipIcon({ name, muted }) { return ( ); } function AppContent({ tick, activeTab }) { return (
{activeTab === 'workflows' && ( )} {activeTab === 'mergequeue' && ( )} {activeTab === 'settings' && (
Settings
Project settings, secrets, and integrations live here. Coming soon in this prototype.
)}
); } function PullRequestPanel() { return (
Pull Request
source #1142 oauth-fallback-self-hosted-sso-001a
target work-item/auth-sso/oauth-fallback-3-of-5 Open
Opened by sourceweaver-bot 12h ago
); } function MergeQueuePanel({ tick }) { // Cycle status pill across realistic states const cycle = [ { label: 'Broken', tone: 'broken' }, { label: 'Rebasing', tone: 'progress' }, { label: 'Testing', tone: 'progress' }, { label: 'Broken', tone: 'broken' }, ]; const status = cycle[tick % cycle.length]; return (
Merge Queue
Status: {status.label} {status.label}
Position 5 in queue · Priority 0 · work-item/oauth-fallback-self-hosted-sso-001a · PR #1142 · Added 10h ago
2 retries
CI checks failure · workflow merge-queue-fix.yaml dispatched
); } function EventTimelinePanel({ tick }) { // Flowing timeline of state transitions, latest at top. const events = [ { from: 'Testing', to: 'Broken', tone: 'broken', ago: '6h ago', dur: '7m 4s' }, { from: 'Rebasing', to: 'Testing', tone: 'idle', ago: '7h ago', dur: '0s' }, { from: 'Syncing', to: 'Rebasing', tone: 'progress', ago: '7h ago', dur: '0s' }, { from: 'Queued', to: 'Syncing', tone: 'idle', ago: '7h ago', dur: '3h 23m' }, { from: '—', to: 'Queued', tone: 'idle', ago: '10h ago', dur: '—' }, ]; // Animate the head dot pulsing const liveIdx = tick % 2 === 0 ? 0 : -1; return (
Event Timeline
{events.map((e, i) => (
{e.ago} {e.from} {e.to}
Duration: {e.dur}
View workflow run
))}
); } function WorkflowRunsPanel() { const runs = [ { name: 'Workspace Task Execution', status: 'Running', tone: 'progress', started: '5h ago', dur: '5h 39m', expanded: true }, { name: 'Workspace Task Execution', status: 'FailedRetried', tone: 'warn', started: '6h ago', dur: '44m 5s' }, { name: 'merge-queue-fix', status: 'Queued', tone: 'queued', started: '6h ago', dur: '6h 53m' }, { name: 'Workspace Task Execution', status: 'FailedRetried', tone: 'warn', started: '7h ago', dur: '16m 31s' }, { name: 'merge-queue-fix', status: 'Queued', tone: 'queued', started: '10h ago', dur: '10h 24m' }, { name: 'PR Review', status: 'Completed', tone: 'done', started: '10h ago', dur: '2m 52s' }, { name: 'Workspace Task Execution', status: 'Completed', tone: 'done', started: '10h ago', dur: '18m 36s' }, ]; return (
Workflow Runs
Workflow Status Started Duration
{runs.map((r, i) => (
{r.expanded ? '▾' : '▸'} {r.name} {r.status} {r.started} {r.dur}
{r.expanded ? (
) : null}
))}
); } Object.assign(window, { AppShellMock });