From e44e1ffb8a33acee79247c64c5a0b295b85aee0c Mon Sep 17 00:00:00 2001 From: Docker Config Backup Date: Tue, 29 Jul 2025 14:35:46 +0200 Subject: [PATCH] Auto-save: Updated components/timeshift-spreadsheet.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-saved at 2025-07-29 14:35:46 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- PM2-QUICK-REFERENCE.md | 103 +++++++++++++++++++++++++++ components/timeshift-spreadsheet.tsx | 6 ++ logs/auto-commit.log | 4 ++ logs/auto-commit.out.log | 4 ++ 4 files changed, 117 insertions(+) create mode 100644 PM2-QUICK-REFERENCE.md diff --git a/PM2-QUICK-REFERENCE.md b/PM2-QUICK-REFERENCE.md new file mode 100644 index 0000000..c720765 --- /dev/null +++ b/PM2-QUICK-REFERENCE.md @@ -0,0 +1,103 @@ +# PM2 Auto-Commit Service - Quick Reference + +## ✅ Service Status: RUNNING +The auto-commit watcher is now running as a PM2 background service! + +## 🚀 Quick Commands + +### Service Management +```bash +# Check service status +npm run pm2:status + +# View auto-commit logs +npm run services:logs + +# Stop auto-commit service +npm run services:stop + +# Start auto-commit service +npm run services:start + +# Restart auto-commit service +./start-services.sh restart +``` + +### Manual Operations +```bash +# Save changes immediately +npm run save "Your message" + +# Create restore point +npm run restore-point "Before big changes" + +# List restore points +./auto-commit.sh list +``` + +## 📊 Monitoring + +### Real-time Monitoring +```bash +# PM2 monitoring dashboard +npm run pm2:monit + +# Live log streaming +pm2 logs timeshift-auto-commit +``` + +### Log Files +- **Output**: `/home/klas/timeshift/logs/auto-commit.out.log` +- **Errors**: `/home/klas/timeshift/logs/auto-commit.error.log` +- **Combined**: `/home/klas/timeshift/logs/auto-commit.log` + +## ⚙️ How It Works + +1. **File Watching**: Monitors `components/`, `app/`, `lib/` directories +2. **Smart Delay**: Waits 30 seconds after last change +3. **Auto-Commit**: Creates timestamped git commits +4. **Rate Limiting**: Max 10 commits per hour +5. **Restore Points**: Creates backup branches every 30 minutes + +## 🛡️ Backup & Recovery + +### Automatic Backups +- ✅ Auto-commits every 30 seconds when files change +- ✅ Restore points every 30 minutes +- ✅ Session restore point on startup + +### Manual Recovery +```bash +# See all restore points +./auto-commit.sh list + +# Restore to specific point +git checkout restore-point-20250729-142449 + +# Go back to main +git checkout main + +# See recent auto-commits +git log --oneline -10 +``` + +## 🔧 Process Info +- **Service Name**: `timeshift-auto-commit` +- **Process ID**: Check with `npm run pm2:status` +- **Auto-restart**: Yes (if crashes) +- **Max Memory**: 200MB limit +- **Log Rotation**: Managed by PM2 + +## 🎯 Benefits Achieved + +✅ **No more lost work** - Changes saved every 30 seconds +✅ **Claude restart proof** - Survives session restarts +✅ **Background operation** - Runs independently +✅ **Auto-recovery** - PM2 restarts if crashes +✅ **Full monitoring** - Logs and status tracking +✅ **Easy management** - Simple npm commands + +--- + +**🎉 Success**: Your work is now automatically protected! +The service is running in the background and will continue even if Claude restarts. \ No newline at end of file diff --git a/components/timeshift-spreadsheet.tsx b/components/timeshift-spreadsheet.tsx index dc0f6b3..78fa856 100644 --- a/components/timeshift-spreadsheet.tsx +++ b/components/timeshift-spreadsheet.tsx @@ -240,6 +240,12 @@ export function TimeshiftSpreadsheet({ teamId, teamName }: TimeshiftSpreadsheetP // Generate styles for day/night shifts based on the Excel pattern const styles: Record = {} if (selectedMonth && selectedYear) { + // Make first row (row 1) taller - 97px + for (let col = 0; col < (data[0]?.length || 0); col++) { + const colLetter = getExcelColumnName(col) + styles[`${colLetter}1`] = "height: 97px;" + } + // Make day names row (row 2) taller for (let col = 0; col < (data[0]?.length || 0); col++) { const colLetter = getExcelColumnName(col) diff --git a/logs/auto-commit.log b/logs/auto-commit.log index a24c6a3..12823ce 100644 --- a/logs/auto-commit.log +++ b/logs/auto-commit.log @@ -26,3 +26,7 @@ 2025-07-29 14:30:38 +02:00: 📝 File changed: components/test-component.tsx (change) 2025-07-29 14:31:08 +02:00: 🔄 Performing auto-commit... 2025-07-29 14:31:08 +02:00: ✅ Auto-commit successful +2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) +2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) +2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) +2025-07-29 14:35:46 +02:00: 🔄 Performing auto-commit... diff --git a/logs/auto-commit.out.log b/logs/auto-commit.out.log index 95f641f..9bc6e95 100644 --- a/logs/auto-commit.out.log +++ b/logs/auto-commit.out.log @@ -24,3 +24,7 @@ 2025-07-29 14:30:38 +02:00: 📝 File changed: components/test-component.tsx (change) 2025-07-29 14:31:08 +02:00: 🔄 Performing auto-commit... 2025-07-29 14:31:08 +02:00: ✅ Auto-commit successful +2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) +2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) +2025-07-29 14:35:16 +02:00: 📝 File changed: components/timeshift-spreadsheet.tsx (change) +2025-07-29 14:35:46 +02:00: 🔄 Performing auto-commit...