feat(tasks): finished work can be looked at, and is out of the way by default

A task list is what is left to do, so closing something has to take it off the
plan. But "what did I get done" is a real question and the answer was nowhere:
once a task was closed it left the interface entirely.

They come back in one list at the bottom rather than back among the open ones in
their sections. A closed task has stopped being work and started being a record,
and putting the record in the middle of the plan makes the plan longer without
making it say more.

Off by default, and deliberately: a list that opens full of things already done is
a list you have to read past before you can use it.

In localStorage rather than on the account, like the sidebar's width and unlike a
folded group. It is a way of *looking*, not a statement about the work — somebody
reviewing their week wants it on for ten minutes, and a setting that followed them
to every device is one they would have to turn off twice.

`loadTasks` asks for closed tasks when the setting is on, rather than each caller
deciding. A view added later cannot then forget and quietly ignore it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kristian Wind
2026-08-18 09:49:58 +02:00
co-authored by Claude Opus 5
parent 4d8b70918b
commit 626ea9aaec
6 changed files with 182 additions and 10 deletions
+9 -6
View File
@@ -4,6 +4,7 @@
import { app } from '$lib/stores.svelte.js';
import TaskRow from '$lib/components/TaskRow.svelte';
import QuickAdd from '$lib/components/QuickAdd.svelte';
import { t, tag } from '$lib/i18n.svelte.js';
let loaded = $state(false);
@@ -36,16 +37,18 @@
);
let liveToday = $derived(app.tasks.filter((t) => !t.completed && t.due_date === isoToday));
let date = new Date().toLocaleDateString('da-DK', {
weekday: 'long',
day: 'numeric',
month: 'long'
});
let date = $derived(
new Date().toLocaleDateString(tag(), {
weekday: 'long',
day: 'numeric',
month: 'long'
})
);
</script>
<div class="view">
<header>
<h1>I dag</h1>
<h1>{t('nav.today')}</h1>
<p>{date}</p>
</header>