Skip to content
Merged
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
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Main entrypoints:
- Do not use decorative repeated-character section headers.
- Use `it('should...')` style tests.
- Unit tests live next to their implementation.
- `apps/ui/src/routeTree.gen.ts` is generated and must not be manually edited.
- `src/ui/routeTree.gen.ts` is generated and must not be manually edited.

## Architecture

Expand Down Expand Up @@ -97,9 +97,9 @@ Shared utilities:
- `src/coverage-check.ts`

UI source tree:
- `apps/ui/`
- `src/ui/`
- TanStack Start browser UI
- API routes live under `apps/ui/src/routes/api.v1.*.ts`
- API routes live under `src/ui/routes/api.v1.*.ts`
- source routes include `/threads/$threadId`, `/claude-code-sessions/$sessionId`, `/cline-tasks/$taskId`, `/grok-sessions/$sessionId`, `/kiro-sessions/$sessionId`, `/qoder-sessions/$sessionId`, `/cursor-threads/$composerId`, `/antigravity-conversations/$conversationId`, `/minimax-code-sessions/$sessionId`, and `/opencode-sessions/$sessionId`

## Stable API Contract
Expand Down Expand Up @@ -151,7 +151,7 @@ When changing risky areas:
- Source adapter changes: update the matching `src/lib/conversation-data/*-adapter.ts` tests or add one next to the adapter.
- Transcript parsing/rendering: update the matching source transcript tests.
- Codex browsing/delete/analytics: update `src/lib/codex-browser-db.test.ts` and `src/lib/codex-analytics.test.ts`.
- UI behavior: update/add Vitest files under `apps/ui/src/**/*.vitest.tsx`.
- UI behavior: update/add Vitest files under `src/ui/**/*.vitest.tsx`.
- API route behavior: add a real UI server/browser smoke when route registration or SSR behavior changes.

## Common Commands
Expand All @@ -171,7 +171,7 @@ rtk bun run test:ui

- Keep root-package source modules imported by the UI available through `@spiracha/lib/*`.
- The repository has one package manifest. Keep UI runtime dependencies needed by packaged `bunx spiracha` in root `dependencies` and build/test-only tooling in root `devDependencies`.
- Root-owned UI Vite commands use `apps/ui` as their internal working directory and run through `bun --bun` because TanStack and server functions depend on that application root and Bun-only modules like `bun:sqlite`. Do not add a nested manifest to achieve this. UI Vitest commands use the normal Node runtime.
- UI Vite commands run from the repository root with `bun --bun`, so TanStack, server functions, the stable API, and the browser route tree all resolve from one manifest and one dependency graph. UI Vitest commands use the normal Node runtime.
- TanStack Start server functions should use `.validator(...)`, not deprecated `.inputValidator(...)`.
- API routes should use route-level `server.handlers`.
- Keep `*-transcript-phase.ts` modules browser-safe; UI client adapters import them directly.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# spiracha

<p align="center">
<img src="apps/ui/public/icon.svg" alt="Spiracha icon" width="96" height="100">
<img src="public/icon.svg" alt="Spiracha icon" width="96" height="100">
</p>

[![license](https://img.shields.io/npm/l/spiracha)](LICENSE.md)
Expand Down Expand Up @@ -180,11 +180,11 @@ bun run test:ui

`bun run coverage` enforces at least 90% line coverage independently for the root Bun suite and the UI Vitest suite, and reports function coverage and per-file hotspots for follow-up.

Run one root test file with `bun test src/lib/shared.test.ts`. Run one UI test file with `bun run test:ui --run apps/ui/src/components/export-dialog.vitest.tsx`.
Run one root test file with `bun test src/lib/shared.test.ts`. Run one UI test file with `bun run test:ui --run src/ui/components/export-dialog.vitest.tsx`.

Spiracha has one package manifest. The `apps/ui` directory remains a source boundary, but all UI and direct-client commands and dependencies are owned at the repository root. Root-owned Vite commands use `apps/ui` as their internal working directory and run through `bun --bun` because TanStack server functions import Bun-only modules such as `bun:sqlite`; Vitest uses its normal Node runtime.
Spiracha has one application boundary: the stable API, server functions, browser route tree, and UI all live under the root package and resolve through one manifest and one dependency graph. Vite runs from the repository root with Bun because TanStack server functions import Bun-only modules such as `bun:sqlite`; Vitest uses its normal Node runtime.

TanStack Router generates `apps/ui/src/routeTree.gen.ts` during development/build. Do not edit it manually; after adding or renaming route files, run `bun run build` (or start the dev server) and include the generated update.
TanStack Router generates `src/ui/routeTree.gen.ts` during development/build. Do not edit it manually; after adding or renaming route files, run `bun run build` (or start the dev server) and include the generated update.

## Breaking Consequences

Expand Down
13 changes: 0 additions & 13 deletions apps/ui/.gitignore

This file was deleted.

126 changes: 0 additions & 126 deletions apps/ui/AGENTS.md

This file was deleted.

Loading
Loading