Skip to content

refactor!: modernize architecture, resolve logging conflicts and standardize i18n#85

Open
void0x14 wants to merge 6 commits intoaleiepure:mainfrom
void0x14:main
Open

refactor!: modernize architecture, resolve logging conflicts and standardize i18n#85
void0x14 wants to merge 6 commits intoaleiepure:mainfrom
void0x14:main

Conversation

@void0x14
Copy link

@void0x14 void0x14 commented Jan 17, 2026

Overview

This PR introduces critical structural improvements to resolve namespace conflicts and standardize the codebase for future development. The primary focus is on resolving library shadowing issues and establishing English as the primary development language.

Detailed Changes

1. Fix: Logging Namespace Conflict

The local directory src/logging was shadowing the standard Python logging library. This caused ImportError exceptions when external dependencies attempted to access the standard library's LogRecord class.

  • Action: Renamed the local module to app_logging.
  • Result: Restored full compatibility with the Python standard library and third-party packages.

2. Codebase Standardization

To facilitate broader contribution, the entire codebase (comments, variable names, and docstrings) has been refactored to English. This eliminates language barriers for new contributors and aligns with open-source best practices.

3. Documentation Improvements

Added docs/DEVELOPER_GUIDE.md which documents:

  • Application architecture (GTK4 + Libadwaita + SQLite).
  • Virtualization logic in ContentGridView (Widget recycling patterns).
  • Signal flow and navigation requirements.

4. Security & Persistence

  • Audited LocalProvider.py to ensure all SQL queries utilize parameterized inputs, enhancing security against injection attacks.
  • Verified database migrations for schema integrity.

5. Performance: Memory Leak Prevention

  • Implemented Widget Recycling pattern in ContentGridView to prevent memory accumulation when scrolling through 1000+ items.
  • Added proper signal disconnection in _on_factory_unbind() to avoid handler accumulation.
  • Introduced chunked loading (_add_models_chunk) to keep UI responsive during large data loads.

Testing

  • Verified successful build against org.gnome.Platform runtime version 49.
  • Validated core functionalities: Database persistence, navigation flow, and dashboard mode.

Note to maintainers: This is my first contribution to the project (and my first ever OSS PR! 🎉). I've done my best to align with the project's architecture, but I'm open to any feedback or style corrections needed to get this merged.

Waiting for your review.

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