Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

Addresses all actionable review feedback from PR #57 focusing on i18n quality, input validation, error handling, and browser compatibility.

French Localization

  • Fixed missing accents throughout: Français, Cybersécurité, Générale, préférée, Fréquence, Réinitialiser, etc.
  • Updated config.json, issue templates, email templates, and UI strings

Input Validation & Security

Aggregator (src/aggregator.js)

  • Config loading with actionable error messages on missing/malformed files
  • Email validation (RFC-compliant regex) before sending
  • API key format validation with sanitized error output
  • Deduplication threshold type checking
  • HTML lang attribute validation (ISO 639-1 codes only)

Workflows

  • Email validation with abuse detection (max @ symbol threshold)
  • RSS URL format validation
  • Input sanitization for source names and tags (XSS prevention)
// Before: silent crash on missing config
const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8'));

// After: actionable error
try {
  if (!fs.existsSync(CONFIG_PATH)) {
    console.error(`ERROR: Configuration file not found at ${CONFIG_PATH}`);
    console.error('Please ensure config.json exists in the repository root.');
    process.exit(1);
  }
  // ...
} catch (e) {
  console.error(`ERROR: Failed to load or parse config.json: ${e.message}`);
  process.exit(1);
}

Browser Compatibility

  • localStorage availability checks before all operations
  • Try-catch wrappers with quota overflow recovery
  • IntersectionObserver feature detection with graceful degradation
  • ReadHistory.markRead safety guard against undefined

Rate Limiting & Configuration

  • Email sending rate limit (100ms delay between sends)
  • Configurable sender via EMAIL_FROM env var with dev domain warning
  • Constants extracted for magic numbers (VALID_LANG_CODES, MAX_SOURCE_NAME_LENGTH, etc.)

Security Scan

✅ CodeQL: 0 alerts


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits February 5, 2026 19:12
Co-authored-by: EthanThePhoenix38 <103653068+EthanThePhoenix38@users.noreply.github.com>
Co-authored-by: EthanThePhoenix38 <103653068+EthanThePhoenix38@users.noreply.github.com>
Co-authored-by: EthanThePhoenix38 <103653068+EthanThePhoenix38@users.noreply.github.com>
Co-authored-by: EthanThePhoenix38 <103653068+EthanThePhoenix38@users.noreply.github.com>
Copilot AI changed the title [WIP] Update AI-Pulse news aggregator to configurable version Fix French accents, add validation, error handling, and browser compatibility Feb 5, 2026
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.

2 participants