Skip to content

fix(desktop): remove Regenerate in favor of edit and resend - #5468

Merged
Astro-Han merged 2 commits into
apache:mainfrom
Nyvo-io:fix/remove-regenerate-5132
Sep 20, 2026
Merged

Astro-Han merged 2 commits into
apache:mainfrom
Nyvo-io:fix/remove-regenerate-5132

Conversation

@Nyvo-io

@Nyvo-io Nyvo-io commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Closes #5132.

Summary

  • Remove the Regenerate operation, bridge, and footer affordance.
  • Use message edit to refill the Side Chat composer.
  • Remove the Guest retry affordance; approved legacy regenerate requests now terminalize without execution.
  • Preserve historical regeneration lineage and bump the Host compatibility epoch to 167.

Note

Edit & resend still cannot preserve attachments, quotes, or directory references. This temporary gap is tracked by #5109 and #5118.

Validation

  • npm run lint
  • npm run format:check
  • npm exec -- tsx --test apps/desktop/src/main/__tests__/app-shell-turn-actions.test.ts apps/desktop/src/main/__tests__/permission-response-ipc-boundary.test.ts apps/desktop/src/main/__tests__/workbar-services-adapter.test.ts packages/runtime-host/src/__tests__/session-collaboration-authority.test.ts
  • npm --workspace @maka/runtime run typecheck
  • npm --workspace @maka/runtime-host run typecheck
  • npm --workspace @maka/desktop run check:architecture

Desktop typecheck is blocked only by three existing packages/ui prop mismatches (autoScroll, settledText, and trailingAction).

AI disclosure: Prepared with OpenAI Codex at the contributor's request.

@Nyvo-io
Nyvo-io force-pushed the fix/remove-regenerate-5132 branch from d561312 to b2a501e Compare September 20, 2026 01:35

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified the removal end to end — this is a clean excision, and the semantics hold.

Removal is complete. turn.regenerate is gone from TURN_OPERATION_SPECS, TurnRegenerateInput, the remote-owner grant list, the interactive-turn coordinator handler map, prepareRegenerateTurn, RuntimeRegenerateTurnError, normalizeRegenerateTurnInput, the session-execution IPC handler, the client method, and the renderer regenerateTurn port — zero dangling references outside intentional lineage surfaces. The epoch-167 bump correctly rejects old peers that could still submit the operation.

Legacy terminalization is the right shape. The intent decode survives (SessionTurnRegenerateRequestIntent in session-collaboration.ts) — necessary, since durable access requests persisted before the upgrade must still load — while the coordinator now does !('content' in request.intent) → 'failed': approved-but-unexecuted regenerate intents reach a terminal state without executing and without hanging. Admission recovery additionally Excludes kind:'regenerate', so a persisted descriptor can't resurrect on restart. The new test pins exactly this (started === false, admission 'failed').

Replacement path is real, not just deletion. Side Chat's onEditUserMessage finds the user message for the turn and refills the composer via setText + focus — edit-and-resend is genuinely wired. No renderer constructs regenerate intents anymore; the owner approval/history UI is retained only to render legacy pendings, which is correct.

Lineage read-side preserved. regeneratedFromTurnId/regeneratedToTurnId still decode through core session/runtime-event and project through materialize.ts to badges — historical regeneration chains keep rendering.

P3s (none blocking):

  • packages/ui/src/conversation-copy.ts (~line 934): the truncated-output text still says "Regenerate it or inspect the persisted task log" — user-facing instruction pointing at a removed affordance. Reword to edit-and-resend or drop the clause.
  • packages/ui/src/chat-view.tsx (~line 409): comment still says "a clickable regenerate/branch" — regenerate no longer exists; minor staleness.
  • Coordination note: #5503 also bumps the epoch to 167 — whichever lands second needs to renumber to 168.

@Astro-Han
Astro-Han merged commit 87ff279 into apache:main Sep 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Under 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

design(desktop): unify Regenerate, Branch, and Edit-and-resend into one retry-from-turn model

2 participants