|
60 | 60 | - **Commit**: `276b42d` - "fix: Admin button not appearing on initial login" |
61 | 61 | - **Verification**: ✅ Admin and logout buttons appear immediately on initial login |
62 | 62 |
|
| 63 | +**✅ Smart Auto-Scroll for Long Introductions - FIXED** (December 21, 2025) [Issue #1]: |
| 64 | +- **Status**: Fixed long game introductions scrolling away and becoming unrecoverable ✅ |
| 65 | +- **GitHub Issue**: https://github.com/skeptomai/gruesome/issues/1 |
| 66 | +- **Symptom**: Enchanter's long intro scrolls away, cannot be retrieved by scrolling up |
| 67 | +- **Root Cause**: Terminal output forced scroll to bottom on every output update |
| 68 | + - `gameOutput.scrollTop = gameOutput.scrollHeight` forced scrolling regardless of user position |
| 69 | + - Standard terminal emulators only auto-scroll when user is already at bottom |
| 70 | + - Prevented users from reading earlier content during long output sequences |
| 71 | +- **Solution**: Implemented smart auto-scroll with standard terminal emulator behavior |
| 72 | + - Added `isScrolledToBottom(element, threshold)` helper to detect user scroll position |
| 73 | + - Added `smartScrollToBottom(element)` wrapper for conditional scrolling |
| 74 | + - Only auto-scrolls when user is within 50px of bottom |
| 75 | + - Preserves scroll position if user has scrolled up to read earlier content |
| 76 | +- **Implementation Details**: |
| 77 | + ```javascript |
| 78 | + function isScrolledToBottom(element, threshold = 50) { |
| 79 | + if (!element) return false; |
| 80 | + const scrollBottom = element.scrollHeight - element.scrollTop - element.clientHeight; |
| 81 | + return scrollBottom < threshold; |
| 82 | + } |
| 83 | + |
| 84 | + function smartScrollToBottom(element) { |
| 85 | + if (!element) return; |
| 86 | + if (isScrolledToBottom(element)) { |
| 87 | + element.scrollTop = element.scrollHeight; |
| 88 | + } |
| 89 | + } |
| 90 | + ``` |
| 91 | +- **Files Modified**: `frontend/app.js` (runUntilInput, handleGameInput) |
| 92 | +- **Deployment**: |
| 93 | + - ✅ Tested on staging: https://staging.gruesome.skeptomai.com |
| 94 | + - ✅ Deployed to production: https://gruesome.skeptomai.com |
| 95 | + - ✅ Cache invalidation: Both staging and production CloudFront distributions |
| 96 | +- **Commits**: |
| 97 | + - `6bb2327` - "fix: Implement smart auto-scroll for long introductions (Issue #1)" |
| 98 | +- **GitHub Issue**: ✅ Closed with detailed explanation and verification |
| 99 | +- **Verification**: ✅ Enchanter intro readable, scroll position preserved during long output |
| 100 | + |
63 | 101 | **✅ Admin Panel Backend & DynamoDB Schema Compatibility - FIXED** (December 20, 2025): |
64 | 102 | - **Status**: Complete admin Lambda backend implemented with schema compatibility fixes ✅ |
65 | 103 | - **Symptom**: Admin panel showed no games despite 7 games existing in DynamoDB |
|
0 commit comments