What's New
- Compact Mode: A new compact display mode reduces spacing and scales UI elements across the main search screen, results, tools, and settings for smaller screens.
- Expanded Compound Metadata: Compound results now include richer structural data from PubChem, including Atom Number and Bond Number, with support for additional structural metrics in the data layer.
- Settings Backup & Restore: You can now export app settings to JSON and import them later for easier migration and recovery.
- Network Diagnostics: A new diagnostics tool in Debug settings can test PubChem, Wikipedia, GitHub Releases, Gemini, and Groq endpoints with latency/status reporting.
Improvements & Fixes
- Search and result layouts have been tightened up for compact mode with better spacing, padding, icon sizing, and typography scaling.
- SearchCard and related UI components have been refined for denser layouts and more consistent presentation.
- Chemical formulas now render more cleanly with smarter subscript formatting.
- The Molar Mass Calculator and Reaction Balancer now use cursor-aware text editing for smoother input handling.
- Fixed cursor moving to left after inputting symbols by clicking buttons in tools like reaction balancer & molar mass calculator.
- Formula and synonym interactions are more convenient with improved tap-to-copy behavior and clearer formula actions.
- Tools UI has been polished with category pills, clearer labels, better keyboard dismissal behavior, and formula explanation cards in calculation tools.
- Percentage composition output handles edge cases more cleanly, including near-total values displaying as 100%.
Technical Changes
- Introduced LocalCompactMode as a shared composition local to drive responsive layout scaling across the app.
- Expanded ChemUiState and compound property models to support new structural metadata.
- Updated PubChem integration to request CovalentUnitCount and added a record endpoint for richer structure data access.
- Added automatic metadata backfill in ChemViewModel so older cached entries can be refreshed with newly supported structural fields.
- Migrated state collection to collectAsStateWithLifecycle for better lifecycle-aware UI state handling.
- Moved cache work, file I/O, and viewer save operations to Dispatchers.IO for safer background execution.
- Added lifecycle-runtime-compose to support lifecycle-aware Compose state collection.
- Modernized settings architecture with modular settings cards and reload support after importing backups.