@devries-cameron20 / t3code-1 / commits / 3dd62dce70
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

revert(web): remove the composer rich text toggle button and mod+/ shortcut (#27390)

maria committed Oct 30, 2026 at 04:59 UTC 3dd62dce70b5ff577099966ba92452603ccc8f89
8 files changed +3 -90
apps/web/src/components/chat/ChatComposer.tsx
+1 -27
@@ -133,7 +133,6 @@ import {
133 import { attachmentUploadBlockReason } from "../../lib/attachmentUploadState";
134 import type { AssistantCitationSourceAnchor } from "~/lib/assistantTextSelection";
135 import { shortcutLabelForCommand } from "../../keybindings";
136 -import { persistClientSettingsUpdate } from "../../hooks/useSettings";
136 import {
137 type TerminalContextDraft,
138 type TerminalContextSelection,
@@ -199,7 +198,6 @@ import {
198 ComposerRestingImagePreviews,
199 } from "./ComposerAttachmentStrip";
200 import { ComposerPrimaryActions } from "./ComposerPrimaryActions";
202 -import { ComposerRichTextToggle } from "./ComposerRichTextToggle";
201 import { ComposerFooterPrimaryActions } from "./ComposerFooterControls";
202 import { ComposerPendingUserInputPanel } from "./ComposerPendingUserInputPanel";
203 import { ComposerPlanFollowUpBanner } from "./ComposerPlanFollowUpBanner";
@@ -306,7 +304,6 @@ export interface ChatComposerHandle {
304 openModelPicker: () => void;
305 stepReasoningEffort: (direction: 1 | -1) => void;
306 toggleModelPicker: () => void;
309 - toggleRichText: () => void;
307 openControl: (command: KeybindingCommand) => void;
308 isModelPickerOpen: () => boolean;
309 isCaretAtStart: () => boolean;
@@ -2855,13 +2852,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
2852 openModelPickerStable();
2853 }
2854 },
2858 - toggleRichText: () => {
2859 - if (isLiteralPendingAnswer) return;
2860 - persistClientSettingsUpdate((current) => ({
2861 - ...current,
2862 - composerRichTextEnabled: !current.composerRichTextEnabled,
2863 - })).catch(console.error);
2864 - },
2855 openControl: (command) => {
2856 if (composerBlurFrameRef.current !== null) {
2857 window.cancelAnimationFrame(composerBlurFrameRef.current);
@@ -3439,23 +3429,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
3429 showMobilePendingAnswerActions && "hidden sm:flex",
3430 )}
3431 >
3442 - {composerAttachButton || !isLiteralPendingAnswer ? (
3443 - <div className="me-2 flex items-center gap-0.5">
3444 - {composerAttachButton}
3445 - {isLiteralPendingAnswer ? null : (
3446 - <ComposerRichTextToggle
3447 - richTextEnabled={settings.composerRichTextEnabled}
3448 - shortcutLabel={shortcutLabelForCommand(
3449 - keybindings,
3450 - "composer.toggleRichText",
3451 - {
3452 - context: { terminalFocus: false, terminalOpen, modelPickerOpen: false },
3453 - },
3454 - )}
3455 - />
3456 - )}
3457 - </div>
3458 - ) : null}
3432 + {composerAttachButton ? <div className="me-2">{composerAttachButton}</div> : null}
3433 <div
3434 data-chat-composer-actions="right"
3435 data-chat-composer-transition-actions="true"
apps/web/src/components/chat/ComposerRichTextToggle.tsx deleted
-41
@@ -1,41 +0,0 @@
1 -import { PilcrowIcon } from "lucide-react";
2 -
3 -import { updateClientSettings } from "../../hooks/useSettings";
4 -import { Button } from "../ui/button";
5 -import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
6 -
7 -// Same setting as Settings → Chat → Rich text composer. Flipping it remounts the
8 -// editor; pointer-down is swallowed so a focused editor keeps its caret across that.
9 -export function ComposerRichTextToggle({
10 - richTextEnabled,
11 - shortcutLabel,
12 -}: {
13 - readonly richTextEnabled: boolean;
14 - readonly shortcutLabel: string | null;
15 -}) {
16 - const showingSource = !richTextEnabled;
17 - return (
18 - <Tooltip>
19 - <TooltipTrigger
20 - render={
21 - <Button
22 - type="button"
23 - variant="ghost"
24 - size="icon-sm"
25 - aria-label="Markdown source"
26 - aria-pressed={showingSource}
27 - data-pressed={showingSource ? "" : undefined}
28 - onPointerDown={(event) => event.preventDefault()}
29 - onClick={() => void updateClientSettings({ composerRichTextEnabled: showingSource })}
30 - />
31 - }
32 - >
33 - <PilcrowIcon />
34 - </TooltipTrigger>
35 - <TooltipPopup>
36 - {showingSource ? "Show formatting" : "Show Markdown source"}
37 - {shortcutLabel ? ` · ${shortcutLabel}` : null}
38 - </TooltipPopup>
39 - </Tooltip>
40 - );
41 -}
apps/web/src/components/chat/composerShortcuts.ts
-6
@@ -18,12 +18,6 @@ export function composerShortcutCommands(
18 "modelPicker.toggle": ({ event }) => {
19 if (!event.repeat) composerRef.current?.toggleModelPicker();
20 },
21 - "composer.toggleRichText": ({ event }) => {
22 - // The flip remounts the editor, which would drop an unsaved citation comment.
23 - if (event.target instanceof Element && event.target.closest("[data-citation-comment-editor]"))
24 - return false;
25 - if (!event.repeat) composerRef.current?.toggleRichText();
26 - },
21 "composer.increaseEffort": ({ event }) => {
22 if (!event.repeat) composerRef.current?.stepReasoningEffort(1);
23 },
apps/web/src/keybindings.test.ts
+1 -10
@@ -768,21 +768,12 @@ describe("composer and pull request shortcuts", () => {
768 });
769
770 it.each(["MacIntel", "Win32", "Linux"])(
771 - "resolves composer toggle and alternate send chords in their contexts on %s",
771 + "reserves the alternate send chord for the focused composer on %s",
772 (platform) => {
773 const modifier = {
774 metaKey: platform === "MacIntel",
775 ctrlKey: platform !== "MacIntel",
776 };
777 - for (const terminalFocus of [false, true]) {
778 - assert.strictEqual(
779 - resolveShortcutCommand(event({ key: "/", ...modifier }), DEFAULT_RESOLVED_KEYBINDINGS, {
780 - platform,
781 - context: { terminalFocus },
782 - }),
783 - terminalFocus ? null : "composer.toggleRichText",
784 - );
785 - }
777 const shiftedEnter = event({ key: "Enter", shiftKey: true, ...modifier });
778 for (const composerRequiresModifier of [false, true]) {
779 const context = {
docs/user/composer.md
+1 -3
@@ -19,9 +19,7 @@ The composer writes Markdown and shows it styled as you type. Markers such as
19 them. Lines starting with `- `, `1. `, `- [ ] `, `> `, `# ` or `---` become lists,
20 task lists, quotes, headings and rules; ` ``` ` followed by Enter opens a code
21 block. What you typed is what the agent receives, markers and numbering
22 -included, and `#1234` without a space still looks up a pull request. To see the
23 -plain Markdown instead, press the **¶** button beside attach; it is the same
24 -switch as **Settings → Chat → Rich text composer**.
22 +included, and `#1234` without a space still looks up a pull request.
23
24 Enter sends. In a list or quote, **Shift+Enter** continues it, and Shift+Enter
25 on an empty line moves out one level, then leaves it; **Tab** nests a list item
docs/user/keybindings.md
-1
@@ -28,7 +28,6 @@ Use `mod+shift+e` for effort, `mod+shift+a` for permissions, `mod+shift+x` for t
28 workspace, and `mod+shift+g` for the Git branch. The workspace menu includes the
29 current checkout, a new worktree, and the previous worktree when available.
30 Use `mod+shift+l` to reuse the previous worktree directly.
31 -Use `mod+/` to switch the composer between rich text and its Markdown source.
31
32 To change effort one step without opening the picker, bind
33 **Composer: Increase Effort** and **Composer: Decrease Effort** in Keybindings.
packages/contracts/src/keybindings.ts
-1
@@ -87,7 +87,6 @@ export const STATIC_KEYBINDING_COMMANDS = [
87 "appearance.cycle",
88 "themeEditor.toggle",
89 "composer.stash",
90 - "composer.toggleRichText",
90 "composer.sendAlternate",
91 "composer.sendBackground",
92 "composer.sendAndNewThread",
packages/shared/src/keybindings.ts
-1
@@ -179,7 +179,6 @@ export const DEFAULT_KEYBINDINGS: ReadonlyArray<KeybindingRule> = [
179 { key: "mod+alt+shift+a", command: "appearance.cycle", when: "!terminalFocus" },
180 { key: "mod+alt+shift+t", command: "themeEditor.toggle" },
181 { key: "mod+s", command: "composer.stash", when: "!terminalFocus" },
182 - { key: "mod+/", command: "composer.toggleRichText", when: "!terminalFocus" },
182 { key: "mod+shift+enter", command: "thread.steerQueuedMessage", when: "!terminalFocus" },
183 { key: "alt+arrowup", command: "thread.editQueuedMessage", when: "composerFocus" },
184 { key: "mod+enter", command: "composer.sendAlternate", when: "composerFocus && turnRunning" },