{% extends "base.html" %} {% block content %}
{# Add some overall padding for the page content area #}
{# Card container #}

# Changelog

{# Added bottom border to heading #} {# Container for the actual changelog entries with prose styling #}

Updates and changes to the site will be documented here, with the most recent changes listed first.

## April 24, 2025

- Added Workout Program Management:

- Created new database tables (`workout_program`, `program_session`, `person_program_assignment`).
- Added a new section under `/programs/` to create, view, and list workout program templates.
- Program creation allows defining multiple sessions, each with a name and a list of selected exercises.
- The system automatically finds or creates non-person-specific tags based on the selected exercises for each session.
- Added functionality to delete programs from the list view.
- Implemented HTMX for dynamic loading of the program view page from the list page.
- Integrated `tail.select` for searchable exercise dropdowns in the program creation form.

## April 19, 2025

- Refactored tag management functionality:

- Moved tag-related routes (`add_tag`, `delete_tag`, `goto_tag`) from `app.py` to a new blueprint `routes/tags.py`.
- Changed `add_tag` endpoint to use `POST` and `delete_tag` to use `DELETE`.
- Updated `add_tag` and `delete_tag` to return the updated `tags.html` partial via HTMX swap.
- Wrapped the inclusion of `tags.html` in `dashboard.html` and `person_overview.html` with `div#container` for correct HTMX targeting.

## April 15, 2025

- Replaced Plotly graph generation in SQL Explorer with direct SVG rendering:

- Updated `plot_query` and `plot_unsaved_query` endpoints in `routes/sql_explorer.py` to fetch raw data.
- Added `prepare_svg_plot_data` function in `utils.py` to process data and determine plot type (scatter, line, bar, or table fallback).
- Created `templates/partials/sql_explorer/svg_plot.html` template to render SVG plots with axes and basic tooltips.
- Removes the need for Plotly library for SQL Explorer plots, reducing dependencies and potentially improving load times.

## April 13, 2025

- Added a dismissible exercise progress graph to the workout page:

- Added a graph icon next to each exercise name in the topset list (`templates/partials/topset.html`).
- Clicking the icon loads the exercise progress graph inline using HTMX (`hx-get`, `hx-target`).
- Added a dismiss button (cross icon) to the loaded graph area.
- Implemented hyperscript (`_`) logic to show the dismiss button when the graph loads and clear the graph/hide the button when clicked.

## April 12, 2025

- Added functionality to export data from the Settings page:

- Export all workout set data as a CSV file.
- Export full database schema (CREATE statements) and data (INSERT statements) as an SQL script.

## April 5, 2025

- Added experimental feature to SQL Explorer to generate SQL queries from natural language using the Gemini REST API. Requires `GEMINI_API_KEY` environment variable, set Gemni model via GEMINI_MODEL environment variable

## March 31, 2025

- Refactored endpoint listing/searching functionality into its own blueprint (`routes/endpoints.py` with `/endpoints` prefix).
- Updated relevant `url_for` calls in templates to use the new `endpoints.` prefix.

## March 31, 2025

- Refactored SQL Explorer functionality into its own blueprint (`routes/sql_explorer.py` with `/sql` prefix).
- Moved SQL Explorer logic from `features/sql_explorer.py` into the blueprint for better encapsulation.
- Updated relevant `url_for` calls in templates to use the new `sql_explorer.` prefix.

## March 31, 2025

- Refactored workout functionality (create/delete/edit workouts, topsets, tags) into its own blueprint (`routes/workout.py`).
- Moved workout view model logic from `features/workout.py` into the `routes/workout.py` blueprint.
- Updated relevant `url_for` calls in templates to use the new `workout.` prefix.

## March 31, 2025

- Fixed `AttributeError` in calendar year view caused by passing a date string instead of a date object to the template.

## March 31, 2025

- Refactored notes functionality (viewing/editing workout notes) into its own blueprint (`routes/notes.py`).
- Moved notes-specific database logic from `db.py` into the `routes/notes.py` blueprint for better encapsulation.

## March 30, 2025

- Refactored the calendar view and logic into its own blueprint (`routes/calendar.py`).
- Cleaned up calendar code, removing the `Calendar` class and `pandas` dependency.
- Fixed various bugs related to the calendar refactoring (circular imports, HTMX checks, `url_for` build errors, date comparisons).

{# Increased margin for HR #}

## March 30, 2025

{# Reduced margin-bottom for H2 #}

{# Added space between list items #}
- Added the initial changelog page.
- Fixed a minor styling issue on the dashboard.
- Improved visual styling of the changelog page itself.
{# Added an entry for this change #}
- Refactored the calendar view and logic into its own blueprint (`routes/calendar.py`).

{# Add more entries below, following the pattern above #}
{% endblock %}