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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .claude/hooks/cloud-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ mark() { echo "$2" >"$STATE/$1.done"; }
echo "==> Build @tomic workspace packages ($(date -u +%T))"
cd "$REPO/browser" || exit 1
# data-browser (which also compiles the WASM) is built by the server build.
if pnpm --filter @tomic/lib --filter @tomic/react --filter @tomic/plugin \
--filter @tomic/service-ui --filter @tomic/edit-mode \
--filter @tomic/cli --filter @tomic/svelte -r build; then
if pnpm --filter '@tomic/data-browser^...' \
--filter @tomic/cli... --filter @tomic/svelte... -r build; then
mark packages ok
else
mark packages failed
Expand Down
27 changes: 10 additions & 17 deletions .dagger/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,25 +682,11 @@ export class AtomicServer {
// 2. Packages reached through node_modules need a `dist`. Building
// only lib and react left `@tomic/plugin`, `@tomic/service-ui` and
// `@tomic/edit-mode/react` unresolvable, and `@tomic/form-app`
// needs `@tomic/form-renderer`. All six build from TypeScript
// needs `@tomic/form-renderer`. Build the complete dependency graph,
// including the shared UI/table/pure-helper packages, from TypeScript
// alone, so this stays in the cheap static tier beside lint and
// `cargo fmt`: no WASM, no Rust.
.withExec([
'pnpm',
'--filter',
'@tomic/form-renderer',
'--filter',
'@tomic/lib',
'--filter',
'@tomic/react',
'--filter',
'@tomic/plugin',
'--filter',
'@tomic/service-ui',
'--filter',
'@tomic/edit-mode',
'build',
])
.withExec(['pnpm', '--filter', '@tomic/data-browser^...', 'build'])
.withExec([
'pnpm',
'--filter=!@tomic/data-browser',
Expand Down Expand Up @@ -1094,6 +1080,8 @@ export class AtomicServer {
browser.file('data-browser/package.json'),
)
.withFile('/repo/browser/ui/package.json', browser.file('ui/package.json'))
.withFile('/repo/browser/utils/package.json', browser.file('utils/package.json'))
.withFile('/repo/browser/table/package.json', browser.file('table/package.json'))
.withFile(
'/repo/browser/lib/package.json',
browser.file('lib/package.json'),
Expand Down Expand Up @@ -1154,6 +1142,7 @@ export class AtomicServer {
// integration tests, except @tomic/mcp: hosted-mcp.integration.test.ts
// imports its bridge from `../../mcp/src`.
const withSource = installed
.withDirectory('/repo/browser/utils', browser.directory('utils'))
.withDirectory('/repo/browser/lib', browser.directory('lib'))
.withDirectory('/repo/browser/mcp', browser.directory('mcp'));

Expand All @@ -1162,6 +1151,8 @@ export class AtomicServer {
permissions: 0o755,
})
.withDirectory('/repo/wasm/pkg', wasmPkg)
.withWorkdir('/repo/browser/utils')
.withExec(['pnpm', 'run', 'build'])
.withWorkdir('/repo/browser/lib')
.withExec(['pnpm', 'run', 'test:integration'])
.stdout();
Expand Down Expand Up @@ -1358,6 +1349,8 @@ export class AtomicServer {
browser.file('data-browser/package.json'),
)
.withFile('/app/ui/package.json', browser.file('ui/package.json'))
.withFile('/app/utils/package.json', browser.file('utils/package.json'))
.withFile('/app/table/package.json', browser.file('table/package.json'))
.withFile('/app/lib/package.json', browser.file('lib/package.json'))
.withFile('/app/react/package.json', browser.file('react/package.json'))
.withFile('/app/svelte/package.json', browser.file('svelte/package.json'))
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ jobs:
run: |
set -euo pipefail
cd browser
pnpm --filter "@tomic/lib" run build
pnpm --filter "@tomic/lib..." run build
pnpm --filter "@tomic/react" \
--filter "@tomic/cli" \
--filter "@tomic/svelte" \
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/shared-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
paths:
- 'browser/ui/**'
- 'browser/utils/**'
- 'browser/lib/src/EventManager.ts'
- 'browser/lib/src/calendar-date.ts'
- 'browser/lib/tsup.config.ts'
- 'browser/data-browser/src/components/**'
- 'browser/data-browser/src/hooks/**'
- 'browser/data-browser/src/globalCssVars.ts'
Expand All @@ -26,6 +30,8 @@ jobs:
cache-dependency-path: browser/pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
working-directory: browser
- run: pnpm --filter @tomic/utils build && pnpm --filter @tomic/utils test
working-directory: browser
- run: pnpm --filter @tomic/ui lint && pnpm --filter @tomic/ui typecheck
working-directory: browser
- run: pnpm --filter '@tomic/data-browser^...' build
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/table-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Table package

on:
pull_request:
paths:
- 'browser/table/**'
- 'browser/ui/**'
- 'browser/utils/**'
- 'browser/pnpm-lock.yaml'
- 'browser/pnpm-workspace.yaml'
- 'browser/package.json'
- 'browser/.ox*'
- '.github/workflows/table-package.yml'
push:
branches: [develop]
paths:
- 'browser/table/**'
- 'browser/ui/**'
- 'browser/utils/**'
- 'browser/pnpm-lock.yaml'
- 'browser/pnpm-workspace.yaml'
- 'browser/package.json'
- 'browser/.ox*'
- '.github/workflows/table-package.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: table-package-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
package:
name: Build, test and install packed table
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
- uses: pnpm/action-setup@v4
with:
version: 11.10.0
- name: Install table dependencies
working-directory: browser
run: pnpm --filter @tomic/table... install --frozen-lockfile
- name: Build shared UI
working-directory: browser
run: pnpm --filter @tomic/ui... build
- name: Lint, typecheck and test
working-directory: browser
run: |
pnpm --filter @tomic/table lint
pnpm --filter @tomic/table typecheck
pnpm --filter @tomic/table test
- name: Build and pack
working-directory: browser
run: |
pnpm --filter @tomic/table pack --out "$RUNNER_TEMP/tomic-table.tgz"
pnpm --filter @tomic/ui pack --out "$RUNNER_TEMP/tomic-ui.tgz"
- name: Install and typecheck a clean external consumer
run: node browser/table/scripts/check-package.mjs "$RUNNER_TEMP/tomic-table.tgz" "$RUNNER_TEMP/tomic-ui.tgz"
- uses: actions/upload-artifact@v4
with:
name: tomic-table-preview
path: |
${{ runner.temp }}/tomic-table.tgz
${{ runner.temp }}/tomic-ui.tgz
10 changes: 9 additions & 1 deletion TESTING_COVERAGE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Grid extraction and shared helpers: `browser/table/src` retains the existing grid,
keyboard, selection and primitive-editor tests. The SDK's EventManager and civil
calendar tests move with their implementations to `browser/utils/src` (nine
cases). Both SDK and UI builds include the private helper modules' declarations;
packed-consumer checks verify the grid uses the host's UI module instance.
TableCell's local fixture seeds createdAt metadata to avoid external HTTP reads
while asserting cell commits. These changes do not introduce new state policies.

Shared UI extraction: `browser/data-browser/src/components/sharedUI.test.tsx`
checks that compatibility paths and the extracted package share keyboard locks,
the dialog tree and generated background CSS variables. Existing spinner,
Expand Down Expand Up @@ -2107,7 +2115,7 @@ number by keyboard, or a click on the day's empty space) shows every event and
opens each row on top of it. How many chips fit is measured, so it needs a
real browser; jsdom can't cover it.

All-day ranges: `browser/lib/src/calendar-date.test.ts` covers civil-date
All-day ranges: `browser/utils/src/calendar-date.test.ts` covers civil-date
validation, exclusive single/multi-day ends, leap days, DST dates and year
boundaries; run under UTC, America/Los_Angeles and Pacific/Kiritimati.

Expand Down
5 changes: 3 additions & 2 deletions browser/data-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@tomic/plugin": "workspace:*",
"@tomic/react": "workspace:*",
"@tomic/service-ui": "workspace:*",
"@tomic/table": "workspace:*",
"@tomic/ui": "workspace:*",
"@uiw/codemirror-theme-github": "^4.25.10",
"@uiw/react-codemirror": "^4.25.10",
Expand Down Expand Up @@ -149,10 +150,10 @@
"scripts": {
"build:website-runtime": "node scripts/build-website-runtime.mjs",
"build": "if [ \"$SKIP_WASM_BUILD\" = \"1\" ]; then echo 'SKIP_WASM_BUILD=1, skipping wasm-pack'; else pnpm build:wasm; fi && vite build",
"build:tauri": "pnpm --filter \"@tomic/lib\" --filter \"@tomic/react\" run build && pnpm build:wasm && TAURI=1 vite build",
"build:tauri": "pnpm --filter '@tomic/data-browser^...' run build && pnpm build:wasm && TAURI=1 vite build",
"build:wasm": "cd ../../wasm && export CARGO_TARGET_DIR=../target/wasm-pack CARGO_BUILD_BUILD_DIR=../target/wasm-pack/build && cargo run -q --package cargo-bin -- wasm-pack --version && env -u CARGO_ENCODED_RUSTFLAGS -u RUSTFLAGS cargo run -q --package cargo-bin -- wasm-pack build --target web --out-dir pkg && cp pkg/atomic_wasm.js pkg/atomic_wasm_bg.wasm ../browser/data-browser/public/wasm/",
"dev": "vite",
"dev:tauri": "pnpm --filter \"@tomic/lib\" --filter \"@tomic/react\" run build && TAURI=1 vite",
"dev:tauri": "pnpm --filter '@tomic/data-browser^...' run build && TAURI=1 vite",
"format-check": "oxfmt -c ../.oxfmtrc.json --check ./src",
"format": "oxfmt -c ../.oxfmtrc.json ./src",
"lint": "oxlint -c ../.oxlintrc.json . && pnpm format-check",
Expand Down
Loading
Loading