- WitchDrawer is a lightweight Windows file drawer for daily desktop work.
- The primary UI must stay native WPF. Do not replace it with Electron or a WebView shell.
- MVP scope is limited to normal boxes, mapping boxes, and the quick panel.
WitchDrawer.Appowns WPF windows, view models, drag/drop, and hotkey wiring.WitchDrawer.Coreowns models, SQLite persistence, file import rules, search, and safety checks.WitchDrawer.Nativeowns Windows integrations such as Shell open and global hotkeys.- All file mutations must flow through Core services. UI code must not directly move, delete, or rename user files.
- Do not perform file scanning, file moves, SQLite writes, icon extraction, or thumbnail generation on the UI thread.
- Keep file lists virtualized. Avoid large visual trees, real-time blur, oversized shadows, and heavy third-party UI libraries.
- Any new runtime dependency must include a short rationale for startup, memory, and background CPU cost.
- Treat 120Hz as an animation budget: UI-frame work should target an 8.33 ms frame budget.
- Normal boxes move files into
%LocalAppData%\WitchDrawer\Boxes\{BoxId}only after validating the destination path. - Mapping boxes never move, copy, or shortcut source files; they store absolute references only.
- Delete restores stored items to their original locations by default; if the original directory is missing, restore falls back to the desktop. Mapping boxes only remove references.
- File moves must support cross-volume paths (rename on same volume, copy-then-delete otherwise).
- Name conflicts must be resolved by suffixing
(1),(2), etc.
- Changes involving file moves, name conflicts, deletion, SQLite persistence, or search must include focused tests.
dotnet build WitchDrawer.slnanddotnet test WitchDrawer.slnshould pass before handoff.
- The release version is defined in
Directory.Build.props(<Version>). Keep the README version badge and release notes aligned with it. - Before packaging, run
dotnet build WitchDrawer.sln --configuration Releaseanddotnet test WitchDrawer.sln --configuration Release. - Use
tools\Publish-WitchDrawer.ps1 -Version X.Y.Zas the single packaging entry point. It publisheswin-x64self-contained single-file output, embeds native WPF runtime libraries withIncludeNativeLibrariesForSelfExtract=true, creates the portable ZIP, compiles the Inno Setup installer, and writes SHA-256 sidecars. - The script must be able to find Inno Setup 6 under both
Program Filesand%LOCALAPPDATA%\Programs\Inno Setup 6. IfISCC.exeis unavailable, stop the release instead of publishing a portable-only release. - Expected assets under
publish\are:WitchDrawer-Setup-vX.Y.Z-x64.exeWitchDrawer-Setup-vX.Y.Z-x64.exe.sha256WitchDrawer-vX.Y.Z-win-x64.zipWitchDrawer-vX.Y.Z-win-x64.zip.sha256
- Validate the ZIP contents and compare each sidecar with
Get-FileHashbefore uploading. The ZIP must package the complete publish directory; never manually archive onlyWitchDrawer.App.exe, because WPF native dependencies may be emitted beside it. - For a new GitHub release, push the matching
vX.Y.Ztag and upload all four assets. For a packaging-only correction to an existing release, usegh release upload vX.Y.Z ... --clobber, then verify withgh release view vX.Y.Z --json assets,url. - Do not consider a release complete unless GitHub shows both an installable
Setup.exeand a portable ZIP, each with its matching SHA-256 file. Remote release publication is an external write and requires explicit user authorization.