- Rust 56.7%
- TypeScript 42.6%
- CSS 0.5%
- Nix 0.1%
|
All checks were successful
CI / verify (push) Successful in 9m59s
Every run rebuilt all 538 locked crates and refetched every npm package, which is where a ten-minute budget went; the JavaScript suites CI was being blamed for are under thirty seconds of it. Measured cold on this workspace: the Rust gate costs 1013 CPU-seconds, and pnpm install takes about three minutes of network. With the artifacts restored, the same Rust gate finishes in seven seconds and the install in under one. Dropping incremental state and debug symbols nothing here reads takes the cold gate to 709 CPU-seconds and the cached target from 4.2 GB to 1.8 GB. The gate now runs the JavaScript suites under coverage instead of running them once plain and once instrumented in a second step. |
||
|---|---|---|
| .claude | ||
| .codex/skills | ||
| .forgejo/workflows | ||
| .pi | ||
| apps/desktop | ||
| crates | ||
| docs | ||
| openspec | ||
| packages/ui | ||
| .envrc | ||
| .gitignore | ||
| biome.json | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| notes.org | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| skills-lock.json | ||
Samaya
Samaya is a local-first desktop planning workspace. Its React/Vite interface runs in Tauri, while planner data remains user-owned in an Org directory that can also be edited from Emacs. The planner index is rebuilt in memory from those files; Samaya has no planner database or annex. Only local identity and the last open date live outside Org, in one atomically replaced JSON state document. No account, network service, fake production integration, or loopback listener is required.
Prerequisites
The supported development environment is the committed Nix flake on NixOS. Enter it before installing dependencies or using the native host:
nix develop
pnpm install --frozen-lockfile
The lock-pinned flake provides Node.js, pnpm, Rust, Cargo, pkg-config,
WebKitGTK 4.1, Chromium and WebKit for Playwright, actionlint, and the native
libraries needed by Tauri on Linux.
Commands
Run every command from the repository root.
pnpm devstarts the browser-only Vite preview athttp://localhost:5173.pnpm checkruns formatting, linting, TypeScript, frontend tests/build, the Org fidelity corpus through the Rust suite, all Rust format/clippy/test gates, and strict validation of every OpenSpec change and spec. It intentionally does not require a locally launchable browser binary.pnpm browser:testruns the small real-browser smoke suite in Chromium and WebKit. Use it fromnix developso the pinned browsers are available.pnpm check:cicomposes workflow lint, the repository gate, and browser smoke checks. CI performs the frozen install separately first.pnpm test:coveragewrites advisory HTML/JSON/text coverage reports. Coverage is trend information and has no threshold gate.pnpm formatapplies Biome formatting.pnpm lintruns Biome linting.pnpm typechecktype-checks the shared UI and desktop workspaces.pnpm testruns the browser-focused Vitest and Testing Library suite.npx react-doctor@latest --verboseruns an optional advisory React health scan without adding another committed lint dependency.pnpm buildbuilds the frontend assets for Tauri.pnpm org:fidelityverifies that every supported Org mutation changes only its owned field across the committed fixture corpus.cargo run -p samaya-sync -- <command>runs the calendar synchronization binary. It connects Google accounts and keepscalendar.orgcurrent independently of the desktop application; see docs/google-calendar.md. It is the one crate with a version of its own, recorded in crates/samaya-sync/CHANGELOG.org.pnpm native:devstarts Vite and launches Samaya in a native Tauri window.pnpm native:buildcompiles the release host with Tauri bundling disabled. It does not produce an installer.
Repository layout
apps/
desktop/ React, TypeScript, Tailwind, and Vite frontend
src/modules/planning/ Planner model and focused views
src/modules/integrations/ Catalog seam and test/demo adapter
src-tauri/ Standalone Tauri/Rust host and capabilities
crates/
samaya-planner-core/ Org parser/writer, in-memory index, and watcher
samaya-sync/ Provider synchronization binary (`samaya-sync`)
CHANGELOG.org Its release history; the only versioned crate
packages/
ui/ Owned UI primitives, icons, and control styling
openspec/ Product-change planning artifacts
flake.nix Reproducible NixOS development shell
package.json pnpm workspace commands
pnpm-workspace.yaml apps/* and packages/* workspace locations
The root is a Cargo workspace containing the Tauri host and
samaya-planner-core. The core has no desktop or webview dependencies; the
Tauri adapter owns IPC and desktop event emission.
@samaya/ui remains intentionally narrow and owns reusable accessible controls.
Org directory
On the supported Linux configuration, create:
${XDG_CONFIG_HOME:-$HOME/.config}/app.samaya.desktop/planner.json
with this exact shape:
{ "orgDirectory": "/absolute/path/to/org" }
Samaya reads that one file during native startup; it does not discover a config
by walking parent directories and has no environment-variable override. The
orgDirectory value must be an absolute path to a readable directory. A
missing file produces the controlled unconfigured screen; an unreadable or
malformed file prevents native startup with an error.
The Org directory contains one top-level <project>.org file per project,
calendar.org as a read-only generated projection, and archive/ for archived
project files. Samaya-created project files declare their category, display
tone, task/event keyword sequences, and stable headline IDs. Top-level project
files and calendar.org are discovered directly; matching project files below
archive/ are scanned recursively. No legacy database import or schema
migration path remains.
For Emacs, use archive/%s:: as the project archive location convention. A
project file resolves to the identically named file below archive/; automatic
archiving is intentionally not implemented in this change.
A fresh installation starts empty—there is no fixture seed generator or sample data written into user files.
Production also starts with no integration sources. The planning shell receives an empty integration catalog at composition, so it does not show demo Jira, GitHub, Forgejo, Linear, or Google Tasks work or simulate refreshes. Frontend tests inject the explicitly named deterministic demo catalog when they exercise integration behavior.
Deliberate deferrals
- Next.js is reserved for a future browser application. Tauri needs static Vite output today; adding Next.js would introduce server-oriented concerns without a web app to serve.
- Turborepo is deferred until multiple workspaces make task graph orchestration and caching worthwhile.
- Additional shared product packages are deferred until a second consumer establishes a real seam. Domain types and planner behavior remain local.
- Effect v4 is deferred until a concrete asynchronous workflow needs typed failures, cancellation, retries, or dependency construction.
- External calendar synchronization, automatic archiving, routing,
drag-and-drop libraries, and packaging remain deferred.
calendar.orgis indexed read-only but is not populated by this change.
When any of those needs becomes concrete, introduce it through a focused change instead of maintaining placeholder architecture.
Verification scope
Browser rendering, Org fidelity, planner-core, strict OpenSpec, and Forgejo
workflow syntax are automated. Chromium/WebKit smoke behavior is not: the suite
is kept and passes, but it runs from nix develop on demand rather than as a
gate, because the browsers it needs are only usable inside that shell. Native
launch and release no-bundle compilation are verified from nix develop on the
supported NixOS host when WebKitGTK/display support is available. Browser smoke tests are
not native Tauri IPC tests; their injected deterministic transport/catalog
harness exercises composition and supported UI behavior without pretending to
contact an integration provider. This does not claim installer, signing,
updater, Windows, or macOS support.