Skip to content

Commit e39ba1f

Browse files
gkorlandCopilot
andcommitted
Merge origin/staging into add-loading-states
Resolve merge conflicts: - app/components/graphView.tsx: accept deletion (debugger fix already in staging) - app/page.tsx: accept deletion, apply isFetchingGraph to app/src/App.tsx - app/src/components/code-graph.tsx: merge Loader2+Button imports, add loading spinner - app/src/components/combobox.tsx: merge loading state with staging API/headers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 parents da471c4 + 887b82f commit e39ba1f

File tree

154 files changed

+16023
-10379
lines changed

Some content is hidden

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

154 files changed

+16023
-10379
lines changed

.env.template

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1-
PORT=<PORT>
2-
HOST=<HOST>
1+
# FalkorDB connection
2+
FALKORDB_HOST=localhost
3+
FALKORDB_PORT=6379
34

5+
# Optional FalkorDB authentication
6+
FALKORDB_USERNAME=
7+
FALKORDB_PASSWORD=
8+
9+
# Token checked by authenticated endpoints. If left empty, the current
10+
# implementation accepts requests without an Authorization header.
11+
SECRET_TOKEN=<YOUR_SECRET_TOKEN>
12+
13+
# Set to 1 to make read-only endpoints public.
14+
CODE_GRAPH_PUBLIC=0
15+
16+
# Limit /api/analyze_folder to this directory tree. Leave commented to use
17+
# the repository root as the default allowed directory.
18+
# ALLOWED_ANALYSIS_DIR=/absolute/path/to/projects
19+
20+
# LiteLLM model used by /api/chat
21+
MODEL_NAME=gemini/gemini-flash-lite-latest
22+
23+
# Provider credential for the default Gemini model. Change this to the
24+
# appropriate provider key if you change MODEL_NAME.
25+
GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
26+
27+
# Optional Uvicorn bind settings used by start.sh / make run-*
28+
HOST=0.0.0.0
29+
PORT=5000

.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,28 @@ updates:
1010
schedule:
1111
interval: "daily"
1212
target-branch: "staging"
13-
13+
groups:
14+
npm-minor-patch:
15+
update-types:
16+
- "patch"
17+
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
schedule:
21+
interval: "daily"
22+
target-branch: "staging"
23+
groups:
24+
github-actions-minor-patch:
25+
update-types:
26+
- "patch"
27+
28+
- package-ecosystem: "pip"
29+
directory: "/"
30+
schedule:
31+
interval: "daily"
32+
target-branch: "staging"
33+
groups:
34+
pip-minor-patch:
35+
update-types:
36+
- "patch"
37+

.github/workflows/build.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v6
25+
with:
26+
node-version: "24"
27+
cache: "npm"
28+
cache-dependency-path: |
29+
package-lock.json
30+
app/package-lock.json
31+
32+
- name: Install frontend dependencies
33+
working-directory: ./app
34+
run: npm ci
35+
36+
- name: Build frontend
37+
working-directory: ./app
38+
run: npm run build
39+
40+
- name: Lint frontend
41+
working-directory: ./app
42+
run: npm run lint
43+
44+
- name: Setup Python
45+
uses: actions/setup-python@v6
46+
with:
47+
python-version: "3.12"
48+
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v7
51+
with:
52+
version: "latest"
53+
54+
- name: Install backend dependencies
55+
run: uv sync --extra test
56+
57+
docker-build:
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout
61+
uses: actions/checkout@v6
62+
63+
- name: Build Docker image
64+
uses: docker/build-push-action@v7
65+
with:
66+
context: .
67+
file: ./Dockerfile
68+
push: false

.github/workflows/nextjs.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/playwright.yml

Lines changed: 93 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,125 @@ on:
44
branches: [ main, staging ]
55
pull_request:
66
branches: [ main, staging ]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
712
jobs:
813
test:
914
timeout-minutes: 60
1015
runs-on: ubuntu-latest
16+
env:
17+
PYTHONPATH: ${{ github.workspace }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
shard: [1, 2]
1122
services:
1223
falkordb:
1324
image: falkordb/falkordb:latest
1425
ports:
1526
- 6379:6379
1627
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-node@v4
28+
- uses: actions/checkout@v6
29+
30+
- uses: actions/setup-node@v6
1931
with:
20-
node-version: lts/*
21-
- name: Install dependencies
32+
node-version: 24
33+
cache: 'npm'
34+
cache-dependency-path: |
35+
package-lock.json
36+
app/package-lock.json
37+
38+
- uses: actions/setup-python@v6
39+
with:
40+
python-version: '3.12'
41+
42+
- name: Install uv
43+
uses: astral-sh/setup-uv@v7
44+
with:
45+
version: "latest"
46+
47+
- name: Install backend dependencies
48+
run: uv sync
49+
50+
- name: Install frontend dependencies
51+
working-directory: ./app
2252
run: npm ci
23-
- name: Install Playwright Browsers
24-
run: npx playwright install --with-deps
25-
- name: Set up environment variables and run tests
53+
54+
- name: Build frontend
55+
working-directory: ./app
56+
env:
57+
VITE_SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
58+
run: npm run build
59+
60+
- name: Seed test data into FalkorDB
61+
run: uv run python e2e/seed_test_data.py
62+
63+
- name: Install Playwright npm dependencies
64+
run: |
65+
npm ci
66+
67+
- name: Cache Playwright browsers
68+
id: playwright-cache
69+
uses: actions/cache@v5
70+
with:
71+
path: ~/.cache/ms-playwright
72+
key: playwright-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package-lock.json') }}
73+
74+
- name: Install Playwright browsers
75+
if: steps.playwright-cache.outputs.cache-hit != 'true'
76+
run: npx playwright install --with-deps chromium firefox
77+
78+
- name: Install Playwright system deps
79+
if: steps.playwright-cache.outputs.cache-hit == 'true'
80+
run: |
81+
npx playwright install chromium firefox
82+
npx playwright install-deps chromium firefox
83+
84+
- name: Start server
85+
id: start-server
2686
env:
27-
FALKORDB_URL: ${{ secrets.FALKORDB_URL }}
2887
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2988
SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
30-
NEXT_PUBLIC_MODE: UNLIMITED
31-
BACKEND_URL: ${{ secrets.BACKEND_URL }}
89+
CODE_GRAPH_PUBLIC: "1"
90+
MODEL_NAME: "openai/gpt-4.1-mini"
3291
run: |
33-
npm install
34-
npm run build
35-
NEXTAUTH_SECRET=SECRET npm start & npx playwright test --reporter=dot,list
92+
uv run uvicorn api.index:app --host 0.0.0.0 --port 5000 &
93+
echo "pid=$!" >> "$GITHUB_OUTPUT"
94+
# Wait for server to be ready
95+
timeout 30 bash -c 'until curl -s http://localhost:5000/ > /dev/null 2>&1; do sleep 0.5; done'
96+
97+
- name: Run Playwright tests
98+
env:
99+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
100+
SECRET_TOKEN: ${{ secrets.SECRET_TOKEN }}
101+
CODE_GRAPH_PUBLIC: "1"
102+
MODEL_NAME: "openai/gpt-4.1-mini"
103+
run: npx playwright test --shard=${{ matrix.shard }}/2 --reporter=dot,list
104+
105+
- name: Stop server
106+
if: always()
107+
run: kill ${{ steps.start-server.outputs.pid }} 2>/dev/null || true
108+
36109
- name: Ensure required directories exist
110+
if: always()
37111
run: |
38112
mkdir -p playwright-report
39113
mkdir -p playwright-report/artifacts
40-
- uses: actions/upload-artifact@v4
114+
115+
- uses: actions/upload-artifact@v7
41116
if: always()
42117
with:
43-
name: playwright-report
118+
name: playwright-report-shard-${{ matrix.shard }}
44119
path: playwright-report/
45120
retention-days: 30
121+
46122
- name: Upload failed test screenshots
47123
if: always()
48-
uses: actions/upload-artifact@v4
124+
uses: actions/upload-artifact@v7
49125
with:
50-
name: failed-test-screenshots
126+
name: failed-test-screenshots-shard-${{ matrix.shard }}
51127
path: playwright-report/artifacts/
52128
retention-days: 30

.github/workflows/release-image.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616

1717
- name: Set tags
1818
run: |
1919
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}; then
20-
echo "TAGS=falkordb/code-graph-frontend:latest,falkordb/code-graph-frontend:${{ github.ref_name }}" >> $GITHUB_ENV
20+
echo "TAGS=falkordb/code-graph:latest,falkordb/code-graph:${{ github.ref_name }}" >> $GITHUB_ENV
2121
else
22-
echo "TAGS=falkordb/code-graph-frontend:edge" >> $GITHUB_ENV
22+
echo "TAGS=falkordb/code-graph:edge" >> $GITHUB_ENV
2323
fi
2424
2525
- name: Login to DockerHub
26-
uses: docker/login-action@v3
26+
uses: docker/login-action@v4
2727
with:
2828
username: ${{ secrets.DOCKER_USERNAME }}
2929
password: ${{ secrets.DOCKER_PASSWORD }}
3030

3131
- name: Build image
32-
uses: docker/build-push-action@v5
32+
uses: docker/build-push-action@v7
3333
with:
3434
context: .
3535
file: ./Dockerfile

0 commit comments

Comments
 (0)