@mrpatronz/nexusflow 0.2.18 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/commands/sync.d.ts.map +1 -1
  2. package/dist/commands/sync.js +37 -50
  3. package/dist/commands/sync.js.map +1 -1
  4. package/dist/core/sync.d.ts +44 -0
  5. package/dist/core/sync.d.ts.map +1 -0
  6. package/dist/core/sync.js +82 -0
  7. package/dist/core/sync.js.map +1 -0
  8. package/dist/core/workspace-state.d.ts +51 -0
  9. package/dist/core/workspace-state.d.ts.map +1 -0
  10. package/dist/core/workspace-state.js +108 -0
  11. package/dist/core/workspace-state.js.map +1 -0
  12. package/dist/core/workspace-state.test.d.ts +2 -0
  13. package/dist/core/workspace-state.test.d.ts.map +1 -0
  14. package/dist/core/workspace-state.test.js +84 -0
  15. package/dist/core/workspace-state.test.js.map +1 -0
  16. package/dist/gui/assets/index-Bdbld6yY.css +1 -0
  17. package/dist/gui/assets/index-D8iJPvnk.js +26 -0
  18. package/dist/gui/index.html +2 -2
  19. package/dist/mcp/server.d.ts.map +1 -1
  20. package/dist/mcp/server.js +42 -0
  21. package/dist/mcp/server.js.map +1 -1
  22. package/dist/server.d.ts.map +1 -1
  23. package/dist/server.js +94 -13
  24. package/dist/server.js.map +1 -1
  25. package/dist/types.d.ts +31 -0
  26. package/dist/types.d.ts.map +1 -1
  27. package/dist/utils/multi-git.d.ts +33 -8
  28. package/dist/utils/multi-git.d.ts.map +1 -1
  29. package/dist/utils/multi-git.js +91 -19
  30. package/dist/utils/multi-git.js.map +1 -1
  31. package/dist/utils/multi-git.test.d.ts +2 -0
  32. package/dist/utils/multi-git.test.d.ts.map +1 -0
  33. package/dist/utils/multi-git.test.js +125 -0
  34. package/dist/utils/multi-git.test.js.map +1 -0
  35. package/gui/e2e/dashboard.spec.ts +61 -0
  36. package/gui/e2e/wizard.spec.ts +2 -2
  37. package/gui/package-lock.json +62 -4
  38. package/gui/package.json +2 -1
  39. package/gui/src/App.tsx +168 -227
  40. package/gui/src/app/AppSidebar.tsx +69 -0
  41. package/gui/src/components/AddRepoPicker.tsx +81 -0
  42. package/gui/src/components/ui/Button.tsx +40 -0
  43. package/gui/src/components/ui/Card.tsx +6 -0
  44. package/gui/src/components/ui/EmptyState.tsx +22 -0
  45. package/gui/src/components/ui/Input.tsx +21 -0
  46. package/gui/src/components/ui/Menu.tsx +71 -0
  47. package/gui/src/components/ui/Modal.tsx +39 -0
  48. package/gui/src/components/ui/PageHeader.tsx +21 -0
  49. package/gui/src/components/ui/RepoStatusStrip.tsx +33 -0
  50. package/gui/src/components/ui/Skeleton.tsx +5 -0
  51. package/gui/src/components/ui/StatusPill.tsx +36 -0
  52. package/gui/src/components/ui/Tabs.tsx +40 -0
  53. package/gui/src/components/ui/cn.ts +4 -0
  54. package/gui/src/components/ui/index.ts +16 -0
  55. package/gui/src/features/services/ServiceConsole.tsx +4 -39
  56. package/gui/src/index.css +140 -125
  57. package/gui/src/lib/status.ts +24 -0
  58. package/gui/src/pages/DashboardPage.tsx +129 -0
  59. package/gui/src/pages/WorkspacesPage.tsx +352 -0
  60. package/gui/src/types.ts +19 -0
  61. package/package.json +1 -1
  62. package/src/commands/sync.ts +36 -58
  63. package/src/core/sync.ts +121 -0
  64. package/src/core/workspace-state.test.ts +108 -0
  65. package/src/core/workspace-state.ts +130 -0
  66. package/src/mcp/server.ts +44 -0
  67. package/src/server.ts +103 -15
  68. package/src/types.ts +36 -0
  69. package/src/utils/multi-git.test.ts +158 -0
  70. package/src/utils/multi-git.ts +117 -25
  71. package/dist/gui/assets/index-CB-jWded.css +0 -1
  72. package/dist/gui/assets/index-DDXpZZu3.js +0 -25
  73. package/gui/src/features/workspace/WorkspaceList.tsx +0 -666
package/gui/src/index.css CHANGED
@@ -1,152 +1,167 @@
1
- @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Space+Grotesk:wght@300..700&display=swap');
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap');
2
2
  @import "tailwindcss";
3
3
 
4
- /* Global Font Overrides to Monospace */
5
- body {
6
- font-family: 'JetBrains Mono', monospace !important;
7
- background-color: #030408 !important;
8
- background-image:
9
- radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
10
- radial-gradient(at 0% 100%, rgba(6, 182, 212, 0.04) 0px, transparent 50%) !important;
11
- }
12
-
13
- h1, h2, h3, h4, h5, h6, button, input, select, textarea, code, pre {
14
- font-family: 'JetBrains Mono', monospace !important;
15
- }
16
-
17
- /* Custom Sleek Scrollbars */
18
- ::-webkit-scrollbar {
19
- width: 6px;
20
- height: 6px;
21
- }
22
- ::-webkit-scrollbar-track {
23
- background: #05070c;
4
+ /* ─── Design tokens ───────────────────────────────────────────────────────────
5
+ "Mission control for parallel feature branches": neutral dark surfaces, a single
6
+ restrained blue accent, and a strict semantic status palette. Sans-serif UI,
7
+ monospace only for code/paths/data. */
8
+ @theme {
9
+ /* Surfaces */
10
+ --color-base: #0b0c0e;
11
+ --color-surface: #141619;
12
+ --color-raised: #1b1e22;
13
+ --color-hairline: #24272c;
14
+ --color-hairline-strong: #333840;
15
+
16
+ /* Foreground / text */
17
+ --color-content: #e7e9ec;
18
+ --color-content-muted: #9aa0a8;
19
+ --color-content-faint: #6a7078;
20
+
21
+ /* Interactive accent (nav active, primary actions, focus rings) */
22
+ --color-accent: #4f7cff;
23
+ --color-accent-hover: #6b8fff;
24
+ --color-accent-soft: #1b2540;
25
+
26
+ /* Semantic status language */
27
+ --color-success: #3fb950;
28
+ --color-warning: #d29922;
29
+ --color-danger: #f85149;
30
+ --color-running: #2db6c9;
31
+ --color-idle: #6a7078;
32
+
33
+ /* Typography */
34
+ --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
35
+ --font-display: "Space Grotesk", "Inter", ui-sans-serif, sans-serif;
36
+ --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
37
+
38
+ /* Radii */
39
+ --radius-md: 0.5rem;
40
+ --radius-lg: 0.75rem;
41
+
42
+ /* ── Legacy palette remap ──────────────────────────────────────────────────
43
+ Maps the color names still used by not-yet-rewritten views (Create wizard,
44
+ Settings, Strategies) and the reused feature components onto the new tokens,
45
+ so every legacy element harmonizes with the modern theme without JSX edits.
46
+ Also defines the custom shades those views reference (which were previously
47
+ undefined and rendered with no color). */
48
+ --color-indigo-300: #8aa5ff;
49
+ --color-indigo-400: #6b8fff;
50
+ --color-indigo-500: #4f7cff;
51
+ --color-indigo-600: #3f68e0;
52
+ --color-indigo-650: #3f68e0;
53
+ --color-indigo-700: #3459c9;
54
+ --color-indigo-950: #182038;
55
+ --color-violet-500: #6b8fff;
56
+ --color-violet-600: #4f7cff;
57
+
58
+ --color-gray-300: #e7e9ec;
59
+ --color-gray-400: #9aa0a8;
60
+ --color-gray-500: #6a7078;
61
+ --color-gray-550: #6a7078;
62
+ --color-gray-555: #6a7078;
63
+ --color-gray-600: #565c64;
64
+ --color-gray-700: #333840;
65
+ --color-gray-800: #24272c;
66
+ --color-gray-850: #1b1e22;
67
+ --color-gray-900: #141619;
68
+ --color-gray-950: #0f1113;
69
+
70
+ --color-slate-300: #cfd3d8;
71
+ --color-slate-350: #b6bcc4;
72
+ --color-slate-400: #9aa0a8;
73
+ --color-slate-455: #8b929b;
74
+ --color-slate-500: #6a7078;
75
+ --color-slate-550: #6a7078;
76
+ --color-slate-700: #333840;
77
+ --color-slate-800: #24272c;
78
+ --color-slate-850: #1b1e22;
79
+ --color-slate-900: #141619;
80
+ --color-slate-905: #121417;
81
+ --color-slate-950: #0f1113;
82
+
83
+ --color-cyan-400: #2db6c9;
84
+ --color-cyan-455: #2db6c9;
85
+ --color-cyan-500: #2db6c9;
86
+ --color-cyan-650: #2596a6;
87
+ --color-emerald-650: #2f9e46;
88
+ }
89
+
90
+ /* ─── Base ─────────────────────────────────────────────────────────────────── */
91
+ html {
92
+ color-scheme: dark;
24
93
  }
25
- ::-webkit-scrollbar-thumb {
26
- background: #1f2937;
27
- border-radius: 3px;
28
- border: 1px solid rgba(255, 255, 255, 0.03);
29
- }
30
- ::-webkit-scrollbar-thumb:hover {
31
- background: #374151;
32
- }
33
-
34
- /* Glassmorphism and Terminal UI Helpers */
35
- @utility glass-card {
36
- background: rgba(5, 7, 12, 0.6) !important;
37
- backdrop-filter: blur(12px);
38
- -webkit-backdrop-filter: blur(12px);
39
- border: 1px solid rgba(255, 255, 255, 0.04) !important;
40
- box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.5) !important;
94
+ body {
95
+ font-family: var(--font-sans);
96
+ background-color: var(--color-base);
97
+ color: var(--color-content);
98
+ -webkit-font-smoothing: antialiased;
99
+ text-rendering: optimizeLegibility;
41
100
  }
42
-
43
- @utility glass-card-glow {
44
- box-shadow: 0 0 15px rgba(6, 182, 212, 0.05), inset 0 0 1px 1px rgba(255, 255, 255, 0.03);
101
+ code, pre, kbd, samp {
102
+ font-family: var(--font-mono);
45
103
  }
46
104
 
47
- @utility text-glow-cyan {
48
- text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
105
+ /* Consistent focus ring for keyboard users */
106
+ :focus-visible {
107
+ outline: 2px solid var(--color-accent);
108
+ outline-offset: 2px;
109
+ border-radius: 2px;
49
110
  }
50
111
 
51
- @utility text-glow-green {
52
- text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
112
+ /* Sleek neutral scrollbars */
113
+ ::-webkit-scrollbar { width: 8px; height: 8px; }
114
+ ::-webkit-scrollbar-track { background: transparent; }
115
+ ::-webkit-scrollbar-thumb {
116
+ background: #2a2e34;
117
+ border-radius: 4px;
118
+ border: 2px solid var(--color-base);
53
119
  }
120
+ ::-webkit-scrollbar-thumb:hover { background: #3a3f47; }
54
121
 
55
- @utility neon-border {
56
- box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
122
+ /* ─── Motion (respecting reduced-motion) ─────────────────────────────────────── */
123
+ @utility animate-fade-in {
124
+ animation: fade-in 0.16s ease-out both;
57
125
  }
58
-
59
- @utility neon-border-green {
60
- box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
126
+ @utility animate-rise {
127
+ animation: rise 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
61
128
  }
129
+ @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
130
+ @keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
62
131
 
63
- /* CRT Scanline effect */
64
- .crt-screen {
65
- position: relative;
132
+ @media (prefers-reduced-motion: reduce) {
133
+ *, *::before, *::after {
134
+ animation-duration: 0.001ms !important;
135
+ animation-iteration-count: 1 !important;
136
+ transition-duration: 0.001ms !important;
137
+ }
66
138
  }
67
139
 
68
- .crt-screen::after {
69
- content: " ";
70
- display: block;
71
- position: absolute;
72
- top: 0; left: 0; bottom: 0; right: 0;
73
- background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.01), rgba(0, 255, 0, 0.04));
74
- z-index: 10;
75
- background-size: 100% 4px, 6px 100%;
76
- pointer-events: none;
77
- opacity: 0.35;
140
+ /* ─── Compatibility utilities (used by not-yet-restyled feature components) ─────
141
+ Remapped to the new neutral tokens so reused components inherit the modern look.
142
+ CRT/neon/text-glow effects were intentionally dropped. */
143
+ @utility glass-card {
144
+ background: var(--color-surface);
145
+ border: 1px solid var(--color-hairline);
78
146
  }
79
-
80
147
  @utility animate-slide-in {
81
- animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
82
- }
83
-
84
- @utility animate-fade-in {
85
- animation: fade-in 0.2s ease-out forwards;
148
+ animation: rise 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
86
149
  }
87
-
88
150
  @utility animate-spin-slow {
89
151
  animation: spin 8s linear infinite;
90
152
  }
91
-
92
153
  @utility animate-pulse-glow-green {
93
- animation: pulse-glow-green 2s infinite ease-in-out;
154
+ animation: soft-pulse 2s infinite ease-in-out;
94
155
  }
95
-
96
156
  @utility animate-pulse-glow-cyan {
97
- animation: pulse-glow-cyan 2.5s infinite ease-in-out;
157
+ animation: soft-pulse 2.5s infinite ease-in-out;
98
158
  }
99
-
100
- @keyframes slide-in {
101
- from {
102
- transform: translateY(0.5rem);
103
- opacity: 0;
104
- }
105
- to {
106
- transform: translateY(0);
107
- opacity: 1;
108
- }
159
+ @keyframes soft-pulse {
160
+ 0%, 100% { opacity: 0.85; }
161
+ 50% { opacity: 1; }
109
162
  }
110
163
 
111
- @keyframes fade-in {
112
- from {
113
- opacity: 0;
114
- }
115
- to {
116
- opacity: 1;
117
- }
118
- }
119
-
120
- @keyframes pulse-glow-green {
121
- 0%, 100% {
122
- box-shadow: 0 0 4px rgba(52, 211, 153, 0.15);
123
- opacity: 0.8;
124
- }
125
- 50% {
126
- box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
127
- opacity: 1;
128
- }
129
- }
130
-
131
- @keyframes pulse-glow-cyan {
132
- 0%, 100% {
133
- box-shadow: 0 0 4px rgba(6, 182, 212, 0.15);
134
- }
135
- 50% {
136
- box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
137
- }
138
- }
139
-
140
- /* Custom terminal colors */
141
- .term-matrix {
142
- color: #10b981;
143
- background-color: #030712;
144
- }
145
- .term-dracula {
146
- color: #f8f8f2;
147
- background-color: #282a36;
148
- }
149
- .term-classic {
150
- color: #e5e7eb;
151
- background-color: #0b0f19;
152
- }
164
+ /* Terminal log themes for the service logs console */
165
+ .term-matrix { color: #3fb950; background-color: #0b0c0e; }
166
+ .term-dracula { color: #f8f8f2; background-color: #1b1e22; }
167
+ .term-classic { color: var(--color-content); background-color: #0b0f14; }
@@ -0,0 +1,24 @@
1
+ import type { Tone } from '../components/ui/index.js';
2
+ import type { WorkspaceStatus } from '../types.js';
3
+
4
+ /** Maps a workspace sync status to a display label + status-language tone. */
5
+ export function syncMeta(status: WorkspaceStatus['syncStatus']): { label: string; tone: Tone } {
6
+ switch (status) {
7
+ case 'up-to-date':
8
+ return { label: 'In sync', tone: 'success' };
9
+ case 'rebased':
10
+ return { label: 'Rebased', tone: 'accent' };
11
+ case 'conflict':
12
+ case 'stash-conflict':
13
+ return { label: 'Sync conflict', tone: 'danger' };
14
+ case 'error':
15
+ return { label: 'Sync error', tone: 'danger' };
16
+ default:
17
+ return { label: 'Not synced', tone: 'idle' };
18
+ }
19
+ }
20
+
21
+ /** Short repo basename from a full path. */
22
+ export function repoName(repoPath: string): string {
23
+ return repoPath.split(/[\\/]/).pop() || repoPath;
24
+ }
@@ -0,0 +1,129 @@
1
+ import type { ReactNode } from 'react';
2
+ import { FolderGit2, GitBranch, Play, AlertTriangle, Plus, ArrowRight, RefreshCw } from 'lucide-react';
3
+ import type { Feature, WorkspaceStatus } from '../types.js';
4
+ import { Button, Card, EmptyState, PageHeader, Skeleton, StatusPill } from '../components/ui/index.js';
5
+ import { syncMeta } from '../lib/status.js';
6
+
7
+ interface DashboardPageProps {
8
+ workspaces: Feature[];
9
+ workspaceStatuses: Record<string, WorkspaceStatus>;
10
+ workspacesLoading: boolean;
11
+ statusesLoading: boolean;
12
+ onOpenWorkspace: (id: string) => void;
13
+ onNewWorkspace: () => void;
14
+ }
15
+
16
+ function StatTile({ icon, label, value, tone }: { icon: ReactNode; label: string; value: ReactNode; tone: string }) {
17
+ return (
18
+ <Card className="flex items-center gap-3.5 p-4">
19
+ <div className={`grid h-9 w-9 shrink-0 place-items-center rounded-md ${tone}`}>{icon}</div>
20
+ <div className="min-w-0">
21
+ <div className="font-display text-xl font-bold leading-none text-content">{value}</div>
22
+ <div className="mt-1 text-xs text-content-muted">{label}</div>
23
+ </div>
24
+ </Card>
25
+ );
26
+ }
27
+
28
+ export function DashboardPage({
29
+ workspaces,
30
+ workspaceStatuses,
31
+ workspacesLoading,
32
+ statusesLoading,
33
+ onOpenWorkspace,
34
+ onNewWorkspace,
35
+ }: DashboardPageProps) {
36
+ const statuses = Object.values(workspaceStatuses);
37
+ const withChanges = statuses.filter((s) => s.changedFiles > 0).length;
38
+ const running = statuses.reduce((n, s) => n + s.runningServices, 0);
39
+ const needsValidation = statuses.filter((s) => s.pendingValidation).length;
40
+
41
+ return (
42
+ <div className="mx-auto max-w-6xl animate-fade-in">
43
+ <PageHeader
44
+ title="Overview"
45
+ subtitle="Your multi-repo environment at a glance."
46
+ actions={<Button variant="primary" icon={<Plus size={16} />} onClick={onNewWorkspace}>New workspace</Button>}
47
+ />
48
+
49
+ <div className="mb-8 grid grid-cols-2 gap-3 lg:grid-cols-4">
50
+ <StatTile icon={<FolderGit2 size={18} className="text-accent" />} tone="bg-accent-soft" label="Workspaces" value={workspaces.length} />
51
+ <StatTile icon={<GitBranch size={18} className="text-warning" />} tone="bg-warning/10" label="With uncommitted changes" value={withChanges} />
52
+ <StatTile icon={<Play size={18} className="text-running" />} tone="bg-running/10" label="Running services" value={running} />
53
+ <StatTile icon={<AlertTriangle size={18} className="text-warning" />} tone="bg-warning/10" label="Need validation" value={needsValidation} />
54
+ </div>
55
+
56
+ <div className="mb-3 flex items-center justify-between">
57
+ <h2 className="font-display text-sm font-semibold uppercase tracking-wider text-content-muted">Workspaces</h2>
58
+ </div>
59
+
60
+ {workspacesLoading ? (
61
+ <div className="flex flex-col gap-2">
62
+ <Skeleton className="h-20" />
63
+ <Skeleton className="h-20" />
64
+ <Skeleton className="h-20" />
65
+ </div>
66
+ ) : workspaces.length === 0 ? (
67
+ <Card>
68
+ <EmptyState
69
+ icon={<FolderGit2 size={40} />}
70
+ title="No workspaces yet"
71
+ description="Create a feature workspace to group repositories and give your AI assistants shared context."
72
+ action={<Button variant="primary" icon={<Plus size={16} />} onClick={onNewWorkspace}>New workspace</Button>}
73
+ />
74
+ </Card>
75
+ ) : (
76
+ <div className="flex flex-col gap-2">
77
+ {workspaces.map((ws) => {
78
+ const st = workspaceStatuses[ws.branchName];
79
+ const sync = st ? syncMeta(st.syncStatus) : null;
80
+ return (
81
+ <Card
82
+ key={ws.id}
83
+ className="group flex cursor-pointer items-center gap-4 p-4 transition-colors hover:border-hairline-strong hover:bg-raised"
84
+ onClick={() => onOpenWorkspace(ws.branchName)}
85
+ >
86
+ <div className="min-w-0 flex-1">
87
+ <div className="flex items-center gap-2">
88
+ <span className="truncate font-mono text-sm font-semibold text-content">{ws.branchName}</span>
89
+ <span className="shrink-0 text-xs text-content-faint">{ws.repos.length} repos</span>
90
+ </div>
91
+ {ws.description && <p className="mt-0.5 truncate text-xs text-content-muted">{ws.description}</p>}
92
+ </div>
93
+
94
+ <div className="flex shrink-0 items-center gap-1.5">
95
+ {!st && statusesLoading ? (
96
+ <Skeleton className="h-5 w-40" />
97
+ ) : st ? (
98
+ <>
99
+ {st.changedFiles > 0 ? (
100
+ <StatusPill tone="warning" dot>
101
+ {st.changedFiles} changed
102
+ </StatusPill>
103
+ ) : (
104
+ <StatusPill tone="idle" dot>
105
+ Clean
106
+ </StatusPill>
107
+ )}
108
+ {st.runningServices > 0 && (
109
+ <StatusPill tone="running" dot>
110
+ {st.runningServices} running
111
+ </StatusPill>
112
+ )}
113
+ {sync && (
114
+ <StatusPill tone={sync.tone}>
115
+ <RefreshCw size={11} /> {sync.label}
116
+ </StatusPill>
117
+ )}
118
+ </>
119
+ ) : null}
120
+ <ArrowRight size={16} className="text-content-faint transition-transform group-hover:translate-x-0.5 group-hover:text-content" />
121
+ </div>
122
+ </Card>
123
+ );
124
+ })}
125
+ </div>
126
+ )}
127
+ </div>
128
+ );
129
+ }