Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ VITE_ENABLE_GOOGLE_CLOUD_SUBMITTER=<boolean>
# Auth
VITE_REQUIRE_AUTHORIZATION=<boolean>

# OktaSSO (optional SSO gate used by the VS Code extension; leave blank to disable)
VITE_OKTASSO_ENABLED=

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This is an AI-generated code review comment.

Vendor-specific naming in an open-source repo.

The open-source skill asks for vendor-neutral code and docs. This PR names the vendor in OktaSsoAuthProvider / isOktaSsoEnabled / oktaSso*.ts, in VITE_OKTASSO_*, and in the root README's "Okta PKCE flow". It also has comments like "the four proprietary values" (oktaSsoConfig.ts:53) and "the real-environment API gate" (oktaSsoAuth.ts:34). The flow itself is generic: OAuth PKCE, then a token exchange to a session cookie.

The VITE_ prefix is misleading too. Vite never reads these variables (the web app doesn't reference them); esbuild.mjs loads them from the root .env.

Fix: rename to something like SsoGateAuthProvider / TANGENT_SSO_*, describe the flow in generic OAuth terms, and drop the "proprietary" wording.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This is an AI-facilitated answer

Deferred: the vendor-neutral rename (OktaSso* / VITE_OKTASSO_*) is a large cross-cutting change and will be scoped as its own PR.

VITE_OKTASSO_OAUTH_ENDPOINT_BASE=
VITE_OKTASSO_TOKEN_EXCHANGE_URL=
VITE_OKTASSO_CLIENT_ID=
VITE_OKTASSO_TOKEN_COOKIE_NAME=
VITE_OKTASSO_SCOPES=profile email openid
VITE_OKTASSO_REDIRECT_URI=http://localhost:3001/auth
VITE_OKTASSO_CALLBACK_PORT=3001
VITE_OKTASSO_REFRESH_AFTER_MS=3300000

# Github
VITE_GITHUB_CLIENT_ID=<string>
VITE_GITHUB_PAGES=<boolean>
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,29 @@ jobs:

- name: Run knip
run: pnpm run knip

vscode-extension:
name: VS Code extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install dependencies
run: pnpm --dir vscode-extension install --frozen-lockfile

- name: Run type checking
run: pnpm --dir vscode-extension typecheck

- name: Run linting
run: pnpm --dir vscode-extension lint

- name: Run tests
run: pnpm --dir vscode-extension test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ playwright-report
#local files
.local/
.planning/
.codanna/index/
.codanna/index/

# generated extension artifacts (built into public/ during `vite build`)
public/extension/
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ WORKDIR /app
# Enable Corepack so the pinned pnpm version from package.json is used.
RUN corepack enable

# git is needed to resolve the VS Code extension's `@tangent/*` GitHub deps,
# which `vite build` installs and bundles into a .vsix under public/extension/.
RUN apk add --no-cache git

# Leverage caching by installing dependencies first
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,14 @@ Add these to a `.env` file at the root of `tangle-ui`.
Vite reads these values at development server startup or build time. Restart the
development server after changes, or rebuild the frontend for deployment.

| Variable | Required | Description |
| ------------------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `VITE_BACKEND_API_URL` | For backend features | URL of your Tangle backend (e.g. `http://127.0.0.1:8000`). |
| `VITE_REMOTE_PIPELINES` | No | Opt in to remote pipeline storage with `true` on a backend that supports saved pipelines. Unset or `false` keeps new pipelines, imports, and copies in browser storage. Without a configured backend, storage stays local even when enabled. |
| `VITE_ARTIFACT_RETENTION_DAYS` | No | Number of days artifacts are stored by your backend. When set, the UI shows artifact expiry dates and warns when artifacts may no longer be available. |
| `VITE_BUGSNAG_API_KEY` | No | Bugsnag API key. Required alongside `VITE_TANGLE_ENV` to enable error reporting. |
| `VITE_TANGLE_ENV` | No | Release stage passed to Bugsnag (e.g. `development`, `staging`, `production`). |
| Variable | Required | Description |
| ------------------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `VITE_BACKEND_API_URL` | For backend features | URL of your Tangle backend (e.g. `http://127.0.0.1:8000`). |
| `VITE_REMOTE_PIPELINES` | No | Opt in to remote pipeline storage with `true` on a backend that supports saved pipelines. Unset or `false` keeps new pipelines, imports, and copies in browser storage. Without a configured backend, storage stays local even when enabled. |
| `VITE_ARTIFACT_RETENTION_DAYS` | No | Number of days artifacts are stored by your backend. When set, the UI shows artifact expiry dates and warns when artifacts may no longer be available. |
| `VITE_BUGSNAG_API_KEY` | No | Bugsnag API key. Required alongside `VITE_TANGLE_ENV` to enable error reporting. |
| `VITE_TANGLE_ENV` | No | Release stage passed to Bugsnag (e.g. `development`, `staging`, `production`). |
| `VITE_OKTASSO_*` | No | Optional SSO gate for the VS Code extension. When `VITE_OKTASSO_OAUTH_ENDPOINT_BASE`, `VITE_OKTASSO_TOKEN_EXCHANGE_URL`, `VITE_OKTASSO_CLIENT_ID`, and `VITE_OKTASSO_TOKEN_COOKIE_NAME` are set, the extension runs an Okta PKCE flow and attaches the resulting session cookie to its API calls. Leave blank to disable; set `VITE_OKTASSO_ENABLED=false` as a kill switch. See `.env.example` for all keys and defaults. |

The remote-pipeline flag controls new remote storage, migration, and dashboard
listing. Turning it off leaves existing remote links, favorites, and recently
Expand Down
3 changes: 2 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"src/api/**",
"src/components/ui/**",
"src/config/preSubmitHooks.ts",
"src/components/shared/BetaFeatureWrapper/BetaFeatureWrapper.tsx"
"src/components/shared/BetaFeatureWrapper/BetaFeatureWrapper.tsx",
"vscode-extension/**"
],
"ignoreDependencies": [
"@tanstack/react-query-devtools",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
"@radix-ui/react-tooltip": "^1.4.1",
"@reactour/tour": "3.8.0",
"@tailwindcss/vite": "^4.3.3",
"@tangent/embed-react": "github:TangleML/tangent-shell#1998f551d910e229d5108045b552b5549635cd58&path:packages/embed-react",
"@tangent/remote-subagent": "github:TangleML/tangent-shell#1998f551d910e229d5108045b552b5549635cd58&path:packages/remote-subagent",
"@tangent/shared": "github:TangleML/tangent-shell#1998f551d910e229d5108045b552b5549635cd58&path:packages/shared",
"@tangent/embed-react": "github:TangleML/tangent-shell#b0c6ac565872440b779f12e7787f8065d9af867a&path:packages/embed-react",
Comment thread
maxy-shpfy marked this conversation as resolved.
"@tangent/remote-subagent": "github:TangleML/tangent-shell#b0c6ac565872440b779f12e7787f8065d9af867a&path:packages/remote-subagent",
"@tangent/shared": "github:TangleML/tangent-shell#b0c6ac565872440b779f12e7787f8065d9af867a&path:packages/shared",
"@tanstack/history": "1.162.5",
"@tanstack/react-query": "^5.104.5",
"@tanstack/react-query-devtools": "^5.104.5",
Expand Down Expand Up @@ -179,7 +179,7 @@
},
"pnpm": {
"overrides": {
"@tangent/shared": "github:TangleML/tangent-shell#1998f551d910e229d5108045b552b5549635cd58&path:packages/shared"
"@tangent/shared": "github:TangleML/tangent-shell#b0c6ac565872440b779f12e7787f8065d9af867a&path:packages/shared"
}
}
}
Loading
Loading