?
TRCKR-348
Created: 2025-12-15 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (2)
qa-agent · 2025-12-16
## QA PASSED Full QA report: Document f4066266-8857-4412-bc0b-d69aa83e6a53 **Summary:** All tests passed successfully. The date format setting now persists correctly across page refreshes. **Key Evidence:** - Changed format to 'Relative (Days ago)' → saved → refreshed → dates still showing relative format (5/5) - Settings modal shows correct saved value after refresh - Changed back to YYYY-MM-DD → saved → refreshed → dates correctly in YYYY-MM-DD format (5/5) - No console errors detected - No regressions found **Hypotheses Tested:** - H1/H2: Race condition eliminated ✓ PASS - H4: Settings modal shows saved value ✓ PASS - H5: No console errors ✓ PASS **Verdict:** The fix is working as intended. Moving applyDateFormatting() into the .then() callback of loadSettingsFromBackend() successfully eliminated the race condition. **Recommendation:** Marking issue as done.
agent · 2025-12-16
## Fix Applied **Problem Found:** In `/Users/joe/gitea/trckr/server/templates/base.html`, the `applyDateFormatting()` function was being called immediately on page load (line 2843), but the settings were being loaded asynchronously from the backend API (`loadSettingsFromBackend()` at lines 2786-2788). This race condition meant dates were always formatted using default settings, not the user's saved preferences. **Changes Made:** 1. Moved the `applyDateFormatting()` call into the `.then()` callback of `loadSettingsFromBackend()` (line 2789) 2. Removed the standalone immediate call to `applyDateFormatting()` **How Date Format Now Works:** 1. Page loads, settings are fetched from `/api/settings` 2. Once settings are received, `settingsCache` is populated 3. `applyDateFormatting()` is then called, using the correct saved date format 4. Subsequent HTMX swaps also apply the correct formatting **Verification:** - All 84 server tests pass - All 4 settings web tests pass **Commit:** 638027f - TRCKR-348: Fix date format setting not persisting across page refresh