You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent Locations & Favorites: Added a recent locations history (max 3 slots) with duplicate prevention, and the ability to mark a city as a favorite (p key) to pin it with a [FAV] symbol.
Persistent Preferences: Automatically saves and restores your unit preference (°C/°F), favorite city, and search history to ~/.config/WeatherTUI/config.json via a new ConfigManager.
Smart Startup Loading: Automatically resolves and loads weather metrics for your favorite city upon launch, falling back to your most recent search.
Interactive Modal Keybindings: Added a comprehensive keybindings legend overlay toggled via ? (dismissible via ?, Esc, or q), styled using Lip Gloss placement primitives.
Enhanced Navigation & Panel Switching:
Implemented panel switching via Tab with active border styling.
Added Vim-style (j/k) row navigation for the 14-day forecast table and recent locations list.
Added manual refresh and cache bypass via the r key.
Atmospheric Telemetry & Dynamic Styling:
Added wind direction parsing with degree-to-compass conversion using ASCII arrows ($\uparrow, \nearrow, \rightarrow, \searrow, \downarrow, \swarrow, \leftarrow, \nwarrow$).
Implemented color-coded threat thresholds for UV index, relative humidity, and wind speed indicators.
Added dynamic temperature styling (<0°C blue, 0–15°C cyan, 15–25°C green, 25–30°C orange, >=30°C red) applied to current metrics and the forecast table.
Responsive Design Guards: Added an early guard condition to render a fallback message ("Terminal screen too small. Please resize.") if the terminal dimensions drop below 80x20.
Bug Fixes & Improvements
Geocoding & Caching: Persisted the resolved geocoded city name (City, Country) inside the cached WeatherResponse object so subsequent cache hits return the formatted name instead of raw user input. Clean search terms are saved to history rather than the formatted API name to prevent re-fetching failures.
Refined Esc Handling: Updated Esc behavior in main.go to blur the text input and switch focus back to the forecast panel when inside the search panel, preserving application exit functionality when the search panel is inactive.
UI Status Bar: Displayed the explicit Ctrl+C exit shortcut alongside the Esc unfocus hint in the search panel status bar.
Project Structure & Refactoring
Modular Architecture: Extracted Lipgloss model, view, and update UI logic from main.go into the internal/ui/ package.
Style Isolation: Moved Lipgloss style and color definitions to internal/ui/styles.go.
Helper Utilities: Extracted temperature unit conversion, directional degree calculation, and dynamic threshold style resolvers into internal/ui/helpers.go.