memory: rewrite project_xetup_state to current state (2026-06-03)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
X9 Dev 2026-06-03 16:45:06 +02:00
parent d08cfd3e63
commit caaa917a00
2 changed files with 62 additions and 63 deletions

View file

@ -8,7 +8,7 @@
## Project
- [Xetup v0.9 release and CI/ops findings](project_v0.9_release.md) - bloatware toggles, release-via-dispatch, Forgejo UI, pwsh (as of 2026-06-03)
- [Xetup project state](project_xetup_state.md) - Early architecture decisions and planning (as of 2026-04-15, partly superseded)
- [Xetup project state](project_xetup_state.md) - Current high-level snapshot: what it is, architecture, scripts, infra, status (as of 2026-06-03)
- [Technical findings](project_technical_findings.md) - Deep code analysis, UCPD issue, Win11 compatibility, tools research
## Reference

View file

@ -1,73 +1,72 @@
---
name: Xetup project state as of 2026-04-15
description: Current state of the xetup Windows deployment project - architecture decisions, what exists, what's planned
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 ~3 hours of manual work with a single script/tool.
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).
## Current repo structure (cleaned 2026-04-15)
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)
```
xetup/
├── review.html ← interactive review page v2 (with colleague comments)
├── xetup-review.md ← exported review v1 results from colleague
├── xetup-win-setup-spec.md ← original spec from colleague
├── xetup-win-setup-novinky.md ← v2 additions from colleague (taskbar pins, explorer, network, admin desc)
├── W11.pdf ← reference PDF
└── windows-deployment-new/ ← the active codebase
├── Deploy-Windows.ps1 ← master script
├── CLAUDE.md / SPEC.md
├── config/config.json
├── assets/
│ ├── Backinfo/ ← BackInfo.exe + ini + ps1 (ready to use)
│ └── Logo/ ← X9 ico + jpeg (moved here 2026-04-15)
└── scripts/
├── 00-admin-account.ps1
├── 01-bloatware.ps1
├── 02-software.ps1
├── 03-system-registry.ps1
├── 04-default-profile.ps1
├── 05-personalization.ps1
├── 06-scheduled-tasks.ps1
├── 07-desktop-info.ps1 ← TO BE REPLACED by BackInfo
└── 08-activation.ps1
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).
## Key decisions made (2026-04-15 session)
1. **BackInfo wins over custom DesktopInfo** - colleague prefers it (INI config, auto-update, centered text). Our 07-desktop-info.ps1 will be deleted.
2. **OneDrive must NOT be removed** - current code aggressively deletes it, breaks M365. Must fix 03-system-registry.ps1 and 04-default-profile.ps1.
3. **RDP must NOT be removed** - was in SPEC but never implemented (good). Remove from SPEC entirely.
4. **Colleague's spec has priority** over our implementation when they overlap.
5. **adminx9 account: no password** (changed from config-driven password), FullName = "X9.cz s.r.o."
6. **Nextcloud not needed** - assets are in repo, only Atera MSI downloads from web.
7. **Flash2 not integrated** - it's the old version of this tool, just for inspiration.
8. **Atera Agent**: curl from `https://x9.servicedesk.atera.com/api/utils/agent-install/windows/?cid=31&aeid=50b72e7113e54a63ac76b96c54c7e337` then `msiexec /i setup.msi /qn`
## 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.
## Architecture direction (decided 2026-04-15)
- **Go TUI launcher** (xetup.exe) - single binary, embeds PS scripts + assets
- Charmbracelet stack: bubbletea, huh, lipgloss
- Self-update from web (version.json check)
- **Web platform** at xetup.x9.cz:
- Forgejo for git hosting + issues + CI
- Auto-generated documentation from spec.yaml
- Comments via Forgejo Issues API
- Landing page + download + changelog
- Deployment reporting dashboard (later)
- **spec.yaml** as single source of truth for both exe and docs
## 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.
## What needs to happen next
1. Create spec.yaml from all gathered specs + review
2. Initialize Go project structure
3. Fix PS scripts (OneDrive removal, admin password, BackInfo integration)
4. Set up repo (GitHub initially, Forgejo later)
5. First Go build with TUI form
6. CI pipeline (GitHub Actions)
7. Web landing page
## Technical findings from deep analysis
- UCPD kernel driver (since Feb 2024) blocks PDF default association via UserChoice - need to disable UCPD during deployment
- System tray "show all icons" broken in Win11 24H2 - EnableAutoTray=0 ignored
- Edge needs ~15 more policy keys than we currently set
- ConfigureStartPins has new applyOnce property in 24H2
- Current code quality is solid: 3-level registry fallback, proper hive handling with GC+finally
## 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`.