Loaded cached credentials.
[ERROR] [IDEClient] Failed to connect to IDE companion extension in VS Code. Please ensure the extension is running. To install the extension, run /ide install.
1.  Modify `adminCompetitions.php` to add a checkbox for "Allow Time Conversions" in the meet creation/editing form.
2.  Update `admin_actions.php` to handle the new "Allow Time Conversions" value, saving it to the `meets` table when a meet is created or updated.
3.  Create a new helper file, `includes/time_conversion_helper.php`, containing a function `getBestEntryTime()`. This function will encapsulate the entire logic: checking if conversions are allowed for the meet, fetching an athlete's long course and short course personal bests, calculating the converted time based on the meet's course, and returning the faster of the two times.
4.  Create a new AJAX endpoint, `get_best_entry_time.php`. This script will be called from the frontend, use the `getBestEntryTime()` helper function, and return the calculated time as a JSON response.
5.  Modify `enterMeet.php` to add JavaScript that, upon event selection, makes an AJAX call to `get_best_entry_time.php` and dynamically populates the time input field with the fastest calculated time.
6.  Modify `meet_actions.php` to securely process meet entries. It will call the `getBestEntryTime()` helper function on the server side for each entry to ensure the correct, system-calculated time is saved in the database, regardless of the time submitted from the client.
7.  Update `ChangeLog.md` to document the new time conversion feature and move the corresponding task to the "Done" section in `roadmap.md`.
EXECUTER NOTE: Created new helper file `includes/time_conversion_helper.php` with the `getBestEntryTime` function and its helpers `parseEvent` and `convertTime`. The main function handles fetching meet and athlete data, performing time conversions based on meet rules, and returning the most advantageous entry time.
EXECUTER NOTE: Created the new AJAX endpoint `get_best_entry_time.php`. This script takes `meetId`, `athleteId`, `stroke`, `distance`, and `entryTime` as GET parameters, calls the `getBestEntryTime` helper function from `includes/time_conversion_helper.php`, and returns the result as a JSON response. Basic error handling and session validation are included.
