Compare commits

..
Author SHA1 Message Date
Hanzo AI 51a660fa3f feat(hanzogui): add cloud-console primitives (PageHeader, DataTable, Field, StatusTag, States, Loader)
Additive umbrella views under src/views/cloud — brand-agnostic, generic
building blocks back-ported from hanzoai/console2 so every Hanzo Tamagui app
shares one DataTable/PageHeader/Field/StatusTag/empty-state/loader.

- imports adapted to the @hanzogui/* sibling convention (Text from ../Text)
- States decoupled from any HTTP client (structural { status, message })
- Loader is brandless (neutral Spinner) — brand marks stay in the app
- adds @hanzogui/lucide-icons-2 workspace dep (ChevronDown, TriangleAlert)
2026-06-28 19:25:52 -07:00
274 changed files with 2485 additions and 18973 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"@hanzogui/shell": patch
---
Tight app-first shell defaults: 14px base type scale (linear.app/vercel register, still CSS-var overridable), H-only header lockup (drop product wordmark), and Community hub (remove Showcase; Community → hanzo.app/community).
-9
View File
@@ -1,9 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640" viewBox="0 0 1280 640" role="img" aria-label="gui">
<rect width="1280" height="640" fill="#0A0A0A"/>
<svg x="96" y="215" width="210" height="210" viewBox="0 0 67 67"><path d="M22.21 67V44.6369H0V67H22.21Z" fill="#fff"/><path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#fff"/><path d="M22.21 0H0V22.3184H22.21V0Z" fill="#fff"/><path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#fff"/><path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#fff"/></svg>
<text x="378" y="276" font-family="Inter,system-ui,-apple-system,sans-serif" font-size="78" font-weight="800" letter-spacing="-2" fill="#ffffff">gui</text>
<text x="378" y="322" font-family="Inter,system-ui,sans-serif" font-size="30" fill="#ffffff" opacity=".66">Hanzo GUI — cross-platform UI primitives, tenant shell…</text>
<rect x="378" y="338" width="806" height="3" rx="1.5" fill="#ffffff" opacity=".9"/>
<text x="378" y="390" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">github.com/hanzoai</text>
<text x="1184" y="390" text-anchor="end" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">hanzo.ai</text>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,285 @@
name: Build iOS Test Container App
env:
# Relative path from the monorepo root to the app
test_container_app_path: code/kitchen-sink
# Package name in the monorepo
test_app_package_name: '@hanzogui/kitchen-sink'
# Should match the name of "ios/<app_name>.xcworkspace"
ios_app_name: guikitchensink
# A unique ID to identify the app on GitHub Actions, this is used as part of cache keys and artifact names, must be unique among all workflows
app_id: ios-guikitchensink
# The command used to prebuild the app
prebuild_command: bunx expo prebuild --platform ios --no-install # --no-install is used to skip installing dependencies, specifically `pod install` as we want to do it after the Cache Pods step
# These should be set in the repository secrets
# Redis database used for caching and remembering things between runs, such as the last build number
# KV_STORE_REDIS_REST_URL:
# KV_STORE_REDIS_REST_TOKEN:
on:
workflow_call:
inputs:
configuration:
required: true
type: string
description: "Either 'Debug' or 'Release'."
outputs:
build-hash:
description: 'A hash to identify the build (expo fingerprint).'
value: ${{ jobs.build-ios.outputs.build-hash }}
built-app-cache-key:
description: 'The GitHub Actions cache key of the built .app, can be used in subsequent workflows to get the built app from cache using this key.'
value: ${{ jobs.build-ios.outputs.built-app-cache-key }}
built-app-path:
description: 'The path to the built .app relative to the repository root.'
value: ${{ jobs.build-ios.outputs.built-app-path }}
jobs:
build-ios:
name: Build
runs-on: macos-15
permissions:
contents: read
pull-requests: read
timeout-minutes: 60
outputs:
built-app-cache-key: ${{ steps.check-has-build.outputs.cache-primary-key || steps.pre-check-has-build.outputs.cache-primary-key }}
build-hash: ${{ steps.calculate-fingerprint.outputs.fingerprint || steps.get-fingerprint-from-cache.outputs.fingerprint }}
built-app-path: ${{ steps.get-built-app-path.outputs.built_app_path }}
defaults:
run:
working-directory: ${{ env.test_container_app_path }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set Xcode version
# Xcode 26 (Swift 6.2) is required for expo-modules-core 55.x which uses
# conformance isolation syntax (@MainActor in protocol inheritance clause, SE-0434)
run: sudo xcode-select -s /Applications/Xcode_26.0.1.app
- name: Get Built App Path
id: get-built-app-path
env:
BUILT_APP_PATH: ${{ env.test_container_app_path }}/build/Build/Products/${{ inputs.configuration }}-iphonesimulator/${{ env.ios_app_name }}.app
run: |
echo "Built app path: $BUILT_APP_PATH"
echo "built_app_path=$BUILT_APP_PATH" >> $GITHUB_OUTPUT
- name: Calculate Pre-Fingerprint Hash
id: calculate-pre-fingerprint
env:
# A hash that represents bun.lock + app.json - if these haven't changed,
# the fingerprint likely hasn't changed either. This lets us skip bun install
# and prebuild if we have a cached fingerprint for this pre-fingerprint hash.
PRE_FINGERPRINT_HASH: ${{ hashFiles('bun.lock', format('{0}/app.json', env.test_container_app_path), format('{0}/package.json', env.test_container_app_path), 'packages/vxrn/expo-plugin.cjs') }}
run: |
if [ -z "$PRE_FINGERPRINT_HASH" ]; then
echo '[ERROR] Failed to calculate pre-fingerprint hash.'
fi
echo "Pre-fingerprint hash: $PRE_FINGERPRINT_HASH"
echo "pre_fingerprint_hash=$PRE_FINGERPRINT_HASH" >> $GITHUB_OUTPUT
- name: Read Cached Fingerprint
id: get-fingerprint-from-cache
env:
KV_STORE_REDIS_REST_URL: ${{ secrets.KV_STORE_REDIS_REST_URL }}
KV_STORE_REDIS_REST_TOKEN: ${{ secrets.KV_STORE_REDIS_REST_TOKEN }}
run: |
FINGERPRINT_FROM_CACHE=$(curl "$KV_STORE_REDIS_REST_URL/get/${{ env.app_id }}-fingerprint-from-pre-hash-${{ steps.calculate-pre-fingerprint.outputs.pre_fingerprint_hash }}" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN" | jq -r '.result')
if [ "$FINGERPRINT_FROM_CACHE" != "null" ]; then
curl -X POST "$KV_STORE_REDIS_REST_URL/EXPIRE/${{ env.app_id }}-fingerprint-from-pre-hash-${{ steps.calculate-pre-fingerprint.outputs.pre_fingerprint_hash }}/2592000" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN" # Reset TTL to 30 days
echo "Fingerprint from cache: $FINGERPRINT_FROM_CACHE"
echo "fingerprint=$FINGERPRINT_FROM_CACHE" >> $GITHUB_OUTPUT
else
echo 'No cached fingerprint found.'
echo "fingerprint=null" >> $GITHUB_OUTPUT
fi
- name: Check If Build Already Exists
uses: actions/cache/restore@v5
id: pre-check-has-build
if: ${{ steps.get-fingerprint-from-cache.outputs.fingerprint != 'null' }}
with:
key: ${{ env.app_id }}-${{ inputs.configuration }}-${{ steps.get-fingerprint-from-cache.outputs.fingerprint }}
lookup-only: true
path: ${{ steps.get-built-app-path.outputs.built_app_path }}
# The steps below are skipped if we have a cache hit
- name: Install
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
uses: ./.github/actions/install
with:
workspace-focus: ${{ env.test_app_package_name }}
- name: Prebuild
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
run: ${{ env.prebuild_command }}
# workaround for https://github.com/expo/expo/issues/42525
# remove once expo-modules-core ships a fix or expo SDK 56+ resolves it
- name: Patch Podfile for ExpoModulesCore Swift 6 and ContextMenuAuxiliaryPreview
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
run: |
# workaround: expo-modules-core 55.x uses @MainActor in class inheritance
# clauses which requires Swift 6 mode. SWIFT_STRICT_CONCURRENCY=minimal
# suppresses concurrency warnings in swift 6 mode.
# workaround 2: ContextMenuAuxiliaryPreview uses deprecated transform: .default
# which is an error in Xcode 26 / Swift 6.2 - disable warnings-as-errors for it.
PODFILE="ios/Podfile"
if grep -q "ContextMenuAuxiliaryPreview" "$PODFILE" 2>/dev/null; then
echo "Podfile already patched (both ExpoModulesCore + ContextMenuAuxiliaryPreview), skipping"
elif [ -f "$PODFILE" ]; then
node -e "
const fs = require('fs');
const podfile = fs.readFileSync('$PODFILE', 'utf8');
const workaround = \`
# workaround: expo-modules-core 55.x requires Swift 6 mode with isolated
# conformances (SE-0470) for @MainActor in protocol conformance syntax.
installer.pods_project.targets.each do |target|
if target.name == 'ExpoModulesCore'
target.build_configurations.each do |build_config|
build_config.build_settings['SWIFT_VERSION'] = '6'
build_config.build_settings['SWIFT_STRICT_CONCURRENCY'] = 'minimal'
flags = build_config.build_settings['OTHER_SWIFT_FLAGS'] || '$(inherited)'
unless flags.include?('IsolatedConformances')
build_config.build_settings['OTHER_SWIFT_FLAGS'] = "\#{flags} -enable-upcoming-feature IsolatedConformances"
end
end
end
# workaround: ContextMenuAuxiliaryPreview uses deprecated transform: .default
# which becomes a build error in Xcode 26 / Swift 6.2 strict mode.
if target.name == 'ContextMenuAuxiliaryPreview'
target.build_configurations.each do |build_config|
build_config.build_settings['SWIFT_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
build_config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
end
end
end
\`;
const updated = podfile.replace(
/(post_install do \|installer\|.*?)(^\s+end\s*\nend)/ms,
'\$1' + workaround + '\$2'
);
if (updated === podfile) {
console.error('ERROR: could not find post_install block in Podfile');
process.exit(1);
}
fs.writeFileSync('$PODFILE', updated);
console.log('Patched Podfile with ExpoModulesCore Swift 6 and ContextMenuAuxiliaryPreview workarounds');
"
else
echo "WARNING: Podfile not found at $PODFILE"
fi
- name: Cache Pods
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
uses: actions/cache@v5
env:
cache-name: ${{ env.app_id }}-pods
with:
path: ${{ env.test_container_app_path }}/ios/Pods
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles(format('{0}/ios/Podfile', env.test_container_app_path)) }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Pod Install
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
run: |
set -o pipefail
pod install --project-directory=ios 2>&1 | tee pod-install.log || {
echo "::error::Pod install failed. Check pod-install.log artifact for details."
echo "=== Last 50 lines of pod install output ==="
tail -50 pod-install.log
exit 1
}
- name: Upload Pod Install Log on Failure
if: failure()
uses: actions/upload-artifact@v5
with:
name: pod-install-log
path: ${{ env.test_container_app_path }}/pod-install.log
retention-days: 7
- name: Calculate Fingerprint
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
id: calculate-fingerprint
run: |
# Use expo fingerprint for accurate native dependency detection
FINGERPRINT=$(bunx @expo/fingerprint fingerprint:generate --platform ios | jq -r '.hash')
if [ -z "$FINGERPRINT" ]; then
echo '[ERROR] Failed to calculate fingerprint.'
exit 1
fi
echo "Fingerprint: $FINGERPRINT"
echo "fingerprint=$FINGERPRINT" >> $GITHUB_OUTPUT
- name: Write Fingerprint to Cache
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
env:
KV_STORE_REDIS_REST_URL: ${{ secrets.KV_STORE_REDIS_REST_URL }}
KV_STORE_REDIS_REST_TOKEN: ${{ secrets.KV_STORE_REDIS_REST_TOKEN }}
run: |
curl -X POST "$KV_STORE_REDIS_REST_URL/SETEX/${{ env.app_id }}-fingerprint-from-pre-hash-${{ steps.calculate-pre-fingerprint.outputs.pre_fingerprint_hash }}/2592000/${{ steps.calculate-fingerprint.outputs.fingerprint }}" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN"
- name: Check If Build Already Exists
if: ${{ !steps.pre-check-has-build.outputs.cache-hit }}
uses: actions/cache/restore@v5
id: check-has-build
with:
key: ${{ env.app_id }}-${{ inputs.configuration }}-${{ steps.calculate-fingerprint.outputs.fingerprint }}
lookup-only: true
path: ${{ steps.get-built-app-path.outputs.built_app_path }}
- name: Restore Build Cache
if: ${{ !steps.pre-check-has-build.outputs.cache-hit && !steps.check-has-build.outputs.cache-hit }}
id: restore-build-cache
uses: actions/cache/restore@v5
env:
cache-name: ${{ env.app_id }}-build
with:
key: ${{ runner.os }}-${{ env.cache-name }}
path: |
${{ env.test_container_app_path }}/build
- name: Build
if: ${{ !steps.pre-check-has-build.outputs.cache-hit && !steps.check-has-build.outputs.cache-hit }}
run: |
set -o pipefail
xcrun xcodebuild -scheme '${{ env.ios_app_name }}' \
-workspace 'ios/${{ env.ios_app_name }}.xcworkspace' \
-configuration ${{ inputs.configuration }} \
-sdk 'iphonesimulator' \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath build \
OTHER_SWIFT_FLAGS='$(inherited) -enable-upcoming-feature IsolatedConformances' \
SWIFT_STRICT_CONCURRENCY=minimal \
RCT_REMOVE_LEGACY_ARCH=1 \
| tee xcodebuild.log | xcpretty
- name: Upload Built App to Cache
if: ${{ !steps.pre-check-has-build.outputs.cache-hit && !steps.check-has-build.outputs.cache-hit }}
uses: actions/cache/save@v5
with:
key: ${{ steps.check-has-build.outputs.cache-primary-key }}
path: ${{ steps.get-built-app-path.outputs.built_app_path }}
- name: Upload Build Log
uses: actions/upload-artifact@v5.3.1
if: ${{ always() && !steps.pre-check-has-build.outputs.cache-hit && !steps.check-has-build.outputs.cache-hit }}
with:
name: xcodebuild-${{ env.app_id }}-${{ inputs.configuration }}.log
path: |
${{ env.test_container_app_path }}/xcodebuild.log
- name: Save Build Cache
uses: actions/cache/save@v5
if: ${{ always() && !steps.pre-check-has-build.outputs.cache-hit && !steps.check-has-build.outputs.cache-hit }}
with:
key: ${{ steps.restore-build-cache.outputs.cache-primary-key }}
path: |
${{ env.test_container_app_path }}/build
+18
View File
@@ -0,0 +1,18 @@
name: Changelog
on:
push:
tags:
- 'v*'
jobs:
tagged-release:
name: Changelog
runs-on: [self-hosted, linux, amd64]
# needs: release
steps:
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: '${{ github.token }}'
prerelease: false
+124
View File
@@ -0,0 +1,124 @@
name: Checks
on:
workflow_dispatch:
pull_request:
push:
paths-ignore:
- 'assets/**'
- '.vscode/**'
branches:
- main
- v2
- 'v2-*'
# cancel in-progress runs on the same branch (avoids duplicate PR + push runs)
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
checks:
runs-on: [self-hosted, linux, amd64]
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Install
uses: ./.github/actions/install
- name: Check
run: bun run check
- name: Lint
run: bun run lint
unit-tests:
runs-on: [self-hosted, linux, amd64]
env:
NODE_OPTIONS: '--max-old-space-size=6144'
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Install
uses: ./.github/actions/install
- name: Get Playwright version
id: pw-version
run: echo "version=$(bunx playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw-version.outputs.version }}
- name: Install playwright
run: bunx playwright install
- name: Run unit tests
run: bun turbo run test:web --filter='!@hanzogui/kitchen-sink' --concurrency=1
changes:
runs-on: [self-hosted, linux, amd64]
outputs:
integration-relevant: ${{ steps.filter.outputs.integration-relevant }}
steps:
- uses: actions/checkout@v5
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
integration-relevant:
- 'code/core/**'
- 'code/ui/**'
- 'code/packages/**'
- 'code/kitchen-sink/**'
- 'code/compiler/babel-plugin/**'
- 'code/compiler/loader/**'
- 'code/compiler/metro-plugin/**'
- 'code/demos/**'
- 'package.json'
- 'bun.lock'
integration-tests:
needs: changes
if: needs.changes.outputs.integration-relevant == 'true'
runs-on: [self-hosted, linux, amd64]
strategy:
fail-fast: false
matrix:
shard: [1/3, 2/3, 3/3]
env:
NODE_OPTIONS: '--max-old-space-size=6144'
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Install
uses: ./.github/actions/install
- name: Get Playwright version
id: pw-version
run: echo "version=$(bunx playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw-version.outputs.version }}
- name: Install playwright
run: bunx playwright install --with-deps
- name: Run integration tests (shard ${{ matrix.shard }})
run: cd code/kitchen-sink && NODE_ENV=test npx playwright test --shard=${{ matrix.shard }}
timeout-minutes: 20
@@ -34,10 +34,7 @@ permissions:
jobs:
publish-all:
name: Build + publish all gui packages
# Retargeted arm64 self-hosted (spark, frequently offline) → the always-up
# in-cluster amd64 ARC pool. @hanzogui/* are pure-JS; publishing is
# arch-independent, so amd64 is safe and far more reliable.
runs-on: hanzo-build-linux-amd64
runs-on: [self-hosted, linux, arm64]
if: github.event_name == 'push' || github.event.inputs.confirm == 'publish'
steps:
- uses: actions/checkout@v5
@@ -28,9 +28,7 @@ permissions:
jobs:
publish:
name: Build, smoke-test, publish
# Retargeted arm64 self-hosted (spark, frequently offline) → the always-up
# in-cluster amd64 ARC pool. Pure-JS publish is arch-independent.
runs-on: hanzo-build-linux-amd64
runs-on: [self-hosted, linux, arm64]
steps:
- uses: actions/checkout@v5
with:
+46
View File
@@ -0,0 +1,46 @@
name: Release
# testing on a branch for now
on:
push:
branches:
- test-release
jobs:
release:
name: Release
runs-on: [self-hosted, linux, amd64]
steps:
- name: Checkout Repo
uses: actions/checkout@v5
with:
# Full history needed for git tag and push
fetch-depth: 0
token: ${{ secrets.PAT }}
- name: Install
uses: ./.github/actions/install
- name: Install playwright
run: bunx playwright install
- name: Test
run: bun run test
- name: Publish
# just testing for now so --skip-publish
run: bun run release:beta:dirty --ci --gui-git-user --skip-publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
tagged-release:
name: Tagged Release
runs-on: [self-hosted, linux, amd64]
# needs: release
steps:
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: '${{ github.token }}'
prerelease: false
-102
View File
@@ -1,102 +0,0 @@
name: sync
# Carries pushed refs to git.hanzo.ai, the canonical forge, and does nothing
# else: build, test and release run natively there.
#
# Repo-agnostic. owner/name come from ${{ github.repository }}, so this file is
# dropped into every repo unchanged as .github/workflows/sync.yml and is the
# only workflow GitHub is permitted to run.
on:
push:
# '**' matches slashes; '*' does not, and would skip feature/foo.
branches: ['**']
tags: ['**']
workflow_dispatch:
# Serialize per ref. Never cancel: a cancelled run drops that ref and nothing
# reconciles it afterwards.
concurrency:
group: sync-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
sync:
# .github/workflows is also on the forge's own workflow search path, so this
# file executes there too in any repo without .hanzo/workflows, where it
# would push the forge to itself. server_url is the forge's AppURL, which
# makes this the test for "running on GitHub".
if: github.server_url == 'https://github.com'
# GitHub-hosted on purpose. This is the one workflow that must run ON GitHub,
# and the self-hosted pool that used to serve it is retired — a job asking for
# it now queues forever against a label nothing answers. Carrying refs is a
# push, not a build, so it does not belong on the build fabric anyway: builds
# run natively on git.hanzo.ai, which is the whole point of this file.
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
persist-credentials: false
- name: Push refs to git.hanzo.ai
env:
FORGE: https://git.hanzo.ai
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
run: |
set -euo pipefail
if [ -z "${GIT_TOKEN}" ]; then
echo "::error::GIT_TOKEN is unset, so this push never reached the canonical forge. Add the org secret."
exit 1
fi
REMOTE="${FORGE}/${GITHUB_REPOSITORY}.git"
# The forge reads the token from the basic-auth password and ignores
# the username. base64 of a secret is not masked automatically.
AUTH="$(printf 'x-access-token:%s' "${GIT_TOKEN}" | base64 -w0)"
echo "::add-mask::${AUTH}"
# Host-scoped, so the forge token is never sent to github.com.
git config --local "http.${FORGE}/.extraheader" "Authorization: Basic ${AUTH}"
# Reachability is the only transient failure here, so it is the only
# thing retried. ls-remote exits 0 on an existing empty repo and
# non-zero when the forge is down or the repo is absent.
ERR="$(mktemp)"
REACHED=""
for attempt in 1 2 3; do
if git ls-remote "${REMOTE}" >/dev/null 2>"${ERR}"; then
REACHED=1
break
fi
echo "forge probe failed (attempt ${attempt}/3): $(cat "${ERR}")"
if [ "${attempt}" -lt 3 ]; then
sleep $((attempt * 5))
fi
done
if [ -z "${REACHED}" ]; then
echo "::error::git.hanzo.ai is unreachable or ${GITHUB_REPOSITORY} does not exist there. $(cat "${ERR}")"
exit 1
fi
# Additive and fast-forward-only: no leading '+', no --force, no
# --prune, no --mirror. Tags go every run so a tag that missed its own
# event still lands; git refuses to move one that already differs.
REFS=('refs/tags/*:refs/tags/*')
case "${GITHUB_REF}" in
refs/heads/*) REFS+=("${GITHUB_REF}:${GITHUB_REF}") ;;
esac
# Not --atomic: a diverged ref must not hold back the refs that are
# clean. Rejections still fail the job.
if ! git push "${REMOTE}" "${REFS[@]}"; then
echo "::error::git.hanzo.ai rejected a ref for ${GITHUB_REPOSITORY}. The forge is canonical and is never force-updated from here; reconcile the diverged branch or tag by hand."
exit 1
fi
@@ -0,0 +1,137 @@
name: Test iOS Kitchen Sink Go (Maestro)
on:
push:
branches: [main, 'v2-*']
pull_request:
branches: [main, 'v*']
workflow_dispatch:
env:
test_container_app_path: code/kitchen-sink-go
jobs:
test:
# TODO: re-enable once Sheet demo is fixed on Expo Go CI
if: false
name: Run Maestro Tests (exports=${{ matrix.package-exports }})
runs-on: macos-14
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
package-exports: [true, false]
defaults:
run:
working-directory: ${{ env.test_container_app_path }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set Xcode version
run: sudo xcode-select -s /Applications/Xcode_16.2.app
- name: Install Maestro
env:
MAESTRO_VERSION: cli-2.3.0
run: |
curl -fsSL "https://github.com/mobile-dev-inc/maestro/releases/download/${MAESTRO_VERSION}/maestro.zip" -o maestro.zip
unzip -q maestro.zip
mv maestro "$HOME/.maestro"
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
- name: Install Dependencies
uses: ./.github/actions/install
- name: Boot iOS Simulator
working-directory: ${{ github.workspace }}
run: |
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | select(.key | contains("iOS")) | .value[] | select(.name == "iPhone 16") | .udid' | head -1)
if [ -z "$DEVICE_ID" ]; then
echo "iPhone 16 not found, using first available iPhone"
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | select(.key | contains("iOS")) | .value[] | select(.name | contains("iPhone")) | .udid' | head -1)
fi
echo "Booting simulator: $DEVICE_ID"
xcrun simctl boot "$DEVICE_ID" || true
xcrun simctl bootstatus "$DEVICE_ID" -b
echo "Waiting for simulator to be fully ready for Maestro..."
for i in {1..30}; do
if $HOME/.maestro/bin/maestro --device "$DEVICE_ID" test --help > /dev/null 2>&1; then
echo "Maestro can communicate with device"
break
fi
echo "Waiting for Maestro device detection... ($i/30)"
sleep 2
done
sleep 5
- name: Install Expo Go
run: |
# Install Expo Go on simulator (no custom build needed)
bunx expo start --ios &
sleep 30
# Kill expo after it installs Expo Go
kill %1 || true
- name: Start Metro Bundler
run: |
EXPO_NO_TELEMETRY=true HANZO_GUI_PACKAGE_EXPORTS=${{ matrix.package-exports }} bunx expo start --offline &
echo "Waiting for Metro to start..."
for i in {1..30}; do
if curl -s "http://127.0.0.1:8081/" -H "Expo-Platform: ios" > /dev/null 2>&1; then
echo "Metro is responding!"
break
fi
echo "Waiting for Metro... ($i/30)"
sleep 2
done
- name: Pre-warm Bundle
run: |
echo "Pre-warming bundle..."
MANIFEST=$(curl -s "http://127.0.0.1:8081/" -H "Expo-Platform: ios")
BUNDLE_URL=$(echo "$MANIFEST" | jq -r '.launchAsset.url')
echo "Fetching bundle from: $BUNDLE_URL"
curl -s --max-time 900 "$BUNDLE_URL" > /dev/null 2>&1 || echo "Bundle fetch completed (or timed out)"
echo "Bundle pre-warm complete"
- name: Verify Maestro Device Connection
run: |
echo "Checking Maestro device connection..."
for i in {1..10}; do
if xcrun simctl list devices booted | grep -q "Booted"; then
echo "Simulator is booted"
sleep 3
break
fi
echo "Waiting for device... ($i/10)"
sleep 3
done
xcrun simctl list devices booted
- name: Run Maestro Tests
run: |
for attempt in 1 2; do
echo "Test attempt $attempt of 2..."
if maestro test ./flows --exclude-tags=util --no-ansi; then
echo "Tests passed!"
exit 0
fi
if [ $attempt -lt 2 ]; then
echo "Attempt $attempt failed, retrying..."
sleep 10
fi
done
echo "All attempts failed"
exit 1
- name: Upload Maestro Artifacts on Failure
if: failure()
uses: actions/upload-artifact@v5
with:
name: maestro-artifacts-exports-${{ matrix.package-exports }}
path: |
~/.maestro/tests/**/*
+186
View File
@@ -0,0 +1,186 @@
name: Test iOS Native (Maestro)
on:
push:
branches: [main, 'v2-*', rn82]
pull_request:
branches: [main, 'v*']
workflow_dispatch:
env:
test_container_app_path: code/kitchen-sink
MAESTRO_DRIVER_STARTUP_TIMEOUT: 120000
jobs:
build:
uses: ./.github/workflows/build-ios-kitchensink-app.yml
with:
configuration: Debug
secrets: inherit
test:
name: Run Maestro Tests (exports=${{ matrix.package-exports }})
needs: build
runs-on: macos-15
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
package-exports: [true, false]
defaults:
run:
working-directory: ${{ env.test_container_app_path }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set Xcode version
run: sudo xcode-select -s /Applications/Xcode_26.0.1.app
- name: Restore Built App from Cache
id: restore-app-cache
uses: actions/cache/restore@v5
with:
key: ${{ needs.build.outputs.built-app-cache-key }}
path: ${{ needs.build.outputs.built-app-path }}
- name: Check Cache Restore
if: steps.restore-app-cache.outputs.cache-hit != 'true'
run: |
echo "::warning::iOS cache not restored (key: ${{ needs.build.outputs.built-app-cache-key }}). This may happen on first run after cache key changes."
echo "SKIP_MAESTRO_TESTS=true" >> $GITHUB_ENV
- name: Install Maestro
if: env.SKIP_MAESTRO_TESTS != 'true'
env:
MAESTRO_VERSION: cli-2.3.0
run: |
# Pin to specific version via GitHub releases (avoids broken get.maestro.mobile.dev)
curl -fsSL "https://github.com/mobile-dev-inc/maestro/releases/download/${MAESTRO_VERSION}/maestro.zip" -o maestro.zip
unzip -q maestro.zip
mv maestro "$HOME/.maestro"
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
# Install dependencies BEFORE booting simulator to avoid simulator timeout
# during potentially long bun install + build:js steps
- name: Install Dependencies
if: env.SKIP_MAESTRO_TESTS != 'true'
uses: ./.github/actions/install
- name: Boot Simulator & Start Metro (parallel)
if: env.SKIP_MAESTRO_TESTS != 'true'
working-directory: ${{ github.workspace }}
run: |
# start Metro in background while simulator boots
cd "${{ env.test_container_app_path }}"
EXPO_NO_TELEMETRY=true HANZO_GUI_PACKAGE_EXPORTS=${{ matrix.package-exports }} bunx expo start --dev-client --offline --reset-cache &
cd "${{ github.workspace }}"
# boot simulator
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | select(.key | contains("iOS")) | .value[] | select(.name == "iPhone 16") | .udid' | head -1)
if [ -z "$DEVICE_ID" ]; then
echo "iPhone 16 not found, using first available iPhone"
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '.devices | to_entries[] | select(.key | contains("iOS")) | .value[] | select(.name | contains("iPhone")) | .udid' | head -1)
fi
echo "Booting simulator: $DEVICE_ID"
xcrun simctl boot "$DEVICE_ID" || true
xcrun simctl bootstatus "$DEVICE_ID" -b
# install app while waiting for Metro
xcrun simctl install booted "${{ needs.build.outputs.built-app-path }}"
# wait for Metro to be ready
echo "Waiting for Metro..."
for i in {1..60}; do
if curl -s "http://127.0.0.1:8081/" -H "Expo-Platform: ios" > /dev/null 2>&1; then
echo "Metro is responding!"
break
fi
sleep 2
done
- name: Pre-warm Bundle
if: env.SKIP_MAESTRO_TESTS != 'true'
run: |
echo "Pre-warming JS bundle (Metro build + cache)..."
MANIFEST=$(curl -s "http://127.0.0.1:8081/" -H "Expo-Platform: ios")
BUNDLE_URL=$(echo "$MANIFEST" | jq -r '.launchAsset.url')
echo "Fetching bundle from: $BUNDLE_URL"
curl -s --max-time 900 "$BUNDLE_URL" > /dev/null 2>&1 || echo "Bundle fetch completed (or timed out)"
echo "Bundle pre-warm complete"
- name: Start Simulator Log Collection
if: env.SKIP_MAESTRO_TESTS != 'true'
run: |
# capture simulator device logs in background for debugging app crashes
xcrun simctl spawn booted log stream --predicate 'process == "guikitchensink" OR subsystem == "com.gui.guikitchensink"' --level debug > /tmp/simulator-app.log 2>&1 &
echo $! > /tmp/simlog-pid
# also capture broader crash/error logs
xcrun simctl spawn booted log stream --predicate 'eventMessage CONTAINS "crash" OR eventMessage CONTAINS "fatal" OR eventMessage CONTAINS "error" OR process == "ReportCrash"' --level error > /tmp/simulator-errors.log 2>&1 &
echo $! > /tmp/simlog-errors-pid
- name: Warm up App (cold start + Hermes bytecode compile)
if: env.SKIP_MAESTRO_TESTS != 'true'
run: |
# WarmUp.yaml does clearState:true for a clean first launch.
# Subsequent test flows use OpenApp.yaml (no clearState) so Hermes
# bytecode cache persists across launches = much faster restarts.
maestro test ./flows/WarmUp.yaml --no-ansi || true
- name: Run Maestro Tests
if: env.SKIP_MAESTRO_TESTS != 'true'
run: |
# Run tests with one retry for flaky simulator detection
for attempt in 1 2; do
echo "Test attempt $attempt of 2..."
if maestro test ./flows --exclude-tags=util --no-ansi; then
echo "Tests passed!"
exit 0
fi
if [ $attempt -lt 2 ]; then
echo "Attempt $attempt failed, retrying..."
sleep 10
fi
done
echo "All attempts failed"
exit 1
- name: Dump App Logs on Failure
if: failure() && env.SKIP_MAESTRO_TESTS != 'true'
run: |
# stop log collection
kill "$(cat /tmp/simlog-pid 2>/dev/null)" 2>/dev/null || true
kill "$(cat /tmp/simlog-errors-pid 2>/dev/null)" 2>/dev/null || true
echo "::group::Simulator App Logs (last 200 lines)"
tail -200 /tmp/simulator-app.log 2>/dev/null || echo "No app logs captured"
echo "::endgroup::"
echo "::group::Simulator Error Logs (last 100 lines)"
tail -100 /tmp/simulator-errors.log 2>/dev/null || echo "No error logs captured"
echo "::endgroup::"
echo "::group::Metro Bundler Output"
# show any metro errors from the background process
ps aux | grep -i metro | grep -v grep || echo "Metro process not found"
echo "::endgroup::"
echo "::group::Crash Reports"
find ~/Library/Logs/DiagnosticReports -name "*guikitchensink*" -newer /tmp/simulator-app.log 2>/dev/null | while read f; do
echo "=== $f ==="
head -50 "$f"
done || echo "No crash reports found"
echo "::endgroup::"
- name: Report Test Status
if: always() && env.SKIP_MAESTRO_TESTS == 'true'
run: |
echo "::warning::Maestro tests skipped - cache was not available (will be available on next run)"
- name: Upload Maestro Artifacts on Failure
if: failure() && env.SKIP_MAESTRO_TESTS != 'true'
uses: actions/upload-artifact@v5
with:
name: maestro-artifacts-exports-${{ matrix.package-exports }}
path: |
~/.maestro/tests/**/*
/tmp/simulator-app.log
/tmp/simulator-errors.log
+573
View File
@@ -0,0 +1,573 @@
name: Native Tests (Detox)
on:
push:
branches:
- main
- 'native-*'
- 'v*'
- rn82
workflow_dispatch:
# cancel in-progress runs on feature branches, but let main finish for full history
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
test_container_app_path: code/kitchen-sink
# Increment this to force a fresh Android build (invalidates Redis KV cache)
android_cache_version: v4
jobs:
# ─────────────────────────────────────────────────────────────────────────────
# iOS Build & Test
# ─────────────────────────────────────────────────────────────────────────────
build-ios:
name: Build iOS App
uses: ./.github/workflows/build-ios-kitchensink-app.yml
with:
configuration: Debug
secrets: inherit
test-ios:
name: iOS Detox Tests (${{ matrix.shard_name }})
needs: build-ios
runs-on: macos-15
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- shard_name: '1/2'
test_files: 'e2e/check-rngh-status.test.ts e2e/GroupPressNative.test.ts e2e/MediaQueryGtMd.test.ts e2e/NativePortal.test.ts e2e/PointerEvents.test.ts e2e/PressStyleNative.noRngh.test.ts e2e/PressStyleNative.test.ts e2e/SafeArea.test.ts'
- shard_name: '2/2'
test_files: 'e2e/CompilerExtraction.test.ts e2e/SelectAndroidOnPress.test.ts e2e/SelectRemount.test.ts e2e/SheetDragResist.test.ts e2e/SheetKeyboardDrag.test.ts e2e/SheetScrollableDrag.test.ts e2e/ShorthandVariables.test.ts e2e/ThemeChangeBasic.test.ts e2e/ThemeMutation.test.ts'
defaults:
run:
working-directory: ${{ env.test_container_app_path }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Set Xcode version
run: sudo xcode-select -s /Applications/Xcode_26.0.1.app
- name: Restore Built App from Cache
id: restore-ios-cache
uses: actions/cache/restore@v5
with:
key: ${{ needs.build-ios.outputs.built-app-cache-key }}
path: ${{ needs.build-ios.outputs.built-app-path }}
- name: Check iOS Cache Restore
if: steps.restore-ios-cache.outputs.cache-hit != 'true'
run: |
echo "::warning::iOS cache not restored (key: ${{ needs.build-ios.outputs.built-app-cache-key }}). This may happen on first run after cache key changes."
echo "SKIP_IOS_TESTS=true" >> $GITHUB_ENV
- name: Boot iOS Simulator (background)
if: env.SKIP_IOS_TESTS != 'true'
working-directory: ${{ github.workspace }}
run: |
# start simulator boot in background while deps install
xcrun simctl shutdown all 2>/dev/null || true
sleep 1
# find iPhone 16 simulator
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '
.devices | to_entries[]
| select(.key | contains("iOS"))
| .value[]
| select(.name == "iPhone 16")
| .udid' | head -1)
if [ -z "$DEVICE_ID" ]; then
DEVICE_ID=$(xcrun simctl list devices available -j | jq -r '
.devices | to_entries[]
| select(.key | contains("iOS"))
| .value[]
| select(.name | contains("iPhone"))
| .udid' | head -1)
fi
echo "Booting simulator: $DEVICE_ID"
xcrun simctl boot "$DEVICE_ID" || true
echo "SIM_DEVICE_ID=$DEVICE_ID" >> $GITHUB_ENV
- name: Install Dependencies
if: env.SKIP_IOS_TESTS != 'true'
uses: ./.github/actions/install
with:
workspace-focus: '@hanzogui/kitchen-sink'
- name: Install tooling
if: env.SKIP_IOS_TESTS != 'true'
run: |
npm install -g detox-cli &
(brew tap wix/brew && brew install applesimutils) &
wait
- name: Rebuild Detox Framework Cache
if: env.SKIP_IOS_TESTS != 'true'
working-directory: ${{ github.workspace }}
run: npx detox rebuild-framework-cache
- name: Wait for Simulator Boot
if: env.SKIP_IOS_TESTS != 'true'
working-directory: ${{ github.workspace }}
timeout-minutes: 5
run: |
echo "Waiting for simulator $SIM_DEVICE_ID to boot..."
# macOS doesn't have `timeout` — use perl one-liner as fallback
perl -e 'alarm 300; exec @ARGV' xcrun simctl bootstatus "$SIM_DEVICE_ID" -b || {
if xcrun simctl list devices booted | grep -q "Booted"; then
echo "Simulator appears booted despite timeout"
else
echo "Simulator failed to boot"
exit 1
fi
}
sleep 5
- name: Set Simulator to Light Mode
if: env.SKIP_IOS_TESTS != 'true'
working-directory: ${{ github.workspace }}
run: |
xcrun simctl ui booted appearance light
- name: Install App on Simulator
if: env.SKIP_IOS_TESTS != 'true'
working-directory: ${{ github.workspace }}
run: |
xcrun simctl install booted "${{ needs.build-ios.outputs.built-app-path }}"
- name: Setup Bun
if: env.SKIP_IOS_TESTS != 'true'
uses: oven-sh/setup-bun@v2
with:
bun-version-file: 'package.json'
- name: Run iOS Detox Tests
if: env.SKIP_IOS_TESTS != 'true'
env:
DETOX_IOS_APP_PATH: build/Build/Products/Debug-iphonesimulator/guikitchensink.app
run: |
bun run ../packages/native-ci/src/run-detox-ios.ts --project-root "$PWD" --record-logs failing --retries 1 ${{ matrix.test_files }}
- name: Report iOS Test Status
if: always() && env.SKIP_IOS_TESTS == 'true'
run: |
echo "::warning::iOS Detox tests skipped - cache was not available (will be available on next run)"
- name: Upload Detox Artifacts on Failure
if: failure() && env.SKIP_IOS_TESTS != 'true'
uses: actions/upload-artifact@v5
with:
name: detox-artifacts-ios-${{ strategy.job-index }}
path: ${{ env.test_container_app_path }}/e2e/artifacts/
retention-days: 7
# ─────────────────────────────────────────────────────────────────────────────
# Android Build & Test
# ─────────────────────────────────────────────────────────────────────────────
build-android:
name: Build Android App
# Only run on main/v* branches (not PRs)
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v') || github.ref == 'refs/heads/rn82'
runs-on: [self-hosted, linux, amd64]
timeout-minutes: 45
outputs:
android-cache-key: ${{ steps.final-cache-key.outputs.cache_key }}
android-path: code/kitchen-sink/android
fingerprint: ${{ steps.calculate-fingerprint.outputs.fingerprint || steps.get-fingerprint-from-cache.outputs.fingerprint }}
steps:
- name: Free Disk Space
run: |
# Android builds with debug symbols need significant disk space
# Remove unused tools to free ~10GB+
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android/sdk/ndk
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h /
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Calculate Pre-Fingerprint Hash
id: calculate-pre-fingerprint
env:
# Include cache version to allow manual cache busting
PRE_FINGERPRINT_HASH: ${{ hashFiles('bun.lock', 'code/kitchen-sink/app.json', 'packages/vxrn/expo-plugin.cjs') }}-${{ env.android_cache_version }}
run: |
echo "Pre-fingerprint hash: $PRE_FINGERPRINT_HASH"
echo "pre_fingerprint_hash=$PRE_FINGERPRINT_HASH" >> $GITHUB_OUTPUT
- name: Read Cached Fingerprint
id: get-fingerprint-from-cache
env:
KV_STORE_REDIS_REST_URL: ${{ secrets.KV_STORE_REDIS_REST_URL }}
KV_STORE_REDIS_REST_TOKEN: ${{ secrets.KV_STORE_REDIS_REST_TOKEN }}
run: |
FINGERPRINT_FROM_CACHE=$(curl -s "$KV_STORE_REDIS_REST_URL/get/android-guikitchensink-fingerprint-from-pre-hash-${{ steps.calculate-pre-fingerprint.outputs.pre_fingerprint_hash }}" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN" | jq -r '.result')
if [ "$FINGERPRINT_FROM_CACHE" != "null" ]; then
curl -s -X POST "$KV_STORE_REDIS_REST_URL/EXPIRE/android-guikitchensink-fingerprint-from-pre-hash-${{ steps.calculate-pre-fingerprint.outputs.pre_fingerprint_hash }}/2592000" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN"
echo "Fingerprint from cache: $FINGERPRINT_FROM_CACHE"
echo "fingerprint=$FINGERPRINT_FROM_CACHE" >> $GITHUB_OUTPUT
else
echo 'No cached fingerprint found.'
echo "fingerprint=null" >> $GITHUB_OUTPUT
fi
- name: Check if Android folder is already cached
id: android-cache-check
if: ${{ steps.get-fingerprint-from-cache.outputs.fingerprint != 'null' }}
uses: actions/cache/restore@v5
with:
path: code/kitchen-sink/android
key: android-detox-${{ env.android_cache_version }}-${{ steps.get-fingerprint-from-cache.outputs.fingerprint }}
lookup-only: true
- name: Install Dependencies
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
uses: ./.github/actions/install
with:
workspace-focus: '@hanzogui/kitchen-sink'
- name: Setup Java
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Android SDK
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
uses: android-actions/setup-android@v3
- name: Prebuild Android
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
working-directory: code/kitchen-sink
run: |
bunx expo prebuild --platform android --clean
- name: Setup Detox Test Infrastructure
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
working-directory: code/kitchen-sink
run: |
# Create Gradle init script for JNI library conflicts
cat > android/init.gradle << 'INITGRADLE'
// Gradle init script to fix JNI library conflicts for Detox tests
allprojects {
afterEvaluate {
if (it.hasProperty('android')) {
android {
packagingOptions {
jniLibs {
pickFirsts += ['**/libfbjni.so']
}
}
}
}
}
}
INITGRADLE
# Remove leading whitespace from heredoc
sed -i 's/^ //' android/init.gradle
# Add Detox repository to build.gradle (using node for reliable file editing)
node -e "
const fs = require('fs');
let content = fs.readFileSync('android/build.gradle', 'utf8');
content = content.replace(
\"maven { url 'https://www.jitpack.io' }\",
\"maven { url 'https://www.jitpack.io' }\\n // Detox repository\\n maven { url \\\"\\\$rootDir/../../../node_modules/detox/Detox-android\\\" }\"
);
fs.writeFileSync('android/build.gradle', content);
"
# Add Detox test runner config and dependencies to app/build.gradle
node -e "
const fs = require('fs');
let content = fs.readFileSync('android/app/build.gradle', 'utf8');
// Add testInstrumentationRunner after versionName
content = content.replace(
'versionName \"1.0.0\"',
'versionName \"1.0.0\"\\n\\n // Detox instrumentation test runner\\n testBuildType System.getProperty(\\'testBuildType\\', \\'debug\\')\\n testInstrumentationRunner \\'androidx.test.runner.AndroidJUnitRunner\\''
);
// Add Detox dependencies before the final closing brace of dependencies block
content = content.replace(
/(implementation jscFlavor\s*\n\s*}\s*\n})/,
'implementation jscFlavor\\n }\\n\\n // Detox dependencies\\n androidTestImplementation(\\'com.wix:detox:+\\')\\n androidTestImplementation \\'junit:junit:4.13.2\\'\\n}'
);
fs.writeFileSync('android/app/build.gradle', content);
"
# Create androidTest directory structure
mkdir -p android/app/src/androidTest/java/com/hanzoai/guikitchensink
# Create DetoxTest.java
cat > android/app/src/androidTest/java/com/hanzoai/guikitchensink/DetoxTest.java << 'DETOXTEST'
package com.gui.guikitchensink;
import com.wix.detox.Detox;
import com.wix.detox.config.DetoxConfig;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
@RunWith(AndroidJUnit4.class)
@LargeTest
public class DetoxTest {
@Rule
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
@Test
public void runDetoxTests() {
DetoxConfig detoxConfig = new DetoxConfig();
detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;
detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;
detoxConfig.rnContextLoadTimeoutSec = 180;
Detox.runTests(mActivityRule, detoxConfig);
}
}
DETOXTEST
# Create AndroidManifest.xml for androidTest (fixes Android 12+ exported requirement)
cat > android/app/src/androidTest/AndroidManifest.xml << 'MANIFEST'
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- Fix for Android 12+ requiring explicit android:exported -->
<application>
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity"
android:exported="true"
tools:node="merge" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyActivity"
android:exported="true"
tools:node="merge" />
<activity
android:name="androidx.test.core.app.InstrumentationActivityInvoker$EmptyFloatingActivity"
android:exported="true"
tools:node="merge" />
</application>
</manifest>
MANIFEST
- name: Calculate Fingerprint
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
id: calculate-fingerprint
working-directory: code/kitchen-sink
run: |
FINGERPRINT=$(bunx @expo/fingerprint fingerprint:generate --platform android | jq -r '.hash')
if [ -z "$FINGERPRINT" ]; then
echo '[ERROR] Failed to calculate fingerprint.'
exit 1
fi
echo "Fingerprint: $FINGERPRINT"
echo "fingerprint=$FINGERPRINT" >> $GITHUB_OUTPUT
- name: Write Fingerprint to Cache
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
env:
KV_STORE_REDIS_REST_URL: ${{ secrets.KV_STORE_REDIS_REST_URL }}
KV_STORE_REDIS_REST_TOKEN: ${{ secrets.KV_STORE_REDIS_REST_TOKEN }}
run: |
curl -s -X POST "$KV_STORE_REDIS_REST_URL/SETEX/android-guikitchensink-fingerprint-from-pre-hash-${{ steps.calculate-pre-fingerprint.outputs.pre_fingerprint_hash }}/2592000/${{ steps.calculate-fingerprint.outputs.fingerprint }}" -H "Authorization: Bearer $KV_STORE_REDIS_REST_TOKEN"
- name: Check If Build Already Exists (with new fingerprint)
if: ${{ !steps.android-cache-check.outputs.cache-hit }}
id: android-cache-check-new
uses: actions/cache/restore@v5
with:
path: code/kitchen-sink/android
key: android-detox-${{ env.android_cache_version }}-${{ steps.calculate-fingerprint.outputs.fingerprint }}
lookup-only: true
- name: Cache Gradle
if: ${{ !steps.android-cache-check.outputs.cache-hit && !steps.android-cache-check-new.outputs.cache-hit }}
uses: actions/cache@v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build Android App (Debug + Test APKs)
if: ${{ !steps.android-cache-check.outputs.cache-hit && !steps.android-cache-check-new.outputs.cache-hit }}
working-directory: code/kitchen-sink
env:
# Limit Gradle memory to avoid OOM on free runners
GRADLE_OPTS: '-Dorg.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError'
run: |
cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug --init-script init.gradle --no-daemon --max-workers=2
- name: Cache Android Folder
if: ${{ !steps.android-cache-check.outputs.cache-hit && !steps.android-cache-check-new.outputs.cache-hit }}
uses: actions/cache/save@v5
with:
path: code/kitchen-sink/android
key: android-detox-${{ env.android_cache_version }}-${{ steps.calculate-fingerprint.outputs.fingerprint }}
- name: Set Final Cache Key
id: final-cache-key
run: |
if [ "${{ steps.android-cache-check.outputs.cache-hit }}" = "true" ]; then
echo "cache_key=android-detox-${{ env.android_cache_version }}-${{ steps.get-fingerprint-from-cache.outputs.fingerprint }}" >> $GITHUB_OUTPUT
else
echo "cache_key=android-detox-${{ env.android_cache_version }}-${{ steps.calculate-fingerprint.outputs.fingerprint }}" >> $GITHUB_OUTPUT
fi
test-android:
name: Android Detox Tests
needs: build-android
# Only run on main/v* branches (not PRs)
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/v') || github.ref == 'refs/heads/rn82'
runs-on: [self-hosted, linux, amd64]
timeout-minutes: 45
# Android emulator in CI is flaky with window focus issues - don't block on failures
continue-on-error: true
# Retry matrix - run up to 2 attempts sequentially to handle flakiness
strategy:
fail-fast: false
max-parallel: 1
matrix:
attempt: [1, 2]
defaults:
run:
working-directory: ${{ env.test_container_app_path }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Restore Android Folder from Cache
id: restore-android-cache
uses: actions/cache/restore@v5
with:
key: ${{ needs.build-android.outputs.android-cache-key }}
path: ${{ needs.build-android.outputs.android-path }}
- name: Check Cache Restore
if: steps.restore-android-cache.outputs.cache-hit != 'true'
run: |
echo "::warning::Android cache not restored (key: ${{ needs.build-android.outputs.android-cache-key }}). This may happen on first run after cache key changes."
echo "SKIP_ANDROID_TESTS=true" >> $GITHUB_ENV
- name: Install Dependencies
if: env.SKIP_ANDROID_TESTS != 'true'
uses: ./.github/actions/install
with:
workspace-focus: '@hanzogui/kitchen-sink'
- name: Setup Java
if: env.SKIP_ANDROID_TESTS != 'true'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install Detox CLI
if: env.SKIP_ANDROID_TESTS != 'true'
run: npm install -g detox-cli
- name: Setup Bun
if: env.SKIP_ANDROID_TESTS != 'true'
uses: oven-sh/setup-bun@v2
with:
bun-version-file: 'package.json'
- name: Start Android Emulator and Run Tests
if: env.SKIP_ANDROID_TESTS != 'true'
id: android-tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
target: google_apis
arch: x86_64
profile: pixel_4
avd-name: test
ram-size: 2048M
heap-size: 512M
disk-size: 4G
force-avd-creation: false
emulator-boot-timeout: 600
disable-animations: true
emulator-options: -no-snapshot -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -memory 2048
working-directory: code/kitchen-sink
script: |
# Free up memory before tests
sudo swapoff -a || true
sudo swapon -a || true
# Verify emulator is ready
adb devices
adb wait-for-device
# Wait for boot to complete
adb shell 'while [ -z "$(getprop sys.boot_completed)" ]; do sleep 1; done'
# More robust screen unlock and focus sequence
adb shell wm dismiss-keyguard
adb shell input keyevent 82 # KEYEVENT_MENU - wake/unlock
adb shell input keyevent 3 # KEYEVENT_HOME - go home first
sleep 1
adb shell input keyevent 82 # Unlock again
adb shell input keyevent 4 # Back button to dismiss any dialogs
sleep 3
# Verify screen is on and unlocked
adb shell dumpsys window | grep -E "mAwake|mScreenOn" || true
# Let Detox handle APK installation and ADB reverse setup via reversePorts config
# Android emulator is flaky - capture exit code but don't fail the job
bun run ../packages/native-ci/src/run-detox-android.ts --headless --project-root "$PWD" --record-logs failing --retries 2 || echo "ANDROID_TESTS_FAILED=true" >> $GITHUB_ENV
- name: Report Android Test Status
if: always()
run: |
if [ "$SKIP_ANDROID_TESTS" = "true" ]; then
echo "::warning::Android Detox tests skipped - cache was not available (will be available on next run)"
elif [ "$ANDROID_TESTS_FAILED" = "true" ]; then
echo "::warning::Android Detox tests failed - this is expected flakiness and does not block CI"
else
echo "Android Detox tests passed"
fi
- name: Upload Detox Artifacts on Failure
if: env.ANDROID_TESTS_FAILED == 'true' && env.SKIP_ANDROID_TESTS != 'true'
uses: actions/upload-artifact@v5
with:
name: detox-artifacts-android-attempt-${{ matrix.attempt }}
path: ${{ env.test_container_app_path }}/e2e/artifacts/
retention-days: 7
-3
View File
@@ -60,6 +60,3 @@ test-results/
.gui/
# Wed Mar 25 04:08:49 PDT 2026
*.tgz
# tauri build output only — no source lives here (2.1G)
apps/desktop/
-66
View File
@@ -1,66 +0,0 @@
name: Checks
on:
workflow_dispatch:
pull_request:
push:
paths-ignore:
- 'assets/**'
- '.vscode/**'
branches:
- main
- v2
- 'v2-*'
# cancel in-progress runs on the same branch (avoids duplicate PR + push runs)
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
checks:
runs-on: hanzo-build-linux-amd64
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Install
uses: ./.github/actions/install
- name: Check
run: bun run check
- name: Lint
run: bun run lint
unit-tests:
runs-on: hanzo-build-linux-amd64
env:
NODE_OPTIONS: '--max-old-space-size=6144'
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Install
uses: ./.github/actions/install
- name: Get Playwright version
id: pw-version
run: echo "version=$(bunx playwright --version | awk '{print $2}')" >> $GITHUB_OUTPUT
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.pw-version.outputs.version }}
- name: Install playwright
run: bunx playwright install
- name: Run unit tests
run: bun turbo run test:web --filter='!@hanzogui/kitchen-sink' --concurrency=1
-121
View File
@@ -1,121 +0,0 @@
name: Publish @hanzo/ai
# Surgical publish of ONLY the @hanzo/ai SDK (pkgs/ai). The desktop apps
# (hanzo/zoo/lux) render `<HanzoAI/>` from this package; it must be on npm
# for a clean `npm i` to resolve it.
#
# Triggered only on `release/ai-v*` tags. A version bump alone does NOT
# publish — the tag gates the run. Tag scheme:
# release/ai-v0.1.1 -> @hanzo/ai@0.1.1
#
# NPM_TOKEN resolution order (same shape as publish-gui.yml):
# 1. KMS via Universal Auth (KMS_CLIENT_ID/SECRET -> short-lived token)
# 2. KMS via long-lived HANZO_API_KEY (legacy bootstrap)
# 3. Direct repo secret NPM_TOKEN (fallback until KMS is provisioned)
#
# Idempotent: skips if @hanzo/ai@<version> is already on npm.
on:
push:
tags:
- 'release/ai-v*'
workflow_dispatch:
inputs:
confirm:
description: 'Type "publish" to publish @hanzo/ai at its current on-disk version'
required: true
default: ''
permissions:
contents: read
id-token: write
# A transitive puppeteer dep tries to download Chromium in its postinstall,
# which fails on the runner and kills `bun install` (run #7). The publish
# never drives a browser, so skip every browser-binary download.
env:
PUPPETEER_SKIP_DOWNLOAD: '1'
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: '1'
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
PUPPETEER_SKIP_CHROME_DOWNLOAD: '1'
jobs:
publish:
name: Build, smoke-test, publish @hanzo/ai
# Same runner publish-gui.yml uses. @hanzo/ai is arch-independent JS, and the
# arm64 label this asked for is answered by one frequently-offline host — a job
# requesting a label nothing answers queues silently instead of failing, which
# is the worst outcome for a publisher. KMS is reachable from either pool.
runs-on: hanzo-build-linux-amd64
if: github.event_name == 'push' || github.event.inputs.confirm == 'publish'
steps:
- uses: actions/checkout@v5
with:
# Shallow: the publish only builds pkgs/ai — it needs no git history.
# A full clone (fetch-depth 0) of this monorepo's history OOMs git
# index-pack on the runner and fails checkout (runs #5/#6 died here).
fetch-depth: 1
- name: Install
uses: ./.github/actions/install
# Canonical, deterministic KMS auth — the ONE way every hanzo/lux/zoo repo
# loads secrets (see hanzoai/universe/.github/actions/kms-action). OIDC-
# first: GitHub's id-token proves this repo's identity to KMS, so NOTHING
# is stored — only non-secret `vars.*` config. NPM_TOKEN is exported into
# the job env at `secret-path`. No repo NPM_TOKEN secret, no client_id/
# secret. Set KMS_IDENTITY_ID + KMS_PROJECT_ID once at the org level.
- name: Load NPM_TOKEN from Hanzo KMS (OIDC)
uses: hanzoai/universe/.github/actions/kms-action@main
with:
identity-id: ${{ vars.KMS_IDENTITY_ID }}
project-id: ${{ vars.KMS_PROJECT_ID }}
environment: ${{ vars.KMS_ENVIRONMENT || 'prod' }}
secret-path: ${{ vars.KMS_PUBLISH_SECRET_PATH || '/publish' }}
export-type: env
- name: Configure npm registry
run: |
# NPM_TOKEN is now in the job env (kms-action export-type=env).
test -n "${NPM_TOKEN:-}" || { echo "::error::KMS did not yield NPM_TOKEN at the publish path"; exit 1; }
echo 'registry=https://registry.npmjs.org/' > ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
- name: Build @hanzo/ai (dist + dist-desktop)
# pkgs/ai's own build runs BOTH vite passes: dist/ (web entry,
# ai.css) and dist-desktop/ (the <HanzoAI/> desktop bundle the apps
# import). Build it explicitly so both trees exist before publish.
working-directory: pkgs/ai
run: bun run build
- name: Smoke-test dist trees + exports
run: |
set -eu
cd pkgs/ai
test -f dist/index.js || (echo "::error::dist/index.js missing"; exit 1)
test -f dist/ai.css || (echo "::error::dist/ai.css missing"; exit 1)
test -f dist-desktop/index.js || (echo "::error::dist-desktop/index.js missing"; exit 1)
# Every file referenced from the exports map must exist.
node -e "
const fs=require('fs');
const pkg=require('./package.json');
const walk=(v)=>{
if (typeof v==='string') { if (v.startsWith('./') && !fs.existsSync(v)) { console.error('missing:',v); process.exitCode=1; } }
else if (v && typeof v==='object') { for (const k of Object.keys(v)) walk(v[k]); }
};
walk(pkg.exports||{}); walk(pkg.main); walk(pkg.module); walk(pkg.types);
"
echo "smoke OK: $(node -p "require('./package.json').name + '@' + require('./package.json').version")"
- name: Publish @hanzo/ai
env:
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
working-directory: pkgs/ai
run: |
set -eu
version=$(node -p "require('./package.json').version")
if npm view "@hanzo/ai@${version}" version >/dev/null 2>&1; then
echo "@hanzo/ai@${version} already on npm - skipping."
exit 0
fi
# pkgs/ai has no workspace:* deps, so a direct publish is clean.
npm publish --access public
-157
View File
@@ -6,75 +6,6 @@ FOR LONG RUNNNING DEBUGGING run `bun run watch` in the background its faster and
keep commits to one line, add a trailing "Fixes #" if associated with a GH issue, and start with a convential commit style - UNLESS its a change that shouldn't go into the changelog, in those cases you can do things like `docs: ` or `site: `.
# How this ships
One way, and it runs on our own stack:
push -> github.com/hanzoai/gui (a mirror)
.github/workflows/sync.yml carries refs onward
-> git.hanzo.ai/hanzoai/gui CANONICAL
.hanzo/workflows/checks.yaml check, lint, unit tests
.hanzo/workflows/publish-gui.yml hanzogui + @hanzo/gui
.hanzo/workflows/publish-gui-all.yml every @hanzogui/* primitive
.hanzo/workflows/publish-ai.yml @hanzo/ai
.hanzo/workflows/build.yml ghcr.io/hanzoai/gui
**git.hanzo.ai is canonical; GitHub is a mirror.** `.github/workflows/` holds
exactly one file, `sync.yml`, and its only job is getting refs to the forge. Every
build, check and publish is a workflow under `.hanzo/workflows/`, which the forge
reads. `.hanzo/workflows` uses GitHub Actions syntax, so a workflow moves between
the two by changing directory and nothing else. `.github/actions/install` stays
where it is — a moved workflow's `uses: ./.github/actions/install` still resolves.
## What publishes what
Each publisher is the only producer of its packages, and a tag is the trigger in
every case — a version bump alone never ships.
| tag | workflow | publishes |
| --- | --- | --- |
| `release/gui-v*` | `publish-gui.yml` | `hanzogui` + the `@hanzo/gui` alias |
| `release/gui-all-v*` (or dispatch) | `publish-gui-all.yml` | every `@hanzogui/*` primitive + both umbrellas |
| `release/ai-v*` | `publish-ai.yml` | `@hanzo/ai` from `pkgs/ai` |
`NPM_TOKEN` comes from KMS with a repo-secret fallback in the two `publish-gui*`
workflows, and from `hanzoai/universe/.github/actions/kms-action` over OIDC in
`publish-ai.yml`. The forge has to be able to resolve that cross-repo action, so
`hanzoai/universe` must exist there; if it does not, the KMS step is the thing that
fails.
`publish-ai.yml` asked for `runs-on: [self-hosted, linux, arm64]`, which is one
frequently-offline host. A job requesting a label nothing answers queues silently
instead of failing, which is the worst possible outcome for a publisher, so it now
uses `hanzo-build-linux-amd64` like its two siblings — `@hanzo/ai` is
arch-independent JS.
## Known dead ends
- `build.yml` delegates to `hanzoai/.github/.github/workflows/docker-build.yml@main`
and **that file does not exist** in `hanzoai/.github` (which carries
`platform-build.yml` and `promote.yml`). The workflow has therefore never
completed a run and `ghcr.io/hanzoai/gui` is not in the registry. It moved to
`.hanzo/workflows/` unchanged rather than being deleted, because it is the only
declaration of the image path; making it real means either inlining a build or
pointing it at `platform-build.yml`.
- `gui.hanzo.ai` is **not served from this repo.** It answers from Cloudflare Pages
out of `hanzoai/docs` (`apps/gui-docs`). This repo's own `apps/gui.hanzo.ai` is
`one serve` — a long-running server, not a static export — so `hanzoai/static`
cannot serve it and there is no App CR for it. Either point a CR at the docs
image or convert that app to a static export; both are their own change.
- `checks.yaml` lost its `changes` + `integration-tests` jobs on the way over. They
filtered on `code/core/**`, `code/kitchen-sink/**` and friends — an upstream
Tamagui layout this repo does not have (the real paths are `apps/` and `pkgs/`) —
so the filter never matched and the shard matrix never ran. The Playwright suite
they were meant to run is at `apps/kitchen-sink/playwright.config.ts` and is
currently wired to nothing.
- Three iOS workflows were deleted outright: `build-ios-kitchensink-app.yml`,
`test-ios-native.yml` and `test-ios-kitchensink-go.yml`. All three wanted
`macos-14`/`macos-15` runners, which the forge does not have, and all three ran
in `code/kitchen-sink`, which does not exist. One was already `if: false`. Native
iOS testing needs macOS capacity first; these files could not have provided it.
# Hanzo GUI Testing Guide
## Running Tests
@@ -192,66 +123,6 @@ const response = await authFetch('/api/some-endpoint', {
**Why this matters:** Cookies alone are not reliable for auth in production due to cross-origin/SameSite issues. The `authFetch` helper automatically includes the Authorization header with the user's access token. All payment/subscription endpoints require this.
## Tailwind → gui migration (marketing surfaces)
`@hanzogui/chrome` is the shared public-site chrome (`HanzoNav`, `HanzoFooter`,
`ChatHero`, `HanzoWidget`) in Tamagui `styled()` + monochrome tokens. It compiles
and ships `dist/{esm,cjs,jsx}` + `types/`. It is the bridgehead: a surface adopts
the chrome first, then its page bodies.
**Read `pkgs/ui/chrome/src/styles.tsx`'s header before touching a chrome file.**
It states the contract this package is built under — no host config augmentation —
and every build break so far has been a violation of it: element type is `render`
(not `tag`); hover is DOM `onMouseEnter`/`onMouseLeave` (not `onHoverIn`); only
`Text` takes `color`; style props are LONGHAND (`textAlign`, `paddingHorizontal` —
the `text`/`px` shorthands live in augmentation that is absent here); anchors
forward `href` through the `linkable` `.styleable` wrapper. Two type consequences:
`GetProps<F>` requires `F extends StylableComponent`, and a raw-hex token handed to
a strict RN colour prop needs `as ColorTokens`.
### What the migration actually is
Measured on hanzo.ai (the largest surface): **126 marketing pages, 6,720
`className=` sites, 29,845 utility tokens, 671 distinct utilities**, and **zero**
imports of `@hanzo/ui` or `@hanzogui/*` in the page bodies. So this is not a
shadcn component swap — the pages are raw Tailwind. The vocabulary is regular
though: 30 utilities cover **51.4%** of all tokens, and colours are already
semantic (`text-foreground`, not hex), so the colour layer is a rename.
### Primitive map
| Tailwind (count) | gui equivalent |
|---|---|
| `text-foreground` 1091 · `text-muted-foreground` 859 · `text-foreground/80` 244 | `Txt` + `color={c.fg / c.fgMuted / c.fgDim}` (`chrome/src/tokens.ts`) |
| `border-border` 829 · `border` 795 | `borderColor={c.line}` · `borderWidth={1}` |
| `flex` 760 · `items-center` 887 · `justify-center` 512 | `XStack`/`YStack` + `alignItems` / `justifyContent` |
| `inline-flex` 484 | `XStack display="inline-flex"` |
| `grid` 220 | `YStack` + explicit rows, or `View display="grid"` |
| `mx-auto` 705 | `marginHorizontal="auto"` |
| `px-4` 542 · `py-3` 347 | `paddingHorizontal={16}` · `paddingVertical={12}` (longhand) |
| `gap-2` 509 · `gap-4` 239 | `gap={8}` · `gap={16}` |
| `mb-4` 507 | `marginBottom={16}` |
| `text-sm` 693 · `text-xl` 287 · `text-2xl` 323 | `Txt kind=` — the type scale in `chrome/src/styles.tsx` |
| `font-medium` 676 · `font-bold` 560 | `fontWeight="500"` / `"700"` |
| `text-center` 410 | `textAlign="center"` (never `text=`) |
| `rounded-full` 625 · `rounded-xl` 391 | `borderRadius={999}` · `borderRadius={12}` |
| `transition-colors` 372 | `useHover()` + explicit `color` on the child `Text` |
| `relative` 268 · `absolute` 256 · `overflow-hidden` 251 | `position` / `overflow` props |
| `h-4 w-4` 357/352 | icon `size={16}` (lucide props, unchanged) |
### Order
1. Adopt `@hanzogui/chrome` on a surface (nav/footer/hero) — the page bodies keep
working untouched, so this is independently shippable.
2. Extract the repeated page shapes. 17 hanzo.ai pages already open with a
byte-identical hero block; those become one primitive, not 17 rewrites.
3. Migrate bodies shape-by-shape, not page-by-page. Tailwind leaves as a
consequence of the last shape moving, which is the only point it can be
removed from the build.
Do not sed 6,720 class strings. The tail (671 30 utilities) is where the layout
bugs hide, and a marketing site is visually regression-tested by eye.
---
## Additional notes (merged from LLM.md)
@@ -263,31 +134,3 @@ bugs hide, and a marketing site is visually regression-tested by eye.
<h3 align="center">
Style library, design system, composable components, and more.
</h3>
---
## Telemetry — `@hanzogui/telemetry` (pkgs/telemetry)
The ONE zero-config telemetry surface. `<TelemetryProvider>{children}</TelemetryProvider>`
with no props wires all three planes; `@hanzo/ui/telemetry` re-exports it unchanged
so the component layer needs no second definition.
- **One front door.** Everything (pageviews, product events, exceptions,
interaction capture) is POSTed to `https://api.hanzo.ai/v1/event`. Cloud lenses
that one stream into `sentry.hanzo.ai` (errors + session capture),
`analytics.hanzo.ai` (web analytics) and `insights.hanzo.ai` (product insights,
incl. `analytics_errors`). Those three hosts are DASHBOARDS — never ingest
endpoints, never configured in a client.
- **Layering.** `@hanzo/event` = the client (batching, attribution, the wire).
`@hanzo/observe` = the capture engine (semantics, redaction, playback), loaded
with a dynamic `import()` inside an idle callback so it cannot cost LCP.
`@hanzogui/telemetry` = the zero-config policy that composes them. Mechanism
below, policy here, one of each.
- **Privacy.** DNT/GPC honored by default with no app code; an explicit
`setConsent()` choice outranks the browser in both directions; nothing is
written to storage while telemetry is refused.
- **Guarantees.** SSR-safe (a DOM is required before anything is collected),
fail-soft (every method swallows its own errors), no CDN script, ESM,
`sideEffects: false`.
- Tests: `cd pkgs/telemetry && bun run test` (24 tests — one-door URL, three-lens
wire, DNT/GPC, consent precedence, SPA route counting, error boundary, SSR).
-141
View File
@@ -1,141 +0,0 @@
# Fleet migration: shadcn `@hanzo/ui` → `@hanzo/gui`
The repeatable recipe for taking any Hanzo web surface OFF the shadcn/Radix+Tailwind
`@hanzo/ui` library and ONTO the canonical `@hanzo/gui` design system, so every
surface shares one look and feel. Written from increment 1 (hanzo.ai + hanzo.chat);
follow it to roll the rest of the fleet (docs sites, marketing sites, apps) mechanically.
There are **two layers**. They are independent — do them in either order, per surface.
| Layer | What | Package | Substrate | Works on |
|---|---|---|---|---|
| **Chrome** | Header, footer, hero, AI-widget mount (the shared frame) | `@hanzogui/chrome` | plain React + Tailwind + framer-motion + lucide | React 18 **and** 19 · Next **and** Vite |
| **Primitives** | Button/Input/Card/Badge/… inside pages | `@hanzo/gui` | Tamagui (styled + tokens + RN-web) | React ≥19 (Next proven; Vite via `@hanzogui/vite-plugin`) |
Why two: the cross-app chrome must run on React-18 Vite surfaces (hanzo.chat) and
React-19 static-export Next surfaces alike, so it is authored as plain React +
Tailwind — the SAME convention `@hanzogui/shell` (TenantHeader/HanzoAppBar) already
uses. The Tamagui primitive layer needs React ≥19; it is proven to render, SSR-style-
extracted with no FOUC, in a Next `output:'export'` static build (see Proof).
`@hanzogui/chrome` = PUBLIC marketing chrome. `@hanzogui/shell` = AUTHENTICATED tenant
chrome (org switcher, app launcher). Pick per surface; don't conflate.
---
## Recipe A — adopt the shared chrome (`@hanzogui/chrome`)
Exports: `HanzoNav`, `HanzoFooter`, `ChatHero`, `HanzoWidget` (+ types `NavItem`,
`NavLink`, `NavColumn`). All content and effects are **props** — the library is
presentational and host-agnostic (no analytics, no router, no config baked in).
1. **Link the package (no publish needed).** Add to the app's `package.json`:
```jsonc
"@hanzogui/chrome": "link:<relpath>/gui/pkgs/ui/chrome"
```
Install (`pnpm install` / `npm install`). It ships as SOURCE.
2. **Transpile it as first-party.**
- **Next**: `transpilePackages: ['@hanzogui/chrome']` in `next.config`. This ALSO
dedupes React for the linked package — do **NOT** alias `react`/`react-dom` in
webpack; a global react alias breaks Next's server/RSC React and crashes static
export with `Cannot read properties of null (reading 'useContext')`.
- **Vite**: `optimizeDeps.exclude: ['@hanzogui/chrome']` and ensure
`server.fs.allow` includes the gui checkout. Vite transpiles linked TS by default.
3. **Let Tailwind see it** (its classes live outside your project root):
- **Tailwind v4** (CSS-first): `@source '<relpath>/gui/pkgs/ui/chrome/src';` in globals.css.
- **Tailwind v3**: add `'<relpath>/gui/pkgs/ui/chrome/src/**/*.{js,jsx,ts,tsx}'` to `content`.
4. **Write thin adapters** that inject the surface's content + effects. Keep analytics
IN the app (the library takes callbacks):
```tsx
<HanzoNav items={NAV} logo={<HanzoLogo variant="white" size={22} />} brand="Hanzo AI"
login={{ links: LOGIN_LINKS }} primary={{ label: 'Try Hanzo', href: CHAT, links: TRY_LINKS }}
onPrimary={() => analytics.capture(EVENTS.CHAT_STARTED, { source: 'nav' })} />
```
`ChatHero` forwards on submit: pass `onSubmit={(q) => { analytics…; goTo(q) }}` (or a
plain `href` to auto-append `?q=`). Cross-origin surfaces use absolute hrefs in nav data;
a same-app landing forwards INTO itself (e.g. `navigate('/c/new?q='+q)`).
5. **AI widget** (optional): `<HanzoWidget repo="org/repo" />` injects the
`<meta name="hanzo:repo">` convention + loads `hanzo.app/edit.js` once. Mount-only;
edit.js behaviour is a separate workstream.
Gotcha — analytics stays put: never move `@hanzo/event` / `hz.js` into the library.
The chrome is effect-free; wire telemetry in the app via the callback props.
---
## Recipe B — migrate page primitives (`@hanzo/ui` shadcn → `@hanzo/gui` Tamagui)
Proven to build + render in a Next 15 `output:'export'` static export. Steps mirror the
one working fleet integration (`hanzoai/app/next.config.js`).
1. **Deps** (published npm, pin to the same versions the fleet uses, currently 7.3.0):
`@hanzo/gui @hanzogui/config @hanzogui/lucide-icons-2 react-native-web`.
2. **Next config** — transpile the whole gui graph + map RN→RN-web + prefer `.web.*`:
```js
transpilePackages: ['@hanzo/gui','react-native-web', ...fs.readdirSync('node_modules/@hanzogui').map(n=>`@hanzogui/${n}`)]
webpack: (c) => { c.resolve.alias['react-native$']='react-native-web';
c.resolve.extensions=['.web.tsx','.web.ts','.web.jsx','.web.js',...c.resolve.extensions];
c.resolve.fallback={...c.resolve.fallback, fs:false, '@react-native-async-storage/async-storage':false, 'pino-pretty':false}; return c }
```
No `@tamagui/next-plugin` — its dep is broken and unnecessary; `transpilePackages` +
Tamagui's runtime SSR-extracts the atomic CSS into the static HTML (styled on first paint).
(Vite surfaces: use `@hanzogui/vite-plugin` instead + the RN-web alias.)
3. **Provider** — wrap the tree once (context-only; additive, leaves other UI intact):
```tsx
import { createGui } from '@hanzo/gui'; import { defaultConfig } from '@hanzogui/config/v5'
const config = createGui(defaultConfig)
<GuiProvider config={config} defaultTheme="dark">{children}</GuiProvider>
```
4. **Swap primitives.** Build a local `components/ui/*` shim layer that exposes the
shadcn API but is backed by gui, then repoint imports (or alias `@hanzo/ui` → the shim
to flip every importer at once). Component map (hanzo.ai surface, frequency-ranked):
| shadcn `@hanzo/ui` | files | `@hanzo/gui` |
|---|---|---|
| `Button` (+`buttonVariants`) | 121 | `Button` (map `variant`/`size` → theme/size props) |
| `Input` | 12 | `Input` |
| `Badge` | 10 | compose `XStack`+`Text` (no Tamagui Badge) |
| `Label` | 6 | `Label` |
| `Card`+family | 5 | `Card` + `Card.Header`/`Card.Footer` |
| `Avatar`+family | 4 | `Avatar` (`Avatar.Image`/`Avatar.Fallback`) |
| `Tabs`+family | 4 | `Tabs` |
| `Textarea` | 4 | `TextArea` |
| `Table`+family | 3 | compose from `styled` stacks (no Tamagui Table) |
| `Progress`,`Accordion`,`Dialog`,`DropdownMenu`,`Select`,`Separator`,`Sheet`,`Slider`,`Checkbox` | ≤3 ea | `Progress`,`Accordion`,`Dialog`,`Menu`,`Select`,`Separator`,`Sheet`,`Slider`,`Checkbox` |
| `Toaster` | 1 | `Toast`/`ToastProvider` |
Do the top-5 first — they cover the overwhelming majority of files. If a gui primitive
is genuinely missing (Badge, Table), ADD it to `@hanzo/gui` — never reach back to shadcn.
5. **Cleanup during cutover**:
- Repoint any Tailwind `content` glob off `@hanzo/ui/dist/**` (it purges nothing once shadcn is gone).
- Collapse duplicate primitives to one (hanzo.ai has TWO Buttons: raw `@hanzo/ui` in 121
files + a bug-fix wrapper `components/ui/button.tsx` in 17 — pick one).
- Fix dangling type-only imports (`ToastActionElement`/`ToastProps` don't exist in `@hanzo/ui@5`).
---
## Proof (increment 1)
- **Spike** — a real `@hanzo/gui` component (`YStack`/`Text`/`Button` + live theme tokens)
built and rendered STYLED in hanzo.ai's Next 15 `output:'export'` static export; the
atomic CSS is SSR-extracted into the prerendered HTML (no FOUC). Toolchain GREEN.
- **Chrome on hanzo.ai** — apex nav/footer/hero migrated to `@hanzogui/chrome`; static
build passes (711 pages), chrome CSS generated by Tailwind `@source`, pixel-identical to
pre-migration, hz.js + `@hanzo/event` untouched.
- **Chrome on hanzo.chat** — new public landing (React 18 + Vite + Tailwind 3) on the SAME
`@hanzogui/chrome`; composer forwards into the chat app.
## Per-surface rollout checklist
- [ ] Chrome: link `@hanzogui/chrome` · transpile/optimizeDeps · Tailwind source · adapters (nav data + analytics callbacks).
- [ ] Primitives: add gui deps · next/vite config (transpile + RN-web alias) · `GuiProvider` · shim + swap top-5 · flip the rest.
- [ ] Cleanup: repoint Tailwind glob · collapse duplicates · fix dangling types · drop `@hanzo/ui`.
- [ ] Prove: build + Playwright screenshot (desktop + mobile), no horizontal scroll, console clean.
-38
View File
@@ -1,38 +0,0 @@
Hanzo GUI
Copyright (c) 2026-present, Hanzo AI, Inc.
This product includes software derived from Tamagui.
Tamagui
https://github.com/tamagui/tamagui
SPDX-License-Identifier: MIT
Tamagui is distributed under the MIT License. Its original copyright and
permission notices are reproduced below, as that license requires.
MIT License
Copyright (c) 2020 Nate Wienert
Copyright (c) 2015-present, Nicolas Gallagher.
Copyright (c) 2015-present, Facebook, Inc.
Copyright (c) 2021 Radix
Copyright (c) 2017 Carmelo Pullara
Copyright (c) 2018 Framer B.V.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-4
View File
@@ -1,9 +1,5 @@
<p align="center"><img src=".github/hero.svg" alt="gui" width="880"></p>
# Hanzo GUI
Forked from [tamagui](https://github.com/tamagui/tamagui) (MIT).
<h3 align="center">
Style library, design system, composable components, and more.
</h3>
@@ -15,6 +15,7 @@
import { apiRoute } from '~/features/api/apiRoute'
import { ensureAuth } from '~/features/api/ensureAuth'
import { captureServerError } from '~/features/posthog'
import { commerce, CommerceError } from '~/features/commerce/client'
type Body = {
@@ -57,14 +58,8 @@ export default apiRoute(async (req) => {
if (err instanceof CommerceError) {
return Response.json(err.detail, { status: err.status })
}
// Server-side error reporting is the cluster log pipeline for now. The
// previous captureServerError shipped this to a third-party PostHog project
// (posthog-node, hardcoded key, us.i.posthog.com) — off-platform and not the
// ONE door. @hanzogui/telemetry is DOM-oriented and would silently no-op
// here, so wiring it would only pretend to capture. A real server plane
// needs a service credential POSTing api.hanzo.ai/v1/event; until then this
// log is the honest surface.
console.error('create-subscription failed', err)
captureServerError(err as Error, { endpoint: '/api/create-subscription' })
return Response.json({ error: 'Failed to create subscription' }, { status: 500 })
}
})
@@ -1,5 +1,5 @@
import { Component } from 'react'
import { captureError } from '@hanzogui/telemetry'
import { processError } from '~/features/posthog/errorHandling'
export class ErrorBoundary extends Component<any> {
constructor(props) {
@@ -13,14 +13,14 @@ export class ErrorBoundary extends Component<any> {
}
componentDidCatch(error, errorInfo) {
captureError(error, {
handled: true,
properties: {
severity: 'high',
source: 'error_boundary',
processError({
error,
context: {
url: typeof window !== 'undefined' ? window.location.href : undefined,
componentStack: errorInfo?.componentStack,
additional: { componentStack: errorInfo?.componentStack },
},
severity: 'high',
tags: { source: 'error_boundary' },
})
}
+3 -3
View File
@@ -2,7 +2,7 @@ import { InitialPathContext, SeasonProvider } from '@hanzogui/logo'
import { SchemeProvider, useUserScheme } from '@vxrn/color-scheme'
import { GuiProvider } from 'hanzogui'
import tamaConf from '~/gui.config'
import { TelemetryProvider } from '@hanzogui/telemetry'
import { PostHogProvider } from '~/features/posthog/PostHogProvider'
import { SearchProvider } from '~/features/site/search/SearchProvider'
import { ToastProvider } from '~/features/studio/ToastProvider'
@@ -10,13 +10,13 @@ export const Providers = (props: { children: any }) => {
return (
<InitialPathContext.Provider value={3}>
<SchemeProvider>
<TelemetryProvider>
<PostHogProvider>
<SeasonProvider>
<WebsiteGuiProvider>
<SearchProvider>{props.children}</SearchProvider>
</WebsiteGuiProvider>
</SeasonProvider>
</TelemetryProvider>
</PostHogProvider>
</SchemeProvider>
</InitialPathContext.Provider>
)
@@ -0,0 +1,15 @@
import { useEffect } from 'react'
import { clientPostHog } from './client'
import { initializeErrorHandling } from './errorHandling'
import { usePostHogIdentify } from './usePostHogIdentify'
export function PostHogProvider({ children }: { children: React.ReactNode }) {
useEffect(() => {
clientPostHog.initialize()
initializeErrorHandling()
}, [])
usePostHogIdentify()
return <>{children}</>
}
@@ -0,0 +1,18 @@
import { serverPostHog } from './server'
export function captureServerError(
error: Error,
context?: {
endpoint?: string
userId?: string
method?: string
[key: string]: any
}
) {
serverPostHog.captureException(error, {
endpoint: context?.endpoint,
method: context?.method,
distinctId: context?.userId || 'anonymous-server',
...context,
})
}
@@ -0,0 +1,60 @@
import posthog from 'posthog-js'
import type { PostHogInstance } from './types'
const POSTHOG_KEY = 'phc_vy6MdaPFUllGBQLrBNWs4RJ8tbGuHyFF0nY6lncB1Ol'
const POSTHOG_HOST = 'https://us.i.posthog.com'
class ClientPostHog implements PostHogInstance {
private isInitialized = false
initialize(): void {
if (this.isInitialized) return
if (typeof window === 'undefined') return
if (process.env.NODE_ENV === 'development') return
posthog.init(POSTHOG_KEY, {
api_host: POSTHOG_HOST,
person_profiles: 'identified_only',
capture_pageview: true,
capture_pageleave: true,
autocapture: true,
session_recording: {
recordCrossOriginIframes: true,
},
})
this.isInitialized = true
}
capture(event: string, properties?: Record<string, any>): void {
if (!this.isInitialized) return
posthog.capture(event, properties)
}
identify(userId: string, properties?: Record<string, any>): void {
if (!this.isInitialized) return
posthog.identify(userId, properties)
}
reset(): void {
if (!this.isInitialized) return
posthog.reset()
}
captureException(error: Error, properties?: Record<string, any>): void {
if (!this.isInitialized) return
if (typeof posthog.captureException === 'function') {
posthog.captureException(error, properties)
} else {
posthog.capture('$exception', {
$exception_type: error.name,
$exception_message: error.message,
$exception_stack_trace_raw: error.stack || '',
...properties,
})
}
}
}
export const clientPostHog = new ClientPostHog()
@@ -0,0 +1,69 @@
import { clientPostHog } from './client'
import type { ErrorReport } from './types'
let handlersSetup = false
export function initializeErrorHandling(): void {
if (typeof window === 'undefined') return
if (process.env.NODE_ENV === 'development') return
if (handlersSetup) return
setupWebHandlers()
handlersSetup = true
}
export function processError(report: ErrorReport): void {
const { error, context = {}, severity = 'medium', tags } = report
clientPostHog.captureException(error, {
...tags,
severity,
url: context.url,
userAgent: context.userAgent,
timestamp: context.timestamp || Date.now(),
...context.additional,
})
if (severity === 'critical' || severity === 'high') {
console.error('[posthog error]', error)
}
}
function setupWebHandlers(): void {
const ogWindowErrorHandler = window.onerror
window.onerror = (message, source, lineno, colno, error) => {
ogWindowErrorHandler?.(message, source, lineno, colno, error)
const actualError = error || new Error(String(message))
processError({
error: actualError,
context: {
url: source?.toString(),
timestamp: Date.now(),
userAgent: navigator.userAgent,
additional: { line: lineno, column: colno },
},
severity: 'high',
tags: { source: 'window.onerror' },
})
return false
}
window.addEventListener('unhandledrejection', (event: PromiseRejectionEvent) => {
const error =
event.reason instanceof Error ? event.reason : new Error(String(event.reason))
processError({
error,
context: {
url: window.location.href,
userAgent: navigator.userAgent,
timestamp: Date.now(),
},
severity: 'high',
tags: { source: 'unhandled_promise_rejection' },
})
})
}
@@ -0,0 +1,5 @@
export { clientPostHog } from './client'
export { serverPostHog } from './server'
export { captureServerError } from './captureServerError'
export { processError } from './errorHandling'
export type { PostHogInstance, ErrorContext, ErrorReport } from './types'
@@ -0,0 +1,59 @@
import { PostHog } from 'posthog-node'
import type { PostHogInstance } from './types'
const POSTHOG_KEY = 'phc_vy6MdaPFUllGBQLrBNWs4RJ8tbGuHyFF0nY6lncB1Ol'
const POSTHOG_HOST = 'https://us.i.posthog.com'
class ServerPostHog implements PostHogInstance {
private posthog: PostHog | null = null
constructor() {
if (process.env.NODE_ENV !== 'development') {
this.posthog = new PostHog(POSTHOG_KEY, {
host: POSTHOG_HOST,
})
}
}
capture(event: string, properties?: Record<string, any>): void {
if (!this.posthog) return
this.posthog.capture({
event,
properties,
distinctId: properties?.distinctId || properties?.userId || 'anonymous-server',
})
}
captureException(error: Error, properties?: Record<string, any>): void {
if (!this.posthog) return
this.posthog.capture({
event: '$exception',
distinctId: properties?.distinctId || properties?.userId || 'anonymous-server',
properties: {
$exception_type: error.name,
$exception_message: error.message,
$exception_stack_trace_raw: error.stack || '',
source: 'server',
...properties,
},
})
// flush immediately for exceptions
this.posthog.flush()
}
identify(userId: string, properties?: Record<string, any>): void {
if (!this.posthog) return
this.posthog.identify({
distinctId: userId,
properties,
})
}
reset(): void {
if (!this.posthog) return
this.posthog.shutdown()
}
}
export const serverPostHog = new ServerPostHog()
@@ -0,0 +1,21 @@
export interface PostHogInstance {
capture(event: string, properties?: Record<string, any>): void
captureException(error: Error, properties?: Record<string, any>): void
identify(userId: string, properties?: Record<string, any>): void
reset(): void
}
export interface ErrorContext {
userId?: string
url?: string
userAgent?: string
timestamp?: number
additional?: Record<string, any>
}
export interface ErrorReport {
error: Error
context?: ErrorContext
severity?: 'low' | 'medium' | 'high' | 'critical'
tags?: Record<string, string>
}
@@ -0,0 +1,16 @@
import { useEffect } from 'react'
import { useUser } from '~/features/user/useUser'
import { clientPostHog } from './client'
export function usePostHogIdentify() {
const { data } = useUser()
const user = data?.user
useEffect(() => {
if (user) {
clientPostHog.identify(user.id, {
email: user.email,
})
}
}, [user?.id, user?.email])
}
@@ -16,7 +16,7 @@ import type {
import { router } from 'one'
import { useToastController } from '@hanzogui/toast'
import { lazy, Suspense, useEffect, useMemo, useState } from 'react'
import { captureError } from '@hanzogui/telemetry'
import { processError } from '~/features/posthog/errorHandling'
import useSWR, { mutate } from 'swr'
import useSWRMutation from 'swr/mutation'
import {
@@ -749,9 +749,10 @@ const DiscordPanel = ({
toast.show('Discord search failed', {
message: searchSwr.error.message || 'Could not search Discord members',
})
captureError(searchSwr.error, {
handled: true,
properties: { severity: 'medium', source: 'discord_member_search' },
processError({
error: searchSwr.error,
severity: 'medium',
tags: { source: 'discord_member_search' },
})
}
}, [searchSwr.error])
+2 -1
View File
@@ -43,7 +43,6 @@
"@hanzogui/demos": "workspace:*",
"@hanzogui/get-token": "workspace:*",
"@hanzogui/logo": "workspace:*",
"@hanzogui/telemetry": "workspace:*",
"@hanzogui/lucide-icons-2": "workspace:*",
"@hanzogui/dev-config": "workspace:*",
"@hanzogui/use-store": "workspace:*",
@@ -65,6 +64,8 @@
"masonic": "^4.0.1",
"one": "1.12.5",
"parse-numeric-range": "^1.3.0",
"posthog-js": "^1.351.4",
"posthog-node": "^5.24.17",
"postmark": "^3.0.18",
"puppeteer": "^24.3.1",
"react-dropzone": "^14.2.3",
-60
View File
@@ -1,60 +0,0 @@
# Hanzo Team
The hanzo.team shell. React owns the chrome; Svelte views mount inside it while
they wait to be ported.
```bash
bun run dev # dev server on :3000
bun run build # production build → dist
bun run typecheck # tsc
bun run test # playwright, real browser
```
Desktop wraps `dist` with Tauri: build, then `cargo tauri dev` inside `src-tauri/`.
## Layout
```
components/Shell.tsx the chrome — sidebar, header, palette, account
components/Svelte.tsx the ONE seam that mounts a Svelte view
components/props.svelte.ts reactive props for a mounted view
src/views.ts the view registry: each entry is React or Svelte
src/brand.ts hostname -> brand
src/session.ts hanzo.id delegation and the token
src/account.ts POST /v1/team/account
src/theme.css the design tokens BOTH engines read
```
## The seam
`Svelte.tsx` is the only way a Svelte view reaches the screen. React owns the
shell and navigation; a view receives props and renders, and cannot reach the
chrome. Porting a view to React means changing which key its registry entry
carries — `svelte` becomes `react` — and nothing else, which is what makes the
remaining `*-resources` plugins a queue rather than a cliff.
`tests/seam.spec.ts` cycles mount/unmount 25 times and asserts the live-instance
and listener counts return to zero. That assertion is load-bearing and has been
shown to fail when teardown is removed: the DOM looks clean either way, because
React removes the host element whether or not the Svelte instance was destroyed.
## Brand
Brand is a function of hostname (`src/brand.ts`), and an unrecognized host
resolves to no brand rather than to a default — defaulting is how one brand's
mark lands on another's host. The mark comes from `@hanzo/logo`, which ships only
Hanzo's, so a non-Hanzo brand renders its wordmark and there is no code path that
can do otherwise. `tests/brand.spec.ts` asserts the negatives, against real
hostnames via Chromium's host-resolver rules.
## Sign-in
hanzo.id is the only door. The backend owns the whole OAuth hop — it holds the
client id, mints and checks `state`, exchanges the code — so sign-in is one
navigation to `/v1/team/account/auth/openid` and there is deliberately no
credential form. `POST /v1/team/account {method:"login"}` answers
`account:status:Unauthorized "sign in at hanzo.id"`.
The backend bounces back to `/login:component:LoginApp/auth?token=…` on success
and `/login?error=…` on failure, so the token is read from the query rather than
from a route — the success path is a Huly location string that means nothing here.
-96
View File
@@ -1,96 +0,0 @@
import {
Avatar,
AvatarFallback,
Button,
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@hanzo/ui'
import { byOrg, type Login, type Workspace } from '~/src/account'
import { signIn, signOut } from '~/src/session'
/*
* Identity and scope: which workspace is open, and who has it open.
*
* Workspaces are grouped by owning org because `getUserWorkspaces` unions across
* every org the user belongs to — a user in two orgs sees both, each tagged. So
* the org is a heading over its workspaces rather than a second separate control:
* picking a workspace IS picking its org, and two controls could disagree.
*/
export function Account({
login,
workspaces,
current,
onSelect,
}: {
login: Login | undefined
workspaces: readonly Workspace[]
current: string | undefined
onSelect: (workspace: Workspace) => void
}) {
if (login === undefined) {
return (
<Button size="sm" onClick={signIn} data-account="out">
Sign in
</Button>
)
}
const name = login.name !== undefined && login.name !== '' ? login.name : login.account
const groups = byOrg(workspaces)
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="sm" className="gap-2" data-account="in">
<Avatar className="size-6">
<AvatarFallback className="text-[10px]">
{name.slice(0, 2).toUpperCase()}
</AvatarFallback>
</Avatar>
<span className="max-w-40 truncate text-xs">{name}</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-64">
<DropdownMenuLabel className="text-muted-foreground text-[11px] font-normal">
{login.account}
</DropdownMenuLabel>
{groups.map((group) => (
<div key={group.org}>
<DropdownMenuSeparator />
<DropdownMenuLabel className="text-[10px] font-medium uppercase tracking-wider">
{group.org !== '' ? group.org : 'Personal'}
</DropdownMenuLabel>
{group.workspaces.map((workspace) => (
<DropdownMenuItem
key={workspace.uuid}
data-workspace={workspace.url}
aria-current={workspace.url === current ? 'true' : undefined}
disabled={workspace.isDisabled}
onSelect={() => onSelect(workspace)}
>
<span className="truncate">{workspace.name}</span>
{workspace.url === current ? <span className="ml-auto text-xs"></span> : null}
</DropdownMenuItem>
))}
</div>
))}
<DropdownMenuSeparator />
<DropdownMenuItem asChild>
<a href="https://hanzo.id/account" data-account-link="settings">
Settings
</a>
</DropdownMenuItem>
<DropdownMenuItem onSelect={signOut} data-account-link="out">
Sign out
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
}
-49
View File
@@ -1,49 +0,0 @@
import { MARK_PATHS, MARK_VIEWBOX } from '@hanzo/logo'
import type { Brand } from '~/src/brand'
/*
* The brand mark, from the brand pack.
*
* The geometry comes from `@hanzo/logo` — the app holds no path data of its own,
* so a brand change is a package bump rather than an edit here.
*
* The pack ships ONE mark, Hanzo's. So a brand belonging to any other org has no
* mark available and renders its wordmark instead. That is the whole white-label
* guarantee, and it holds structurally rather than by remembering to check:
* there is no code path that can put Hanzo's mark on a Lux or Zoo host, because
* the mark is selected by `brand.org` and only `hanzo` has one.
*
* This owns the ENTIRE lockup — glyph and name together — so exactly one place
* decides how a brand presents itself. Splitting it, with a caller rendering the
* name alongside, is what produced "Lux Team Lux Team": the wordmark already IS
* the name, and a caller cannot know that without re-deciding it.
*/
export function Mark({ brand, size = 22 }: { brand: Brand | undefined; size?: number }) {
// Unknown host — no brand claims it, so show nothing rather than a guess.
if (brand === undefined) return null
// No glyph for this org: the name is the mark.
if (brand.org !== 'hanzo') {
return (
<span data-mark={brand.org} className="truncate text-sm font-semibold tracking-tight">
{brand.name}
</span>
)
}
return (
<>
<svg
data-mark="hanzo"
width={size}
height={size}
viewBox={MARK_VIEWBOX}
aria-hidden="true"
className="shrink-0 fill-foreground"
// Static markup from the brand pack, not input.
dangerouslySetInnerHTML={{ __html: MARK_PATHS }}
/>
<span className="truncate text-sm font-semibold tracking-tight">{brand.name}</span>
</>
)
}
-86
View File
@@ -1,86 +0,0 @@
import {
CommandDialog,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
} from '@hanzo/ui'
import { useEffect, useState } from 'react'
import type { Workspace } from '~/src/account'
import type { View } from '~/src/views'
/*
* Cmd+K. One keyboard path to every view and every workspace.
*
* The palette navigates; it does not act. Selecting a view asks the shell to
* change view, exactly as clicking the sidebar does — the same call, so the two
* cannot drift into disagreeing about what "active" means.
*/
export function Palette({
views,
workspaces,
onView,
onWorkspace,
}: {
views: readonly View[]
workspaces: readonly Workspace[]
onView: (id: string) => void
onWorkspace: (workspace: Workspace) => void
}) {
const [open, setOpen] = useState(false)
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
e.preventDefault()
setOpen((v) => !v)
}
}
window.addEventListener('keydown', onKey)
return () => window.removeEventListener('keydown', onKey)
}, [])
return (
<CommandDialog open={open} onOpenChange={setOpen} title="Command palette">
<CommandInput placeholder="Search views and workspaces…" data-palette="input" />
<CommandList>
<CommandEmpty>Nothing matches.</CommandEmpty>
<CommandGroup heading="Views">
{views.map((view) => (
<CommandItem
key={view.id}
value={`view ${view.label}`}
data-palette-view={view.id}
onSelect={() => {
onView(view.id)
setOpen(false)
}}
>
{view.label}
</CommandItem>
))}
</CommandGroup>
{workspaces.length > 0 ? (
<CommandGroup heading="Workspaces">
{workspaces.map((workspace) => (
<CommandItem
key={workspace.uuid}
value={`workspace ${workspace.name}`}
data-palette-workspace={workspace.url}
onSelect={() => {
onWorkspace(workspace)
setOpen(false)
}}
>
{workspace.name}
</CommandItem>
))}
</CommandGroup>
) : null}
</CommandList>
</CommandDialog>
)
}
-111
View File
@@ -1,111 +0,0 @@
import { Separator } from '@hanzo/ui'
import { useCallback, useEffect, useMemo, useState } from 'react'
import {
login as fetchLogin,
workspaces as fetchWorkspaces,
type Login,
type Workspace,
} from '~/src/account'
import { brandFor } from '~/src/brand'
import { claim, token } from '~/src/session'
import { VIEWS, viewFor, type Props } from '~/src/views'
import { Account } from './Account'
import { Palette } from './Palette'
import { Sidebar } from './Sidebar'
import { Svelte } from './Svelte'
/*
* The chrome.
*
* React owns the frame and the navigation. The sidebar decides which view is
* active; the content area renders it. A view is React or Svelte and gets the
* same props either way, so which language it happens to be written in is not
* something the shell — or the user — can observe.
*/
export function Shell() {
const brand = useMemo(() => brandFor(window.location.hostname), [])
const [active, setActive] = useState(() => window.location.hash.replace(/^#/, '') || VIEWS[0].id)
const [login, setLogin] = useState<Login | undefined>(undefined)
const [workspaces, setWorkspaces] = useState<readonly Workspace[]>([])
const [workspace, setWorkspace] = useState<string | undefined>(undefined)
const [error, setError] = useState<string | null>(null)
// Take any token the backend handed back before asking who we are.
useEffect(() => {
setError(claim().error)
}, [])
useEffect(() => {
if (token() === null) return
let live = true
void (async () => {
try {
const [who, list] = await Promise.all([fetchLogin(), fetchWorkspaces()])
if (!live) return
setLogin(who)
setWorkspaces(list)
setWorkspace((current) => current ?? list[0]?.url)
} catch (e) {
if (live) setError(e instanceof Error ? e.message : String(e))
}
})()
return () => {
live = false
}
}, [])
const select = useCallback((id: string) => {
setActive(id)
window.location.hash = id
}, [])
const view = viewFor(active)
// One object per (workspace, token) pair rather than per render, so a live
// Svelte view is not re-pushed props it already has.
const props = useMemo<Props>(() => ({ workspace: workspace ?? '', token: token() }), [workspace])
return (
<div className="flex h-full w-full">
<Sidebar brand={brand} views={VIEWS} active={view.id} onSelect={select} />
<div className="flex min-w-0 flex-1 flex-col">
<header className="flex h-14 shrink-0 items-center gap-3 px-4" role="banner">
<span className="truncate text-sm font-medium" data-shell="title">
{view.label}
</span>
<div className="flex-1" />
<Account
login={login}
workspaces={workspaces}
current={workspace}
onSelect={(w) => setWorkspace(w.url)}
/>
</header>
<Separator />
{error !== null ? (
<p role="alert" data-shell="error" className="text-destructive px-4 py-2 text-xs">
{error}
</p>
) : null}
<main className="min-h-0 flex-1 overflow-auto p-4" data-shell="content">
{'react' in view.content ? (
<view.content.react {...props} />
) : (
<Svelte view={view.content.svelte} props={props} className="h-full" />
)}
</main>
</div>
<Palette
views={VIEWS}
workspaces={workspaces}
onView={select}
onWorkspace={(w) => setWorkspace(w.url)}
/>
</div>
)
}
-56
View File
@@ -1,56 +0,0 @@
import { Button, ScrollArea, Separator } from '@hanzo/ui'
import type { Brand } from '~/src/brand'
import type { View } from '~/src/views'
import { Mark } from './Mark'
/*
* The navigator. It owns which view is active — a view never moves itself.
*
* Composed from `@hanzo/ui` primitives rather than imported whole, because the
* Sidebar family is not consumable: `@hanzo/ui@8.0.26`'s barrel exports 86 names
* and none of them are Sidebar*, and `@hanzo/ui-shadcn@5.9.1` carries the 726-line
* source but ships no `dist/primitives/sidebar`, so the 23 Sidebar exports resolve
* from neither package. Publishing it collapses this file to an import.
*/
export function Sidebar({
brand,
views,
active,
onSelect,
}: {
brand: Brand | undefined
views: readonly View[]
active: string
onSelect: (id: string) => void
}) {
return (
<nav
aria-label="Views"
className="flex h-full w-60 shrink-0 flex-col border-r border-border bg-card"
>
<div className="flex h-14 items-center gap-2 px-4">
<Mark brand={brand} />
</div>
<Separator />
<ScrollArea className="flex-1">
<ul className="flex flex-col gap-0.5 p-2">
{views.map((view) => (
<li key={view.id}>
<Button
variant={view.id === active ? 'secondary' : 'ghost'}
aria-current={view.id === active ? 'page' : undefined}
data-view={view.id}
className="w-full justify-start font-normal"
onClick={() => onSelect(view.id)}
>
{view.label}
</Button>
</li>
))}
</ul>
</ScrollArea>
</nav>
)
}
-60
View File
@@ -1,60 +0,0 @@
import { useEffect, useRef } from 'react'
import { mount, unmount, type Component } from 'svelte'
import { push, track } from './props.svelte'
/*
* The one seam between the React shell and a Svelte view.
*
* React owns the shell, the sidebar and navigation. A Svelte view is only ever
* content: the sidebar decides which view is active, this mounts it, and nothing
* a view does can reach the chrome. Every unported Huly view arrives through
* here, so porting one to React means changing which key its registry entry
* carries (`svelte` -> `react`) and touching nothing else.
*
* Lifecycle, and why it is split across two effects:
*
* mount keyed on `view` alone, so switching sidebar items — or swapping a
* view for its React port — rebuilds, and a mere prop change does not.
* props assigns onto the tracked proxy, so a live view updates in place.
* destroy the mount effect's cleanup calls `unmount`, which runs the view's
* `onDestroy` and removes its nodes. Leaking one instance per
* navigation is the failure mode this ordering exists to prevent;
* tests/seam.spec.ts cycles it and asserts the live count returns to
* zero, and that the assertion can fail.
*/
export function Svelte<P extends Record<string, unknown>>({
view,
props,
className,
}: {
view: Component<P>
props: P
className?: string
}) {
const host = useRef<HTMLDivElement | null>(null)
const tracked = useRef<P | null>(null)
// Read at mount time without making `props` a mount dependency.
const latest = useRef(props)
latest.current = props
useEffect(() => {
const target = host.current
if (target === null) return
const box = track(latest.current)
const instance = mount(view, { target, props: box })
tracked.current = box
return () => {
tracked.current = null
void unmount(instance, { outro: false })
}
}, [view])
useEffect(() => {
if (tracked.current !== null) push(tracked.current, props)
}, [props])
return <div ref={host} className={className} />
}
-26
View File
@@ -1,26 +0,0 @@
/*
* Reactive props for a mounted Svelte view.
*
* `mount` reads its props object once. To reach a LIVE view a prop change has to
* land on something Svelte tracks, so the seam mounts this proxy and then assigns
* into it. Without this, a prop change could only be delivered by tearing the view
* down and building a new one — which is both slower and a different lifecycle.
*
* This file is `.svelte.ts` because `$state` is a compiler rune, not a function.
*/
/** A props object Svelte tracks. */
export function track<P extends Record<string, unknown>>(initial: P): P {
const props = $state({ ...initial })
return props as P
}
/**
* Copy `next` onto a tracked object so the mounted view sees the change.
* Svelte's proxy compares before notifying, so assigning an unchanged value is
* inert — the seam does not need to diff first.
*/
export function push<P extends Record<string, unknown>>(tracked: P, next: P): void {
const target = tracked as Record<string, unknown>
for (const key of Object.keys(next)) target[key] = next[key]
}
-13
View File
@@ -1,13 +0,0 @@
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="/favicon.svg" />
<title>Hanzo Team</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
-33
View File
@@ -1,33 +0,0 @@
{
"name": "@hanzogui/team",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"typecheck": "tsc --noEmit",
"test": "playwright test"
},
"dependencies": {
"@hanzo/svelte": "^1.0.0",
"@hanzo/ui": "^8.0.26",
"react": "19.1.0",
"react-dom": "19.1.0",
"svelte": "^5.56.8"
},
"devDependencies": {
"@playwright/test": "^1.49.1",
"@sveltejs/vite-plugin-svelte": "^6.2.1",
"@tailwindcss/vite": "^4",
"@types/react": "~19.1.10",
"@types/react-dom": "~19.1.0",
"@vitejs/plugin-react": "^5.0.4",
"tailwindcss": "^4",
"typescript": "~5.9.2",
"vite": "^7.1.5"
},
"license": "BSD-3-Clause",
"author": "Hanzo AI <dev@hanzo.ai>"
}
-30
View File
@@ -1,30 +0,0 @@
import { defineConfig } from '@playwright/test'
// Brand is a function of hostname, so the tests need REAL hostnames rather than a
// stand-in for one. `--host-resolver-rules` points the app's actual hosts at the
// local dev server, which is what makes tests/brand.spec.ts able to assert that
// tracker.hanzo.ai does not render Hanzo Team's mark.
const hosts = ['hanzo.team', 'team.hanzo.ai', 'tracker.hanzo.ai', 'team.lux.network']
export default defineConfig({
testDir: './tests',
fullyParallel: false,
forbidOnly: Boolean(process.env.CI),
reporter: [['list']],
use: {
baseURL: 'http://localhost:3000',
launchOptions: {
// No spaces after the commas — Chromium takes them as part of the next host.
args: [`--host-resolver-rules=${hosts.map((h) => `MAP ${h} 127.0.0.1`).join(',')}`],
},
},
webServer: {
// Bind IPv4 explicitly. Vite's default `localhost` resolves to [::1] here, and
// the resolver rules above send the browser to 127.0.0.1 — mismatched families
// present as ERR_CONNECTION_REFUSED rather than as a bind error.
command: 'vite --host 127.0.0.1 --port 3000 --strictPort',
url: 'http://localhost:3000',
reuseExistingServer: true,
timeout: 120_000,
},
})
-4
View File
@@ -1,4 +0,0 @@
<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg">
<rect width="60" height="60" rx="14" fill="#000000"/>
<path d="M45.9269 46.3536C45.65 45.3274 44.9038 44.8299 43.8628 44.9314C41.8474 45.1268 41.1782 44.4808 40.2218 43.0613C42.7423 43.5952 44.3679 42.9389 44.8756 42.6471C45.5295 42.2694 46.191 41.785 45.9295 40.9306C45.6731 40.0945 44.9038 39.9278 44.1141 40.0789C42.9936 40.2925 41.9192 40.4175 41.0474 39.3261C41.232 39.1594 41.4166 38.9875 41.6064 38.8234C42.0705 38.4249 42.4295 37.9561 42.1936 37.3231C41.9679 36.7188 41.3961 36.3724 40.8141 36.4792C40.3397 36.5678 39.3884 36.8647 39.0987 36.3802L39.1115 36.375C39.0013 36.349 38.832 35.8957 38.7961 35.5649C38.6269 33.9474 39.3269 32.395 40.2705 31.1057C41.4474 29.5038 42.2551 27.7378 42.6141 25.7791C43.1756 22.7055 42.5807 19.8456 40.9192 17.2174C38.9474 14.097 36.1679 12.0419 32.509 11.2865C31.65 11.1094 30.8115 11.0156 29.9987 11C29.1833 11.0156 28.3474 11.1094 27.4884 11.2865C23.832 12.0419 21.05 14.097 19.0782 17.2174C17.4192 19.8456 16.8243 22.7055 17.3833 25.7791C17.7397 27.7404 18.55 29.5038 19.7269 31.1057C20.6731 32.395 21.3731 33.9448 21.2013 35.5649C21.1654 35.8957 20.9961 36.349 20.8859 36.375L20.8987 36.3802C20.609 36.8621 19.6602 36.5678 19.1833 36.4792C18.6038 36.3724 18.0295 36.7188 17.8038 37.3231C17.5679 37.9561 17.9243 38.4249 18.391 38.8234C18.5807 38.9875 18.7654 39.1594 18.95 39.3261C18.0782 40.4175 17.0013 40.2925 15.8833 40.0789C15.0936 39.9278 14.3243 40.0945 14.0679 40.9306C13.8064 41.785 14.4679 42.2694 15.1218 42.6471C15.6269 42.9389 17.2551 43.5926 19.7756 43.0613C18.8192 44.4808 18.15 45.1268 16.1346 44.9314C15.0936 44.8299 14.3448 45.3274 14.0705 46.3536C13.8013 47.3564 14.332 48.0753 15.1731 48.5546C15.7243 48.8672 16.3397 48.9896 16.991 49C20.5577 49.0495 23.5013 47.5778 26.1525 45.3638C27.6115 44.1448 28.8115 43.5275 30.0013 43.5119C31.191 43.5275 32.3884 44.1448 33.85 45.3638C36.5013 47.5778 39.4448 49.0495 43.0115 49C43.6628 48.9922 44.2782 48.8672 44.8295 48.5546C45.6731 48.0753 46.2013 47.3564 45.932 46.3536H45.9269ZM25.0756 34.2027C23.9731 34.2001 23.0628 33.278 23.0602 32.1658C23.0602 31.0328 23.9807 30.1055 25.1166 30.0951C26.1961 30.0847 27.1577 31.1083 27.1474 32.257C27.1372 33.3952 26.2705 34.2079 25.0756 34.2027ZM34.9192 34.2027C33.7218 34.2079 32.8577 33.3926 32.8474 32.257C32.8372 31.1083 33.8013 30.0847 34.8782 30.0951C36.0141 30.1081 36.9346 31.0354 36.9346 32.1658C36.9346 33.278 36.0218 34.2001 34.9192 34.2027Z" fill="#ffffff"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

-2
View File
@@ -1,2 +0,0 @@
/target
/gen/schemas
-4392
View File
File diff suppressed because it is too large Load Diff
-12
View File
@@ -1,12 +0,0 @@
[package]
name = "team"
version = "0.1.0"
description = "Hanzo Team desktop shell"
license = "BSD-3-Clause"
edition = "2021"
[build-dependencies]
tauri-build = { version = "2", features = [] }
[dependencies]
tauri = { version = "2", features = [] }
-3
View File
@@ -1,3 +0,0 @@
fn main() {
tauri_build::build()
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

-7
View File
@@ -1,7 +0,0 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
tauri::Builder::default()
.run(tauri::generate_context!())
.expect("error while running hanzo team");
}
-24
View File
@@ -1,24 +0,0 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Hanzo Team",
"version": "0.1.0",
"identifier": "ai.hanzo.team",
"build": {
"frontendDist": "../dist/client"
},
"app": {
"windows": [
{
"title": "Hanzo Team",
"width": 1200,
"height": 800
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": false
}
}
-65
View File
@@ -1,65 +0,0 @@
/*
* The account plane: who is signed in, and which workspaces they can open.
*
* One JSON-RPC endpoint, `POST /v1/team/account`, with `{method, params}` in and
* `{result}` or `{error}` out. Types mirror the Go structs in cloud
* `apps/team/account.go` (`LoginInfo`, `WorkspaceInfo`) — same field names, same
* casing, so a drift shows up as a type error rather than as an empty menu.
*/
import { token } from './session'
/** `LoginInfo` — cloud apps/team/account.go:114. */
export interface Login {
account: string
name?: string
socialId?: string
}
/** One entry of `getUserWorkspaces` — cloud apps/team/account.go:135. */
export interface Workspace {
uuid: string
name: string
url: string
/** The owning IAM tenant. `getUserWorkspaces` unions across every org the user
* belongs to, so the switcher groups on this. */
org?: string
region: string
mode: string
isDisabled: boolean
}
export class Refused extends Error {}
async function call<T>(method: string, params: Record<string, unknown> = {}): Promise<T> {
const bearer = token()
const res = await fetch('/v1/team/account', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
...(bearer !== null ? { Authorization: `Bearer ${bearer}` } : {}),
},
body: JSON.stringify({ method, params }),
})
const body = (await res.json()) as { result?: T; error?: { code?: string; params?: { message?: string } } }
if (body.error !== undefined) {
throw new Refused(body.error.params?.message ?? body.error.code ?? 'refused')
}
return body.result as T
}
export const login = (): Promise<Login> => call<Login>('getLoginInfoByToken')
export const workspaces = (): Promise<Workspace[]> => call<Workspace[]>('getUserWorkspaces')
/** Group workspaces by owning org, preserving first-seen order. */
export function byOrg(list: readonly Workspace[]): { org: string; workspaces: Workspace[] }[] {
const groups: { org: string; workspaces: Workspace[] }[] = []
for (const workspace of list) {
const org = workspace.org ?? ''
const found = groups.find((g) => g.org === org)
if (found === undefined) groups.push({ org, workspaces: [workspace] })
else found.workspaces.push(workspace)
}
return groups
}
-64
View File
@@ -1,64 +0,0 @@
/*
* Which brand a host serves.
*
* Shared infrastructure white-labels by domain, so the mark and the name are a
* function of the hostname and nothing else — never a build flag, never a
* constant in a component.
*
* Fail closed. An unrecognized host resolves to `undefined`, and the chrome then
* renders no mark at all. Defaulting an unknown host to Hanzo is precisely the
* bug this shape prevents: it is how one brand's mark ends up on another's host.
*
* `@hanzogui/shell`'s `findSurfaceByHost` cannot be reused here, and that is
* worth stating because it looks like it should be. Its surface list keys one
* host per surface (`hanzo.team`) and then falls back to the longest matching
* suffix, so `team.hanzo.ai` and `tracker.hanzo.ai` both match `hanzo.ai` and
* resolve to brandName "Hanzo". tests/brand.spec.ts pins that they must not.
*/
/** The org whose brand is being rendered. Decides the mark. */
export type Org = 'hanzo' | 'lux' | 'zoo'
export interface Brand {
/** Stable id — also the active-surface key in the app switcher. */
id: string
/** Name shown beside the mark. */
name: string
org: Org
/** Every host this brand serves. Exact match wins; then longest dot-boundary suffix. */
hosts: readonly string[]
}
/**
* `localhost` and `127.0.0.1` are listed deliberately. A dev host is a known
* host, not a reason to weaken the fallback.
*/
export const BRANDS: readonly Brand[] = [
{ id: 'team', name: 'Hanzo Team', org: 'hanzo', hosts: ['hanzo.team', 'team.hanzo.ai', 'localhost', '127.0.0.1'] },
{ id: 'tracker', name: 'Tracker', org: 'hanzo', hosts: ['tracker.hanzo.ai'] },
{ id: 'lux', name: 'Lux Team', org: 'lux', hosts: ['team.lux.network'] },
{ id: 'zoo', name: 'Zoo Team', org: 'zoo', hosts: ['team.zoo.ngo'] },
]
/**
* Resolve the brand for a hostname, or `undefined` when no brand claims it.
* Exact match first, so a specific host is never swallowed by a broader one.
*/
export function brandFor(host: string | undefined): Brand | undefined {
if (host === undefined || host === '') return undefined
const h = host.toLowerCase().replace(/^www\./, '').replace(/:\d+$/, '')
for (const brand of BRANDS) if (brand.hosts.includes(h)) return brand
let best: Brand | undefined
let length = 0
for (const brand of BRANDS) {
for (const candidate of brand.hosts) {
if (h.endsWith(`.${candidate}`) && candidate.length > length) {
best = brand
length = candidate.length
}
}
}
return best
}
-16
View File
@@ -1,16 +0,0 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { Shell } from '~/components/Shell'
import './theme.css'
const root = document.getElementById('root')
if (root === null) throw new Error('#root missing')
// StrictMode stays on deliberately. It mounts every effect twice in development,
// which means the Svelte seam's mount/destroy pair is exercised on every single
// navigation — a leak there shows up immediately rather than in production.
createRoot(root).render(
<StrictMode>
<Shell />
</StrictMode>,
)
-55
View File
@@ -1,55 +0,0 @@
/*
* The signed-in session.
*
* hanzo.id is the only door. The backend owns the whole OAuth hop — it holds the
* client id, mints and checks `state`, and exchanges the code — so this module
* never sees a credential, a client secret, or a PKCE verifier. Verified against
* the live service:
*
* GET /v1/team/account/auth/openid -> 302 hanzo.id/v1/iam/oauth/authorize?...
* POST /v1/team/account {method:login} -> account:status:Unauthorized
* "sign in at hanzo.id"
*
* Sign-in is therefore one navigation, and there is deliberately no credential
* form to build.
*/
const KEY = 'hanzo-team-token'
/** Start sign-in. The backend redirects to hanzo.id and back. */
export function signIn(): void {
window.location.assign('/v1/team/account/auth/openid')
}
export function signOut(): void {
window.localStorage.removeItem(KEY)
window.location.assign('/login')
}
export function token(): string | null {
return window.localStorage.getItem(KEY)
}
/**
* Take the token the backend handed back, and report any error it reported.
*
* Read from the query rather than from a route, because the backend chooses the
* path: it bounces to `/login:component:LoginApp/auth?token=…` on success and
* `/login?error=…` on failure (cloud `apps/team/account.go:836`). The first is a
* Huly location string that means nothing to this shell, so matching on the path
* would couple us to it. The query is the actual contract.
*/
export function claim(): { error: string | null } {
const query = new URLSearchParams(window.location.search)
const handed = query.get('token')
const error = query.get('error')
if (handed !== null && handed !== '') {
window.localStorage.setItem(KEY, handed)
// Drop the token from the address bar so it stays out of history and out of
// any Referer this page goes on to send.
window.history.replaceState(null, '', window.location.pathname.startsWith('/login') ? '/' : window.location.pathname)
}
return { error }
}
-114
View File
@@ -1,114 +0,0 @@
@import 'tailwindcss';
/*
* Tailwind must scan the component libraries, not just this app.
*
* v4 auto-detects sources but excludes node_modules, and both libraries ship
* utility classes in their published output rather than a stylesheet. Without
* these two lines the classes they rely on — `sr-only`, `z-50`, `fixed inset-0`,
* the `data-[state=open]` variants — are never generated, so every dialog, menu
* and palette renders unpositioned and unlayered. It looks like a broken
* component and is actually a missing utility.
*
* Worth knowing that this failure is invisible to assertions on text and data
* attributes: the markup is correct and only the styling is absent.
*/
@source "../node_modules/@hanzo/ui/dist";
@source "../node_modules/@hanzo/svelte";
/*
* The standard design tokens both backends read.
*
* `@hanzo/ui` renders Radix primitives styled with token classes (bg-background,
* text-foreground, border-border, ring-ring, …) and `@hanzo/svelte` emits the
* SAME token classes through its own vendored `cn`. Neither package ships a
* resolvable stylesheet — `@hanzo/ui`'s `./theme.css` subpath points at `src/`,
* which the published tarball omits — so the host defines the variables. That is
* the documented contract for both, and defining them once here is what makes a
* React panel and a Svelte panel render identically.
*/
@custom-variant dark (&:is(.dark *));
:root {
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
--muted-foreground: oklch(0.556 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
--destructive: oklch(0.577 0.245 27.325);
--destructive-foreground: oklch(0.985 0 0);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: oklch(0.708 0 0);
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.985 0 0);
--primary-foreground: oklch(0.205 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--destructive-foreground: oklch(0.985 0 0);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.556 0 0);
}
@theme inline {
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-destructive-foreground: var(--destructive-foreground);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
}
html,
body,
#root {
height: 100%;
}
body {
margin: 0;
background: var(--background);
color: var(--foreground);
font-family: var(--font-sans);
}
-43
View File
@@ -1,43 +0,0 @@
import type { ComponentType } from 'react'
import type { Component } from 'svelte'
import Facts from '~/views/Facts.svelte'
import { Home } from '~/views/Home'
import { Session } from '~/views/Session'
/*
* What the sidebar can select.
*
* The shell hands every view the SAME props whichever language it is written in.
* That symmetry is the point: porting a Huly view to React means changing which
* key its entry carries — `svelte` becomes `react` — and touching nothing else.
* So the ~40 remaining `*-resources` plugins are a queue, not a cliff.
*/
/** The context every view receives. */
export interface Props extends Record<string, unknown> {
workspace: string
token: string | null
}
/** A view is React or Svelte. Never both, and there is no third option. */
export type Content = { react: ComponentType<Props> } | { svelte: Component<Props> }
export interface View {
/** Stable id — the sidebar selection and the route segment. */
id: string
label: string
content: Content
}
export const VIEWS: readonly View[] = [
{ id: 'home', label: 'Home', content: { react: Home } },
{ id: 'session', label: 'Session', content: { react: Session } },
// The same content in Svelte, through the seam. It reads its tokens from the
// same stylesheet the React views do, so the two must render identically —
// that equivalence is what tells us a half-migrated shell looks whole.
{ id: 'facts', label: 'Session · Svelte', content: { svelte: Facts as Component<Props> } },
]
export function viewFor(id: string | undefined): View {
return VIEWS.find((v) => v.id === id) ?? VIEWS[0]
}
-64
View File
@@ -1,64 +0,0 @@
import { expect, test } from '@playwright/test'
import { brandFor } from '../src/brand'
/*
* Brand is a function of hostname. These run against REAL hostnames — Chromium's
* host-resolver rules point the app's hosts at the dev server — so what is under
* test is the wiring and not a stand-in for it.
*
* The negatives carry the weight. One brand's mark appearing on another's host is
* the failure this exists to prevent, and asserting only the positives would pass
* for an implementation that renders "Hanzo Team" unconditionally.
*/
test('each host renders its own brand', async ({ page }) => {
for (const [host, name] of [
['hanzo.team', 'Hanzo Team'],
['team.hanzo.ai', 'Hanzo Team'],
['tracker.hanzo.ai', 'Tracker'],
['team.lux.network', 'Lux Team'],
]) {
await page.goto(`http://${host}:3000/`)
await expect(page.locator('nav[aria-label="Views"]')).toContainText(name)
}
})
test('tracker.hanzo.ai does not render Hanzo Team', async ({ page }) => {
await page.goto('http://tracker.hanzo.ai:3000/')
const nav = page.locator('nav[aria-label="Views"]')
await expect(nav).toContainText('Tracker')
await expect(nav).not.toContainText('Hanzo Team')
})
test('a non-Hanzo host never renders the Hanzo mark', async ({ page }) => {
await page.goto('http://team.lux.network:3000/')
await expect(page.locator('nav[aria-label="Views"]')).toContainText('Lux Team')
// The mark is chosen by brand.org and the pack ships only Hanzo's, so there is
// no path that can put it here.
await expect(page.locator('[data-mark="hanzo"]')).toHaveCount(0)
await expect(page.locator('[data-mark="lux"]')).toBeVisible()
})
test('a Hanzo host does render the Hanzo mark', async ({ page }) => {
await page.goto('http://hanzo.team:3000/')
await expect(page.locator('[data-mark="hanzo"]')).toBeVisible()
})
test('an unclaimed host resolves to no brand', () => {
// Pure resolution, so it is asserted directly rather than through a page. The
// rendering tests above cover the wiring from window.location.hostname.
expect(brandFor('evil.example.com')).toBeUndefined()
// Another Hanzo surface's host: this app does not serve it, so it gets no brand
// here even though it is a legitimate Hanzo domain.
expect(brandFor('hanzo.chat')).toBeUndefined()
expect(brandFor('')).toBeUndefined()
expect(brandFor(undefined)).toBeUndefined()
// A subdomain of a claimed host still belongs to it.
expect(brandFor('eu.hanzo.team')?.id).toBe('team')
// The specific host wins over the broader one it sits under. This is exactly
// where @hanzogui/shell's findSurfaceByHost resolves "Hanzo" instead.
expect(brandFor('tracker.hanzo.ai')?.id).toBe('tracker')
expect(brandFor('team.hanzo.ai')?.id).toBe('team')
})
-46
View File
@@ -1,46 +0,0 @@
<script lang="ts">
/*
* The seam's conformance view. Not part of the app — the app never registers it.
*
* It counts its own live instances and its own listeners so a leak is
* observable from the browser. Counting DOM nodes instead would be a test that
* cannot fail: React removes the seam's host element on unmount, so the page
* looks clean whether or not the Svelte instance was destroyed. The instance and
* listener counters are what distinguish "torn down" from "orphaned but hidden".
*/
import { onDestroy, onMount } from 'svelte'
export let workspace: string
export let token: string | null
interface Counters {
live: number
mounts: number
destroys: number
listeners: number
}
const scope = globalThis as unknown as { probe?: Counters }
const probe: Counters = (scope.probe ??= { live: 0, mounts: 0, destroys: 0, listeners: 0 })
function onResize(): void {
// Exists to be registered and removed; a leaked instance keeps it attached.
}
onMount(() => {
probe.live += 1
probe.mounts += 1
window.addEventListener('resize', onResize)
probe.listeners += 1
})
onDestroy(() => {
probe.live -= 1
probe.destroys += 1
window.removeEventListener('resize', onResize)
probe.listeners -= 1
})
</script>
<p data-probe="workspace">{workspace}</p>
<p data-probe="token">{token === null ? 'absent' : 'present'}</p>
-11
View File
@@ -1,11 +0,0 @@
<!doctype html>
<html lang="en" class="dark">
<head>
<meta charset="utf-8" />
<title>Svelte seam conformance</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./main.tsx"></script>
</body>
</html>
-34
View File
@@ -1,34 +0,0 @@
import { useState } from 'react'
import { createRoot } from 'react-dom/client'
import { Svelte } from '~/components/Svelte'
import Probe from './Probe.svelte'
/*
* Drives the seam directly so its lifecycle can be asserted without the shell's
* data fetching in the way. Exercises the same components/Svelte.tsx the app uses.
*
* No StrictMode here, on purpose: StrictMode double-invokes effects, so mount and
* destroy counts would be doubled and the arithmetic in tests/seam.spec.ts would
* stop being exact. The app keeps StrictMode; this harness wants precise counts.
*/
function Harness() {
const [on, setOn] = useState(true)
const [n, setN] = useState(0)
return (
<>
<button data-probe-action="toggle" onClick={() => setOn((v) => !v)}>
toggle
</button>
<button data-probe-action="bump" onClick={() => setN((v) => v + 1)}>
bump
</button>
<span data-probe-state={on ? 'on' : 'off'} />
{on ? <Svelte view={Probe} props={{ workspace: `ws-${n}`, token: null }} /> : null}
</>
)
}
const root = document.getElementById('root')
if (root === null) throw new Error('#root missing')
createRoot(root).render(<Harness />)
-73
View File
@@ -1,73 +0,0 @@
import { expect, test, type Page } from '@playwright/test'
/*
* The seam's lifecycle contract.
*
* Leaking one Svelte instance per navigation is the failure mode that matters, and
* it is invisible in the DOM: React removes the seam's host element, so the page
* looks clean while the orphaned instance keeps its effects and listeners. These
* assertions read the instance and listener counters instead, which is the only
* way the leak is observable.
*/
const HARNESS = '/tests/probe/index.html'
interface Counters {
live: number
mounts: number
destroys: number
listeners: number
}
const counters = (page: Page): Promise<Counters> =>
page.evaluate(() => (globalThis as unknown as { probe: Counters }).probe)
test('a Svelte view mounts inside React and receives its props', async ({ page }) => {
await page.goto(HARNESS)
await expect(page.locator('[data-probe="workspace"]')).toHaveText('ws-0')
await expect(page.locator('[data-probe="token"]')).toHaveText('absent')
})
test('a prop change reaches a live view without remounting it', async ({ page }) => {
await page.goto(HARNESS)
await expect(page.locator('[data-probe="workspace"]')).toHaveText('ws-0')
const before = await counters(page)
await page.click('[data-probe-action="bump"]')
await expect(page.locator('[data-probe="workspace"]')).toHaveText('ws-1')
const after = await counters(page)
// The value changed, so props were delivered. Nothing was rebuilt to deliver
// them — a seam that remounted on every prop change would show mounts climbing.
expect(after.mounts).toBe(before.mounts)
expect(after.destroys).toBe(before.destroys)
expect(after.live).toBe(1)
})
test('cycling mount and unmount 25 times leaks no instance and no listener', async ({ page }) => {
await page.goto(HARNESS)
await expect(page.locator('[data-probe="workspace"]')).toBeVisible()
for (let i = 0; i < 25; i++) {
await page.click('[data-probe-action="toggle"]') // unmount
await expect(page.locator('[data-probe-state="off"]')).toBeAttached()
await page.click('[data-probe-action="toggle"]') // mount
await expect(page.locator('[data-probe-state="on"]')).toBeAttached()
}
const mid = await counters(page)
expect(mid.mounts).toBe(26) // the first mount plus 25 more
expect(mid.destroys).toBe(25)
expect(mid.live).toBe(1) // exactly the one on screen
expect(mid.listeners).toBe(1)
// Take the last one away too: nothing at all should remain alive.
await page.click('[data-probe-action="toggle"]')
await expect(page.locator('[data-probe="workspace"]')).toHaveCount(0)
const end = await counters(page)
expect(end.destroys).toBe(26)
expect(end.live).toBe(0)
expect(end.listeners).toBe(0)
})
-162
View File
@@ -1,162 +0,0 @@
import { expect, test, type Page } from '@playwright/test'
/*
* The chrome: it renders, the sidebar navigates, cmd+k opens, the switcher lists
* workspaces grouped by org, and a Svelte view mounts in the content area.
*
* The account RPC is served at the network boundary. Everything above it — the
* client, the grouping, the menu — is the real code; only the transport is stood
* in for, because a real token needs an interactive hanzo.id sign-in.
*/
const RPC = '**/v1/team/account'
async function signedIn(page: Page): Promise<void> {
await page.addInitScript(() => {
window.localStorage.setItem('hanzo-team-token', 'test-token')
})
await page.route(RPC, async (route) => {
const method = (route.request().postDataJSON() as { method: string }).method
if (method === 'getLoginInfoByToken') {
await route.fulfill({
json: { result: { account: 'z@zoo.ngo', name: 'Z', socialId: 's1' } },
})
return
}
if (method === 'getUserWorkspaces') {
await route.fulfill({
json: {
result: [
{ uuid: 'u1', name: 'Hanzo Core', url: 'core', org: 'hanzo', region: '', mode: 'active', isDisabled: false },
{ uuid: 'u2', name: 'Hanzo Labs', url: 'labs', org: 'hanzo', region: '', mode: 'active', isDisabled: false },
{ uuid: 'u3', name: 'Zoo Research', url: 'zoo', org: 'zoo', region: '', mode: 'active', isDisabled: false },
],
},
})
return
}
await route.fulfill({ json: { error: { code: 'account:status:UnknownMethod' } } })
})
}
test('the shell renders its frame', async ({ page }) => {
await page.goto('/')
await expect(page.locator('nav[aria-label="Views"]')).toBeVisible()
await expect(page.locator('header[role="banner"]')).toBeVisible()
await expect(page.locator('[data-shell="content"]')).toBeVisible()
await expect(page.locator('[data-shell="title"]')).toHaveText('Home')
})
test('navigating every view raises nothing on the console', async ({ page }) => {
// A thrown ReferenceError blanks the page while element assertions elsewhere go
// on passing against a stale tree, so a suite without this guard can be green
// over a broken app. Both engines report here: a Svelte mount failure and a
// React render failure land on the same console.
const noise: string[] = []
page.on('console', (m) => {
if (m.type() === 'error') noise.push(m.text())
})
page.on('pageerror', (e) => noise.push(`pageerror: ${e.message}`))
await page.goto('/')
for (const id of ['session', 'facts', 'home']) {
await page.click(`[data-view="${id}"]`)
await expect(page.locator('[data-shell="content"]')).toBeVisible()
}
expect(noise).toEqual([])
})
test('the sidebar drives which view is active', async ({ page }) => {
await page.goto('/')
await expect(page.locator('[data-view="home"]')).toHaveAttribute('aria-current', 'page')
await page.click('[data-view="session"]')
await expect(page.locator('[data-shell="title"]')).toHaveText('Session')
await expect(page.locator('[data-view="session"]')).toHaveAttribute('aria-current', 'page')
// Selection is exclusive — two views cannot both be current.
await expect(page.locator('[aria-current="page"]')).toHaveCount(1)
})
test('a Svelte view mounts in the content area and matches its React twin', async ({ page }) => {
await page.goto('/')
await page.click('[data-view="session"]')
await expect(page.locator('[data-facts="engine"]')).toHaveText('React')
const react = await page.locator('[data-shell="content"] dl').innerText()
await page.click('[data-view="facts"]')
await expect(page.locator('[data-facts="engine"]')).toHaveText('Svelte')
const svelte = await page.locator('[data-shell="content"] dl').innerText()
// Same facts, same layout, only the engine label differs. That equivalence is
// what says a half-migrated shell still looks like one product.
expect(svelte.replace('Svelte', 'React')).toBe(react)
})
test('cmd+k opens the palette and navigates', async ({ page }) => {
await page.goto('/')
await expect(page.locator('[data-palette="input"]')).toHaveCount(0)
await page.keyboard.press('ControlOrMeta+k')
await expect(page.locator('[data-palette="input"]')).toBeVisible()
await page.locator('[data-palette="input"]').fill('Svelte')
await page.click('[data-palette-view="facts"]')
await expect(page.locator('[data-palette="input"]')).toHaveCount(0)
await expect(page.locator('[data-shell="title"]')).toHaveText('Session · Svelte')
})
test('signed out, the shell offers hanzo.id and no credential form', async ({ page }) => {
await page.goto('/')
await expect(page.locator('[data-account="out"]')).toBeVisible()
// hanzo.id is the only door: there is deliberately no local password to type.
await expect(page.locator('input[type="password"]')).toHaveCount(0)
})
test('sign-in delegates to the backend hop rather than to hanzo.id directly', async ({ page }) => {
await page.goto('/')
// Stop at the first hop so the assertion is about where we send the browser.
await page.route('**/v1/team/account/auth/openid', (route) =>
route.fulfill({ status: 200, body: 'intercepted' }),
)
await page.click('[data-account="out"]')
await page.waitForURL(/\/v1\/team\/account\/auth\/openid$/)
expect(page.url()).toContain('/v1/team/account/auth/openid')
})
test('the switcher lists workspaces grouped by org and switches', async ({ page }) => {
await signedIn(page)
await page.goto('/')
await expect(page.locator('[data-account="in"]')).toContainText('Z')
await page.click('[data-account="in"]')
await expect(page.locator('[data-workspace="core"]')).toBeVisible()
await expect(page.locator('[data-workspace="zoo"]')).toBeVisible()
await expect(page.locator('[data-account-link="settings"]')).toBeVisible()
await expect(page.locator('[data-account-link="out"]')).toBeVisible()
// Grouped by owning org, because getUserWorkspaces unions across orgs.
const menu = page.locator('[role="menu"]')
await expect(menu).toContainText('hanzo')
await expect(menu).toContainText('zoo')
// The first workspace is current until another is chosen.
await expect(page.locator('[data-workspace="core"]')).toHaveAttribute('aria-current', 'true')
await page.click('[data-workspace="zoo"]')
await page.click('[data-view="session"]')
await expect(page.locator('[data-facts="workspace"]')).toHaveText('zoo')
})
test('the workspace reaches a Svelte view as a prop', async ({ page }) => {
await signedIn(page)
await page.goto('/')
await expect(page.locator('[data-account="in"]')).toBeVisible()
await page.click('[data-view="facts"]')
await expect(page.locator('[data-facts="workspace"]')).toHaveText('core')
await expect(page.locator('[data-facts="token"]')).toHaveText('present')
})
-20
View File
@@ -1,20 +0,0 @@
{
"compilerOptions": {
"baseUrl": ".",
"module": "esnext",
"moduleResolution": "bundler",
"target": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"jsx": "react-jsx",
"strict": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"paths": {
"~/*": ["./*"]
},
"types": ["vite/client", "svelte"],
"noEmit": true
},
"include": ["src", "components", "views", "tests"]
}
-39
View File
@@ -1,39 +0,0 @@
<script lang="ts">
/*
* A Svelte view, mounted by the shell through components/Svelte.tsx.
*
* It is deliberately the same content as views/Session.tsx, rendered with
* @hanzo/svelte instead of @hanzo/ui. Both read their tokens from src/theme.css,
* so the two must look identical — and while ~2,400 Huly views are still Svelte,
* that equivalence is what says a half-migrated shell looks whole.
*
* Note what this view CANNOT do: it has no handle on the sidebar, the router or
* the workspace. It receives props and renders. That is the seam's whole point.
*/
import Badge from '@hanzo/svelte/Badge.svelte'
import Card from '@hanzo/svelte/Card.svelte'
import CardContent from '@hanzo/svelte/CardContent.svelte'
import CardHeader from '@hanzo/svelte/CardHeader.svelte'
import CardTitle from '@hanzo/svelte/CardTitle.svelte'
export let workspace: string
export let token: string | null
</script>
<Card>
<CardHeader>
<CardTitle>Session</CardTitle>
</CardHeader>
<CardContent>
<dl class="grid grid-cols-[8rem_1fr] gap-y-2 text-sm">
<dt class="text-muted-foreground">Rendered by</dt>
<dd data-facts="engine"><Badge>Svelte</Badge></dd>
<dt class="text-muted-foreground">Workspace</dt>
<dd data-facts="workspace">{workspace === '' ? '—' : workspace}</dd>
<dt class="text-muted-foreground">Token</dt>
<dd data-facts="token">{token === null ? 'absent' : 'present'}</dd>
</dl>
</CardContent>
</Card>
-31
View File
@@ -1,31 +0,0 @@
import { Card, CardContent, CardHeader, CardTitle } from '@hanzo/ui'
import { VIEWS, type Props } from '~/src/views'
/** Landing view: what this workspace holds, and how much of it is ported. */
export function Home({ workspace }: Props) {
const svelte = VIEWS.filter((v) => 'svelte' in v.content).length
return (
<div className="flex flex-col gap-4">
<Card>
<CardHeader>
<CardTitle>{workspace === '' ? 'No workspace open' : workspace}</CardTitle>
</CardHeader>
<CardContent className="text-muted-foreground text-sm">
Pick a view on the left, or press <kbd className="text-foreground">K</kbd>.
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Views</CardTitle>
</CardHeader>
<CardContent className="text-sm">
<p data-home="counts">
{VIEWS.length} registered, {VIEWS.length - svelte} React, {svelte} Svelte.
</p>
</CardContent>
</Card>
</div>
)
}
-27
View File
@@ -1,27 +0,0 @@
import { Badge, Card, CardContent, CardHeader, CardTitle } from '@hanzo/ui'
import type { Props } from '~/src/views'
/** The React half of the parity pair. views/Facts.svelte renders the same facts. */
export function Session({ workspace, token }: Props) {
return (
<Card>
<CardHeader>
<CardTitle>Session</CardTitle>
</CardHeader>
<CardContent>
<dl className="grid grid-cols-[8rem_1fr] gap-y-2 text-sm">
<dt className="text-muted-foreground">Rendered by</dt>
<dd data-facts="engine">
<Badge>React</Badge>
</dd>
<dt className="text-muted-foreground">Workspace</dt>
<dd data-facts="workspace">{workspace === '' ? '—' : workspace}</dd>
<dt className="text-muted-foreground">Token</dt>
<dd data-facts="token">{token === null ? 'absent' : 'present'}</dd>
</dl>
</CardContent>
</Card>
)
}
-43
View File
@@ -1,43 +0,0 @@
import { svelte, vitePreprocess } from '@sveltejs/vite-plugin-svelte'
import tailwind from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import { fileURLToPath } from 'node:url'
import type { UserConfig } from 'vite'
// React owns the shell; Svelte views mount inside it through components/Svelte.tsx.
// One compiler each, one plugin each, no second path.
//
// `vitePreprocess` is what lets the Huly view corpus through: Svelte 5 strips
// plain TS natively, but not `<style lang="scss">` (10+ files) and not TS `enum`
// (2 files). Both go through the preprocessor.
export default {
clearScreen: false,
plugins: [
react(),
svelte({ preprocess: vitePreprocess() }),
tailwind(),
],
// `~` is the app root, matching tsconfig `paths`. Vite does not read tsconfig
// paths, so the two have to be stated once each and agree.
resolve: {
alias: { '~': fileURLToPath(new URL('.', import.meta.url)).replace(/\/$/, '') },
// React and Svelte must each be a single instance; two copies of either
// produce hooks-order and lifecycle faults that look like seam bugs.
dedupe: ['react', 'react-dom', 'svelte'],
},
server: {
port: 3000,
// The hosts this app is served on. Brand is a function of hostname, so the
// dev server has to answer to each of them for that to be testable at all.
allowedHosts: ['hanzo.team', 'team.hanzo.ai', 'tracker.hanzo.ai', 'team.lux.network'],
// The Go backend is unchanged and owns every /v1 route.
proxy: {
'/v1': { target: process.env.TEAM_API ?? 'https://api.hanzo.ai', changeOrigin: true },
},
},
build: { outDir: 'dist', emptyOutDir: true },
} satisfies UserConfig
+26 -145
View File
@@ -98,7 +98,6 @@
"@hanzogui/get-token": "workspace:*",
"@hanzogui/logo": "workspace:*",
"@hanzogui/lucide-icons-2": "workspace:*",
"@hanzogui/telemetry": "workspace:*",
"@hanzogui/use-store": "workspace:*",
"@hookform/resolvers": "^3.3.4",
"@leeoniya/ufuzzy": "^1.0.14",
@@ -127,6 +126,8 @@
"masonic": "^4.0.1",
"one": "1.12.5",
"parse-numeric-range": "^1.3.0",
"posthog-js": "^1.351.4",
"posthog-node": "^5.24.17",
"postmark": "^3.0.18",
"puppeteer": "^24.3.1",
"react-dropzone": "^14.2.3",
@@ -322,30 +323,6 @@
"ws": "^8.18.0",
},
},
"apps/team": {
"name": "@hanzogui/team",
"version": "0.1.0",
"dependencies": {
"@hanzogui/config": "workspace:*",
"@hanzogui/core": "workspace:*",
"@hanzogui/lucide-icons-2": "workspace:*",
"@vxrn/color-scheme": "^1.12.5",
"expo": "~55.0.6",
"hanzogui": "workspace:*",
"one": "1.12.5",
"react": ">=19",
"react-native": "0.83.2",
"react-native-safe-area-context": "~5.7.0",
"react-native-screens": "~4.23.0",
"react-native-svg": "15.15.3",
"react-native-web": "^0.21.0",
},
"devDependencies": {
"@hanzogui/vite-plugin": "workspace:*",
"@types/react": "~19.1.10",
"vite": "^8.0.3",
},
},
"apps/tests/configs": {
"name": "@hanzogui/configs-test",
"version": "7.3.0",
@@ -597,24 +574,6 @@
"babel-plugin-react-compiler",
],
},
"pkgs/calendar": {
"name": "@hanzo/booker",
"version": "0.1.0",
"devDependencies": {
"@hanzogui/build": "workspace:*",
"hanzogui": "workspace:*",
"react": ">=19",
"react-native": "0.83.2",
},
"peerDependencies": {
"hanzogui": ">=7.0.0",
"react": ">=18",
"react-native": "*",
},
"optionalPeers": [
"react-native",
],
},
"pkgs/cli-color": {
"name": "@hanzogui/cli-color",
"version": "7.3.0",
@@ -834,7 +793,7 @@
},
"pkgs/compiler/vite-plugin": {
"name": "@hanzogui/vite-plugin",
"version": "7.3.1",
"version": "7.3.0",
"dependencies": {
"@hanzogui/fake-react-native": "workspace:*",
"@hanzogui/proxy-worm": "workspace:*",
@@ -852,7 +811,7 @@
"vite": "^8.0.3",
},
"peerDependencies": {
"vite": "^8",
"vite": "*8.0.3",
},
},
"pkgs/compiler/vite-plugin-cjs": {
@@ -2299,26 +2258,6 @@
"react": ">=19",
},
},
"pkgs/telemetry": {
"name": "@hanzogui/telemetry",
"version": "0.1.0",
"dependencies": {
"@hanzo/event": "^0.3.1",
"@hanzo/observe": "^0.1.0",
},
"devDependencies": {
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"happy-dom": "^20.10.6",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"typescript": "^5.9.3",
"vitest": "^4.1.9",
},
"peerDependencies": {
"react": ">=18",
},
},
"pkgs/timer": {
"name": "@hanzogui/timer",
"version": "7.3.0",
@@ -2548,24 +2487,6 @@
"react-native": "*",
},
},
"pkgs/ui/chrome": {
"name": "@hanzogui/chrome",
"version": "7.3.0",
"dependencies": {
"@hanzogui/core": "workspace:*",
"@hanzogui/input": "workspace:*",
"@hanzogui/lucide-icons-2": "workspace:*",
"@hanzogui/stacks": "workspace:*",
"@hanzogui/web": "workspace:*",
},
"devDependencies": {
"@hanzogui/build": "workspace:*",
"react": ">=19",
},
"peerDependencies": {
"react": ">=19",
},
},
"pkgs/ui/collapsible": {
"name": "@hanzogui/collapsible",
"version": "7.3.0",
@@ -3371,7 +3292,7 @@
},
"pkgs/ui/shell": {
"name": "@hanzogui/shell",
"version": "7.6.4",
"version": "7.3.0",
"peerDependencies": {
"@hanzo/iam": "^0.13.1",
"react": "*",
@@ -4310,14 +4231,8 @@
"@hanzo/base": ["@hanzo/base@0.2.0", "", { "dependencies": { "pocketbase": "^0.26.5" }, "peerDependencies": { "react": ">=18.0.0" }, "optionalPeers": ["react"] }, "sha512-JymDJQou0olqik3okyqqNxPs2RGwV3wwqzeaX1IdIYsjPCEvgEkSCMqje6FdsuAmSTc5NgVNO62KJ3lIeHsxcA=="],
"@hanzo/booker": ["@hanzo/booker@workspace:pkgs/calendar"],
"@hanzo/event": ["@hanzo/event@0.3.3", "", { "peerDependencies": { "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["react"] }, "sha512-faooSLA2UR4N8B0hOcSuQk3yi48Dahp5IMTrQn/WdKQc4JkKGx0lmdASp7os80ita48VQUNheqF6lpdXIj6ZYQ=="],
"@hanzo/iam": ["@hanzo/iam@0.13.1", "", { "dependencies": { "jose": "^6.1.0", "libphonenumber-js": "^1.13.3", "passport-oauth2": "^1.8.0" }, "peerDependencies": { "react": ">=17" }, "optionalPeers": ["react"] }, "sha512-MAqXY7jL5pcPkaUE0Qb/ePL2WKvk3p6EQDLHGZENj+/gbNKs7e/9qG+nmRlPMFVcwXPk+suzkBAEyIMT2EiJ8w=="],
"@hanzo/observe": ["@hanzo/observe@0.1.0", "", { "dependencies": { "@hanzo/event": "^0.3.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["react"] }, "sha512-VWfMz4F6gexchEaEjK9btxcTOVhWk8km64TN69hWLa1jWB4uTL9VdTj3cWZRDl/OP1lS8YcjpLdSI1q+C7fymg=="],
"@hanzo_network/brand-config": ["@hanzo_network/brand-config@workspace:pkgs/net-brand-config"],
"@hanzo_network/hanzo-artifacts": ["@hanzo_network/hanzo-artifacts@workspace:pkgs/net-artifacts"],
@@ -4374,8 +4289,6 @@
"@hanzogui/checkbox-headless": ["@hanzogui/checkbox-headless@workspace:pkgs/ui/checkbox-headless"],
"@hanzogui/chrome": ["@hanzogui/chrome@workspace:pkgs/ui/chrome"],
"@hanzogui/cli": ["@hanzogui/cli@workspace:pkgs/core/cli"],
"@hanzogui/cli-color": ["@hanzogui/cli-color@workspace:pkgs/cli-color"],
@@ -4618,10 +4531,6 @@
"@hanzogui/tabs-headless": ["@hanzogui/tabs-headless@workspace:pkgs/ui/tabs-headless"],
"@hanzogui/team": ["@hanzogui/team@workspace:apps/team"],
"@hanzogui/telemetry": ["@hanzogui/telemetry@workspace:pkgs/telemetry"],
"@hanzogui/test-design-system": ["@hanzogui/test-design-system@workspace:pkgs/core/test-design-system"],
"@hanzogui/text": ["@hanzogui/text@workspace:pkgs/ui/text"],
@@ -5180,6 +5089,10 @@
"@polka/url": ["@polka/url@1.0.0-next.29", "", {}, "sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww=="],
"@posthog/core": ["@posthog/core@1.30.8", "", { "dependencies": { "@posthog/types": "1.380.1" } }, "sha512-rRJxn7UjPR5LWgRwicJgHWD7tu3P2IebdWjGJ1xpXkbNqpFyW+SbSDGjhunmmXXl2c59ejOICtnbrwN6njS1lw=="],
"@posthog/types": ["@posthog/types@1.380.1", "", {}, "sha512-GaeyU1vPxwZvYlSWdpxbLCRPqY2WKUZYUNjBlJHAlaAXbMmCfLgB2cvkwjidr8lhX8nyxINjjvQMiOSSfSSxcg=="],
"@preact/signals": ["@preact/signals@2.9.1", "", { "dependencies": { "@preact/signals-core": "^1.14.0" }, "peerDependencies": { "preact": ">= 10.25.0 || >=11.0.0-0" } }, "sha512-xVqN8mJjbSN5IB/8Ubmd9NN+Ew6zJswoRxrjZbH3YsgkMshFeO6d8zxEFpHRTq9GJZx7cnPs2CnCpFqtGXGNsw=="],
"@preact/signals-core": ["@preact/signals-core@1.14.2", "", {}, "sha512-RZHdBj9ZF4n40Rp4jS052EHHjBWf96P9oNdXPfhQTovCuWY9iQn3Gq+gOTJSgBO9A/JBuPfMOWsSX/lIU9Pc/A=="],
@@ -5946,8 +5859,6 @@
"@types/webxr": ["@types/webxr@0.5.24", "", {}, "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg=="],
"@types/whatwg-mimetype": ["@types/whatwg-mimetype@3.0.2", "", {}, "sha512-c2AKvDT8ToxLIOUlN51gTiHXflsfIFisS4pO7pDPoKouJCESkhZnEy623gwP9laCy5lnLDAw1vAzu2vM2YLOrA=="],
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
"@types/yargs": ["@types/yargs@17.0.35", "", { "dependencies": { "@types/yargs-parser": "*" } }, "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg=="],
@@ -6354,8 +6265,6 @@
"buffer-from": ["buffer-from@1.1.2", "", {}, "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="],
"buffer-image-size": ["buffer-image-size@0.6.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-nEh+kZOPY1w+gcCMobZ6ETUp9WfibndnosbpwB1iJk/8Gt5ZF2bhS6+B6bPYz424KtwsR6Rflc3tCz1/ghX2dQ=="],
"builtins": ["builtins@1.0.3", "", {}, "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ=="],
"bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
@@ -6938,7 +6847,7 @@
"enhanced-resolve": ["enhanced-resolve@5.22.2", "", { "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.3.3" } }, "sha512-0rxICaFZ7NQho/sHely2bvOPRP0Eu2B0NZ9zM54YvRvWMn7jfz3DmnOZDR9LlXDdDcqntAVc6Hfy4gr/tdH/Ag=="],
"entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],
"entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
"env-editor": ["env-editor@1.3.0", "", {}, "sha512-EqiD/j01PooUbeWk+etUo2TWoocjoxMfGNYpS9e47glIJ5r8WepycIki+LCbonFbPdwlqY5ETeSTAJVMih4z4w=="],
@@ -7190,7 +7099,7 @@
"fetch-nodeshim": ["fetch-nodeshim@0.4.10", "", {}, "sha512-m6I8ALe4L4XpdETy7MJZWs6L1IVMbjs99bwbpIKphxX+0CTns4IKDWJY0LWfr4YsFjfg+z1TjzTMU8lKl8rG0w=="],
"fflate": ["fflate@0.6.10", "", {}, "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg=="],
"fflate": ["fflate@0.4.8", "", {}, "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="],
"file-entry-cache": ["file-entry-cache@8.0.0", "", { "dependencies": { "flat-cache": "^4.0.0" } }, "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ=="],
@@ -7410,7 +7319,7 @@
"hanzogui-loader": ["hanzogui-loader@workspace:pkgs/compiler/loader"],
"happy-dom": ["happy-dom@20.11.1", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-XSt8tMzbW9ymE7687xztkO1ckR7qJNQ3LywY9vlYGhGi3zXrGBHuUo2Cl1ztZaICW+1eAGdkLbj6iwVqDT33kg=="],
"happy-dom": ["happy-dom@10.11.2", "", { "dependencies": { "css.escape": "^1.5.1", "entities": "^4.5.0", "iconv-lite": "^0.6.3", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0" } }, "sha512-rzgmLjLkhyaOdFEyU8CWXzbgyCyM7wJHLqhaoeEVSTyur1fjcUaiNTHx+D4CPaLvx16tGy+SBPd9TVnP/kzL3w=="],
"harfbuzzjs": ["harfbuzzjs@0.10.3", "", {}, "sha512-GJnLUrgLMadlMYrBGEXwYEimObbysy3prWT4HyPpFQERvgTU/OZ+ReUlEPOum6w4RBtFXzXiCCmECOr4sz3qwQ=="],
@@ -8412,8 +8321,6 @@
"obuf": ["obuf@1.1.2", "", {}, "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg=="],
"obug": ["obug@2.1.4", "", {}, "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA=="],
"on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="],
"on-headers": ["on-headers@1.1.0", "", {}, "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A=="],
@@ -8638,6 +8545,10 @@
"postcss-value-parser": ["postcss-value-parser@4.2.0", "", {}, "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="],
"posthog-js": ["posthog-js@1.380.1", "", { "dependencies": { "@posthog/core": "1.30.8", "@posthog/types": "1.380.1", "core-js": "^3.38.1", "dompurify": "^3.3.2", "fflate": "^0.4.8", "preact": "^10.28.2", "query-selector-shadow-dom": "^1.0.1", "web-vitals": "^5.1.0" } }, "sha512-Rkct0Ozfsa8igzdpXBWKtaZmoHQ53sr9xZLzHJI4JCFgoewDtfC81vwfeB4kcfYKJqch+1Rul3iYdTgoDc+ZEA=="],
"posthog-node": ["posthog-node@5.36.2", "", { "dependencies": { "@posthog/core": "1.30.8" }, "peerDependencies": { "rxjs": "^7.0.0" }, "optionalPeers": ["rxjs"] }, "sha512-k+URjhZyxR0PJ92JZkYcgyk7+2U+T8r0fnfsQFNkW4GeKcuYH6t13VLzjI+bH4YLSknUuLmDDg4CczGO9nad2Q=="],
"postmark": ["postmark@3.11.0", "", { "dependencies": { "axios": "^0.25.0" } }, "sha512-asguBQ9M/8ueQMJ1D45iPF+3+T641q8rAU8m8cQSfhDWePw4TVYql9wszjAwSCE93dUonyrF08D8Kvg6USBoFA=="],
"potpack": ["potpack@1.0.2", "", {}, "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="],
@@ -8728,6 +8639,8 @@
"quansync": ["quansync@0.2.11", "", {}, "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA=="],
"query-selector-shadow-dom": ["query-selector-shadow-dom@1.0.1", "", {}, "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw=="],
"query-string": ["query-string@7.1.3", "", { "dependencies": { "decode-uri-component": "^0.2.2", "filter-obj": "^1.1.0", "split-on-first": "^1.0.0", "strict-uri-encode": "^2.0.0" } }, "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg=="],
"querystringify": ["querystringify@2.2.0", "", {}, "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="],
@@ -9792,6 +9705,8 @@
"web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="],
"web-vitals": ["web-vitals@5.3.0", "", {}, "sha512-q6LWsLatGYZp5VGBIOvbTj6JBV2nOmC8KvWztXBmwJcfFAzhwKwbOxhUH306XY3CcaZDUlSmSuNPBsCn0bFu+g=="],
"webcrypto-core": ["webcrypto-core@1.9.2", "", { "dependencies": { "@peculiar/asn1-schema": "^2.7.0", "@peculiar/json-schema": "^1.1.12", "@peculiar/utils": "^2.0.2", "asn1js": "^3.0.10", "tslib": "^2.8.1" } }, "sha512-gsXecm82UQNlTBURJGuqOWy1Ww08S3kZUcr3aOJS02Pk0xLtkfeUAVC0u0xhgdonFme80edSJUIJyuvL/7250Q=="],
"webdriver-bidi-protocol": ["webdriver-bidi-protocol@0.4.1", "", {}, "sha512-ARrjNjtWRRs2w4Tk7nqrf2gBI0QXWuOmMCx2hU+1jUt6d00MjMxURrhxhGbrsoiZKJrhTSTzbIrc554iKI10qw=="],
@@ -10008,16 +9923,8 @@
"@hanzogui/site/vite": ["vite@8.0.16", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.15", "rolldown": "1.0.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.1.18", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw=="],
"@hanzogui/team/@types/react": ["@types/react@19.1.17", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-Qec1E3mhALmaspIrhWt9jkQMNdw6bReVu64mjvhbhq2NFPftLPVr+l1SZgmw/66WwBNpDh7ao5AT6gF5v41PFA=="],
"@hanzogui/team/vite": ["vite@8.0.16", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.15", "rolldown": "1.0.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.1.18", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw=="],
"@hanzogui/telemetry/vitest": ["vitest@4.1.10", "", { "dependencies": { "@vitest/expect": "4.1.10", "@vitest/mocker": "4.1.10", "@vitest/pretty-format": "4.1.10", "@vitest/runner": "4.1.10", "@vitest/snapshot": "4.1.10", "@vitest/spy": "4.1.10", "@vitest/utils": "4.1.10", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", "std-env": "^4.0.0-rc.1", "tinybench": "^2.9.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tinyrainbow": "^3.1.0", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", "@vitest/browser-playwright": "4.1.10", "@vitest/browser-preview": "4.1.10", "@vitest/browser-webdriverio": "4.1.10", "@vitest/coverage-istanbul": "4.1.10", "@vitest/coverage-v8": "4.1.10", "@vitest/ui": "4.1.10", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@opentelemetry/api", "@types/node", "@vitest/browser-playwright", "@vitest/browser-preview", "@vitest/browser-webdriverio", "@vitest/coverage-istanbul", "@vitest/coverage-v8", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "./vitest.mjs" } }, "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw=="],
"@hanzogui/vite-plugin/vite": ["vite@8.0.16", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.15", "rolldown": "1.0.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.1.18", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw=="],
"@hanzogui/vite-plugin-internal/happy-dom": ["happy-dom@10.11.2", "", { "dependencies": { "css.escape": "^1.5.1", "entities": "^4.5.0", "iconv-lite": "^0.6.3", "webidl-conversions": "^7.0.0", "whatwg-encoding": "^2.0.0", "whatwg-mimetype": "^3.0.0" } }, "sha512-rzgmLjLkhyaOdFEyU8CWXzbgyCyM7wJHLqhaoeEVSTyur1fjcUaiNTHx+D4CPaLvx16tGy+SBPd9TVnP/kzL3w=="],
"@isaacs/cliui/string-width": ["string-width@5.1.2", "", { "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" } }, "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA=="],
"@isaacs/cliui/strip-ansi": ["strip-ansi@7.2.0", "", { "dependencies": { "ansi-regex": "^6.2.2" } }, "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w=="],
@@ -10612,8 +10519,6 @@
"dir-glob/path-type": ["path-type@4.0.0", "", {}, "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="],
"dom-serializer/entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
"dot-case/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
"dot-prop/type-fest": ["type-fest@5.7.0", "", { "dependencies": { "tagged-tag": "^1.0.0" } }, "sha512-1URUxUqfHFM1c+zfSPsa3gnkO7Aq21qyH75SIduNYz4SzY964rn1X2vCMQaHSHhktiw+0kPa2iyb6PUpXqB6Vg=="],
@@ -10756,6 +10661,8 @@
"handlebars/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
"happy-dom/webidl-conversions": ["webidl-conversions@7.0.0", "", {}, "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="],
"happy-dom/whatwg-mimetype": ["whatwg-mimetype@3.0.0", "", {}, "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q=="],
"has-values/is-number": ["is-number@3.0.0", "", { "dependencies": { "kind-of": "^3.0.2" } }, "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg=="],
@@ -10814,6 +10721,8 @@
"html-minifier-terser/commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="],
"htmlparser2/entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],
"http-proxy-agent/agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
"http-proxy-middleware/is-plain-obj": ["is-plain-obj@3.0.0", "", {}, "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA=="],
@@ -11468,6 +11377,8 @@
"test-next-turbopack/@types/react": ["@types/react@19.1.17", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-Qec1E3mhALmaspIrhWt9jkQMNdw6bReVu64mjvhbhq2NFPftLPVr+l1SZgmw/66WwBNpDh7ao5AT6gF5v41PFA=="],
"three-stdlib/fflate": ["fflate@0.6.10", "", {}, "sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg=="],
"through2/readable-stream": ["readable-stream@2.3.8", "", { "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA=="],
"to-object-path/kind-of": ["kind-of@3.2.2", "", { "dependencies": { "is-buffer": "^1.1.5" } }, "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ=="],
@@ -11626,34 +11537,6 @@
"@expo/spawn-async/cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
"@hanzogui/telemetry/vitest/@vitest/expect": ["@vitest/expect@4.1.10", "", { "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", "@vitest/spy": "4.1.10", "@vitest/utils": "4.1.10", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" } }, "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA=="],
"@hanzogui/telemetry/vitest/@vitest/mocker": ["@vitest/mocker@4.1.10", "", { "dependencies": { "@vitest/spy": "4.1.10", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "optionalPeers": ["msw", "vite"] }, "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow=="],
"@hanzogui/telemetry/vitest/@vitest/pretty-format": ["@vitest/pretty-format@4.1.10", "", { "dependencies": { "tinyrainbow": "^3.1.0" } }, "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q=="],
"@hanzogui/telemetry/vitest/@vitest/runner": ["@vitest/runner@4.1.10", "", { "dependencies": { "@vitest/utils": "4.1.10", "pathe": "^2.0.3" } }, "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg=="],
"@hanzogui/telemetry/vitest/@vitest/snapshot": ["@vitest/snapshot@4.1.10", "", { "dependencies": { "@vitest/pretty-format": "4.1.10", "@vitest/utils": "4.1.10", "magic-string": "^0.30.21", "pathe": "^2.0.3" } }, "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw=="],
"@hanzogui/telemetry/vitest/@vitest/spy": ["@vitest/spy@4.1.10", "", {}, "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw=="],
"@hanzogui/telemetry/vitest/@vitest/utils": ["@vitest/utils@4.1.10", "", { "dependencies": { "@vitest/pretty-format": "4.1.10", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" } }, "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA=="],
"@hanzogui/telemetry/vitest/es-module-lexer": ["es-module-lexer@2.1.0", "", {}, "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ=="],
"@hanzogui/telemetry/vitest/std-env": ["std-env@4.2.0", "", {}, "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw=="],
"@hanzogui/telemetry/vitest/tinyexec": ["tinyexec@1.2.4", "", {}, "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg=="],
"@hanzogui/telemetry/vitest/vite": ["vite@8.0.16", "", { "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", "postcss": "^8.5.15", "rolldown": "1.0.3", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.1.18", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw=="],
"@hanzogui/vite-plugin-internal/happy-dom/entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
"@hanzogui/vite-plugin-internal/happy-dom/webidl-conversions": ["webidl-conversions@7.0.0", "", {}, "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="],
"@hanzogui/vite-plugin-internal/happy-dom/whatwg-mimetype": ["whatwg-mimetype@3.0.0", "", {}, "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q=="],
"@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="],
"@isaacs/cliui/strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
@@ -12908,8 +12791,6 @@
"@expo/spawn-async/cross-spawn/shebang-command/shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
"@hanzogui/telemetry/vitest/@vitest/mocker/estree-walker": ["estree-walker@3.0.3", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g=="],
"@istanbuljs/load-nyc-config/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
"@jest/reporters/glob/minimatch/brace-expansion": ["brace-expansion@1.1.15", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg=="],
-1
View File
@@ -16,7 +16,6 @@
"./apps/kitchen-sink-go",
"./apps/kitchen-sink-shared",
"./apps/sandbox",
"./apps/team",
"./apps/tests/**/*",
"./templates/*",
"./pkgs/ai",
@@ -1,4 +1,4 @@
import { P as withPath, Q as pi, S as cos, T as sin, V as constant, W as halfPi, X as epsilon, Y as tau, Z as sqrt, $ as min, a0 as abs, a1 as atan2, a2 as max, a3 as asin, a4 as acos } from './index-CjXUZi2M.js';
import { P as withPath, Q as pi, S as cos, T as sin, V as constant, W as halfPi, X as epsilon, Y as tau, Z as sqrt, $ as min, a0 as abs, a1 as atan2, a2 as max, a3 as asin, a4 as acos } from './index-DvUTQ6Kr.js';
function arcInnerRadius(d) {
return d.innerRadius;
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
function arcInnerRadius(d) {
return d.innerRadius;
@@ -2,8 +2,8 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const index = require('./index-DKX_wW-G.cjs');
const chunk4BX2VUAB = require('./chunk-4BX2VUAB-9CeW2WzV.cjs');
const index = require('./index-BqtStGzd.cjs');
const chunk4BX2VUAB = require('./chunk-4BX2VUAB-BPAckI7A.cjs');
const wardleyL42UT6IY = require('./wardley-L42UT6IY-LWC3cHV5.cjs');
const cytoscape_esm = require('./cytoscape.esm-DQ71Mqgy.cjs');
@@ -1,5 +1,5 @@
import { bl as getDefaultExportFromCjs, _ as __name, O as selectSvgElement, aj as setupGraphViewbox, l as log, b as setAccTitle, a as getAccTitle, t as setDiagramTitle, v as getDiagramTitle, g as getAccDescription, s as setAccDescription, C as clear, K as cleanAndMerge, H as getConfig, M as defaultConfig_default, c as getConfig2, aS as createText, bm as getIconSVG, i as sanitizeText, d as select, z as getEdgeId, bn as registerIconPacks, bo as unknownIcon } from './index-CjXUZi2M.js';
import { p as populateCommonDb } from './chunk-4BX2VUAB-XGOXHn6f.js';
import { bl as getDefaultExportFromCjs, _ as __name, O as selectSvgElement, aj as setupGraphViewbox, l as log, b as setAccTitle, a as getAccTitle, t as setDiagramTitle, v as getDiagramTitle, g as getAccDescription, s as setAccDescription, C as clear, K as cleanAndMerge, H as getConfig, M as defaultConfig_default, c as getConfig2, aS as createText, bm as getIconSVG, i as sanitizeText, d as select, z as getEdgeId, bn as registerIconPacks, bo as unknownIcon } from './index-DvUTQ6Kr.js';
import { p as populateCommonDb } from './chunk-4BX2VUAB-C09YbnjP.js';
import { p as parse } from './wardley-L42UT6IY-CrBdnzA2.js';
import { c as cytoscape$1 } from './cytoscape.esm-vCfDE9xP.js';
@@ -1,7 +1,7 @@
import { g as getIconStyles } from './chunk-FMBD7UC4-B_J0zLHb.js';
import { ar as isPrimitive, as as getTag, at as isTypedArray, au as uint32ArrayTag, av as uint16ArrayTag, aw as uint8ClampedArrayTag, ax as uint8ArrayTag, ay as symbolTag, az as stringTag, aA as setTag, aB as regexpTag, aC as objectTag, aD as numberTag, aE as mapTag, aF as int32ArrayTag, aG as int16ArrayTag, aH as int8ArrayTag, aI as float64ArrayTag, aJ as float32ArrayTag, aK as dateTag, aL as booleanTag, aM as dataViewTag, aN as arrayBufferTag, aO as arrayTag, aP as argumentsTag, _ as __name, H as getConfig, d as select, e as configureSvgSize, l as log, C as clear, E as rgba, aQ as getLineFunctionsWithOffset, ad as line, ae as curveBasis, c as getConfig2, aa as getUrl, aR as getEffectiveHtmlLabels, aS as createText, aT as computeLabelTransform, aU as getSubGraphTitleMargins, u as utils_default, k as common_default, aV as getStylesFromArray, i as sanitizeText, aW as decodeEntities, aX as configureLabelImages } from './index-CjXUZi2M.js';
import { G as Graph } from './graph-CYjtjMlv.js';
import { c as channel } from './channel-C-6mgvkG.js';
import { g as getIconStyles } from './chunk-FMBD7UC4-B74aL4kM.js';
import { ar as isPrimitive, as as getTag, at as isTypedArray, au as uint32ArrayTag, av as uint16ArrayTag, aw as uint8ClampedArrayTag, ax as uint8ArrayTag, ay as symbolTag, az as stringTag, aA as setTag, aB as regexpTag, aC as objectTag, aD as numberTag, aE as mapTag, aF as int32ArrayTag, aG as int16ArrayTag, aH as int8ArrayTag, aI as float64ArrayTag, aJ as float32ArrayTag, aK as dateTag, aL as booleanTag, aM as dataViewTag, aN as arrayBufferTag, aO as arrayTag, aP as argumentsTag, _ as __name, H as getConfig, d as select, e as configureSvgSize, l as log, C as clear, E as rgba, aQ as getLineFunctionsWithOffset, ad as line, ae as curveBasis, c as getConfig2, aa as getUrl, aR as getEffectiveHtmlLabels, aS as createText, aT as computeLabelTransform, aU as getSubGraphTitleMargins, u as utils_default, k as common_default, aV as getStylesFromArray, i as sanitizeText, aW as decodeEntities, aX as configureLabelImages } from './index-DvUTQ6Kr.js';
import { G as Graph } from './graph-_hAKm3T7.js';
import { c as channel } from './channel-D5ZCUX-b.js';
//#region src/compat/predicate/isArray.ts
/**
@@ -2,10 +2,10 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const chunkFMBD7UC4 = require('./chunk-FMBD7UC4-DH3o-HXt.cjs');
const index = require('./index-DKX_wW-G.cjs');
const graph = require('./graph-DibOkrQS.cjs');
const channel = require('./channel-DfZ2PY4S.cjs');
const chunkFMBD7UC4 = require('./chunk-FMBD7UC4-TIlv4zvc.cjs');
const index = require('./index-BqtStGzd.cjs');
const graph = require('./graph-BbyehMEB.cjs');
const channel = require('./channel-BMEomDyV.cjs');
//#region src/compat/predicate/isArray.ts
/**
@@ -2,8 +2,8 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const chunkND2GUHAM = require('./chunk-ND2GUHAM-xYudtxDP.cjs');
const index = require('./index-DKX_wW-G.cjs');
const chunkND2GUHAM = require('./chunk-ND2GUHAM-CYtASDDw.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/diagrams/c4/parser/c4Diagram.jison
var parser = (function() {
@@ -1,5 +1,5 @@
import { g as getNoteRect, d as drawRect } from './chunk-ND2GUHAM-G2KWBwb_.js';
import { s as setAccDescription, g as getAccDescription, a as getAccTitle, b as setAccTitle, _ as __name, c as getConfig2, d as select, l as log, e as configureSvgSize, f as assignWithDepth_default, h as calculateTextWidth, i as sanitizeText, j as distExports, w as wrapLabel, k as common_default, m as calculateTextHeight } from './index-CjXUZi2M.js';
import { g as getNoteRect, d as drawRect } from './chunk-ND2GUHAM-C2CEfjdO.js';
import { s as setAccDescription, g as getAccDescription, a as getAccTitle, b as setAccTitle, _ as __name, c as getConfig2, d as select, l as log, e as configureSvgSize, f as assignWithDepth_default, h as calculateTextWidth, i as sanitizeText, j as distExports, w as wrapLabel, k as common_default, m as calculateTextHeight } from './index-DvUTQ6Kr.js';
// src/diagrams/c4/parser/c4Diagram.jison
var parser = (function() {
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
/* IMPORT */
/* MAIN */
@@ -1,4 +1,4 @@
import { U as Utils, F as Color } from './index-CjXUZi2M.js';
import { U as Utils, F as Color } from './index-DvUTQ6Kr.js';
/* IMPORT */
/* MAIN */
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/rendering-util/setupViewPortForSVG.ts
var setupViewPortForSVG = /* @__PURE__ */ index.__name((svg, padding, cssDiagram, useMaxWidth) => {
@@ -1,4 +1,4 @@
import { _ as __name, e as configureSvgSize, l as log } from './index-CjXUZi2M.js';
import { _ as __name, e as configureSvgSize, l as log } from './index-DvUTQ6Kr.js';
// src/rendering-util/setupViewPortForSVG.ts
var setupViewPortForSVG = /* @__PURE__ */ __name((svg, padding, cssDiagram, useMaxWidth) => {
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/diagrams/common/populateCommonDb.ts
function populateCommonDb(ast, db) {
@@ -1,4 +1,4 @@
import { _ as __name } from './index-CjXUZi2M.js';
import { _ as __name } from './index-DvUTQ6Kr.js';
// src/diagrams/common/populateCommonDb.ts
function populateCommonDb(ast, db) {
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
var getDiagramElement = /* @__PURE__ */ index.__name((id, securityLevel) => {
let sandboxElement;
@@ -1,4 +1,4 @@
import { _ as __name, d as select } from './index-CjXUZi2M.js';
import { _ as __name, d as select } from './index-DvUTQ6Kr.js';
var getDiagramElement = /* @__PURE__ */ __name((id, securityLevel) => {
let sandboxElement;
@@ -1,10 +1,10 @@
'use strict';
const chunkFMBD7UC4 = require('./chunk-FMBD7UC4-DH3o-HXt.cjs');
const chunkND2GUHAM = require('./chunk-ND2GUHAM-xYudtxDP.cjs');
const chunk55IACEB6 = require('./chunk-55IACEB6-Dv6op4Nf.cjs');
const chunk2J33WTMH = require('./chunk-2J33WTMH-CqgMP_BK.cjs');
const index = require('./index-DKX_wW-G.cjs');
const chunkFMBD7UC4 = require('./chunk-FMBD7UC4-TIlv4zvc.cjs');
const chunkND2GUHAM = require('./chunk-ND2GUHAM-CYtASDDw.cjs');
const chunk55IACEB6 = require('./chunk-55IACEB6-C46821Hm.cjs');
const chunk2J33WTMH = require('./chunk-2J33WTMH-D0iADRfX.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/diagrams/class/parser/classDiagram.jison
var parser = (function() {
@@ -1,8 +1,8 @@
import { g as getIconStyles } from './chunk-FMBD7UC4-B_J0zLHb.js';
import { c as createTooltip } from './chunk-ND2GUHAM-G2KWBwb_.js';
import { g as getDiagramElement } from './chunk-55IACEB6-3wERdOBZ.js';
import { s as setupViewPortForSVG } from './chunk-2J33WTMH-CcP1Rmyz.js';
import { _ as __name, l as log, c as getConfig2, q as getRegisteredLayoutAlgorithm, r as render, u as utils_default, d as select, B as purify, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, t as setDiagramTitle, v as getDiagramTitle, k as common_default, C as clear, z as getEdgeId, i as sanitizeText, ac as parseGenericTypes } from './index-CjXUZi2M.js';
import { g as getIconStyles } from './chunk-FMBD7UC4-B74aL4kM.js';
import { c as createTooltip } from './chunk-ND2GUHAM-C2CEfjdO.js';
import { g as getDiagramElement } from './chunk-55IACEB6-D-Nu18Jt.js';
import { s as setupViewPortForSVG } from './chunk-2J33WTMH-DtshrYP2.js';
import { _ as __name, l as log, c as getConfig2, q as getRegisteredLayoutAlgorithm, r as render, u as utils_default, d as select, B as purify, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, t as setDiagramTitle, v as getDiagramTitle, k as common_default, C as clear, z as getEdgeId, i as sanitizeText, ac as parseGenericTypes } from './index-DvUTQ6Kr.js';
// src/diagrams/class/parser/classDiagram.jison
var parser = (function() {
@@ -1,6 +1,6 @@
import { g as getDiagramElement } from './chunk-55IACEB6-3wERdOBZ.js';
import { s as setupViewPortForSVG } from './chunk-2J33WTMH-CcP1Rmyz.js';
import { _ as __name, l as log, c as getConfig2, r as render, u as utils_default, a as getAccTitle, b as setAccTitle, g as getAccDescription, s as setAccDescription, t as setDiagramTitle, v as getDiagramTitle, af as generateId, k as common_default, C as clear } from './index-CjXUZi2M.js';
import { g as getDiagramElement } from './chunk-55IACEB6-D-Nu18Jt.js';
import { s as setupViewPortForSVG } from './chunk-2J33WTMH-DtshrYP2.js';
import { _ as __name, l as log, c as getConfig2, r as render, u as utils_default, a as getAccTitle, b as setAccTitle, g as getAccDescription, s as setAccDescription, t as setDiagramTitle, v as getDiagramTitle, af as generateId, k as common_default, C as clear } from './index-DvUTQ6Kr.js';
// src/diagrams/state/parser/stateDiagram.jison
var parser = (function() {
@@ -1,8 +1,8 @@
'use strict';
const chunk55IACEB6 = require('./chunk-55IACEB6-Dv6op4Nf.cjs');
const chunk2J33WTMH = require('./chunk-2J33WTMH-CqgMP_BK.cjs');
const index = require('./index-DKX_wW-G.cjs');
const chunk55IACEB6 = require('./chunk-55IACEB6-C46821Hm.cjs');
const chunk2J33WTMH = require('./chunk-2J33WTMH-D0iADRfX.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/diagrams/state/parser/stateDiagram.jison
var parser = (function() {
@@ -1,4 +1,4 @@
import { _ as __name } from './index-CjXUZi2M.js';
import { _ as __name } from './index-DvUTQ6Kr.js';
// src/diagrams/globalStyles.ts
var getIconStyles = /* @__PURE__ */ __name(() => `
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/diagrams/globalStyles.ts
var getIconStyles = /* @__PURE__ */ index.__name(() => `
@@ -1,4 +1,4 @@
import { _ as __name, d as select, n as lineBreakRegex, j as distExports } from './index-CjXUZi2M.js';
import { _ as __name, d as select, n as lineBreakRegex, j as distExports } from './index-DvUTQ6Kr.js';
var drawRect = /* @__PURE__ */ __name((element, rectData) => {
const rectElement = element.append("rect");
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
var drawRect = /* @__PURE__ */ index.__name((element, rectData) => {
const rectElement = element.append("rect");
@@ -1,4 +1,4 @@
import { _ as __name } from './index-CjXUZi2M.js';
import { _ as __name } from './index-DvUTQ6Kr.js';
// src/utils/imperativeState.ts
var ImperativeState = class {
@@ -1,6 +1,6 @@
'use strict';
const index = require('./index-DKX_wW-G.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/utils/imperativeState.ts
var ImperativeState = class {
@@ -1,5 +1,5 @@
import { s as styles_default, c as classRenderer_v3_unified_default, a as classDiagram_default, C as ClassDB } from './chunk-727SXJPM-DzrnZ2j8.js';
import { _ as __name } from './index-CjXUZi2M.js';
import { s as styles_default, c as classRenderer_v3_unified_default, a as classDiagram_default, C as ClassDB } from './chunk-727SXJPM-BIYeoqjf.js';
import { _ as __name } from './index-DvUTQ6Kr.js';
// src/diagrams/class/classDiagram.ts
var diagram = {
@@ -2,8 +2,8 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const chunk727SXJPM = require('./chunk-727SXJPM-C1-9f1y2.cjs');
const index = require('./index-DKX_wW-G.cjs');
const chunk727SXJPM = require('./chunk-727SXJPM-BIWKZqME.cjs');
const index = require('./index-BqtStGzd.cjs');
// src/diagrams/class/classDiagram.ts
var diagram = {
@@ -1,5 +1,5 @@
import { s as styles_default, c as classRenderer_v3_unified_default, a as classDiagram_default, C as ClassDB } from './chunk-727SXJPM-DzrnZ2j8.js';
import { _ as __name } from './index-CjXUZi2M.js';
import { s as styles_default, c as classRenderer_v3_unified_default, a as classDiagram_default, C as ClassDB } from './chunk-727SXJPM-BIYeoqjf.js';
import { _ as __name } from './index-DvUTQ6Kr.js';
// src/diagrams/class/classDiagram-v2.ts
var diagram = {

Some files were not shown because too many files have changed in this diff Show More