Skip to content

Commit 2383946

Browse files
authored
Add web UI (#7151)
AI slop PR to add the initial skeleton of a Vortex web explorer. * It creates a vite + TS + react + tailwind project, based on the styles of vortex.dev * A vortex-web-wasm crate for exposing a limited WASM API to Vortex. * Drag-n-drop / browse for Vortex files, opens the file and displays row count and dtype TODO: * Explore if this is the right way to setup previews. We need to manually deploy since we must build the WASM asset. <img width="663" height="448" alt="Screenshot 2026-03-24 at 23 46 48" src="https://github.com/user-attachments/assets/311a77ae-a7e0-4775-82df-4b1eff73aec6" /> <img width="1388" height="821" alt="Screenshot 2026-03-24 at 23 46 45" src="https://github.com/user-attachments/assets/c930a76e-b1a0-4ac8-9a5b-d2c861553d70" /> --------- Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent ec2c602 commit 2383946

23 files changed

+7278
-1
lines changed

.github/workflows/web.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
3+
name: Vortex Web
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
9+
on:
10+
pull_request:
11+
push:
12+
branches: [develop]
13+
14+
permissions:
15+
contents: read
16+
17+
defaults:
18+
run:
19+
working-directory: vortex-web
20+
21+
jobs:
22+
changes:
23+
name: Detect Changes
24+
runs-on: ubuntu-latest
25+
permissions:
26+
pull-requests: read
27+
outputs:
28+
web: ${{ steps.filter.outputs.web }}
29+
steps:
30+
- uses: actions/checkout@v6
31+
- uses: dorny/paths-filter@v3
32+
id: filter
33+
with:
34+
filters: |
35+
web:
36+
- "vortex-web/**"
37+
- ".github/workflows/web.yml"
38+
39+
build:
40+
name: Build
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 30
43+
steps:
44+
- uses: actions/checkout@v6
45+
- uses: ./.github/actions/setup-rust
46+
with:
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}
48+
enable-sccache: "false"
49+
- name: Install wasm-pack
50+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
51+
working-directory: .
52+
- uses: actions/setup-node@v4
53+
with:
54+
node-version: "22"
55+
cache: "npm"
56+
cache-dependency-path: vortex-web/package-lock.json
57+
- run: npm ci
58+
- run: npm run build
59+
- run: npm run lint
60+
- uses: actions/upload-artifact@v4
61+
with:
62+
name: vortex-web-dist
63+
path: vortex-web/dist
64+
retention-days: 7
65+
66+
preview:
67+
name: Deploy Preview
68+
needs: [build, changes]
69+
if: needs.changes.outputs.web == 'true'
70+
runs-on: ubuntu-latest
71+
timeout-minutes: 10
72+
permissions:
73+
contents: read
74+
pull-requests: write
75+
deployments: write
76+
environment:
77+
name: preview
78+
url: ${{ steps.deploy.outputs.deployment-url }}
79+
steps:
80+
- uses: actions/download-artifact@v4
81+
with:
82+
name: vortex-web-dist
83+
path: dist
84+
- name: Deploy to Cloudflare Pages
85+
id: deploy
86+
uses: cloudflare/wrangler-action@v3
87+
with:
88+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
89+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
90+
command: >-
91+
pages deploy dist/
92+
--project-name=vortex-web
93+
--branch=${{ github.head_ref || github.ref_name }}
94+
- name: Comment preview URL on PR
95+
if: github.event_name == 'pull_request'
96+
uses: actions/github-script@v7
97+
with:
98+
script: |
99+
const body = `**Vortex Web Preview:** ${{ steps.deploy.outputs.deployment-url }}`;
100+
const { data: comments } = await github.rest.issues.listComments({
101+
owner: context.repo.owner,
102+
repo: context.repo.repo,
103+
issue_number: context.issue.number,
104+
});
105+
const existing = comments.find(c =>
106+
c.body?.startsWith('**Vortex Web Preview:**')
107+
);
108+
if (existing) {
109+
await github.rest.issues.updateComment({
110+
owner: context.repo.owner,
111+
repo: context.repo.repo,
112+
comment_id: existing.id,
113+
body,
114+
});
115+
} else {
116+
await github.rest.issues.createComment({
117+
owner: context.repo.owner,
118+
repo: context.repo.repo,
119+
issue_number: context.issue.number,
120+
body,
121+
});
122+
}

Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ members = [
3232
"vortex-jni",
3333
"vortex-python",
3434
"vortex-tui",
35+
"vortex-web/crate",
3536
"vortex-test/compat-gen",
3637
"vortex-test/e2e-cuda",
3738
"xtask",

REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ SPDX-FileCopyrightText = "Copyright the Vortex contributors"
3131
SPDX-License-Identifier = "CC-BY-4.0"
3232

3333
[[annotations]]
34-
path = ["**/.gitignore", ".gitmodules", ".python-version", "**/*.lock", "**/*.lockfile", "**/*.toml", "renovate.json", ".idea/**", ".github/**", "codecov.yml", "java/gradle/wrapper/gradle-wrapper.properties"]
34+
path = ["**/.gitignore", ".gitmodules", ".python-version", "**/*.lock", "**/*.lockfile", "**/*.toml", "**/*.json", ".idea/**", ".github/**", "codecov.yml", "java/gradle/wrapper/gradle-wrapper.properties"]
3535
precedence = "override"
3636
SPDX-FileCopyrightText = "Copyright the Vortex contributors"
3737
SPDX-License-Identifier = "Apache-2.0"

vortex-web/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
src/wasm/pkg
4+
*.local

0 commit comments

Comments
 (0)