Skip to content

feat: persist tasks tab view state across navigation - #168

Merged
h4yfans merged 2 commits into
mainfrom
feat/tasks-tab-state-persistence
Apr 6, 2026
Merged

feat: persist tasks tab view state across navigation#168
h4yfans merged 2 commits into
mainfrom
feat/tasks-tab-state-persistence

Conversation

@h4yfans

@h4yfans h4yfans commented Apr 6, 2026

Copy link
Copy Markdown
Collaborator

What

Persist tasks tab view state (active view, internal tab, selected project, detail drawer) when navigating away and back.

Why

Navigating away from the Tasks tab and returning always reset to default view (Today tab, list view, no project, drawer closed). Users lose their place.

How

  • Initialize useState from activeTab.viewState with fallback defaults (restore on mount)
  • Track latest state via ref, dispatch saveTabState() in cleanup effect (save on unmount)
  • Mirrors the existing scroll-position pattern in TabContent
  • Single file change: apps/desktop/src/renderer/src/pages/tasks.tsx

Type

  • feat — new feature

Test plan

  • Manual testing (describe below)
  1. Open Tasks tab → switch to "All" internal tab, select a project, open Kanban view, open a task drawer
  2. Navigate to another tab (Journal, Inbox, etc.)
  3. Navigate back to Tasks tab
  4. Verify: All view, project, Kanban, and drawer state are preserved

Checklist

  • Self-reviewed the diff
  • No hardcoded secrets or credentials
  • Files stay under ~500 LOC
  • Follows immutable data patterns

h4yfans added 2 commits April 7, 2026 01:37
Save activeView, activeInternalTab, selectedProjectId, and detailTaskId
to the tab's viewState on unmount and restore on mount. Mirrors the
existing scroll-position pattern in TabContent.
@h4yfans
h4yfans merged commit 00fd7ea into main Apr 6, 2026
2 checks passed
@h4yfans
h4yfans deleted the feat/tasks-tab-state-persistence branch April 6, 2026 22:50
h4yfans added a commit that referenced this pull request May 6, 2026
feat: persist tasks tab view state across navigation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant