Skip to content

feat(mac): restore transcript + assistant context menus; fix plan rows - #448

Merged
SergeSerb2 merged 3 commits into
mainfrom
surgecode/appkit-context-menus
Aug 2, 2026
Merged

feat(mac): restore transcript + assistant context menus; fix plan rows#448
SergeSerb2 merged 3 commits into
mainfrom
surgecode/appkit-context-menus

Conversation

@SergeSerb2

Copy link
Copy Markdown
Owner

Summary

Wave 2 of the post-Gate-F restoration: the context-menu surface the SwiftUI renderer deletion took with it, plus the plan-row contract violations.

Context menus (were entirely gone — right-click gave AppKit's stock text menu or nothing):

  • Timeline-wide menu on the transcript table: Copy Entire Thread, Branch Session, New Session, Select Text… — thread flattening and the select-text sheet route to the SwiftUI shell via host closures; branch/create go through RendererActions (branch also selects the new thread, matching the old behavior). Items enable/disable via menuNeedsUpdate.
  • Assistant-message menu on every fragment of a message (right-click can land on any block): Copy Text (flattened plain text), Copy as Markdown (source), Open with per-editor submenu + Copy Path (disabled with an explanatory tooltip when the Mac can't open a local editor), Open Link / Copy Link for external links. The presentation store now carries each message's resolved targets + source on its markdown render rows (MarkdownMessageChrome, resolved at settle, shared COW references).
  • The prose NSTextView augments AppKit's stock text menu (message items above, Copy/Look Up/Services below) instead of being replaced by it.

Plan rows (three contract violations from the port):

  • Plans parsed with a full uncached cmark parse synchronously inside tableView(_:viewFor:) per realization — now routed through MarkdownPresentationEngine's bounded cache.
  • Disclosure restored: pending plans default expanded (it's the thing you're being asked to read), implemented plans default collapsed; the chevron stays truthful via an expandedOverride.
  • The active-card ⌘⇧⏎ Implement shortcut is back.

Carries the #447 hotfix commit (branched while main didn't compile); merges cleanly on top of it.

Area

  • apps/mac — native macOS app
  • apps/windows
  • apps/mobile
  • apps/server
  • Shared packages or relay
  • Build, CI, or release tooling
  • Docs

Release size

  • size:XS
  • size:S
  • size:M
  • size:L
  • size:XL

Verification

  • pnpm run verify --all: 5/5 steps, exit 0 (one unrelated documented flake in the quick-chat preferences suite failed once and passes in isolation and in the gate)
  • New store test: settled assistant fragments carry message chrome; focused timeline/markdown suites green

🤖 Generated with Claude Code

SergeSerb2 and others added 3 commits August 2, 2026 14:54
PR #443 added the requestTimeout case and PR #445 added this exhaustive
switch; each passed its own gate but their merge does not compile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gate F deleted ChatContextMenu's timeline attachment with the SwiftUI
renderer and left the AppKit transcript with no table menu at all, a
one-item assistant menu, and AppKit's stock text menu over prose. This
restores the contract surface natively:

- Timeline-wide menu on the transcript table: Copy Entire Thread,
  Branch Session, New Session, Select Text… — thread flattening and the
  select-text sheet route to the SwiftUI shell through host closures;
  branch/create go through RendererActions. Items validate through
  menuNeedsUpdate.
- Assistant message menu on every fragment: Copy Text (flattened plain
  text), Copy as Markdown (source), Open <file> with per-editor submenu
  + Copy Path (capability-gated for remote Macs), Open Link / Copy Link
  for external links. The presentation store now carries the message's
  resolved file targets, external links, and source on each markdown
  render row (MarkdownMessageChrome) — resolved when the message
  settles, shared copy-on-write.
- The prose NSTextView augments rather than replaces AppKit's stock
  text menu: message items on top, Copy/Look Up/Services below.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…he active-card shortcut

The plan case ran a complete uncached cmark parse synchronously inside
tableView(_:viewFor:) on every realization — the exact independent
parsing policy the renderer contract forbids — and lost the retired
PlanCard's disclosure and ⌘⇧⏎ Implement shortcut in the port.

Plans now parse through MarkdownPresentationEngine's bounded cache
(keyed plan:<id>), pending plans default expanded / implemented plans
default collapsed with the toggle flipping either (the disclosure
header takes an expandedOverride so the chevron stays truthful), and
Implement binds ⌘⇧⏎ while the plan is the active decision card.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@SergeSerb2 SergeSerb2 added the size:M Normal feature or meaningful behavior change label Aug 2, 2026
@SergeSerb2
SergeSerb2 merged commit cce0b53 into main Aug 2, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M Normal feature or meaningful behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant