docs(06-01): complete desktop Tauri scaffold plan

This commit is contained in:
2026-06-25 10:17:22 +02:00
parent d944aaa5a0
commit f41e673dd5
4 changed files with 182 additions and 18 deletions
+4 -4
View File
@@ -81,8 +81,8 @@ Requirements for initial release. Each maps to roadmap phases.
### Desktop-Client
- [ ] **DESK-01**: Tauri-basierter Desktop-Wrapper fuer Windows und Linux
- [ ] **DESK-02**: Desktop-App verbindet sich mit dem Web-Backend (kein eigenstaendiger Server)
- [x] **DESK-01**: Tauri-basierter Desktop-Wrapper fuer Windows und Linux
- [x] **DESK-02**: Desktop-App verbindet sich mit dem Web-Backend (kein eigenstaendiger Server)
## v2 Requirements
@@ -167,8 +167,8 @@ Which phases cover which requirements. Updated during roadmap creation.
| INFRA-02 | Phase 1 | Complete |
| INFRA-03 | Phase 1 | Complete |
| INFRA-04 | Phase 6 | Pending |
| DESK-01 | Phase 6 | Pending |
| DESK-02 | Phase 6 | Pending |
| DESK-01 | Phase 6 | Complete |
| DESK-02 | Phase 6 | Complete |
**Coverage:**
+2 -2
View File
@@ -201,7 +201,7 @@ Decimal phases appear between their surrounding integers in numeric order.
**Wave 1** *(parallel — disjoint files)*
- [ ] 06-01-PLAN.md -- Desktop foundation: Tauri toolchain, apps/desktop scaffold, URL-loading WebView + first-run server URL setup (DESK-01/02)
- [x] 06-01-PLAN.md -- Desktop foundation: Tauri toolchain, apps/desktop scaffold, URL-loading WebView + first-run server URL setup (DESK-01/02)
- [ ] 06-03-PLAN.md -- CI/CD: Gitea remote, act_runner, multi-stage Gitea Actions pipeline (lint+type-check -> tests -> docker build+deploy) (INFRA-04)
**Wave 2** *(blocked on 06-01)*
@@ -220,4 +220,4 @@ Phases execute in numeric order: 1 -> 2 -> 3 -> 4 -> 5 -> 6
| 3. Module System & Domaincheck | 3/4 | In Progress| |
| 4. Marketplace & Portal Navigation | 0/4 | Not started | - |
| 5. Dashboard & Calendar | 5/5 | Complete | 2026-06-24 |
| 6. Desktop Client & CI/CD | 0/3 | Not started | - |
| 6. Desktop Client & CI/CD | 1/3 | In Progress| |
+16 -12
View File
@@ -3,14 +3,14 @@ gsd_state_version: 1.0
milestone: v1.0
milestone_name: milestone
status: executing
stopped_at: Phase 6 context gathered
last_updated: "2026-06-25T07:27:16.235Z"
last_activity: 2026-06-24 -- Calendar backend complete (Plan 03)
stopped_at: Completed 06-01-PLAN.md
last_updated: "2026-06-25T08:17:06.237Z"
last_activity: 2026-06-25 -- Phase 06 execution started
progress:
total_phases: 6
completed_phases: 4
total_plans: 21
completed_plans: 20
total_plans: 24
completed_plans: 21
percent: 67
---
@@ -21,14 +21,14 @@ progress:
See: .planning/PROJECT.md (updated 2026-06-18)
**Core value:** Eine zentrale Plattform, in der beliebige Workflow-Tools als Module lizenziert, aktiviert und genutzt werden koennen -- ohne zwischen verschiedenen Anwendungen wechseln zu muessen.
**Current focus:** Phase 05 — dashboard-calendar
**Current focus:** Phase 06 — desktop-client-ci-cd
## Current Position
Phase: 05 (dashboard-calendar) — EXECUTING
Plan: 5 of 5
Phase: 06 (desktop-client-ci-cd) — EXECUTING
Plan: 2 of 3
Status: Ready to execute
Last activity: 2026-06-24 -- Calendar backend complete (Plan 03)
Last activity: 2026-06-25 -- Phase 06 execution started
Progress: [████████░░] 86%
@@ -58,6 +58,7 @@ Progress: [████████░░] 86%
| Phase 05-dashboard-calendar P02 | 4min | 4 tasks | 16 files |
| Phase 05-dashboard-calendar P03 | 11min | 4 tasks | 14 files |
| Phase 05-dashboard-calendar PP04 | 5min | 2 tasks | 11 files |
| Phase 06-desktop-client-ci-cd P01 | 5min | 2 tasks | 13 files |
## Accumulated Context
@@ -88,6 +89,9 @@ Recent decisions affecting current work:
- [Phase ?]: Optimistic UI for calendar visibility toggle — reverts on API error
- [Phase ?]: Auto-run testSource after adding new calendar source for immediate feedback
- [Phase ?]: URL constructor for client-side https-only validation (T-05-14)
- [Phase ?]: StoreExt trait import required for app.store() in Tauri 2.x
- [Phase ?]: frontendDist=../src local page, navigate() for runtime URL override
- [Phase ?]: CSP connect-src wildcard for configurable server URL (D-02)
### Pending Todos
@@ -107,6 +111,6 @@ Items acknowledged and carried forward from previous milestone close:
## Session Continuity
Last session: 2026-06-25T06:35:35.760Z
Stopped at: Phase 6 context gathered
Resume file: .planning/phases/06-desktop-client-ci-cd/06-CONTEXT.md
Last session: 2026-06-25T08:17:06.230Z
Stopped at: Completed 06-01-PLAN.md
Resume file: None
@@ -0,0 +1,160 @@
---
phase: 06-desktop-client-ci-cd
plan: 01
subsystem: desktop
tags: [tauri, rust, webview, desktop-wrapper, tauri-plugin-store, oklch]
requires:
- phase: 01-foundation-portal-shell
provides: OKLCH design tokens for consistent dark mode styling
provides:
- "apps/desktop Tauri 2.x project as @tessera/desktop in pnpm workspace"
- "Rust entry point with tauri-plugin-store and server URL navigation"
- "First-run setup page (setup.html) with URL validation and persistence"
- "Capabilities config with core:default and store:default permissions"
affects: [06-02-desktop-native-polish]
tech-stack:
added: [tauri@2.11.3, "@tauri-apps/cli@2.11.3", "@tauri-apps/api@2.11.1", "@tauri-apps/plugin-store@2.4.3", tauri-plugin-store@2, rust@1.96.0]
patterns: [tauri-url-loading-wrapper, first-run-setup-page, tauri-plugin-store-persistence]
key-files:
created:
- apps/desktop/package.json
- apps/desktop/src-tauri/Cargo.toml
- apps/desktop/src-tauri/tauri.conf.json
- apps/desktop/src-tauri/build.rs
- apps/desktop/src-tauri/src/main.rs
- apps/desktop/src-tauri/src/lib.rs
- apps/desktop/src-tauri/capabilities/default.json
- apps/desktop/src/setup.html
- apps/desktop/src-tauri/icons/icon.png
- apps/desktop/src-tauri/icons/icon.ico
- apps/desktop/src-tauri/icons/128x128.png
modified:
- .gitignore
- pnpm-lock.yaml
key-decisions:
- "StoreExt trait import required for app.store() in Tauri 2.x (not auto-imported)"
- "Placeholder icons (gold 32x32 PNG/ICO) for build compatibility until proper branding in 06-02"
- "CSP allows connect-src * for configurable server URL (D-02 requirement)"
- "HTTP warning on non-localhost (T-06-01 mitigation) but allowed for internal LAN"
- "frontendDist set to ../src (local setup page directory) not a hardcoded URL"
patterns-established:
- "Tauri URL-loading wrapper: frontendDist points to local page, navigate() redirects to server"
- "First-run setup: validate URL constructor, persist to store, navigate on save"
- "Cargo target/ added to root .gitignore for Rust build artifacts"
requirements-completed: [DESK-01, DESK-02]
duration: 5min
completed: 2026-06-25
---
# Phase 06 Plan 01: Desktop Tauri Scaffold Summary
**Tauri 2.x desktop wrapper scaffolded as @tessera/desktop with URL-loading shell and first-run server URL configuration page**
## Performance
- **Duration:** 5 min
- **Started:** 2026-06-25T08:08:44Z
- **Completed:** 2026-06-25T08:14:41Z
- **Tasks:** 2 (of 3; Task 1 checkpoint completed by user)
- **Files modified:** 13
## Accomplishments
- Scaffolded apps/desktop as a Tauri 2.x project registered in the pnpm workspace as @tessera/desktop
- Implemented Rust entry point (lib.rs) that reads stored server_url and navigates WebView on startup
- Created first-run setup page with URL validation (URL constructor), HTTP warning for non-localhost, persistence via tauri-plugin-store, and German UI strings
- Configured tauri.conf.json with local frontendDist (no bundled frontend), 1280x800 centered window, and permissive CSP for configurable server
## Task Commits
Each task was committed atomically:
1. **Task 1: Install Tauri toolchain prerequisites** - completed by user (checkpoint)
2. **Task 2: Scaffold apps/desktop Tauri project** - `48e3a69` (feat)
3. **Task 3: First-run setup page** - `d944aaa` (feat)
## Files Created/Modified
- `apps/desktop/package.json` - @tessera/desktop package with Tauri CLI and plugin-store dependencies
- `apps/desktop/src-tauri/Cargo.toml` - Rust crate with tauri, tauri-plugin-store, serde dependencies
- `apps/desktop/src-tauri/tauri.conf.json` - Window config, frontendDist=../src, CSP, bundle targets
- `apps/desktop/src-tauri/build.rs` - Standard tauri_build::build() entry
- `apps/desktop/src-tauri/src/main.rs` - Binary entry calling lib::run()
- `apps/desktop/src-tauri/src/lib.rs` - Plugin registration, store read, navigate-to-server-URL logic
- `apps/desktop/src-tauri/capabilities/default.json` - core:default + store:default permissions
- `apps/desktop/src/setup.html` - First-run server URL form with validation and persistence
- `apps/desktop/src-tauri/icons/icon.png` - Placeholder 32x32 gold icon
- `apps/desktop/src-tauri/icons/icon.ico` - Placeholder 32x32 gold icon (Windows)
- `apps/desktop/src-tauri/icons/128x128.png` - Placeholder 128x128 gold icon
- `.gitignore` - Added target/ for Cargo build artifacts
- `pnpm-lock.yaml` - Updated with @tessera/desktop dependencies
## Decisions Made
- **StoreExt trait import:** Tauri 2.x requires explicit `use tauri_plugin_store::StoreExt` for `app.store()` method -- not auto-imported via Manager trait
- **Placeholder icons:** Generated minimal gold PNG/ICO files matching primary OKLCH color so cargo check and tauri build pass; proper branding icons planned for 06-02
- **CSP connect-src wildcard:** Required by D-02 (configurable server URL) -- cannot lock to single domain
- **HTTP allowed with warning:** Non-HTTPS non-localhost URLs show a warning but are permitted for internal LAN servers (T-06-01 mitigation)
## Deviations from Plan
### Auto-fixed Issues
**1. [Rule 3 - Blocking] Added StoreExt trait import**
- **Found during:** Task 2 (cargo check)
- **Issue:** `app.store()` method requires `tauri_plugin_store::StoreExt` trait in scope
- **Fix:** Added `use tauri_plugin_store::StoreExt;` to lib.rs
- **Files modified:** apps/desktop/src-tauri/src/lib.rs
- **Verification:** cargo check passes
- **Committed in:** 48e3a69
**2. [Rule 3 - Blocking] Generated placeholder icons for build compatibility**
- **Found during:** Task 2 (cargo check failed: "failed to open icon")
- **Issue:** tauri.conf.json references icons/icon.png and icons/icon.ico which did not exist
- **Fix:** Generated minimal 32x32 and 128x128 PNG + 32x32 ICO placeholder icons
- **Files modified:** apps/desktop/src-tauri/icons/icon.png, icon.ico, 128x128.png
- **Verification:** cargo check passes without icon errors
- **Committed in:** 48e3a69
**3. [Rule 2 - Missing Critical] Added Cargo target/ to .gitignore**
- **Found during:** Task 2 (post cargo check, target/ dir created)
- **Issue:** Cargo build artifacts not in .gitignore, would be committed accidentally
- **Fix:** Added `target/` line to root .gitignore
- **Files modified:** .gitignore
- **Verification:** git status does not show target/ as untracked
- **Committed in:** 48e3a69
---
**Total deviations:** 3 auto-fixed (1 missing critical, 2 blocking)
**Impact on plan:** All auto-fixes necessary for build correctness. No scope creep.
## Issues Encountered
- Rust toolchain was not in PATH despite checkpoint completion status -- rustup was present but env not sourced. Resolved by running `curl rustup installer` which detected existing settings and installed stable 1.96.0.
## User Setup Required
None - no external service configuration required.
## Next Phase Readiness
- apps/desktop is ready for 06-02 (native polish: tray icon, close-to-tray, window state, autostart, notifications)
- Placeholder icons must be replaced with proper Tessera branding in 06-02
- tauri-plugin-notification, tauri-plugin-autostart, tauri-plugin-window-state to be added in 06-02
- Capabilities default.json to be extended with additional plugin permissions in 06-02
## Self-Check: PASSED
All 11 created files verified present on disk. Both task commits (48e3a69, d944aaa) confirmed in git log.
---
*Phase: 06-desktop-client-ci-cd*
*Completed: 2026-06-25*