Skip to content

[feature]: Cmd+Z does not undo a property change, only text #307

Closed

Description

@Tanzeelsameen

Current status, September 22

Implementation is open in #479 by @abdul-rahman-0x. Changes are still requested for two overlapping edits when the later edit succeeds before the earlier edit fails: undo must restore the last saved value, not the failed optimistic value. Keep this issue open until the regression and fresh CI pass.

Original requirements

What is painful today

Orbit is fast enough that a property gets changed by accident. Press s, the status menu opens, an arrow key and Enter land on the wrong row, and the issue is now Done. Or the wrong issue is selected in a list and an assignee is set on it.

At that point Cmd+Z is the reflex, and nothing happens. Undo exists inside every text surface, so the reflex is trained: it works in the issue description, in the issue title, and in the comment composer, because TipTap and the browser handle it there. It is only property changes that have no undo, which is the least obvious place for the gap to be.

Recovering means remembering what the value was before. The activity feed records the change, so the old value is on screen, but putting it back is a manual round trip through the same menu that just went wrong. On a keyboard first product this is the one place the keyboard cannot get you out of what the keyboard got you into.

Reproduced on the seeded demo workspace, on main at 0c0b301:

  1. Open /issue/ENG-2, note the status is In Progress.
  2. Click the status property and pick Done.
  3. Click on the page background and press Cmd+Z.
  4. Status is still Done.

Same with estimate, assignee, priority, labels, project and sprint.

What you would like to happen

Cmd+Z undoes the last property change made in this tab, and says so.

The narrow version, which is what I would like to build:

  • A small stack of recent property changes, each holding the issue and the patch that puts it back. Capped at something like 20, and living for the session only, not persisted.
  • Cmd+Z pops the top entry and applies the inverse through the existing useUpdateIssue mutation, so it travels the same server path, the same policy check and the same realtime fan out as the original change. An undo is an ordinary write, not a special case.
  • A toast confirming what was reverted, so undo is visible rather than silent.
  • Cmd+Shift+Z to redo the entry just undone.
  • The binding registers with allowInInput: false so it never competes with TipTap or a native input. Text undo keeps working exactly as it does now, and the two never fight.
  • If the server refuses the inverse write, the entry is dropped and the toast says it could not be undone, rather than leaving the stack out of step with the server.

Deliberately out of scope, unless you want them in: undoing a board drag, undoing a create or a delete, and undoing another person's change. Each of those is a different shape, and a stack that mixes them gets hard to reason about quickly. Property changes alone cover the accident that actually happens.

Which part of Orbit

Issues, lists and boards

How you work around it now

Read the old value off the activity feed and set it back by hand. It works, and it costs about ten seconds and a small amount of trust every time.

Anything else

Happy to build this if the shape sounds right, and happy to adjust it first. Two things I would want your call on before writing code:

  1. Session only, or persisted? I am assuming an in memory stack that dies with the tab. Persisting undo across reloads raises questions about what happens when someone else has changed the issue since, and I would rather not answer those in the first version.
  2. Does undo appear in the activity feed as its own entry, or does it read as a normal change? I lean towards a normal change, because that is what it is on the server, but it does mean the feed shows a change and then a change back with nothing marking the second as an undo.

Context: I opened #306 for some smaller issue property fixes, and found this while checking whether Cmd+Z was broken somewhere. It is not broken anywhere, it just does not exist for actions.

Activity

  1. github-actions commented on Aug 13, 2026

    @github-actions

    Thanks for opening your first issue on Orbit.

    A maintainer will triage this. If it is a bug, the fastest way to move it
    along is exact steps to reproduce starting from the seeded demo workspace,
    since that is what we run locally.

    If you fancy fixing it yourself, CONTRIBUTING.md
    walks through the setup. You need Bun and Docker, and nothing else.

  2. added
    enhancement
    help wanted
    needs design
    p2 medium
    area: web
    area: issues
    size: large
    points: 8
    on Aug 15, 2026
  3. imshashank commented on Aug 23, 2026

    @imshashank
    Contributor

    The narrow shape is approved, with one concurrency requirement before implementation.

    Decisions:

    • Keep the undo history session-only and per browser tab, capped at 20 entries.
    • An undo and redo are normal issue updates and produce normal activity entries and realtime fan-out.
    • Keep the first version to property changes. Board moves, create, delete, title, description, and another person's action stay out of scope.
    • Preserve native and TipTap undo by keeping the binding disabled in editable controls.
    • Clear the redo stack after any new property change following an undo.
    • Store the value written by the forward action as well as the inverse value.

    The safety requirement is server-enforced compare-and-set behavior. Before applying an inverse, the server transaction must verify that the current property still equals the value this tab wrote. A client-cache check alone has a race. If another tab or person changed it, refuse the undo, discard that entry, keep the newer value, and announce that it could not be undone because the issue changed elsewhere.

    Please cover undo, redo, stack cap, redo clearing, input/editor isolation, a refused server write, and a realtime/current-value conflict. If you still want to build it, please proceed with that scope.

  4. added
    ready
    and removed
    needs design
    on Aug 23, 2026
  5. imshashank commented on Sep 6, 2026

    @imshashank
    Contributor

    @Tanzeelsameen the shape was approved on Aug 23 and nothing has landed yet. Are you still planning to build this? If I have not heard by Sep 13 I will drop the ready marker so someone else can pick it up. No pressure either way, I just want the label to be honest.

  6. abdul-rahman-0x commented on Sep 18, 2026

    @abdul-rahman-0x
    Contributor

    Hi @imshashank, since the Sep 13 deadline passed and the ticket remained unassigned, I have implemented this following the approved narrow shape and concurrency requirements in PR #479

    • In-memory session stack capped at 20 entries per browser tab.
    • Native useHotkey bindings for mod+z (undo) and mod+shift+z (redo) configured with allowInInput: false for complete TipTap and text input isolation.
    • Server-enforced Compare-And-Set (CAS) validation inside the Drizzle transaction in packages/core/src/work/issue-service.ts, rejecting any undo if the database state drifted.
    • Toast notifications confirming reverted, restored, and concurrency-conflict property actions.
    • Full test coverage in packages/shared/tests/validators/issue-undo.test.ts, with all unit test suites passing cleanly.

    The PR is open and ready for your review!

  7. added
    work in progress
    and removed
    help wanted
    ready
    on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: issuesarea: webenhancementp2 mediumpoints: 8size: largework in progress

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions