Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0c4fb13
fix(copilot): keep a file-preview failure from stripping a tool call'…
waleedlatif1 Aug 12, 2026
5cf60f6
fix(v2): give every collection one pagination contract and close four…
waleedlatif1 Aug 12, 2026
878856b
chore(ci): declare least-privilege permissions on the desktop e2e wor…
waleedlatif1 Aug 12, 2026
74212ef
feat(models): add grok-4.6 and make it the xAI flagship (#6624)
waleedlatif1 Aug 12, 2026
afa0293
fix(docs): include API key header in generated code samples (#6630)
TheodoreSpeaks Aug 12, 2026
9dfd9db
feat(xai): wire reasoning effort through the Grok adapter (#6627)
waleedlatif1 Aug 12, 2026
6541a22
fix(v2): tell a caller when to come back on every failure meant to be…
waleedlatif1 Aug 12, 2026
81108d5
fix(v2): serve HEAD, advertise PATCH, and document the reachable 403 …
waleedlatif1 Aug 12, 2026
3ae83b1
fix(desktop): fix desktop prod ci #6628
Sg312 Aug 12, 2026
f4ee41b
improvement(blog): simplify provenance post structure (#6631)
icecrasher321 Aug 12, 2026
c411b1d
fix(workflow): allow dual-mode blocks inside loop/parallel subflows (…
j15z Aug 12, 2026
7022e2e
fix(workflow): stop the coloured knob leaving a barb at each shoulder…
waleedlatif1 Aug 12, 2026
8a0b328
fix(blocks): give a block one tile everywhere it is listed (#6634)
waleedlatif1 Aug 12, 2026
0e65ca3
fix(copilot): surface document render failures (#6629)
j15z Aug 12, 2026
7c2ba46
fix(cmdk): keep the first result focused and the top fog stable acros…
j15z Aug 12, 2026
1b63541
fix(v2): give the keyset cursor's timestamp an explicit SQL type (#6636)
waleedlatif1 Aug 12, 2026
9aa16e3
improvement(workflow): smooth the running hatch and sit it in the slo…
waleedlatif1 Aug 12, 2026
2805a8d
feat(windchill): add document integration (#6577)
BillLeoutsakosvl346 Aug 12, 2026
128054e
fix(workflow): stop subflows resizing themselves after every load (#6…
waleedlatif1 Aug 12, 2026
1fa40b8
feat(v2): complete and align the v2 API surface (#6643)
waleedlatif1 Aug 12, 2026
c58a642
fix(workflow): stop a nested block jumping when it leaves its contain…
waleedlatif1 Aug 12, 2026
e56b288
fix(workflow): draw a highlighted edge over the ordinary ones (#6642)
waleedlatif1 Aug 12, 2026
9f8d4d1
fix(billing): checkout guard, admin panel case (#6641)
icecrasher321 Aug 12, 2026
1faac4e
fix(tools): sanitize database execution errors (#6645)
TheodoreSpeaks Aug 12, 2026
aeb77dd
fix(files): allow document compiler to read referenced images (#6647)
TheodoreSpeaks Aug 12, 2026
f890c89
improvement(emails): size the header wordmark to the landing navbar's…
waleedlatif1 Aug 12, 2026
51df824
fix(copilot): align principal lifetime with orchestration (#6649)
TheodoreSpeaks Aug 13, 2026
2da8015
fix(enrichment): require work email company domain (#6531)
TheodoreSpeaks Aug 13, 2026
738006d
fix(emails): re-export the wordmark onto its original canvas (#6651)
waleedlatif1 Aug 13, 2026
29853fb
improvement(docs): make the API reference read as code and unify its …
waleedlatif1 Aug 13, 2026
ec70c4d
improvement(nav): cut prefetch and session-recorder waste (#6656)
waleedlatif1 Aug 13, 2026
e4019fa
fix(files): preserve principals when serving generated documents (#6654)
TheodoreSpeaks Aug 13, 2026
e8d278b
fix(files): stop the collaborative editor rewriting and reflowing a d…
icecrasher321 Aug 13, 2026
c49751b
perf(prefetch): stop calling our own API over the wire during server …
waleedlatif1 Aug 13, 2026
618cee5
test(prefetch): cover the workspace-list seed, and fix two tests that…
waleedlatif1 Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .agents/skills/tool-registry-boundary/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ If it fails, do not add the entry to an allowlist — there isn't one. Find the

Run it with `--verbose` to print per-route module counts, which is also the quickest way to see whether a change moved the graph.

The same command also ratchets those counts against `check-tool-registry-boundary.baseline.json`. `--check` (what CI runs) fails when an entry exceeds its baseline by more than `max(25 modules, 2%)`, naming the import chain responsible. This catches bloat the registry rule misses — a prefetch importing `listTables` cost the Tables page 444 modules without ever touching `@/tools/registry`.

Re-record with `--update-baseline` and commit the JSON when growth is deliberate. A *shrink* passes but is reported — re-record then too, or the win is silently spendable again.

## How to verify an edge actually got cut

Do not eyeball imports — the registry is reached through several redundant paths, so cutting one buys nothing while another survives. Walk the graph:
Expand Down
219 changes: 219 additions & 0 deletions .agents/skills/v2-api-conventions/SKILL.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .claude/commands/tool-registry-boundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ If it fails, do not add the entry to an allowlist — there isn't one. Find the

Run it with `--verbose` to print per-route module counts, which is also the quickest way to see whether a change moved the graph.

The same command also ratchets those counts against `check-tool-registry-boundary.baseline.json`. `--check` (what CI runs) fails when an entry exceeds its baseline by more than `max(25 modules, 2%)`, naming the import chain responsible. This catches bloat the registry rule misses — a prefetch importing `listTables` cost the Tables page 444 modules without ever touching `@/tools/registry`.

Re-record with `--update-baseline` and commit the JSON when growth is deliberate. A *shrink* passes but is reported — re-record then too, or the win is silently spendable again.

## How to verify an edge actually got cut

Do not eyeball imports — the registry is reached through several redundant paths, so cutting one buys nothing while another survives. Walk the graph:
Expand Down
218 changes: 218 additions & 0 deletions .claude/commands/v2-api-conventions.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions .claude/rules/sim-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ const handler = useCallback(() => {
}, [data])
```

## Server prefetching

A server prefetch fills the *same* cache key a client hook fills, so it must be indistinguishable from a client fetch. Five rules:

1. **Read the data layer, never our own API over HTTP.** A server-to-server call to `/api/...` costs a round trip and a second authentication for data the process can already read. Where the route runs an application use case, call that same use case with a principal from the same auth policy the route declares — not a manager underneath it.
2. **Match the wire shape the hook caches.** The hook's data is whatever `requestJson(contract, …)` produced, so the seed must equal it. Two traps: a contract field declared `z.coerce.date()` means the hook holds a `Date` where raw route JSON holds a string; a passthrough response schema (`z.custom`) means the hook caches route JSON *verbatim*, so seeding raw rows leaks `Date`s and server-only fields. When the route projects before responding, share that projection — have the route and the prefetch call one function.
3. **Prove the viewer.** Data-layer reads carry no authorization; the route used to provide it. Resolve the viewer (`getWorkspaceHostContextForViewer`, already `cache`d by the layout so it costs nothing) and return early on failure, caching nothing — the client fetch then reaches the route for the real 403. Never widen what a viewer can see.
4. **Always `await`.** Only a settled query is dehydrated, so an unawaited prefetch is silently dropped from the payload and the pane waterfalls anyway.
5. **Don't repeat what the layout already seeded.** `getQueryClient()` builds a new client per server call, so a page re-seeding a layout key is a genuine second read — and `HydrationBoundary` defers an already-seen query to an effect, which SSR never runs, so it never reaches the server render either.

Reuse the hook's exported `staleTime` constant and its key factory; `dehydrate` carries neither options nor `staleTime`, and freshness is per-observer.

Seed with `setQueryData` only when the prefetch must be able to *decline* to create an entry (an empty list that has to fall through to a route's creation path). `prefetchQuery` and `ensureQueryData` always create one.

Keep prefetch imports light. A page prefetch's imports land in that route's server graph, so pulling a barrel to reach one function can drag thousands of modules behind it — `bun run check:tool-registry-boundary` gates this per page.

## Boundary Types

- Hooks import named type aliases from `@/lib/api/contracts/**` (e.g., `import { listEntitiesContract, type EntityList } from '@/lib/api/contracts/entities'`). Never write `z.input<...>` / `z.output<...>` in hooks, and never `import { z } from 'zod'` in client code.
Expand Down
4 changes: 4 additions & 0 deletions .cursor/commands/tool-registry-boundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ If it fails, do not add the entry to an allowlist — there isn't one. Find the

Run it with `--verbose` to print per-route module counts, which is also the quickest way to see whether a change moved the graph.

The same command also ratchets those counts against `check-tool-registry-boundary.baseline.json`. `--check` (what CI runs) fails when an entry exceeds its baseline by more than `max(25 modules, 2%)`, naming the import chain responsible. This catches bloat the registry rule misses — a prefetch importing `listTables` cost the Tables page 444 modules without ever touching `@/tools/registry`.

Re-record with `--update-baseline` and commit the JSON when growth is deliberate. A *shrink* passes but is reported — re-record then too, or the win is silently spendable again.

## How to verify an edge actually got cut

Do not eyeball imports — the registry is reached through several redundant paths, so cutting one buys nothing while another survives. Walk the graph:
Expand Down
Loading
Loading