- Remove all !important declarations from table cell styles in _index.scss
- Increase selector specificity by changing .location-cell to td.location-cell
- Change .details-cell to td.details-cell, .time-cell to td.time-cell, etc.
- This eliminates the need for !important while maintaining proper cascade order
- Follows CSS best practices for maintainable and readable stylesheets
- Added public/style.css to .gitignore
- Removed style.css from git tracking (git rm --cached)
- Enhanced package.json scripts for better CSS workflow:
- postinstall: Auto-builds CSS on npm install
- build-css:dev: Development build with source maps
- start: Now builds CSS before starting server
- dev: Builds CSS before development mode
- Updated README with CSS development documentation
- Explains SCSS organization and build process
- Documents all CSS-related npm scripts
Benefits:
✅ Cleaner repository (no generated files)
✅ Prevents merge conflicts in generated CSS
✅ Automatic CSS generation on new machine setup
✅ Source of truth is SCSS files only
✅ Consistent build process across environments
- Created src/scss/pages/_privacy.scss with all privacy page styles
- Moved all inline styles from privacy.html to proper CSS classes
- Replaced inline style attributes with semantic CSS classes:
- privacy-header__title-wrapper for header positioning
- privacy-header__title-content for centered title content
- privacy-header__theme-toggle for theme toggle button
- Maintained all existing functionality and styling
- Improved maintainability and consistency with SCSS architecture
- All styles now use CSS variables for theme compatibility
- Resolved conflicts in admin.html to keep CSS optimization changes
- Regenerated package-lock.json after merge
- All features from both branches are now integrated
- Add async initialize() method for reliable initialization waiting
- Add static create() factory method for easy async creation
- Add initialization state tracking with isInitialized flag
- Add warning system for methods called before full initialization
- Update server.js to use proper async initialization pattern
- Maintain backward compatibility with constructor-only usage
- Add accessibility improvement for reduced motion preferences in CSS
Fixes the race condition issue where consumers relied on arbitrary
timeouts instead of properly waiting for async initialization to complete.
- Add comprehensive no-op fallback profanity filter with all required methods
- Prevent runtime errors when profanity filter initialization fails
- Add startup logging to clearly indicate profanity filter status
- Include _isFallback property for monitoring and debugging
- Ensure all routes continue to function even with fallback filter
- Maintain security awareness with clear warning messages
- Create public/utils.js with shared frontend utility functions
- Extract parseUTCDate, getTimeAgo, getTimeRemaining, getRemainingClass to utils.js
- Remove duplicate functions from admin.js, app-mapbox.js, app-google.js, and app.js
- Add utils.js script import to index.html and admin.html
- Add comprehensive JSDoc documentation for all utility functions
- Ensure consistent UTC timestamp parsing across all frontend scripts
This addresses Copilot AI feedback about function duplication across multiple frontend scripts.
Now all timestamp and time calculation logic is centralized in one maintainable module.
Benefits:
- Single source of truth for time-related utilities
- Easier maintenance and updates
- Consistent behavior across all frontend components
- Better code organization and documentation
- Reduced bundle size through deduplication
- Add proper error handling to prevent undefined profanityFilter from being passed to routes
- Implement fallback no-op profanity filter strategy when initialization fails
- Add validation check before setupRoutes() to ensure profanityFilter is defined
- Provide clear error messages and security warnings when fallback is used
- Update graceful shutdown to safely handle both real and fallback profanity filters
Fallback profanity filter:
- Allows all content to pass through (security risk but prevents crash)
- Provides proper method signatures for API compatibility
- Logs prominent security warnings about disabled filtering
- Returns appropriate error messages for admin operations
This prevents runtime errors while maintaining service availability, with clear warnings about the security implications.
- Add parseUTCDate helper function to handle timestamp UTC parsing consistently
- Eliminates code duplication across getTimeAgo, getTimeRemaining, and expiry functions
- Applied to admin.js, app-mapbox.js, app-google.js, and app.js
- Ensures consistent UTC timezone handling throughout all frontend JavaScript
- Addresses Copilot AI feedback for better code maintainability and DRY principles
The parseUTCDate function handles the logic:
timestamp.includes('T') ? timestamp : timestamp + 'Z'
This ensures all timestamp parsing uses the same UTC interpretation logic.
- Use :not(.back-link) selector to exclude back button from general link styling
- Add more specific CSS selectors for back-link to increase specificity
- Use both .privacy-content .back-link and a.back-link selectors
- Ensure white text color overrides the blue link color from general rules
- Prevent general link styling from interfering with button appearance
- Remove conflicting .back-link CSS rule that used undefined variables
- Consolidate all back-link styling into single comprehensive rule
- Add all necessary properties with !important to override conflicts
- Include display, margin, padding, border-radius for proper button appearance
- Ensure white text color on blue background for proper contrast
- Add font-weight and transition for better visual presentation
- Change back-link text color from blue to white for readability
- Remove text-decoration underline for cleaner button appearance
- Ensure white text shows clearly on blue button background
- Maintain white text color on hover for consistency
- Improve accessibility with proper color contrast ratio
- Add explicit link styling with proper color variables for readability
- Use !important declarations to override any conflicting inline styles
- Style all links in privacy-content and contact-info sections
- Add font-weight: 500 for better link visibility
- Fix back-link button with proper primary color styling
- Add CSS variables for primary colors in both light and dark themes
- Ensure links maintain proper contrast in both theme modes
- Change flexbox layout to relative positioning for header container
- Position theme toggle as absolute overlay in top-right corner
- Keep title and subtitle centered without interference from theme button
- Effective date now properly aligns with centered title text
- Theme toggle no longer displaces header text horizontally
- Add proper flexbox styling for .header-content to space items correctly
- Style .header-text with flex: 1 to take available space on left
- Position theme toggle button on the right side of header row
- Add responsive mobile layout that stacks header vertically
- Center header text and theme toggle on mobile devices
- Maintain proper spacing and visual hierarchy at all screen sizes
- Increase all typography scale by 2px for improved accessibility
- xs: 10px → 12px, sm: 12px → 14px, md: 14px → 16px
- lg: 16px → 18px, xl: 18px → 20px, xxl: 24px → 28px
- Set base body font-size to medium (16px) for default text
- All form inputs, buttons, tables, and content now more readable
- Maintains responsive design but with larger, more accessible text
- Increase footer font size from small to medium for better readability
- Ensure all footer text is properly centered including disclaimer
- Add explicit text-align: center and display: block for disclaimer small text
- Maintain responsive design with smaller font on mobile but still readable
- Update mobile disclaimer font size to small instead of extra small
- Add card styling to map-section with proper spacing and visual hierarchy
- Add reports-header with flexbox layout for title and view toggle buttons
- Add styling for view-toggle buttons, map-info, and table-controls
- Create shared footer component with consistent styling across pages
- Add footer to admin.html and privacy.html for consistency
- Add missing CSS variables for links, secondary text, and font-size-xs
- Ensure footer uses proper theme colors for light/dark modes
- Restore visual box around Current Reports section on main page
## Critical CSS Fixes
- ✅ Added missing index page styles (_index.scss) for main application
- ✅ Restored original CSS variables and color scheme compatibility
- ✅ Added comprehensive reports-table styles with proper cell formatting
- ✅ Fixed theme variables to match original design (updated colors)
- ✅ Added missing form, button, and layout components
## Enhanced Styles
- ✅ Proper table cell styling (.location-cell, .details-cell, .time-cell, .remaining-cell)
- ✅ Status indicators for urgent/warning/normal time remaining
- ✅ Enhanced responsive design for mobile tables
- ✅ Form and input styling consistency
- ✅ Theme toggle and header components
- ✅ Error/success message styling
## Architecture Improvements
- ✅ Modular imports: admin styles + index styles + shared components
- ✅ Better CSS variable organization with light/dark theme support
- ✅ Maintained backward compatibility with existing classes
- ✅ Compressed CSS output for production performance
The application now has full styling coverage with the new SCSS architecture.
## Major CSS/SCSS Improvements
- ✅ Set up modular SCSS architecture with variables, mixins, and components
- ✅ Created organized directory structure: src/scss/ with variables, mixins, pages/
- ✅ Removed ~300+ lines of inline CSS from admin.html
- ✅ Added comprehensive design system with consistent spacing, colors, typography
- ✅ Created reusable mixins for buttons, cards, tables, forms, and layouts
- ✅ Implemented responsive breakpoint mixins for mobile/tablet/desktop
- ✅ Added utility classes for common layouts and spacing
## Build System
- ✅ Added sass and concurrently as dev dependencies
- ✅ Created npm scripts: build-css, watch-css, dev-with-css
- ✅ Automated SCSS compilation to compressed CSS
- ✅ Set up development workflow with CSS watching
## Admin Panel Enhancements
- ✅ Added complete tab navigation system (Location Reports + Profanity Filter)
- ✅ Integrated profanity management UI with forms and tables
- ✅ Consistent styling across all components using SCSS mixins
- ✅ Improved responsive design for mobile devices
## Benefits
- 🎯 Maintainable: All styles centralized in modular SCSS files
- 📱 Responsive: Better mobile experience with consistent breakpoints
- 🎨 Consistent: Design system ensures visual consistency
- ⚡ Efficient: Compressed CSS output, no inline styles
- 🔧 Developer-friendly: Easy to extend and modify styles
The application now has professional-grade CSS architecture that's easy to maintain and extend.
- Updated clone commands to use correct repository name
- Fixed deployment directory paths to /opt/ice
- Updated systemctl service names to 'ice' from 'great-lakes-ice-report'
- Ensures documentation matches actual repository structure
- Fixed getTimeAgo(), getTimeRemaining(), and getRemainingClass() functions
- Database stores UTC timestamps but frontend was treating them as local time
- Added logic to append 'Z' to timestamps without timezone info to force UTC interpretation
- Now properly shows 48-hour countdown instead of incorrect 52-hour or 28-hour values
- Affects both main app (app-mapbox.js) and admin panel (admin.js)
- Updated getTimeRemaining() function to use 48 hours instead of 24 hours
- Updated getRemainingClass() function to calculate remaining time based on 48 hours
- Frontend now matches backend 48-hour expiration policy
- Time remaining display will now show up to ~47h instead of ~23h for new reports
- Corrected API endpoint URLs from /api/admin/profanity/words to /api/admin/profanity-words
- Fixed profanity test endpoint from /api/admin/profanity/test to /api/admin/test-profanity
- Updated data handling to match actual API response format
- Fixed profanity test results display to match API analysis structure
- All CRUD operations for profanity words now working correctly
- Added tab-based admin interface with separate Profanity Filter tab
- Implemented custom word management (add/delete words with severity levels)
- Added profanity filter testing interface for real-time validation
- Integrated with profanity database API endpoints
- Added comprehensive CSS styling for new UI components
- Full admin interface for managing custom profanity words and categories
- Create dedicated ProfanityFilter class with isolated SQLite database
- Separate profanity.db from main application database to prevent SQLITE_MISUSE errors
- Add comprehensive custom word management (CRUD operations)
- Implement advanced profanity detection with leetspeak and pattern matching
- Add admin UI for managing custom profanity words
- Add extensive test suites for both profanity filter and API routes
- Update server.js to use isolated profanity filter
- Add proper database initialization and cleanup methods
- Support in-memory databases for testing
Breaking changes:
- Profanity filter now uses separate database file
- Updated admin API endpoints for profanity management
- Enhanced profanity detection capabilities
- Add dark mode overrides for table cell text colors to ensure visibility
- Remove Google Maps API key exposure from /api/config endpoint (security fix)
- Update privacy policy to clarify international server hosting
- Switch from CDN resources to local files for better control
- Add SCSS build system for future styling improvements
Applied the exact same selector pattern as admin table:
- .reports-table th, .reports-table td { color: var(--text-color); }
This ensures both header and data cells explicitly inherit the correct
text color variable, matching the admin table behavior exactly.
Should resolve the white text visibility issue in dark mode.
Updated reports table to use the same robust styling as admin table:
✅ Added:
- border-radius: 8px and overflow: hidden for rounded corners
- box-shadow: 0 2px 4px var(--shadow) for elevation
- color: var(--text-color) on table element for inheritance
- Consistent border styling with 1px borders
- font-weight: bold for headers (matching admin)
✅ Improved:
- Better dark mode support with proper color inheritance
- Consistent visual appearance between admin and public tables
- Removed duplicate box-shadow from table-container
- Simplified header borders (removed 2px, sticky positioning complexity)
Both tables now share the same visual design language and dark mode behavior.
The admin table was working correctly because it explicitly sets 'color: var(--text-color)'
on all table cells, but the main reports table (Table View on homepage) was missing this.
Added 'color: var(--text-color)' to '.reports-table td' to ensure all table cells
use the proper text color in both light and dark modes.
This fixes the gray-on-gray readability issue in the details table view.