Skip to content

Commit d620069

Browse files
userFRMclaude
andauthored
Remove dedicated toggle thinking button (#97)
## Summary - Remove the standalone "Toggle thinking blocks" button from the session header toolbar - The block type filter dropdown already includes thinking as a filterable block type, making the dedicated button redundant - Remove the `t` keyboard shortcut, `toggleThinking()` method, `showThinking` getter, and associated tests ## Test plan - [ ] Verify thinking blocks can still be toggled via the block filter dropdown - [ ] Verify the `t` key no longer has any effect - [ ] All 574 frontend tests pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ef953e8 commit d620069

File tree

7 files changed

+8
-53
lines changed

7 files changed

+8
-53
lines changed

frontend/e2e/message-content.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,14 @@ test.describe("Mixed content rendering", () => {
224224
const sid = await selectSession(page, project, count);
225225
await expectSessionLoaded(page, sid, displayRows);
226226

227-
// Toggle thinking off with keyboard shortcut
228-
await page.keyboard.press("t");
227+
// Open block filter dropdown and toggle thinking off
228+
await page
229+
.locator('button[aria-label="Filter block types"]')
230+
.click();
231+
await page
232+
.locator(".block-filter-item")
233+
.filter({ hasText: "Thinking blocks" })
234+
.click();
229235

230236
// Thinking blocks should be hidden
231237
const thinkingBlocks = page.locator(".thinking-block");

frontend/src/lib/components/layout/AppHeader.svelte

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,6 @@
135135

136136
<div class="header-right">
137137
{#if hasActiveSession}
138-
<button
139-
class="header-btn"
140-
class:active={ui.isBlockVisible("thinking")}
141-
onclick={() => ui.toggleThinking()}
142-
title="Toggle thinking blocks (t)"
143-
aria-label="Toggle thinking blocks"
144-
>
145-
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor">
146-
<path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11zM8 4a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 4zm0 6a.75.75 0 100 1.5.75.75 0 000-1.5z"/>
147-
</svg>
148-
</button>
149-
150138
<div class="block-filter-wrap">
151139
<button
152140
class="header-btn"

frontend/src/lib/components/modals/ShortcutsModal.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{ key: "]", action: "Next session" },
1010
{ key: "[", action: "Previous session" },
1111
{ key: "o", action: "Toggle sort order" },
12-
{ key: "t", action: "Toggle thinking blocks" },
1312
{ key: "l", action: "Cycle message layout" },
1413
{ key: "r", action: "Trigger sync" },
1514
{ key: "s", action: "Star / unstar session" },

frontend/src/lib/stores/ui.svelte.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ class UIStore {
8888
/** Set of block types currently visible. */
8989
visibleBlocks: Set<BlockType> = $state(readBlockFilters());
9090

91-
get showThinking(): boolean {
92-
return this.visibleBlocks.has("thinking");
93-
}
94-
9591
constructor() {
9692
$effect.root(() => {
9793
$effect(() => {
@@ -140,10 +136,6 @@ class UIStore {
140136
this.theme = this.theme === "light" ? "dark" : "light";
141137
}
142138

143-
toggleThinking() {
144-
this.toggleBlock("thinking");
145-
}
146-
147139
isBlockVisible(type: BlockType): boolean {
148140
return this.visibleBlocks.has(type);
149141
}

frontend/src/lib/stores/ui.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,6 @@ describe("UIStore", () => {
213213
expect(ui.theme).toBe("light");
214214
});
215215

216-
it("should toggle showThinking", () => {
217-
const initial = ui.showThinking;
218-
ui.toggleThinking();
219-
expect(ui.showThinking).toBe(!initial);
220-
});
221-
222216
it("should toggle sortNewestFirst", () => {
223217
const initial = ui.sortNewestFirst;
224218
ui.toggleSort();
@@ -252,22 +246,6 @@ describe("UIStore", () => {
252246
expect(ui.hiddenBlockCount).toBe(0);
253247
});
254248

255-
it("should sync showThinking when toggling thinking block", () => {
256-
ui.toggleBlock("thinking");
257-
expect(ui.showThinking).toBe(false);
258-
259-
ui.toggleBlock("thinking");
260-
expect(ui.showThinking).toBe(true);
261-
});
262-
263-
it("should sync block filter when toggling thinking", () => {
264-
ui.toggleThinking();
265-
expect(ui.isBlockVisible("thinking")).toBe(false);
266-
267-
ui.toggleThinking();
268-
expect(ui.isBlockVisible("thinking")).toBe(true);
269-
});
270-
271249
it("should reset all with showAllBlocks", () => {
272250
ui.toggleBlock("user");
273251
ui.toggleBlock("tool");

frontend/src/lib/utils/keyboard.test.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,6 @@ describe("registerShortcuts", () => {
162162
expect(navigateMessage).not.toHaveBeenCalled();
163163
});
164164

165-
it("should NOT trigger shortcut on Alt+T", () => {
166-
const toggleSpy = vi.spyOn(ui, "toggleThinking");
167-
fireKey("t", { altKey: true });
168-
expect(toggleSpy).not.toHaveBeenCalled();
169-
toggleSpy.mockRestore();
170-
});
171-
172165
it("should still navigate on plain J key", () => {
173166
fireKey("j");
174167
expect(navigateMessage).toHaveBeenCalledWith(1);

frontend/src/lib/utils/keyboard.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export function registerShortcuts(
8181
sessions.navigateSession(-1, filter);
8282
},
8383
o: () => ui.toggleSort(),
84-
t: () => ui.toggleThinking(),
8584
l: () => ui.cycleLayout(),
8685
r: () => sync.triggerSync(() => sessions.load()),
8786
e: () => {

0 commit comments

Comments
 (0)