Repository navigation
feat(web): group completed journal tasks in a collapsed Completed section - #562
Merged
Merged
Conversation
…tion On today and future days, Completed rows (subtasks included) move into a "Completed · N" group under the open work, collapsed by default. A subtask group is split by row and both halves keep the parent's header, whose progress covers the whole group. Past days show everything. The collapsed state is stored in localStorage and written only on toggle. Header description ids are scoped per section so they stay unique. When a completed row leaves the list, focus falls back to the group 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
done/totalcounter in the card header still counts hidden rows.Details
useCompletedCollapsedhook stores the choice in localStorage (taskflow_journal_completed_collapsed_v1), written only from the toggle, never on mount.todo-ctx-open-N,todo-ctx-done-N) so they stay unique when a parent's header appears in both sections.Tests
TodosSection.completed-group.test.tsx(12 tests): default collapsed, counts, expand and persist, no write before toggle, past day, subtask split, header in both places, unique ids, fully done group.TodosSection.*files that assume completed rows are visible now start with the group expanded. Three assertions changed meaning: manual order with completed rows last, the completion-day sort, and the subtask header (now rendered twice).npm run type-check,npm run lintand the full vitest suite (2,310 tests) pass.