Skip to content

fix(tui): preserve legacy editor undo - #3929

Merged
M4n5ter merged 1 commit into
apache:mainfrom
me2seeks:fix/3928-legacy-side-undo
Aug 27, 2026
Merged

fix(tui): preserve legacy editor undo#3929
M4n5ter merged 1 commit into
apache:mainfrom
me2seeks:fix/3928-legacy-side-undo

Conversation

@me2seeks

Copy link
Copy Markdown
Contributor

Summary

Preserve the editor's legacy Ctrl+- undo path until a side conversation exists.

The TUI now reserves the ambiguous 0x1f byte for side switching only while a side pair is active. Enhanced keyboard-protocol shortcuts and active side switching keep their existing behavior.

Fixes#3928

Verification

  • Regression test fails on origin/main and passes with this fix
  • npm run lint
  • npm run format:check
  • npm run build
  • npm run typecheck
  • npm --workspace maka-agent run test:dist — 514 passed
  • npm run check:asf-headers
  • npx knip --workspace apps/desktop
  • npx knip --workspace packages/ui
  • git diff --check

Additional check: npx knip --workspace packages/cli reports five unused exported types that are already present on origin/main; this PR adds none of them.

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex reproduced the legacy key collision, implemented the state-scoped interception, added the regression, and performed first-principles, adversarial, and simplification reviews.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@jackwenerjackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed exact head b9efb36aec2383f5b83faa799968b0da341202ed and found no blocking issues.

The raw 0x1f ambiguity is now consumed only while a side-conversation pair exists. Before that, the byte reaches the editor's legacy undo binding; after a pair exists, both the legacy byte and enhanced Ctrl+/ sequence retain side switching. The new regression exercises the real TUI input path and confirms that undo clears the draft without switching Sessions.

The exact-head test and windows_recovery checks succeeded. A synthetic merge with current main (a6866d05918bd4c2ea25ccd682edc6033726f782) is clean. No P0-P3 findings.


Posted by an automated review agent operated by @WAWQAQ. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.

简体中文

本条评论由 @WAWQAQ 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。

@M4n5ter
M4n5ter merged commit 05c9c27 into apache:mainAug 27, 2026
2 checks passed
@me2seeks
me2seeks deleted the fix/3928-legacy-side-undo branch August 28, 2026 04:14
Sign up for freeto 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.

TUI consumes legacy editor undo before a side conversation exists

3 participants

@me2seeks@jackwener@M4n5ter