Skip to content

Commit 8f87a94

Browse files
authored
Merge pull request #267 from marijnvdwerf/add-frontend-ci
Add interface CI workflow
2 parents 2e05ef7 + 8eea645 commit 8f87a94

File tree

11 files changed

+54
-56
lines changed

11 files changed

+54
-56
lines changed

.github/workflows/interface-ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Interface CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "interface/**"
8+
- ".github/workflows/interface-ci.yml"
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- "interface/**"
13+
- ".github/workflows/interface-ci.yml"
14+
15+
permissions:
16+
contents: read
17+
18+
concurrency:
19+
group: interface-ci-${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
quality:
24+
name: Interface Quality
25+
runs-on: ubuntu-24.04
26+
defaults:
27+
run:
28+
working-directory: interface
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: oven-sh/setup-bun@v1
33+
with:
34+
bun-version: "1.3"
35+
36+
- name: Install dependencies
37+
run: bun ci
38+
39+
- name: Typecheck
40+
run: bunx tsc --noEmit

interface/src/components/ChannelSettingCard.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ interface PlatformCatalogProps {
5252
}
5353

5454
export function PlatformCatalog({onAddInstance}: PlatformCatalogProps) {
55-
const PLATFORMS: {platform: Platform; description: string}[] = [
56-
{platform: "discord", description: "Discord bot integration"},
57-
{platform: "slack", description: "Slack bot integration"},
58-
{platform: "telegram", description: "Telegram bot integration"},
59-
{platform: "twitch", description: "Twitch chat integration"},
60-
{platform: "email", description: "IMAP/SMTP email integration"},
61-
{platform: "webhook", description: "HTTP webhook receiver"},
55+
const PLATFORMS: Platform[] = [
56+
"discord",
57+
"slack",
58+
"telegram",
59+
"twitch",
60+
"email",
61+
"webhook",
6262
];
6363

6464
const COMING_SOON = [
@@ -75,7 +75,7 @@ export function PlatformCatalog({onAddInstance}: PlatformCatalogProps) {
7575
<h3 className="text-xs font-semibold text-ink-faint uppercase tracking-wider mb-2">
7676
Available
7777
</h3>
78-
{PLATFORMS.map(({platform, description}) => (
78+
{PLATFORMS.map((platform) => (
7979
<button
8080
key={platform}
8181
type="button"

interface/src/components/TagInput.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {useState, useRef, KeyboardEvent} from "react";
22
import {X} from "lucide-react";
3-
import {Input} from "@/ui";
43

54
interface TagInputProps {
65
value: string[];

interface/src/components/TopologyGraph.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,6 @@ function loadHandles(): SavedHandles {
9696
return {};
9797
}
9898

99-
function saveHandles(edges: Edge[]) {
100-
const handles: SavedHandles = {};
101-
for (const edge of edges) {
102-
if (edge.sourceHandle && edge.targetHandle) {
103-
handles[edge.id] = {
104-
sourceHandle: edge.sourceHandle,
105-
targetHandle: edge.targetHandle,
106-
};
107-
}
108-
}
109-
try {
110-
localStorage.setItem(HANDLES_KEY, JSON.stringify(handles));
111-
} catch {
112-
// ignore
113-
}
114-
}
115-
11699
/** Deterministic gradient from a seed string. */
117100
function seedGradient(seed: string): [string, string] {
118101
let hash = 0;

interface/src/hooks/useEventSource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export function useEventSource(url: string, options: UseEventSourceOptions) {
3131

3232
const [connectionState, setConnectionState] = useState<ConnectionState>("connecting");
3333

34-
const reconnectTimeout = useRef<ReturnType<typeof setTimeout>>();
35-
const eventSourceRef = useRef<EventSource>();
34+
const reconnectTimeout = useRef<ReturnType<typeof setTimeout> | null>(null);
35+
const eventSourceRef = useRef<EventSource | null>(null);
3636
const retryDelayRef = useRef(INITIAL_RETRY_MS);
3737
const hadConnectionRef = useRef(false);
3838

interface/src/routes/AgentConfig.tsx

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useCallback, useEffect, useState, useRef } from "react";
22
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
33
import { api, type AgentConfigResponse, type AgentConfigUpdateRequest } from "@/api/client";
4-
import { Button, SettingSidebarButton, Input, TextArea, Toggle, NumberStepper, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, cx } from "@/ui";
4+
import { Button, SettingSidebarButton, TextArea, Toggle, NumberStepper, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, cx } from "@/ui";
55
import { ModelSelect } from "@/components/ModelSelect";
66
import { TagInput } from "@/components/TagInput";
77
import { Markdown } from "@/components/Markdown";
@@ -882,28 +882,6 @@ function ConfigSectionEditor({ sectionId, label, description, detail, config, on
882882

883883
// -- Form Field Components --
884884

885-
interface ConfigFieldProps {
886-
label: string;
887-
description: string;
888-
value: string;
889-
onChange: (value: string) => void;
890-
}
891-
892-
function ConfigField({ label, description, value, onChange }: ConfigFieldProps) {
893-
return (
894-
<div className="flex flex-col gap-1.5">
895-
<label className="text-sm font-medium text-ink">{label}</label>
896-
<p className="text-tiny text-ink-faint">{description}</p>
897-
<Input
898-
type="text"
899-
value={value}
900-
onChange={(e) => onChange(e.target.value)}
901-
className="mt-1 border-app-line/50 bg-app-darkBox/30"
902-
/>
903-
</div>
904-
);
905-
}
906-
907885
interface ConfigToggleFieldProps {
908886
label: string;
909887
description: string;

interface/src/routes/AgentCortex.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { useQuery } from "@tanstack/react-query";
33
import { AnimatePresence, motion } from "framer-motion";
44
import {
55
api,
6-
CORTEX_EVENT_TYPES,
76
type CortexEvent,
87
type CortexEventType,
98
} from "@/api/client";

interface/src/routes/AgentCron.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useState } from "react";
22
import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
33
import { api, type CronJobWithStats, type CreateCronRequest } from "@/api/client";
44
import { formatDuration, formatTimeAgo } from "@/lib/format";
5-
import { AnimatePresence, motion } from "framer-motion";
65
import { Clock05Icon } from "@hugeicons/core-free-icons";
76
import { HugeiconsIcon } from "@hugeicons/react";
87
import {

interface/src/routes/AgentIngest.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {useState, useRef, useCallback} from "react";
22
import {useQuery, useMutation, useQueryClient} from "@tanstack/react-query";
33
import {api, type IngestFileInfo} from "@/api/client";
44
import {formatTimeAgo} from "@/lib/format";
5-
import {Button, Badge} from "@/ui";
5+
import {Badge} from "@/ui";
66
import {clsx} from "clsx";
77
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
88
import {faTrash} from "@fortawesome/free-solid-svg-icons";

interface/src/routes/AgentMemories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
FilterButton,
2323
} from "@/ui";
2424
import { formatTimeAgo } from "@/lib/format";
25-
import { Search01Icon, ArrowDown01Icon, LeftToRightListBulletIcon, WorkflowSquare01Icon, IdeaIcon } from "@hugeicons/core-free-icons";
25+
import { ArrowDown01Icon, LeftToRightListBulletIcon, WorkflowSquare01Icon, IdeaIcon } from "@hugeicons/core-free-icons";
2626
import { HugeiconsIcon } from "@hugeicons/react";
2727

2828
type ViewMode = "list" | "graph";

0 commit comments

Comments
 (0)