Skip to content

Give sidebar tasks one active-to-deleted ladder - #989

Merged
AnthonyRonning merged 1 commit into
MaplePrivacyLabs:masterfrom
benthecarman:fix/sidebar-state-transitions
Sep 21, 2026
Merged

AnthonyRonning merged 1 commit into
MaplePrivacyLabs:masterfrom
benthecarman:fix/sidebar-state-transitions

Conversation

@benthecarman

@benthecarman benthecarman commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Agent sidebar treated settle and archive as two unrelated toggles. That let an archived row offer Settle on hover and Unsettle in its menu, gave settled rows a Reopen button whose icon never drew because the undo SVG was not embedded, and left no way to delete a task.

This models the task states as one ladder, active, settled, archived, deleted, owned by the maple-agent runtime.

State lives on the session

  • New AgentTaskState { Active, Settled, Archived } on AgentSessionSummary, replacing the archived: bool. Deleted is not a state; a deleted task is gone.
  • The runtime stores it in Maple's extension record on the goose session and mirrors Archived into goose's own archived_at, which wins when they disagree, so goose listing and the ACP archive path are unchanged.
  • One set_session_state call replaces set_session_archived. It refuses to settle or archive a running task, is a no-op for the current state, and announces each change with SessionUpdated.
  • Starting a run on a settled task makes it active on the runtime, replacing the app's previous wake-on-completion. Goose bumps updated_at on the change, so a reopened task sorts to the top of Active without a separate ordering set.
  • The app's settled_tasks and unsettled_tasks settings fields are removed. Pinned stays an app-side view of active work and drops the moment a task leaves active.

UI

  • Hover button steps one rung forward: Settle, Archive, Delete.
  • Menu reaches every later rung and comes back only to active:
    • Active or pinned: Rename, Pin/Unpin, Settle, Archive, Delete.
    • Settled: Rename, Reopen, Archive, Delete.
    • Archived: Rename, Reopen, Delete.
  • Every menu item closes the menu when chosen.
  • Delete goes through the same confirmation modal as project removal (now a shared ConfirmDialog) and calls the runtime's existing delete_session. On success the row leaves every section and a deleted selection moves to the newest live task in the same project.
  • Embeds undo-2.svg so the Reopen icon renders.

Migration

None. The settled and unsettled lists only ever existed in the unreleased app's local settings file, so there is nothing shipped to migrate. Any such entries already on a dev machine are ignored and those tasks read as active once.

Test plan

  • cargo fmt, workspace clippy with -D warnings, the full maple-agent suite (460 tests), the full maple-gpui suite (344 tests), and the headless acp,proxy build's tests, all inside nix develop.
  • Runtime tests: set_session_state persists, mirrors archived_at, prefers goose's timestamp over a stale Maple record, notifies once per change, and stays quiet on a no-op; a run that starts on a settled task makes it active.
  • App tests: labels per rung, the event every move emits from every starting state and the no-ops, the pin dropping on settle, reopen landing on top of Active once the runtime's record lands, a running settled task showing active, the confirm dialog cancel/accept paths, local cleanup after a delete, and the menu closing after each item.
  • Manually exercised a patched Linux release build of the earlier revision of this branch.

🤖 Generated with Claude Code

The task sidebar treated settle and archive as two unrelated toggles.
That let an archived row offer Settle on hover and Unsettle in its
menu, gave a settled row a Reopen button whose icon never drew because
the undo SVG was not embedded, and left no way to delete a task at all.

Model the states as one ladder: active, settled, archived, deleted. The
runtime owns it as one AgentTaskState per session, kept in Maple's
extension record with archived mirrored into Goose's archived_at so its
own listing and the ACP archive path keep working. One set_session_state
call replaces set_session_archived; a run that starts on a settled task
makes it active. The app no longer keeps settled and unsettled id sets
in its settings file; reopen relies on Goose bumping updated_at to land
a task at the top of Active.

The hover button steps one rung forward. The menu reaches every later
rung and comes back only to active: an active or pinned task can pin,
settle, archive, or delete; a settled task can reopen, archive, or
delete; an archived task can reopen or delete. Pinned is a view of
active work, so leaving active drops the pin. Choosing any menu item
closes the menu.

Deleting goes through the same confirmation modal as project removal,
now a shared dialog, and calls the runtime's existing delete, which
still refuses while the task runs. On success the row leaves every
section and a deleted selection moves to the newest live task in the
same project.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@benthecarman
benthecarman force-pushed the fix/sidebar-state-transitions branch from 9a36c69 to b03b471 Compare September 21, 2026 19:51
@AnthonyRonning
AnthonyRonning merged commit 2c7b5b4 into MaplePrivacyLabs:master Sep 21, 2026
22 checks passed
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.

2 participants