feat(work): undo an acceptance inside the server-owned window

Open
#137 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
github, rust, typescript

Research direction

Start with the design matrix at plans/261202-0003-client-bootstrap/design-feature-matrix.md and the plan at plans/261202-0806-keep-all-design-features/plan.md; inspect the inbox preview string in packages/app-core/src/screens/inbox/messages.ts. Trace dependencies #111 and #135 and the upstream revert route before estimating the implementation. Done requires a real route wired on web/PWA and desktop behind the capability, focused tests for the listed recovery cases, and staging verification once the route exists.

Written by the indexing model from the issue text.

Description

enhancement

Design: boards 08 and 09, row W08 (undo acceptance, 2 min). Split from #124, which keeps undo send, because the two halves have different upstream owners, lanes and kill switches.

Invariant: the server owns the acceptance window. Undo is a server-side revert inside the window and one logical decision. The client never delays the acceptance and never computes the window.

Acceptance criteria

  • The inbox and task rows show the server's remaining window. Revert calls the typed revert operation with an idempotency key; a double click or a second device gives one revert.
  • Started effects. If the acceptance already started an agent run or another side effect, the server lists those effects. The UI shows them and says which are stopped and which cannot be undone. If the server says a revert is no longer possible, the UI says so and offers no revert.
  • After the window closes, the control disappears, and the server would refuse anyway.
  • Fixtures. The existing preview string "Undo · 2 min (demo)" (packages/app-core/src/screens/inbox/messages.ts:47) moves under this issue's id and is removed from the coarse inbox demo.
  • Tests. Window expiry during the click, offline (no undo offline), a double undo, another device, and an unknown outcome that reconciles before any retry.
  • Wired, not fixtures. This issue closes only on a slice wired to the real route it depends on, behind its dark capability id (or its local switch for a client-only feature), and verified on staging once the route exists. A fixture-backed screen satisfies none of the boxes above.

Capability

Client id undo-accept; server group work, child entry for the revert window from an upstream item (tracked privately).

Denied, pending and recovery states

Denied: the window has expired, or the person no longer has authority. Pending: the revert is in flight. Recovery: an unknown outcome reconciles first.

Parity

Surface Evidence
Gateway API/RPC Acceptance revert window (upstream, tracked privately)
CLI Per an upstream item (tracked privately); team task commands an upstream item (tracked privately)
MCP Per an upstream item (tracked privately)
CCP / RGD / ACP CCP task view shows the same state
Dewee client Inbox, tasks board, task detail on web/PWA and desktop
Conversation The room sees "acceptance undone"; started effects are reported to the requester only
Docs docs/UX.md
Traces Revert traced with the original acceptance

Dependencies

An upstream item (tracked privately), #111, #135. Work lane (features/work/**, screens/{inbox,tasks}/**).

Rules for this issue

  • The owner kept this feature on 2026-12-02 (DECISIONS.md D23, recorded by the keep-all docs PR #132). Design rows and states are in plans/261202-0003-client-bootstrap/design-feature-matrix.md. The plan is plans/261202-0806-keep-all-design-features/plan.md.
  • Done means wired. This issue closes only with a slice wired to the real route it depends on: the relay route through the web BFF and the desktop host command, or, for a client-only feature, the real native or browser path. The slice runs behind its dark capability id and is verified on staging once the route exists. Fixtures are for tests only. A fixture-backed screen never closes this issue and is never listed in plans/EVIDENCE.md. Until the route merges, the feature renders its gated or dark state.
  • One relay integrator. Only the relay-integrator lane adds ClientMethod entries to CLIENT_METHODS in packages/core/src/protocol.ts, one route at a time in merge order, together with the BFF allowlist entry and the desktop host command. A feature lane does not edit protocol.ts or capabilities.ts. The desktop host's shared files (lib.rs, capabilities/default.json, Cargo.toml, Cargo.lock, build.rs, apps/desktop/src/desktop-session.ts) have one owner at a time, in the order the plan names; a lane puts its commands in its own module and adds only a registration line.
  • Ships dark. The client id below resolves from the server's capability read through the capability map (#135). A feature without both renders its gated or dark state, never sample data presented as real. Where the route belongs to a domain that still awaits server-side relay parity, its relay child flag stays off until that domain's upstream parity work lands (tracked privately).
  • Both hosts. Web/PWA and desktop, en/vi, light/dark, 390/768/1024/1440, keyboard-only.
  • Checks. Typecheck, Biome and focused tests. Tests cover flag off, denied, pending, revocation and recovery.
  • Review. An independent review runs before the PR leaves draft. No auto-merge.
Dominant language
No language data
Stars
1
Forks
2
Avg merge
1h 51m
Merged PRs (30d)
103

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextlevelbuilder/dewee-desktop-app

All issues in nextlevelbuilder/dewee-desktop-app

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.