← Back to Pull requests

Archive a project instead of deleting it #96

Closed
unknown closed this pull request without merging on Nov 30, 2026 10:31 UTC
View on GitHub
unknown unknown commented on Nov 30, 2026 09:47 UTC
Author

Fixes #81

What this changes

You can archive a project when its work is done. An archived project keeps its tasks and comments. Delete project does not change.

  • Rule: a project is out of sight when it is archived and has no open task. A backlog task is an open task. When an archived project gets an open task, the project shows again until that task is done.

  • MCP: list_projects does not list a project that is out of sight. It adds one last line, (+N archived). The one of: ... hints also leave out these projects. A lookup by slug or by linked repo still finds an archived project, so create_task with its slug works.

  • API: PATCH /api/projects/{slug} accepts {"archived": true} and {"archived": false}. /api/board sends archived_at for each project. kanzo export does not write archived_at, so the export keeps the same keys.

  • Board: the ⋯ menu of a project with no open task shows Archive. The menu of an archived project shows Restore. Projects that are out of sight go into a closed Archived group under the projects of each board. You cannot drag a project in this group. ⌘1–⌘9 count only the projects in sight. The Chinese text is 「封存」, 「取消封存」, and 「已封存」.

  • Schema: one migration adds projects.archived_at (TEXT). It is NULL for a project in use.

  • README: the Sidebar item in each of the four READMEs tells how to archive and restore a project.
  • Size

    measure.py now adds a project with 13 done tasks and archives it. Thus CI shows the effect on list_projects. Release builds on macOS, 3000 tasks:

    | Measurement | Base | Head |
    | --- | --- | --- |
    | list_projects reply | 83 B | 73 B |
    | Tool list (tools_bytes) | 3855 B | 3855 B |
    | Page | | +3196 B |
    | /api/board | | +75 B |
    | Binary | | +16544 B |

    The other MCP replies have the same size as before.

    Tests

    New tests:

  • src/store.rs: a_new_board_has_no_archived_project, archive_sets_archived_at_and_restore_clears_it, an_archived_project_without_open_tasks_is_out_of_sight, an_archived_project_with_an_open_task_shows_again, an_archived_project_stays_out_of_sight_when_it_gets_a_done_task, find_project_still_finds_an_archived_project, the_hint_tells_an_empty_board_from_one_where_every_project_is_archived

  • src/web.rs: patching_a_project_archives_and_restores_it

  • src/export.rs: an_exported_project_has_no_archived_at
  • Checks by hand

  • Board in Chromium, with real mouse hover, click, and drag: light and dark mode, a 390×844 window, and Chinese. I checked the Archive and Restore steps, and a reload (the group is closed again). I also checked an open task that brings a project back, and drag with the group present. The All view and the project pickers still list every project.

  • MCP over stdio: list_projects with 0, 1, and 2 projects out of sight, create_task in an archived project, and the hint for an unknown slug.

  • A copy of a real board with 15 projects, on Debian 13 x86_64: the migration ran, and each project has archived_at = null. I archived and restored projects on it in a browser.
  • Known limits

  • The server does not check for open tasks. PATCH with {"archived": true} also archives a project that has an open task. That project stays in sight until its open tasks are done. The board shows Archive only for a project with no open task.

  • A shared board on an older Kanzo does not send archived_at. A computer that joined that board does not show Archive or Restore for its projects.

  • If another pull request adds a migration first, the new migration of this pull request must move after it.

  • I did not check Safari, Firefox, touch devices, or a real joined board.
  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass

  • A board change was tried in a browser, in light and dark mode

  • The README says what changed for users, if anything did
  • Diff: 492 lines (+369 / -123) across 6 files Reviewer: emanuele-em Review duration: 43m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 492 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.371
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #96"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.4% (MEDIUM) · Higher = larger blast radius
    47.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%