Skip to content

fix(dashboard): stop auto-archiving Done/Cancelled tasks in UI filter#147

Open
mvanhorn wants to merge 1 commit intocft0808:mainfrom
mvanhorn:fix/isarchived-premature-archive-54
Open

fix(dashboard): stop auto-archiving Done/Cancelled tasks in UI filter#147
mvanhorn wants to merge 1 commit intocft0808:mainfrom
mvanhorn:fix/isarchived-premature-archive-54

Conversation

@mvanhorn
Copy link

Summary

  • Changes isArchived() from t.archived || ['Done','Cancelled'].includes(t.state) to !!t.archived in both dashboard/dashboard.html and edict/frontend/src/store.ts
  • Done/Cancelled tasks now stay visible in the active view until the user explicitly archives them via the archive button or "archive all done" batch action
  • This aligns the UI filter with the server-side archival logic in handle_archive_task (which sets t.archived = True as a separate flag from state)

Evidence: Issue #54 reports a task at 20% progress already showing as archived. The isArchived() function was treating all Done/Cancelled tasks as archived, but the "archive all done" button at line 995 proves Done tasks can exist without being archived (!t.archived && ['Done','Cancelled'].includes(t.state)). The server-side handle_archive_task (line 144-166) also treats archival as a separate explicit action from state transitions.

Note: dashboard/dist/assets/index-J5u1Q_A5.js is a pre-built bundle and needs a rebuild (cd edict/frontend && npm run build) to pick up the React source change.

Closes #54

Test plan

  • Create a task, mark it Done via kanban_update.py state JJC-TEST Done "test", verify it stays in "active" filter on the dashboard
  • Click the "archive" button on the task, verify it moves to the "archived" filter
  • Use "archive all done" batch button, verify all Done tasks move to archived
  • Rebuild React frontend: cd edict/frontend && npm run build

The isArchived() function treated all Done/Cancelled tasks as archived,
hiding them from the active view immediately on completion. This caused
tasks with incomplete progress to appear archived prematurely.

Change isArchived() to only check the explicit archived flag, matching
the server-side archival logic. Done tasks now stay visible until the
user explicitly archives them.

Fixed in both dashboard/dashboard.html and edict/frontend/src/store.ts.
Note: dashboard/dist/ needs a rebuild (npm run build) to pick up the
React source change.

Closes cft0808#54

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

任务执行进度 20%,但是任务状态已归档

1 participant