Commit graph

19 commits

Author SHA1 Message Date
8e2a0337e9
fix: add retry logic for flaky cache.nixos.org
Some checks failed
Build and Push OCI Image / build (push) Failing after 1m12s
Build can fail with EOF errors when fetching from cache.
Add fallback to build from source if cache fails.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-27 00:35:40 +01:00
c32ba4d80e
fix: create temp directory for skopeo in CI
Some checks failed
Build and Push OCI Image / build (push) Failing after 1m3s
skopeo needs /var/tmp or /tmp for temporary files when copying
docker-archive images. Use --tmpdir flag to explicitly use /tmp.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-27 00:31:50 +01:00
2210c5fcf7 Merge pull request 'feat: PWA photo capture with IndexedDB storage' (#1) from feat/20260226-photo-capture into main
Some checks failed
Build and Push OCI Image / build (push) Failing after 1m56s
2026-02-26 23:27:01 +00:00
53ba0c815d
fix: devShell packages with sd-card tools
All checks were successful
Build and Push OCI Image / build (pull_request) Successful in 1m57s
Use inputsFrom instead of concatenating to packages list
2026-02-27 00:26:37 +01:00
9621c1b727
Merge branch 'main' into feat/20260226-photo-capture
Resolved conflicts:
- flake.nix: Combined flake-parts + sd-card + OCI image
- flake.lock: Updated to include flake-parts input
2026-02-27 00:25:53 +01:00
16e9c891a8 feat: integrate sd-card for interactive spec generation (#2)
## Summary

Integrated **sd-card** workflow for interactive specification generation:

-  Added sd-card flake input
-  Created `nix run .#dev` - starts Vite with annotation proxy
-  Updated dev shell with sd-card tools (tea, playwright, nodejs)
-  Replaced old forgejo-workflow with sd-card

## Usage

### Widget-based annotation
```bash
FORGEJO_TOKEN="your-token" nix run .#dev
```

Opens SvelteKit with ✦ widget injected on every page.

### Interactive annotation (recommended)
Ask Claude to interact with the app via Claudezilla:
```
User: "Open solidhaus"
Claude: [opens in Firefox]
User: "Click the scan barcode button"
Claude: [clicks, shows screenshot]
User: "This should open the camera"
Claude: [generates Gherkin scenario]
```

## Test Plan

- [x] Flake builds successfully
- [x] `nix run .#dev` starts dev server with proxy
- [x] Widget injects on pages
- [x] Claudezilla can open and interact with app
- [x] Dev shell includes all sd-card tools

🤖 Generated with Claude Code

Reviewed-on: toph/solidhaus#2
Co-authored-by: Christopher Mühl <toki@toph.so>
Co-committed-by: Christopher Mühl <toki@toph.so>
2026-02-26 23:07:38 +00:00
1f35ca1190
docs: add Nix build system documentation
All checks were successful
Build and Push OCI Image / build (pull_request) Successful in 2m22s
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-27 00:00:44 +01:00
0160483e9a
feat: nix flake with OCI image + Forgejo CI
All checks were successful
Build and Push OCI Image / build (pull_request) Successful in 2m49s
Add Nix flake build system with automated container image building:

**Nix Flake (flake.nix)**
- Built with flake-parts for modularity
- `solidhaus` package: builds SvelteKit app with buildNpmPackage
- `solidhaus-image` package: OCI image with nginx serving app
- `push-solidhaus-image` app: pushes to registry.toph.so
- Dev shell with Node.js 22

**OCI Image**
- Based on nixpkgs nginx
- Serves SvelteKit build/ as static SPA
- SPA fallback routing configured
- Security headers (X-Frame-Options, X-Content-Type-Options, X-XSS-Protection)
- Gzip compression for text assets
- 1-year cache for immutable static assets

**Forgejo CI (.forgejo/workflows/build-image.yml)**
- Runs on 'nix' runner (uses nix-runner-image)
- Builds OCI image on every push
- Pushes to registry.toph.so on main branch
- Tags with :latest and :${commit-sha}

**Build commands**
- `nix build .#solidhaus` — build app
- `nix build .#solidhaus-image` — build OCI image
- `nix run .#push-solidhaus-image` — push to registry

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-27 00:00:00 +01:00
bf80685b77
chore: log request #req_20260226_234700_photo
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-26 23:45:59 +01:00
91c7476d37
feat: PWA photo capture with IndexedDB storage
Add full photo capture and management functionality using standard Web APIs:

- Photo capture via getUserMedia (camera) or file upload
- Automatic thumbnail generation (max 200px width)
- IndexedDB storage for photos with Blob support
- PhotoCapture component with camera preview and capture controls
- PhotoGallery component with grid view and fullscreen modal
- Integration into item detail page
- 9 new unit tests (all passing)

PWA-friendly implementation:
- No native dependencies required
- Works in mobile browsers
- Falls back to file upload if camera unavailable
- Stores photos locally in IndexedDB

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-26 23:44:46 +01:00
Christopher Mühl
307ef24b78 test: E2E test suite + handoff documentation
50 Playwright E2E tests across 13 spec files covering all routes and
user flows (items CRUD, check-out/in, locations, labels, scanning,
search/filter). Uses vitest as runner with playwright-core for browser
automation (bun-compatible alternative to @playwright/test).

Includes Gherkin .feature files as living documentation, test support
infrastructure (IDB seeding, item factories, assertion helpers, layout
measurement), and HANDOFF.md covering project state, deployment, and
open design decisions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:53:08 +01:00
Christopher Mühl
cbf70665f8 chore: add Forgejo PR workflow 2026-02-26 17:10:07 +01:00
Christopher Mühl
1ffdb937ce feat: all route pages — dashboard, scan, items, locations, labels, settings
- Dashboard with stats grid, checked-out/low-stock/recent items
- Scan route with check-in/out flow
- Items list with search, filters (category/type/custody), sorting
- Item detail with full metadata, check-in/out, edit, delete
- New item form wired to inventory store
- Locations browser with tree view and items-at-location
- Labels page with batch generation and PDF download
- Settings page with DB stats
- Fixed Svelte 5 event modifier syntax (no pipe modifiers)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:22:19 +01:00
Christopher Mühl
0b382b9c5e feat: scanner, label sheet PDF generation, and print server client
- Barcode scanner with ML Kit (native) and BarcodeDetector API (web)
- Label sheet PDF generator with QR codes via bwip-js + jsPDF
- Print server REST client with health check
- 6 print server tests passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:38:33 +01:00
Christopher Mühl
1ef4661d9a feat: UI components — ItemCard, ItemForm, LocationTree, LocationPicker
Includes ConfidenceBadge and CustodyBadge helper components.
Dark slate theme with confidence/custody color coding.
ItemCard test suite (6 tests). Fixed vitest browser resolve conditions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:36:56 +01:00
Christopher Mühl
9f4c743eb8 feat: inventory store with Svelte 5 runes and full test suite
Reactive store with $state/$derived for items, locations, checked-out
items, overdue items, and low-stock items. Supports CRUD, check-in/out,
sighting recording, and location tree queries. 12 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:34:05 +01:00
Christopher Mühl
d56eb2874b feat: data layer, algorithms, and barcode parser with full test suite
- IndexedDB data layer: db.ts, items.ts, locations.ts, sightings.ts, labels.ts
- Pure algorithms: confidence decay, custody state transitions
- Barcode parser: HTTPS URI, haus:// scheme, raw ID parsing
- 150 tests all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:32:56 +01:00
Christopher Mühl
b0a1ae214b chore: add vitest infrastructure and agent definitions
Set up vitest with jsdom, fake-indexeddb, @testing-library/svelte,
$app mock modules, and agent definitions for test-writer/implementer/reviewer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 15:22:19 +01:00
Christopher Mühl
3d246c00ec chore: scaffold SvelteKit project with Capacitor and Tailwind
- SvelteKit 2 (Svelte 5) with TypeScript, static adapter (SPA mode)
- Capacitor config for iOS/Android (so.toph.solidhaus)
- Tailwind CSS v4 via Vite plugin
- All dependencies: idb, nanoid, bwip-js, jspdf, Automerge, Solid
- Route stubs: dashboard, scan, items, locations, labels, settings
- Type definitions and ID generator utility
- Project specification and ontology files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 14:50:10 +01:00