diff --git a/CHANGELOG.md b/CHANGELOG.md index 03c194f..3b5f8d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.20.12] - 2026-04-19 + +### Fixed +- Tasks: active filters are now correctly re-applied when navigating away from and back to the Tasks tab. Previously the filter chip appeared active but all tasks were shown, because the initial data fetch in `render()` always called `/tasks` without query parameters, ignoring the persisted `state.filters`. Fixed by building the filter query in `render()` the same way `loadTasks()` does, so the first fetch already respects the current filter state (closes #49) + ## [0.20.11] - 2026-04-19 ### Fixed diff --git a/package.json b/package.json index a23e25c..33fc617 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oikos", - "version": "0.20.11", + "version": "0.20.12", "description": "Self-hosted family planner - calendar, tasks, shopping, meal planning, budget and more. Private, open-source, no subscription.", "main": "server/index.js", "type": "module", diff --git a/public/pages/tasks.js b/public/pages/tasks.js index e76c08b..ad7f73c 100644 --- a/public/pages/tasks.js +++ b/public/pages/tasks.js @@ -1163,10 +1163,16 @@ export async function render(container, { user }) { if (window.lucide) window.lucide.createIcons(); - // Daten laden + // Daten laden (Filter-State aus vorheriger Session berücksichtigen) try { + const params = new URLSearchParams(); + if (state.filters.status) params.set('status', state.filters.status); + if (state.filters.priority) params.set('priority', state.filters.priority); + if (state.filters.assigned_to) params.set('assigned_to', state.filters.assigned_to); + const query = params.toString() ? `?${params}` : ''; + const [tasksData, metaData] = await Promise.all([ - api.get('/tasks'), + api.get(`/tasks${query}`), api.get('/tasks/meta/options'), ]); state.tasks = tasksData.data ?? [];