Skip to content

Commit 7a97325

Browse files
author
Factory Bot
committed
refactor: rename Figma to Cortex UI across entire codebase
- Rename figma-tokens.css → cortex-tokens.css - Rename --figma-* CSS variables → --cortex-* - Rename src/components/figma/ → src/components/cortex/ - Rename all FigmaXxx components → CortexXxx - Update all imports and references - Update all comments and documentation
1 parent 8c3575f commit 7a97325

306 files changed

Lines changed: 5460 additions & 5127 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cortex-gui/src/components/ActivityBar.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function ActivityBarItemComponent(props: ActivityBarItemProps) {
211211
height: "44px",
212212
border: "none",
213213
background: props.isActive ? "rgba(255, 255, 255, 0.12)" : "transparent",
214-
color: props.isActive ? "var(--figma-text-primary)" : tokens.colors.icon.inactive,
214+
color: props.isActive ? "var(--cortex-text-primary)" : tokens.colors.icon.inactive,
215215
opacity: props.isDragging ? "0.5" : props.isActive ? "1" : "0.7",
216216
cursor: "pointer",
217217
"border-radius": tokens.radius.sm,
@@ -230,7 +230,7 @@ function ActivityBarItemComponent(props: ActivityBarItemProps) {
230230
bottom: "8px",
231231
width: "2px",
232232
background: tokens.colors.semantic.primary,
233-
"border-radius": "var(--figma-radius-sm)",
233+
"border-radius": "var(--cortex-radius-sm)",
234234
}}
235235
/>
236236
</Show>
@@ -255,10 +255,10 @@ function ActivityBarItemComponent(props: ActivityBarItemProps) {
255255
"justify-content": "center",
256256
padding: "0 4px",
257257
background: tokens.colors.semantic.primary,
258-
color: "var(--figma-text-primary)",
258+
color: "var(--cortex-text-primary)",
259259
"font-size": "10px",
260260
"font-weight": "600",
261-
"border-radius": "var(--figma-radius-md)",
261+
"border-radius": "var(--cortex-radius-md)",
262262
"line-height": "1",
263263
}}
264264
>
@@ -302,7 +302,7 @@ function ActivityBarItemComponent(props: ActivityBarItemProps) {
302302
"margin-left": tokens.spacing.md,
303303
padding: `2px ${tokens.spacing.sm}`,
304304
background: tokens.colors.semantic.primary,
305-
color: "var(--figma-text-primary)",
305+
color: "var(--cortex-text-primary)",
306306
"font-size": tokens.typography.fontSize.sm,
307307
"border-radius": tokens.radius.sm,
308308
}}
@@ -842,7 +842,7 @@ export function ActivityBar(props: ActivityBarProps) {
842842
}}
843843
onMouseEnter={(e) => {
844844
e.currentTarget.style.background = "rgba(255, 255, 255, 0.08)";
845-
e.currentTarget.style.color = "var(--figma-text-primary)";
845+
e.currentTarget.style.color = "var(--cortex-text-primary)";
846846
e.currentTarget.style.opacity = "1";
847847
}}
848848
onMouseLeave={(e) => {
@@ -878,7 +878,7 @@ export function ActivityBar(props: ActivityBarProps) {
878878
}}
879879
onMouseEnter={(e) => {
880880
e.currentTarget.style.background = "rgba(255, 255, 255, 0.08)";
881-
e.currentTarget.style.color = "var(--figma-text-primary)";
881+
e.currentTarget.style.color = "var(--cortex-text-primary)";
882882
e.currentTarget.style.opacity = "1";
883883
}}
884884
onMouseLeave={(e) => {
@@ -914,3 +914,4 @@ export function ActivityBar(props: ActivityBarProps) {
914914
// =============================================================================
915915

916916
export default ActivityBar;
917+

cortex-gui/src/components/AgentsManager.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ Guidelines for generating agents:
669669
class="px-3 py-2 rounded text-xs"
670670
style={{
671671
background: "rgba(239, 68, 68, 0.1)",
672-
color: "var(--figma-error)"
672+
color: "var(--cortex-error)"
673673
}}
674674
>
675675
{aiError()}
@@ -935,3 +935,4 @@ Guidelines for generating agents:
935935
</Show>
936936
);
937937
}
938+

cortex-gui/src/components/AgentsSidebar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ export function AgentsSidebar() {
10351035
style={{
10361036
width: "8px",
10371037
height: "8px",
1038-
"border-radius": "var(--figma-radius-full)",
1038+
"border-radius": "var(--cortex-radius-full)",
10391039
background: getStatusColor(agent.status),
10401040
"flex-shrink": "0",
10411041
}}
@@ -1228,7 +1228,7 @@ export function AgentsSidebar() {
12281228
style={{
12291229
width: "6px",
12301230
height: "6px",
1231-
"border-radius": "var(--figma-radius-full)",
1231+
"border-radius": "var(--cortex-radius-full)",
12321232
background: getStatusColor(entry.status),
12331233
}}
12341234
/>
@@ -1258,3 +1258,4 @@ export function AgentsSidebar() {
12581258
}
12591259

12601260
export default AgentsSidebar;
1261+

cortex-gui/src/components/AutoUpdate.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function AutoUpdateDialog() {
8989
<div class="flex items-center gap-3">
9090
<div
9191
class="flex items-center justify-center w-10 h-10 rounded-full"
92-
style={{ background: "var(--figma-info)" }}
92+
style={{ background: "var(--cortex-info)" }}
9393
>
9494
<Icon name="download" size={20} class="text-blue-400" />
9595
</div>
@@ -194,7 +194,7 @@ export function AutoUpdateDialog() {
194194
<div
195195
class="h-full rounded-full transition-all duration-300"
196196
style={{
197-
background: "linear-gradient(90deg, var(--figma-info), var(--figma-info))",
197+
background: "linear-gradient(90deg, var(--cortex-info), var(--cortex-info))",
198198
width: `${downloadData()?.progress || 0}%`
199199
}}
200200
/>
@@ -342,11 +342,11 @@ export function AutoUpdateStatusBadge() {
342342
const badgeColor = createMemo(() => {
343343
switch (update.status.type) {
344344
case "UpdateAvailable":
345-
return "var(--figma-info)";
345+
return "var(--cortex-info)";
346346
case "Downloading":
347-
return "var(--figma-warning)";
347+
return "var(--cortex-warning)";
348348
case "RestartRequired":
349-
return "var(--figma-success)";
349+
return "var(--cortex-success)";
350350
default:
351351
return "#666";
352352
}
@@ -415,8 +415,8 @@ export function AutoUpdateMenuItem(props: { onClose?: () => void }) {
415415
disabled={update.status.type === "Downloading" || update.status.type === "Checking"}
416416
class="w-full flex items-center justify-between px-3 py-1.5 text-xs transition-colors"
417417
style={{
418-
color: update.status.type === "UpdateAvailable" ? "var(--figma-info)" :
419-
update.status.type === "RestartRequired" ? "var(--figma-success)" : "var(--figma-text-primary)",
418+
color: update.status.type === "UpdateAvailable" ? "var(--cortex-info)" :
419+
update.status.type === "RestartRequired" ? "var(--cortex-success)" : "var(--cortex-text-primary)",
420420
background: "transparent",
421421
cursor: update.status.type === "Downloading" || update.status.type === "Checking" ? "default" : "pointer",
422422
}}
@@ -449,3 +449,4 @@ export function AutoUpdateMenuItem(props: { onClose?: () => void }) {
449449
}
450450

451451
export default AutoUpdateDialog;
452+

cortex-gui/src/components/AuxiliaryWindow.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const DefaultHeader: Component<AuxiliaryWindowHeaderProps> = (props) => {
7474
"justify-content": "space-between",
7575
height: "32px",
7676
padding: "0 8px",
77-
background: "var(--color-bg-secondary, var(--figma-bg-primary))",
77+
background: "var(--color-bg-secondary, var(--cortex-bg-primary))",
7878
"border-bottom": "1px solid var(--color-border, #333)",
7979
"-webkit-app-region": "drag",
8080
"user-select": "none",
@@ -112,7 +112,7 @@ const DefaultHeader: Component<AuxiliaryWindowHeaderProps> = (props) => {
112112
border: "none",
113113
padding: "4px 8px",
114114
cursor: "pointer",
115-
"border-radius": "var(--figma-radius-sm)",
115+
"border-radius": "var(--cortex-radius-sm)",
116116
color: "var(--color-text-secondary, #888)",
117117
"font-size": "11px",
118118
}}
@@ -134,7 +134,7 @@ const DefaultHeader: Component<AuxiliaryWindowHeaderProps> = (props) => {
134134
border: "none",
135135
padding: "4px 8px",
136136
cursor: "pointer",
137-
"border-radius": "var(--figma-radius-sm)",
137+
"border-radius": "var(--cortex-radius-sm)",
138138
color: "var(--color-text-secondary, #888)",
139139
}}
140140
onMouseEnter={(e) => {
@@ -155,7 +155,7 @@ const DefaultHeader: Component<AuxiliaryWindowHeaderProps> = (props) => {
155155
border: "none",
156156
padding: "4px 8px",
157157
cursor: "pointer",
158-
"border-radius": "var(--figma-radius-sm)",
158+
"border-radius": "var(--cortex-radius-sm)",
159159
color: "var(--color-text-secondary, #888)",
160160
}}
161161
onMouseEnter={(e) => {
@@ -176,11 +176,11 @@ const DefaultHeader: Component<AuxiliaryWindowHeaderProps> = (props) => {
176176
border: "none",
177177
padding: "4px 8px",
178178
cursor: "pointer",
179-
"border-radius": "var(--figma-radius-sm)",
179+
"border-radius": "var(--cortex-radius-sm)",
180180
color: "var(--color-text-secondary, #888)",
181181
}}
182182
onMouseEnter={(e) => {
183-
e.currentTarget.style.background = "var(--figma-error)";
183+
e.currentTarget.style.background = "var(--cortex-error)";
184184
e.currentTarget.style.color = "white";
185185
}}
186186
onMouseLeave={(e) => {
@@ -252,8 +252,8 @@ const LoadingContent: Component = () => {
252252
width: "32px",
253253
height: "32px",
254254
border: "2px solid var(--color-border, #333)",
255-
"border-top-color": "var(--color-primary, var(--figma-info))",
256-
"border-radius": "var(--figma-radius-full)",
255+
"border-top-color": "var(--color-primary, var(--cortex-info))",
256+
"border-radius": "var(--cortex-radius-full)",
257257
animation: "spin 1s linear infinite",
258258
}}
259259
/>
@@ -542,7 +542,7 @@ export const AuxiliaryWindow: Component<AuxiliaryWindowProps> = (props) => {
542542
"flex-direction": "column",
543543
height: "100vh",
544544
width: "100vw",
545-
background: "var(--color-bg, var(--figma-bg-primary))",
545+
background: "var(--color-bg, var(--cortex-bg-primary))",
546546
color: "var(--color-text, #ccc)",
547547
overflow: "hidden",
548548
...props.style,
@@ -760,3 +760,4 @@ export function useDragDetach(options: UseDragDetachOptions): DragDetachHandlers
760760
}
761761

762762
export default AuxiliaryWindow;
763+

cortex-gui/src/components/Breadcrumbs.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,12 @@ export function Breadcrumbs(props: BreadcrumbsProps) {
703703
}
704704
.breadcrumbs-container::-webkit-scrollbar-thumb {
705705
background: var(--border-weak);
706-
border-radius: var(--figma-radius-sm);
706+
border-radius: var(--cortex-radius-sm);
707707
}
708708
`}</style>
709709
</Show>
710710
);
711711
}
712712

713713
export default Breadcrumbs;
714+

cortex-gui/src/components/BufferSearch.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ export function BufferSearch() {
671671
width: multilineMode() ? "480px" : "419px",
672672
height: showReplace() || multilineMode() ? "auto" : "auto",
673673
background: "var(--ui-panel-bg)",
674-
"border-radius": "var(--figma-radius-md)",
674+
"border-radius": "var(--cortex-radius-md)",
675675
"box-shadow": "0 4px 16px rgba(0, 0, 0, 0.3)",
676676
border: "1px solid rgba(255, 255, 255, 0.08)",
677677
overflow: "hidden",
@@ -690,7 +690,7 @@ export function BufferSearch() {
690690
class="flex-1 flex items-center gap-2 px-3 h-[32px] rounded-md"
691691
style={{
692692
background: "var(--jb-canvas)",
693-
border: searchError() ? "1px solid var(--figma-error)" : "1px solid transparent",
693+
border: searchError() ? "1px solid var(--cortex-error)" : "1px solid transparent",
694694
}}
695695
>
696696
<Icon name="magnifying-glass" size={16} class="shrink-0" style={{ color: "var(--jb-text-muted-color)" }} />
@@ -746,7 +746,7 @@ export function BufferSearch() {
746746
padding: "2px 0 0 2px",
747747
"line-height": "23px",
748748
color: searchError()
749-
? "var(--figma-error)"
749+
? "var(--cortex-error)"
750750
: matches().length > 0
751751
? "var(--jb-text-body-color)"
752752
: "var(--jb-text-muted-color)"
@@ -763,7 +763,7 @@ export function BufferSearch() {
763763
width: "16px",
764764
height: "16px",
765765
padding: "3px",
766-
"border-radius": "var(--figma-radius-md)",
766+
"border-radius": "var(--cortex-radius-md)",
767767
"margin-left": "3px",
768768
display: "flex",
769769
"align-items": "center",
@@ -785,7 +785,7 @@ export function BufferSearch() {
785785
width: "16px",
786786
height: "16px",
787787
padding: "3px",
788-
"border-radius": "var(--figma-radius-md)",
788+
"border-radius": "var(--cortex-radius-md)",
789789
"margin-left": "3px",
790790
display: "flex",
791791
"align-items": "center",
@@ -813,7 +813,7 @@ export function BufferSearch() {
813813
width: "20px",
814814
height: "20px",
815815
padding: "3px",
816-
"border-radius": "var(--figma-radius-sm)",
816+
"border-radius": "var(--cortex-radius-sm)",
817817
display: "flex",
818818
"align-items": "center",
819819
"justify-content": "center",
@@ -1008,3 +1008,4 @@ export function BufferSearch() {
10081008
</Show>
10091009
);
10101010
}
1011+

cortex-gui/src/components/CallHierarchyView.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,31 +194,31 @@ function getSymbolIcon(kind: CallHierarchySymbolKind): JSX.Element {
194194
case "module":
195195
case "namespace":
196196
case "package":
197-
return <Icon name="box" size={16} class="flex-shrink-0" style={{ color: "var(--figma-warning)" }} />;
197+
return <Icon name="box" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-warning)" }} />;
198198
case "class":
199199
case "struct":
200-
return <Icon name="box" size={16} class="flex-shrink-0" style={{ color: "var(--figma-warning)" }} />;
200+
return <Icon name="box" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-warning)" }} />;
201201
case "method":
202202
case "constructor":
203-
return <Icon name="code" size={16} class="flex-shrink-0" style={{ color: "var(--figma-info)" }} />;
203+
return <Icon name="code" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-info)" }} />;
204204
case "property":
205205
case "field":
206-
return <Icon name="key" size={16} class="flex-shrink-0" style={{ color: "var(--figma-info)" }} />;
206+
return <Icon name="key" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-info)" }} />;
207207
case "enum":
208208
case "enumMember":
209-
return <Icon name="hashtag" size={16} class="flex-shrink-0" style={{ color: "var(--figma-error)" }} />;
209+
return <Icon name="hashtag" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-error)" }} />;
210210
case "interface":
211-
return <Icon name="font" size={16} class="flex-shrink-0" style={{ color: "var(--figma-success)" }} />;
211+
return <Icon name="font" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-success)" }} />;
212212
case "function":
213-
return <Icon name="bolt" size={16} class="flex-shrink-0" style={{ color: "var(--figma-info)" }} />;
213+
return <Icon name="bolt" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-info)" }} />;
214214
case "variable":
215-
return <Icon name="anchor" size={16} class="flex-shrink-0" style={{ color: "var(--figma-info)" }} />;
215+
return <Icon name="anchor" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-info)" }} />;
216216
case "constant":
217-
return <Icon name="database" size={16} class="flex-shrink-0" style={{ color: "var(--figma-info)" }} />;
217+
return <Icon name="database" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-info)" }} />;
218218
case "typeParameter":
219-
return <Icon name="font" size={16} class="flex-shrink-0" style={{ color: "var(--figma-info)" }} />;
219+
return <Icon name="font" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-info)" }} />;
220220
case "event":
221-
return <Icon name="code-merge" size={16} class="flex-shrink-0" style={{ color: "var(--figma-warning)" }} />;
221+
return <Icon name="code-merge" size={16} class="flex-shrink-0" style={{ color: "var(--cortex-warning)" }} />;
222222
default:
223223
return <Icon name="code" size={16} class="flex-shrink-0" style={{ color: "var(--text-weak)" }} />;
224224
}
@@ -1478,7 +1478,7 @@ export function CallHierarchyView(props: CallHierarchyViewProps) {
14781478

14791479
<Show when={error()}>
14801480
<div class="flex flex-col items-center justify-center py-12 gap-2">
1481-
<span class="text-sm" style={{ color: "var(--text-error, var(--figma-error))" }}>
1481+
<span class="text-sm" style={{ color: "var(--text-error, var(--cortex-error))" }}>
14821482
{error()}
14831483
</span>
14841484
<button
@@ -1773,3 +1773,4 @@ export function CallHierarchyPanel() {
17731773
}
17741774

17751775
export default CallHierarchyView;
1776+

cortex-gui/src/components/Chat/AgentMessage.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function getSnakeDelay(index: number): number {
3131

3232
function NeonGridLoader() {
3333
// Simple white/gray loader - subtle and minimal
34-
const dotColor = "var(--text-muted, var(--figma-text-secondary))";
35-
const dotColorActive = "var(--text-secondary, var(--figma-text-primary))";
34+
const dotColor = "var(--text-muted, var(--cortex-text-secondary))";
35+
const dotColorActive = "var(--text-secondary, var(--cortex-text-primary))";
3636

3737
return (
3838
<div style={{
@@ -47,7 +47,7 @@ function NeonGridLoader() {
4747
style={{
4848
width: "4px",
4949
height: "4px",
50-
"border-radius": "var(--figma-radius-sm)",
50+
"border-radius": "var(--cortex-radius-sm)",
5151
background: dotColor,
5252
opacity: "0.4",
5353
animation: `gridPulse 1.2s ease-in-out infinite`,
@@ -108,7 +108,7 @@ interface AgentMessageProps {
108108
// User message style
109109
const userMessageStyle: JSX.CSSProperties = {
110110
background: palette.inputCard,
111-
"border-radius": "var(--figma-radius-lg)",
111+
"border-radius": "var(--cortex-radius-lg)",
112112
padding: "12px 16px",
113113
color: palette.textBody,
114114
"max-width": "80%",
@@ -258,3 +258,4 @@ export function AgentMessage(props: AgentMessageProps) {
258258
</div>
259259
);
260260
}
261+

0 commit comments

Comments
 (0)