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
| Rule | Why |
|---|---|
Write to /tmp first β never FUSE path directly | FUSE silently truncates large writes |
Use /tmp/hvac-git β never git -C <FUSE_path> | FUSE git config unreadable |
| Strip null bytes before hashing | Edit/Write tools append null bytes on FUSE |
| Remove ALL unused TypeScript vars before commit | TS6133 = Pages build failure (happened twice on this portal) |
App.tsx at src/App.tsx β not src/components/App.tsx | TS2307 on Pages build (happened on first commit) |
| Parent = last PUSHED SHA β hardcode it | Intermediate 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)
| Error | Root Cause | Fix |
|---|---|---|
| TS2307: Cannot find module './context/AppContext' | App.tsx was at src/components/App.tsx β should be src/App.tsx | Moved in commit d74afba |
| TS6133: 'estByStatus' declared but never read | Variable computed, never used in ReportsView | Removed in commit d74afba |
| TS6133: 'estimates' declared but never read | Destructuring still included estimates after estByStatus removed | Removed in commit 823037d |
| Pages deploy fails: "dist " not found | Output directory has trailing space in Pages settings | Fix manually in Cloudflare Pages dashboard |
Where Things Live
| Item | Path |
|---|---|
| Project root | E:\Claude_Projects\sonan-trackers\hvac-portal\ |
| Worker env | procomfort in wrangler.toml |
| D1 ID | 4d63378c-fad7-4e9c-bc05-14d9dce00bf8 |
| Latest commit | 823037d4ef422b5761c86c6ce06e5aec71d4d45d |
| Maintenance Plans view | src/components/admin/MaintenancePlansView.tsx β unique to HVAC |
| Service Requests view | src/components/admin/ServiceRequestsView.tsx β NewβReviewedβScheduledβResolved |