Skip to content

Refactor: clean, secure, scalable codebase#3

Merged
phillsatellite merged 1 commit into
mainfrom
refactor/clean-secure-scalable
Mar 4, 2026
Merged

Refactor: clean, secure, scalable codebase#3
phillsatellite merged 1 commit into
mainfrom
refactor/clean-secure-scalable

Conversation

@phillsatellite

@phillsatellite phillsatellite commented Mar 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Consolidated 17 scattered icon components into a single Icons.jsx registry
  • Extracted useEscapeKey hook and fixed timer memory leaks in OutputBox/ExportModal
  • Split 481-line SettingsModal into AccountTab, FormatsTab, AboutTab sub-components
  • Added ErrorBoundary wrapping the app for graceful error handling
  • Centralized localStorage keys in constants.js to eliminate magic strings
  • Cleared Google Drive access token on sign-out (security fix)
  • Added input validation to openai.js, exportFile.js, googleDrive.js
  • Added Firebase env var validation with soft console warning
  • Consolidated hardcoded CSS colors/sizes into custom properties (--color-error, --color-success, --overlay-bg, --modal-z, --icon-btn-size)
  • Added sidebar auto-collapse on window resize below 768px
  • Fixed outdated privacy text referencing browser storage instead of Firebase

Test plan

  • npm run build succeeds
  • All 71 Cypress tests pass
  • Verify modals open/close with Escape key
  • Verify sidebar collapses on window resize below 768px
  • Verify sign-out clears Google Drive token

- Consolidate 17 icon components into Icons.jsx (from 5+ scattered files)
- Extract useEscapeKey hook to eliminate duplicate modal escape handlers
- Split SettingsModal (481 lines) into AccountTab, FormatsTab, AboutTab
- Add ErrorBoundary wrapping the app in main.jsx
- Extract localStorage key constants to constants.js
- Fix timer memory leaks in OutputBox and ExportModal (useRef + cleanup)
- Clear Google Drive access token on sign-out
- Add input validation to openai.js, exportFile.js, googleDrive.js
- Add Firebase env var validation with soft console.error
- Consolidate hardcoded CSS values into custom properties
- Add sidebar auto-collapse on window resize below 768px
- Fix outdated privacy text in AboutTab
@phillsatellite phillsatellite merged commit f00a05f into main Mar 4, 2026
1 check passed
@phillsatellite phillsatellite deleted the refactor/clean-secure-scalable branch March 4, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant