Last updated: 2026-07-12

πŸ€–
AI Session Handoff β€” ProComfort HVAC Portal

Read before making any changes. Note the build error history below β€” same mistakes cause Pages failures again.

Critical Rules

RuleWhy
Write to /tmp first β€” never FUSE path directlyFUSE silently truncates large writes
Use /tmp/hvac-git β€” never git -C <FUSE_path>FUSE git config unreadable
Strip null bytes before hashingEdit/Write tools append null bytes on FUSE
Remove ALL unused TypeScript vars before commitTS6133 = Pages build failure (happened twice on this portal)
App.tsx at src/App.tsx β€” not src/components/App.tsxTS2307 on Pages build (happened on first commit)
Parent = last PUSHED SHA β€” hardcode itIntermediate commit as parent = GitHub push rejection
Every new portal repo first push: delete lock, rewrite config, add remote, then push.git/config is always corrupted on FUSE (reads as spaces) and a .git/config.lock is left behind β€” run: del .git\config.lock β†’ echo [core] > .git\config && echo repositoryformatversion = 0 >> .git\config && echo filemode = false >> .git\config && echo bare = false >> .git\config β†’ git remote add origin <url> β†’ git push origin <sha>:refs/heads/main

Build Error History (Resolved)

ErrorRoot CauseFix
TS2307: Cannot find module './context/AppContext'App.tsx was at src/components/App.tsx β€” should be src/App.tsxMoved in commit d74afba
TS6133: 'estByStatus' declared but never readVariable computed, never used in ReportsViewRemoved in commit d74afba
TS6133: 'estimates' declared but never readDestructuring still included estimates after estByStatus removedRemoved in commit 823037d
Pages deploy fails: "dist " not foundOutput directory has trailing space in Pages settingsFix manually in Cloudflare Pages dashboard

Where Things Live

ItemPath
Project rootE:\Claude_Projects\sonan-trackers\hvac-portal\
Worker envprocomfort in wrangler.toml
D1 ID4d63378c-fad7-4e9c-bc05-14d9dce00bf8
Latest commit823037d4ef422b5761c86c6ce06e5aec71d4d45d
Maintenance Plans viewsrc/components/admin/MaintenancePlansView.tsx β€” unique to HVAC
Service Requests viewsrc/components/admin/ServiceRequestsView.tsx — New→Reviewed→Scheduled→Resolved