Summary
After updating an organization's log retention via Admin → Organizations → [org] → Retention Period, the read-only display on Settings → Organization (/dashboard/settings/general) continues to show 90 days, even though Admin correctly shows the updated value (e.g. 365 days).
Hard refresh of the Settings page does not fix it. Admin remains accurate.
Environment
- Self-hosted LogTide (Docker / Portainer)
- Org Settings (member UI): read-only retention card
- Admin Organizations detail: editable retention field
Steps to reproduce
- As a platform admin, open Admin → Organizations → [organization].
- Set Retention Period (days) to
365 and save.
- Confirm Admin still shows 365.
- Open Settings → Organization (
/dashboard/settings/general).
- Observe Log Retention Policy still shows 90 days.
- Hard-refresh Settings — value remains 90.
Expected
Settings → Organization should show the same retention as Admin / the database (organizations.retention_days), e.g. 365 days.
Actual
Settings shows 90 days (looks like a default/fallback), while Admin shows the correct 365 days.
Likely cause (from frontend build inspection)
On the Settings general page, retention is rendered from the client org store / cached currentOrganization:
{currentOrg?.retentionDays || 90} days
Admin loads retention via getOrganizationDetails() (fresh API), so it stays correct.
Suspected contributing factors:
|| 90 fallback — if retentionDays is missing/undefined on the cached org object, the UI always displays 90 even when the server has another value.
- Stale
localStorage org cache (currentOrganization) — Settings appears to read the cached org object and does not re-fetch retention when opening the page after an Admin retention update.
Suggested fix
- Re-fetch organization (or at least retention) when opening Settings → Organization, or update the org store after Admin retention save so all views stay in sync.
- Prefer nullish coalescing with an explicit fetch over
retentionDays || 90 so a missing field does not silently look like a policy of 90 days (or show a loading/error state instead).
Impact
Operators believe retention is still 90 days and may “fix” it again or distrust Admin, even though cleanup already uses the Admin/DB value.
Summary
After updating an organization's log retention via Admin → Organizations → [org] → Retention Period, the read-only display on Settings → Organization (
/dashboard/settings/general) continues to show 90 days, even though Admin correctly shows the updated value (e.g. 365 days).Hard refresh of the Settings page does not fix it. Admin remains accurate.
Environment
Steps to reproduce
365and save./dashboard/settings/general).Expected
Settings → Organization should show the same retention as Admin / the database (
organizations.retention_days), e.g. 365 days.Actual
Settings shows 90 days (looks like a default/fallback), while Admin shows the correct 365 days.
Likely cause (from frontend build inspection)
On the Settings general page, retention is rendered from the client org store / cached
currentOrganization:{currentOrg?.retentionDays || 90} daysAdmin loads retention via
getOrganizationDetails()(fresh API), so it stays correct.Suspected contributing factors:
|| 90fallback — ifretentionDaysis missing/undefinedon the cached org object, the UI always displays 90 even when the server has another value.localStorageorg cache (currentOrganization) — Settings appears to read the cached org object and does not re-fetch retention when opening the page after an Admin retention update.Suggested fix
retentionDays || 90so a missing field does not silently look like a policy of 90 days (or show a loading/error state instead).Impact
Operators believe retention is still 90 days and may “fix” it again or distrust Admin, even though cleanup already uses the Admin/DB value.