Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3eaf260
feat(docs): live WaveHouse demo panel in the hero, via our own SDK
EricAndrechek Jun 6, 2026
620cdb2
test(e2e): de-flake query-limit and batching assertions
EricAndrechek Jun 5, 2026
28319b6
fix(mq): keep embedded NATS off process signals (NoSigs)
EricAndrechek Jun 6, 2026
447876d
review: address pre-push findings (NoSigs sweep, test anchor, SSE har…
EricAndrechek Jun 6, 2026
7739d69
fix(e2e): give the cover binary 30s to exit gracefully (was 10s)
EricAndrechek Jun 6, 2026
9fb4f96
review: round-2 findings (dedup key normalization, scoped wire claims…
EricAndrechek Jun 6, 2026
df2d309
review: round-3 findings (chip [hidden] guard, WaitForShutdown, DLQ d…
EricAndrechek Jun 6, 2026
fdb6506
docs: round-4 wording (until durations, ago-semantics, quickstart 404…
EricAndrechek Jun 6, 2026
8fd9a00
docs: document the silent 10k limit cap; move README 404 note to the …
EricAndrechek Jun 6, 2026
8ff9fb8
docs: DLQ messages carry the EventMessage envelope, not the inner row
EricAndrechek Jun 6, 2026
720e45c
feat(docs): hero panel rides the new upstream pipes (gh_summary, gh_a…
EricAndrechek Jun 6, 2026
7c588ef
docs(api): admin-query curl example carries the Authorization header …
EricAndrechek Jun 6, 2026
cc212bc
docs: dlq stats 500 row, JWT-secret provenance, drop fictional WS fan…
EricAndrechek Jun 6, 2026
397c1e7
docs(api): drop the "secretless ⇒ no token validates" clause (masks #…
EricAndrechek Jun 6, 2026
bcbed8c
fix(docs): live panel was clipped on phones — make it fluid to ~320px
EricAndrechek Jun 6, 2026
864f948
feat(docs): site-wide UI consistency pass (radius, buttons, light the…
EricAndrechek Jun 6, 2026
a806a3b
docs: drop the false "secretless ⇒ no token validates" claim from acc…
EricAndrechek Jun 6, 2026
fc8685b
feat(docs): re-architect landing atmosphere (page-level grid+glow) + …
EricAndrechek Jun 6, 2026
93bf0db
fix(docs): grid was occluded behind Starlight's body bg; add live wow…
EricAndrechek Jun 6, 2026
538f0c8
fix(docs): sort events/min sparkline data ascending (defensive, pre-p…
EricAndrechek Jun 6, 2026
0369a0b
Merge remote-tracking branch 'origin/main' into docs-demo
EricAndrechek Jun 8, 2026
77d8018
fix(docs): drop #285/168h rationale obsoleted by the main merge
EricAndrechek Jun 8, 2026
07bc4de
Merge remote-tracking branch 'origin/main' into docs-demo
EricAndrechek Jun 8, 2026
34ca5aa
fix(docs): stop mermaid label clipping, stack paired diagrams, add di…
EricAndrechek Jun 8, 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
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,16 @@ jobs:
SHA: ${{ github.event.pull_request.head.sha }}
run: |
marker='<!-- docs-preview-comment -->'
body="$(printf '%s\n📚 **Docs preview** is live: %s\n\n_Updated for commit %s_' "$marker" "$URL" "${SHA:0:7}")"
# Surface what the preview is actually built on: the commit subject
# and the upload time, so a stale preview is obvious at a glance.
# %s args (not the format string) carry the subject so a `%` in a
# commit message can't be read as a printf directive.
subject="$(gh api "repos/${GITHUB_REPOSITORY}/commits/${SHA}" --jq '.commit.message' 2>/dev/null | head -1 || true)"
[ -z "$subject" ] && subject='(commit message unavailable)'
updated="$(date -u '+%Y-%m-%d %H:%M UTC')"
commit_url="${GITHUB_SERVER_URL:-https://github.com}/${GITHUB_REPOSITORY}/commit/${SHA}"
body="$(printf '%s\n📚 **Docs preview** is live: %s\n\nLive on [`%s`](%s) — %s\n_Updated %s_' \
"$marker" "$URL" "${SHA:0:7}" "$commit_url" "$subject" "$updated")"
cid="$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR}/comments" --paginate \
--jq 'map(select(.body | startswith("<!-- docs-preview-comment -->"))) | .[0].id // empty' | head -1 || true)"
if [ -n "$cid" ]; then
Expand Down
9 changes: 9 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,15 @@ Source-of-truth pairs that must agree:

Before finishing a task, grep for the identifiers you touched (field names, env var names, endpoint paths) across docs to catch staleness.

### Authoring Mermaid diagrams

Diagrams render inside the Starlight content column (~46–58rem wide) as build-time SVG via `astro-themed-mermaid`, themed by `docs/src/config/mermaid-theme.mjs`. **Author them vertically so they fit the page at a legible size** — the single most common diagram mistake here is a wide left-to-right flowchart that gets scaled down to fit the column until its labels are unreadable.

- **Default to top-down**: `flowchart TB`/`TD`, and `direction TB` inside subgraphs — not `LR`/`RL`. A tall diagram keeps full-size nodes and just costs page height (cheap); a wide one shrinks to illegibility. Reserve `LR` for genuinely short chains (≤3–4 nodes) that read naturally as a single line.
- **Never sit two large diagrams side-by-side.** Wrap comparisons in `<div class="diagram-pair">…</div>`, which stacks them vertically so each gets the full column width. (Two detailed diagrams in a row each shrink to ~half width and stop being readable.)
- **Keep node labels short.** Labels are measured at build time to size the box; use `<br/>` for a second line rather than one long line. Lean on the `:::` semantic node classes (`wh`, `win`, `pain`, `fail`, `infra`, `neutral`, `store`, `client`) and the `--wh-mermaid-*` vars rather than inline colors.
- Diagrams are **click-to-zoom** on the site (`docs/src/components/MermaidZoom.astro`), so fine detail is always recoverable — but that's a fallback, not a license to ship an illegible inline diagram.

## SDK Sync

The TypeScript SDK (`@wavehouse/sdk` in `clients/ts/`) is the canonical client and ships from this repo. When backend changes alter the public API surface, the SDK needs corresponding updates. The `pre-commit` git hook flags likely misses informationally; consult this table when deciding what to update.
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ dev-ts: pnpm-install ## Watch-build SDK (tsup --watch)
# Slower per change than Astro HMR; the raw dev server remains available as
# `pnpm --filter wavehouse-docs run start` when fidelity doesn't matter.
.PHONY: dev-docs
dev-docs: install-playwright-docs ## Prod-faithful docs dev loop: rebuild-on-save + wrangler dev on :4321
dev-docs: install-playwright-docs build-ts ## Prod-faithful docs dev loop: rebuild-on-save + wrangler dev on :4321
@$(PNPM) --filter $(DOCS_FILTER) run dev

# preview-docs serves the production build through wrangler (Cloudflare Workers
Expand Down Expand Up @@ -526,8 +526,10 @@ build-ts: pnpm-install ## Build TypeScript SDK → clients/ts/dist/
# `build-docs`, so make runs it once and serializes it before the build — Astro's
# content-sync writes docs/.astro/, so check and build must not run concurrently.
# (Link validation is separate: owned by starlight-links-validator at build.)
# build-ts prereq: the landing page imports @wavehouse/sdk (workspace package),
# which resolves to clients/ts/dist/ for both types and the browser bundle.
.PHONY: check-docs
check-docs: pnpm-install ## Type-check the docs (astro check — types + content schemas)
check-docs: pnpm-install build-ts ## Type-check the docs (astro check — types + content schemas)
$(call run,check-docs (astro check),NODE_OPTIONS=--no-deprecation $(PNPM) -s --filter $(DOCS_FILTER) run check,)

# build-docs: Astro site → docs/dist/. Pulls in Chromium (install-playwright-docs)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ docker compose -f deployments/compose/standalone.yaml exec clickhouse \
# stream live events in one terminal, then ingest one in another and watch it arrive
curl -N "http://localhost:8080/v1/stream?table=events" & sleep 1
# in another terminal, ingest an event (no auth needed with the dev policy)
# (a 404 "unknown table" here just means schema discovery hasn't seen the new table yet — retry; worst case 60s)
curl -sX POST "http://localhost:8080/v1/ingest?table=events" \
-H 'content-type: application/json' -d '{"kind":"click","user":"u_42"}'
```
Expand Down
2 changes: 1 addition & 1 deletion clients/ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Generate TypeScript types from your live WaveHouse schema:
npm run codegen -- --url http://localhost:8080 --out ./src/db.d.ts
```

This introspects `/v1/schema`, maps ClickHouse column types to TypeScript, and outputs a `Database` interface you can pass to `createClient<Database>()`.
This introspects `/v1/schema`, maps ClickHouse column types to TypeScript, and outputs a `Database` interface you can pass to `createClient<Database>()`. `/v1/schema` is **admin-only** — pass an admin-role token with `--auth <jwt>` (or `-a`) against any non-dev policy.

## Development & Testing

Expand Down
2 changes: 1 addition & 1 deletion clients/ts/src/query-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class QueryBuilder<Row = Record<string, unknown>> implements PromiseLike<

// --- Execution ---

/** Default row limit when none is specified. Matches backend DefaultMaxRows. */
/** Default row limit when none is specified — deliberately tighter than the backend's DefaultMaxRows (10000) safety cap. */
static readonly DEFAULT_LIMIT = 1000;

async fetch(opts?: FetchOptions): Promise<Result<Row[]>> {
Expand Down
7 changes: 6 additions & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,12 @@ export default defineConfig({
expressiveCode: {
themes: ["github-dark", "github-light"],
styleOverrides: {
borderRadius: "0.5rem",
// 0.75rem − 1px so the frame's OUTER corner lands at exactly 12px
// (--radius-md, matching cards): EC adds the 1px border width to the
// configured radius for the frame, and derives the inner header/tab/
// <pre> corners from the same base, so frame and inner stay in sync
// (a manual `.frame` radius in global.css used to desync them).
borderRadius: "calc(0.75rem - 1px)",
codeFontFamily: "'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace",
uiFontFamily: "'Inter Variable', ui-sans-serif, system-ui, sans-serif",
frames: {
Expand Down
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"@fontsource-variable/inter": "^5.2.8",
"@fontsource-variable/jetbrains-mono": "^5.2.8",
"@tailwindcss/vite": "^4.3.0",
"@wavehouse/sdk": "workspace:*",
"astro": "^6.1.5",
"astro-themed-mermaid": "github:Wave-RF/astro-themed-mermaid#v0.2.0",
"astro-themed-mermaid": "github:Wave-RF/astro-themed-mermaid#7c7e0ff3d5c6b31737570d82cfa1956c88350dbd",
"cloudflare-md-router": "github:Wave-RF/cloudflare-md-router",
"katex": "^0.16.11",
"rehype-katex": "^7.0.1",
Expand Down
17 changes: 11 additions & 6 deletions docs/scripts/screenshot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,24 @@ try {
colorScheme: theme === "dark" ? "dark" : "light",
});
const page = await ctx.newPage();
await page.goto(`${BASE}${p.url}`, { waitUntil: "networkidle" });
// "load", not "networkidle": the landing page holds a live SSE stream
// open to stats.wavehouse.dev, so the network never goes idle and a
// networkidle wait would time the goto out.
await page.goto(`${BASE}${p.url}`, { waitUntil: "load" });
await page.evaluate((t) => {
document.documentElement.setAttribute("data-theme", t);
try {
localStorage.setItem("starlight-theme", t);
} catch {}
}, theme);
// Wait on web fonts + the hero's own ready signal — Hero.astro stamps
// `[data-screenshot-ready]` on <html> via animationend on the last
// terminal line (first mount) or synchronously when the replay guard
// suppresses the entrance choreography (subsequent mounts). Pages
// without a hero never get the attribute, so we cap the wait at 5s
// and fall through to the screenshot regardless.
// `[data-screenshot-ready]` on <html> via animationend on the visual
// column's entrance (first mount) or synchronously when the replay
// guard suppresses the entrance choreography (subsequent mounts).
// Pages without a hero never get the attribute, so we cap the wait at
// 5s and fall through to the screenshot regardless. Live-demo data may
// or may not have arrived by then — the panel is layout-stable either
// way; screenshots assert layout, not live numbers.
await page.evaluate(() => document.fonts.ready);
await page.waitForSelector("html[data-screenshot-ready]", { timeout: 5000 }).catch(() => {});
const filename = `${p.name}-${theme}.png`;
Expand Down
5 changes: 5 additions & 0 deletions docs/src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import EditLink from "virtual:starlight/components/EditLink";
import LastUpdated from "virtual:starlight/components/LastUpdated";
import Pagination from "virtual:starlight/components/Pagination";
import MermaidZoom from "./MermaidZoom.astro";
import WaveMark from "./WaveMark.astro";

const year = new Date().getFullYear();
Expand Down Expand Up @@ -123,6 +124,10 @@ const repo = "https://github.com/Wave-RF/WaveHouse";
)
}

{/* Click-to-zoom for Mermaid diagrams — rendered once per page from here
(Footer is on every page); self-contained script + styles, no markup. */}
<MermaidZoom />

<script is:inline>
function setupFooterLinkTracking() {
document.querySelectorAll('[data-ph-link]').forEach(function(el) {
Expand Down
Loading