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 |
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 |