xetup/.claude/memory/project_xetup_state.md
X9 Dev caaa917a00 memory: rewrite project_xetup_state to current state (2026-06-03)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 16:45:06 +02:00

72 lines
4 KiB
Markdown

---
name: Xetup project state as of 2026-06-03
description: Current state of the xetup Windows deployment project - what it is, architecture, status, what is shipped vs open
type: project
---
## What xetup is
Automated Windows 10/11 setup for X9.cz MSP clients - replaces hours of manual
prep on a new machine with a single signed binary the technician runs on-site as
Administrator. ~20 machines/month, various clients. `xetup.exe` is the SOLE entry
point (no CLI script entry point - do NOT create Deploy-Windows.ps1).
Detailed architecture, conventions and per-step notes live in `CLAUDE.md` and
`SPEC.md` - this file is the high-level current-state snapshot.
## Architecture (as built)
- **Go GUI launcher** (`xetup.exe`) - single binary, embeds `scripts/` + `assets/`
via `embed.go`. Extracts to temp, loads config, runs PS scripts sequentially,
handles reboot-resume cycles, sends an HTML email report (SMTP2Go) at the end.
- **GUI is Walk** (Windows-only, CGO required) - NOT a charmbracelet TUI (that was
an early-planning idea that did not ship). Cross-compiled with mingw:
`CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64`.
- Three GUI phases: config form -> live log -> summary with reboot countdown.
- **Steps with sub-features**: GUI checkboxes map to `config.features[step][feature]`
(missing key defaults to true). Step is enabled if >=1 of its features is checked.
- **Reboot-resume**: steps exit code 9 = "reboot required"; runner persists state,
sets autologon for `adminx9` + an `X9-Resume` scheduled task, reboots, resumes.
Steps 09 (pcIdentity on rename) and 12 (windowsUpdate) can trigger it.
## Current scripts (step order)
```
00 admin-account (adminx9, no password, hidden, FullName "X9.cz s.r.o.")
08 activation (OA3 -> config key -> GVLK)
01 bloatware (AppX + Capabilities + Optional Features; feature-gated)
02 software (parallel winget + Adobe PDF default + Atera under SYSTEM)
03 system-registry (HKLM tweaks, Edge policies, OneDrive, powercfg)
04 default-profile (NTUSER.DAT + HKCU + personalization, merged into one hive load)
07 backinfo (BackInfo.exe + startup shortcut)
10 network (Private profile, ping, Network Discovery)
11 dell-update (Dell Command | Update, auto-skip on non-Dell)
09 pc-identity (rename PC + C:\X9 folder, exit 9 on rename)
12 windows-update (PSWindowsUpdate reboot cycle, exit 9)
```
Note: old 05-personalization / 06-scheduled-tasks / 07-desktop-info no longer
exist (personalization merged into 04; DesktopInfo replaced by BackInfo).
## Infra / web (live)
- **Forgejo** at git.xetup.x9.cz (container `xetup-forgejo`, v9.0.3) - git + issues +
Actions CI. Runner: `xetup-runner`. Navbar logo customized to a xetup.x9.cz
back-link (see `deploy/forgejo/`).
- **Static site** at xetup.x9.cz (container `xetup-web`, nginx) - bind-mounts
`/opt/xetup/web` directly, so editing `web/**` is LIVE immediately (no deploy step).
Pages: landing, spec (from `web/data/descriptions.json`), changelog (renders
`CHANGELOG.md` via Forgejo raw API).
- **CI release** (`.forgejo/workflows/release.yml`): builds, signs (Azure Trusted
Signing), publishes `xetup.exe`. Push to `main` touching code/scripts -> rolling
`latest`. Version `vX.Y` releases are triggered by `workflow_dispatch` on the tag
ref (the `paths` filter blocks docs-only tag pushes). Signing SP is shared across
X9 projects - do NOT rotate.
## Status (2026-06-03)
- **Released: v0.9** - bloatware feature toggles (Outlook/Snipping/standard now
independently toggleable; Snipping kept by default), `keepPackages` runtime bug
fixed. See `project_v0.9_release.md` for detail.
- CI, signing, web, changelog page all working.
## Open / next
- v0.9 + `latest` NOT yet smoke-tested on real Windows - recommend VM test
(snapshot -> run -> revert) before client deployment.
- Complete winget SW list still TODO (config list may be incomplete).
- Hard rules (from CLAUDE.md): keep Calculator; do not remove OneDrive policy-block;
do not remove RDP/RDS; no diacritics anywhere; no `$ErrorActionPreference=Stop`.