Skip to content

feat: composer and panels: ⌘Return for the next turn, arrows stay in multi-line drafts, one dialog convention, file viewer gutter - #168

Merged
chenweigao merged 3 commits into
mainfrom
fix/composer-panels-20261015
Oct 16, 2026
Merged

chenweigao merged 3 commits into
mainfrom
fix/composer-panels-20261015

Conversation

@chenweigao

Copy link
Copy Markdown
Owner

Stacked on #167 (reading pass 2), which it builds on: ConversationNotice, the pending-prompt bubble and PendingMessageContent's controls closure. Review only the last three commits here. Once #167 merges, I will rebase this onto main and retarget it.

Summary

Fifth batch of the 2026-10-15 polish review (composer and panels): one commit per area.

  • Composer (bf3aa92)

    • While a turn runs, plain Return keeps doing what it did: Kimi steers, native agents that can steer steer, and the rest queue for the next turn. Where Return steers, ⌘Return now sends for the next turn; everywhere else it sends like Return. Each press sends once. The send menu shows 下一轮发送 ⌘↩ as text, not as a key equivalent, which a pop-up menu could fire while closed.

    • The placeholder says what Return does:

      • while running, 回车引导当前轮,⌘回车排到下一轮… or 回车排到下一轮发送…;
      • when idle, 继续此任务,或输入 / 使用命令… where the composer offers / commands, otherwise 继续此任务….

      VoiceOver reads it. The 11 pt Steer / Queue hint names both keys in its tooltip.

    • History recall no longer hijacks the arrows inside a recalled multi-line prompt. ↑ recalls only from an empty draft or the first visual line, and ↓ only from the last; elsewhere they move the caret. ComposerKey.up / .down carry the edge-line flag, read from the text view's TextKit 1 layout.

    Key Kimi idle Kimi running Native idle Native running
    Return send steer send steer if supported, else next turn (attachments: next turn)
    ⌘Return send next turn send next turn
  • Dialogs and file viewer (b7e1db0)

    • Sheets share WorkbenchTheme.Dialog.padding (24; they used 16 to 28) and one button order: Spacer, the dismissing action (.cancelAction), the primary (.defaultAction).
    • The commit diff sheet and the new-task file sheet close on Escape; the side file panel does not.
    • The queued-message editor, code feedback and group suggestions sheets gain a default action.
    • Onboarding keeps 上一步 leading and moves 取消 next to the primary.
    • File viewer code uses the reply code style (12.5 pt, 4 pt spacing).
      • Line numbers sit in the scroll view's vertical ruler: right-aligned, padded to the widest number, not selectable. They scroll vertically with the code and never sideways. Code and numbers share one fixed line height, so CJK or emoji lines cannot drift.
      • Copy, quotes and feedback now read the source text directly instead of mapping back from "9 │ " prefixes, so ReviewContext.sourceSelection is removed. Lines count as TextKit breaks them (CRLF included), and a final newline gets no number.
  • Labels and copy (090479d)

    • Icon-only controls without an accessibility label get one from their tooltip: 18 controls across the composer, file panel, sidebar, find controls, activity bar and workbench.
    • Hit targets grew only where nothing else moves: the project header's + went from 26 to 28. Everywhere else, 28 pt would make a row taller, and transcript rows get labels only.
    • Onboarding's model picker now says it sets the default model for new tasks; before, it said "next message".
    • The settings toggle 启动时自动连接 is now 自动连接, because flipping it connects or disconnects at once.

Verification

  • Linux portable suite on clean head 090479d: 8/8, including localization (1245 keys) and preview source lists (19 builds; three previews now compile WorkbenchTheme.swift).
  • Linux WorkbenchCore + WorkbenchChecks: 58 PASS, including the updated review-context check. The AppKit math test is skipped here.
  • Tests/ComposerChecks (macOS step "composer") covers:
    • ⌘Return / ⌃Return / Shift / Option;
    • the recall decision with edge-line inputs;
    • NSTextView edge lines across hard breaks, soft wraps, upstream affinity at a wrap and a final empty line.
  • Not run locally: no macOS SDK here, so the macOS job is the first compile.
  • Mac checks needed:
    • ⌘Return in a running Kimi and native turn sends once, for the next turn.
    • The placeholder switches as a turn starts and ends.
    • ↑/↓ move through a recalled multi-line prompt.
    • Return in the queued-message editor and code feedback sheets now submits. As in the composer, Shift-Return should add a line; if that is unwanted, I'll drop the default action there.
    • Escape on the commit and new-task file sheets.
    • The file viewer gutter with CJK and CRLF files, fast scrolling and sideways scrolling.
    • Sheet spacing.
    • VoiceOver on the new labels.

🤖 Generated with Claude Code

chenweigao and others added 3 commits October 15, 2026 22:07
…a real gutter

- Sheets share `WorkbenchTheme.Dialog.padding` (24; they used 16 to 28)
  and one button order: Spacer, the dismissing action (.cancelAction),
  then the primary (.defaultAction). The queued-message editor, code
  feedback and group suggestions sheets gain a default action. The commit
  diff sheet's 关闭 and the new-task file sheet close on Escape; the side
  file panel's close button stays without a shortcut
  (`RemoteFilePanel.closeShortcut`). Onboarding keeps 上一步 leading and
  moves 取消 next to the primary.
- The file viewer sets code in the reply code style (12.5 pt, 4 pt line
  spacing). Line numbers live in the scroll view's vertical ruler:
  right-aligned in a column as wide as the widest number, not selectable,
  scrolling with the code vertically and never sideways. Code and numbers
  share one fixed line height, so CJK or emoji lines cannot drift. The
  text view holds exactly the source, so ⌘C, quotes and feedback read
  source offsets, and `ReviewContext.sourceSelection` is gone. Lines count
  as TextKit breaks them (LF, CR, CRLF); a final newline gets no number.
  Diffs use the same size and spacing.
- Icon-only controls in these files get accessibility labels (the
  outcome menu also a tooltip). Sizes stay where 28 pt would grow a row.
- The activity-bar, host-label and sidebar previews compile
  WorkbenchTheme.swift for the token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rn does

- While a turn runs, plain Return keeps steering (Kimi, and native agents
  that can steer) or queueing (other native agents). Where Return steers,
  ⌘Return now sends for the next turn; elsewhere it sends like Return.
  Each press sends once: the send menu's 下一轮发送 shows ⌘↩ as text, not
  as a key equivalent. The 11 pt Steer / Queue hint names both keys in
  its tooltip.
- The placeholder says what Return does: 回车引导当前轮,⌘回车排到下一轮… or
  回车排到下一轮发送… while running; 继续此任务,或输入 / 使用命令… where the
  composer offers / commands, otherwise 继续此任务…. VoiceOver reads it.
- History recall: ↑ swaps in an older prompt only from an empty draft or
  from the first visual line, ↓ a newer one only from the last; elsewhere
  they move the caret, so a recalled multi-line prompt can be read and
  edited. `ComposerKey.up` / `.down` carry that edge-line flag, read from
  the text view's TextKit 1 layout (soft wraps, a final empty line,
  upstream affinity at a wrap).
- Accessibility labels for the send menu chevron and the attachment,
  file-reference and paste remove buttons.
- ComposerChecks cover ⌘Return, ⌃Return, Shift and Option, the recall
  decision, and edge lines across hard and soft breaks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…says what they do

- Icon-only controls in the sidebar, the long-output find controls, the
  activity bar and the project header get accessibility labels from their
  tooltips, and tooltips where they had none. The project header's + now
  fills its 28 pt column; other sizes stay, since 28 pt would grow header
  or host rows. Transcript rows get labels only.
- The ⌘K search sheet uses the dialog padding token.
- Onboarding's model picker said the choice applies to the next message;
  it sets the default model for new tasks and now says so. The settings
  toggle said 启动时自动连接 but connects or disconnects at once; it is now
  自动连接, and the section footer explains both.
- Localization tables: the batch's 11 new keys (composer, panels, labels,
  copy); the 4 replaced keys are removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T14:12:34.693620Z 090479d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 090479dd74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +298 to +300
private var nextTurnSend: (() -> Void)? {
defaultMode(s) == .steer ? { send(.nextTurn) } : nil
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude slash commands from the next-turn action

When a native session is running and the draft is a recognized command such as /compact, defaultMode(s) is still .steer, so this exposes ⌘Return and the menu as “Send next turn.” However, NativeAgentConnection.send detects commands before enqueueing and ignores the supplied .nextTurn mode, executing the command immediately instead. This makes the advertised next-turn action perform immediate work or fail against the active turn; mirror the Kimi composer by withholding onQueue for command drafts.

Useful? React with 👍 / 👎.

@chenweigao
chenweigao changed the base branch from fix/reading-pass2-20261015 to main October 16, 2026 07:30
@chenweigao
chenweigao merged commit 954a183 into main Oct 16, 2026
3 checks passed
@chenweigao
chenweigao deleted the fix/composer-panels-20261015 branch October 16, 2026 07:46
Sign up for free to 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.

1 participant