Session History Log + Dark Mode Table Fix#4
Merged
Conversation
… window. Update ROADMAP.md.
…. Notify user in web UI when process dies on the back end. Adapt to multiple process termination scenarios. Update documentation.
…ssion history table dark mode support after merge revert. Re-applied .history-table custom CSS in base.html and updated start_session.html to use it instead of Bootstrap .table class. Table background, text, borders, and hover now properly follow the theme toggle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements persistent session history with a responsive recent-sessions table, CSV export, and history clearing on the start screen. Also fixes the session history table to properly support the Light/Dark theme toggle.
What's New
Session History Log
session_history.jsonas structured JSON records containing: date, start/end time, duration, distance (km/mi), steps, calories, and average speed (km/h and mph).threading.Lock()(_history_lock) to prevent corruption across Flask request threads and the BLE thread.session_history.jsonis handled gracefully — starts fresh with an empty array and logs a warning.Recent Sessions Table
HISTORY_DISPLAY_LIMIT) in a responsive table showing date, time, duration, distance, steps, calories, and average speed..tableclass dependency.CSV Export & Clear History
/export_csvroute generates a downloadablewalkingdad_history.csvcontaining all historical sessions (full history, no limit)./clear_historyPOST endpoint.Bugfixes
Session History Table Dark Mode
--card-color,--text-color,--border-color,--button-hover-bg) so every color — background, borders, hover, text — properly switches with the theme toggle.Files Changed
app.py_build_session_record(),_save_session(),_load_session_history(),_clear_session_history(),_load_full_session_history()functions. Added/end_session,/export_csv,/clear_historyroutes. History loaded inroot(). Shutdown hook calls_save_session(). New constants:HISTORY_FILE,HISTORY_DISPLAY_LIMIT,_history_lock.templates/start_session.html.history-tableclass, Export CSV and Clear buttons, clear history JavaScript handler.templates/active_session.htmltemplates/paused_session.htmltemplates/base.html.history-tablecustom CSS rules with dark mode support..gitignoresession_history.jsonexclusion (already present from prior work).CHANGELOG.mdROADMAP.mdTesting Checklist
session_history.jsoncontains the session after exitsession_history.jsonwhile app running → app handles gracefully, no crash