Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8d6250d
build: shadcn primitives, Tailwind tokens, Monaco unification, datast…
josephschorr Apr 30, 2026
7fb9671
refactor: migrate panels, relationship editor, playground-ui, and emb…
josephschorr Apr 30, 2026
8a4ddff
feat: redesigned UX with editor groups, drawer, status strip, and clo…
josephschorr Apr 30, 2026
8c1df82
feat(watches): persist, share, and load check watches
josephschorr Apr 30, 2026
098dbde
feat(schema): Visualize button + showDocument editor action
josephschorr Apr 30, 2026
70c954a
feat(editor-groups): tab right-click menu, per-tab diagnostics, 5-sta…
josephschorr Apr 30, 2026
7841685
fix: theme contrast, tooltip arrow, and toolbar polish
josephschorr Apr 30, 2026
beb505d
feat: playground settings dialog with theme, minimap, and clear-all
josephschorr Apr 30, 2026
22bee71
fix(lint): drop unused Logo imports, satisfy useMemo deps, ignore pla…
josephschorr Apr 30, 2026
ebb3e1a
style: apply oxfmt formatting fixes
josephschorr Apr 30, 2026
b968615
chore: undisable lint
tstirrat15 Apr 30, 2026
bc3d24a
chore: remove unused code
tstirrat15 Apr 30, 2026
bd6b510
chore: un-legacy the confirm dialog
tstirrat15 Apr 30, 2026
eac9cd6
chore: add a simple dev server for shares
tstirrat15 May 8, 2026
7f82150
chore: refactor to use dev server middleware
tstirrat15 May 8, 2026
1687826
chore: bring in copy-to-clipboard behavior
tstirrat15 May 8, 2026
bc28eb5
chore: get rid of material
tstirrat15 May 8, 2026
08f237b
chore: update packages
tstirrat15 May 8, 2026
1c5d80d
chore: migrate embedded view
tstirrat15 May 8, 2026
b3e963c
chore: figure out why alert dialog is not releasing things
tstirrat15 May 8, 2026
65c105f
chore: final polish
tstirrat15 May 8, 2026
0404557
chore: rip tour out
tstirrat15 May 11, 2026
05730ec
chore: fix tests
tstirrat15 May 11, 2026
caf101e
chore: validate tests
tstirrat15 May 11, 2026
35c4231
chore: fix manual cancellation error
tstirrat15 May 11, 2026
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
2 changes: 0 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ jobs:
run: "yarn run lint"
- name: "Run formatting check"
run: "yarn run format:check"
- name: "Run Typescript type checking"
run: "yarn run typecheck"
Comment on lines -26 to -27
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The lint step already does typechecking

14 changes: 10 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,25 @@ on:
jobs:
test:
name: "Run Tests"
runs-on: "depot-ubuntu-24.04-small"
runs-on: "depot-ubuntu-24.04-4"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

More beef since we're running chrome

steps:
- uses: "actions/checkout@v6"
with:
lfs: true
submodules: true
- uses: "authzed/action-spicedb@v1"
with:
version: "latest"
Comment on lines -18 to -20
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not needed when everything is wasm

- uses: "actions/setup-node@v6"
with:
node-version: 24
cache-dependency-path: "yarn.lock"
cache: "yarn"
- uses: "bahmutov/npm-install@v1"
- name: "Install chromium for playwright"
run: "yarn test:install-chromium-headless"
- name: "Run tests"
run: "yarn test"
- name: "Upload test artifacts"
if: "failure()"
uses: "actions/upload-artifact@v4"
with:
name: "test-screenshots"
path: "src/tests/browser/__screenshots__"
23 changes: 22 additions & 1 deletion api/lookupshare.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GetObjectCommand, S3Client } from "@aws-sdk/client-s3";
import type { VercelRequest, VercelResponse } from "@vercel/node";

const encodeURL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
export const encodeURL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";

export default async function handler(req: VercelRequest, res: VercelResponse) {
const shareid = req.query.shareid ?? "";
Expand Down Expand Up @@ -76,6 +76,27 @@ export default async function handler(req: VercelRequest, res: VercelResponse) {
}
}

if ("check_watches" in shareData) {
if (!Array.isArray(shareData.check_watches)) {
return res.status(400).json({ error: "Share data is not supported" });
}
for (const w of shareData.check_watches) {
if (typeof w !== "object" || w === null) {
return res.status(400).json({ error: "Share data is not supported" });
}
if (
typeof w.object !== "string" ||
typeof w.action !== "string" ||
typeof w.subject !== "string"
) {
return res.status(400).json({ error: "Share data is not supported" });
}
if ("context" in w && typeof w.context !== "string") {
return res.status(400).json({ error: "Share data is not supported" });
}
}
}

return res.status(200).send(bodyContents);
} catch (error) {
if (error instanceof Error && error.name === "NoSuchKey") {
Expand Down
20 changes: 20 additions & 0 deletions api/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export type SharedDataV2 = {
relationships_yaml?: string;
validation_yaml?: string;
assertions_yaml?: string;
check_watches?: Array<{
object: string;
action: string;
subject: string;
context?: string;
}>;
};

const hashPrefixSize = 12;
Expand Down Expand Up @@ -51,6 +57,20 @@ function validateSharedDataV2(data: VercelRequestBody): data is SharedDataV2 {
}
}

if ("check_watches" in data) {
const watches = data.check_watches;
if (!Array.isArray(watches)) {
return false;
}
for (const w of watches) {
if (typeof w !== "object" || w === null) return false;
if (typeof w.object !== "string") return false;
if (typeof w.action !== "string") return false;
if (typeof w.subject !== "string") return false;
if ("context" in w && typeof w.context !== "string") return false;
}
}

return true;
}

Expand Down
16 changes: 0 additions & 16 deletions cypress.config.ts

This file was deleted.

35 changes: 0 additions & 35 deletions cypress/integration/basic.spec.js

This file was deleted.

58 changes: 0 additions & 58 deletions cypress/integration/nav.spec.js

This file was deleted.

63 changes: 0 additions & 63 deletions cypress/support/commands.js

This file was deleted.

28 changes: 0 additions & 28 deletions cypress/support/e2e.ts

This file was deleted.

6 changes: 6 additions & 0 deletions dev-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## The Dev API

The share logic in prod is taken care of by Vercel API routes
that write and read to object storage. This provides a similar
API, but stores the shares in-memory. It exists to make it possible
to test share logic in development.
Loading
Loading