Skip to content

Commit 14eb253

Browse files
committed
fix(web-shell): remove OpenWork composer overrides
1 parent 53382ba commit 14eb253

8 files changed

Lines changed: 3 additions & 150 deletions

File tree

docs/design/openwork-tauri-customization-audit.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Status values:
3434
| Session renderer compatibility | Intermediate/commentary rendering, tool errors, subagent history, duration and ordering fixes | Web Shell has its own daemon-native timeline and structured message implementation | Upstream equivalent | PR1 verification |
3535
| Image/file attachments | Preserve Qwen image attachment metadata and ordering | Web Shell has native attachment support; desktop-path parity is not yet exercised end to end | Partial | PR2 parity verification |
3636
| Approval mode and permissions | Persist approval mode through Qwen settings; align permission settings with Qwen policy | Web Shell and daemon expose approval/permission controls | Upstream equivalent | PR1 verification |
37-
| Model and thinking controls | Persist model changes, refresh model defaults, provider-managed model handling, thinking-level picker and shortcut | Web Shell has native model/effort controls and local commands; exact OpenWork composer UX is not fully mapped | Partial | PR2 |
37+
| Model and thinking controls | Persist model changes, refresh model defaults, provider-managed model handling | Web Shell retains its native model controls and `/effort` command without OpenWork-specific composer controls | Upstream equivalent | PR1 |
3838
| Qwen settings | Qwen settings, memory, MCP, hooks, extensions, runtime settings, error handling | Web Shell has daemon-native settings, memory, MCP, hooks, extensions, tools and workspace settings | Upstream equivalent | PR1 verification |
3939
| Provider connection setup | Provider selection, API-key setup, onboarding and provider/skill settings flows | Web Shell exposes provider/settings infrastructure, but the OpenWork onboarding/connect flow is not preserved as a desktop flow | Partial | PR2 |
4040
| Skills | Workspace-scoped skills, disabled-skill filtering, mention cache synchronization, examples and install status | Web Shell has native skills, mentions, extensions and capability-backed settings | Upstream equivalent | PR1 verification |
@@ -48,9 +48,6 @@ Status values:
4848
| High contrast | User-facing Increase contrast setting | No matching Web Shell user setting identified | Missing | PR2 |
4949
| Chat text size | Small/default/large setting | No matching Web Shell user setting identified | Missing | PR2 |
5050
| Interface zoom | Cmd/Ctrl `+`, `-`, `0` and appearance setting | No matching Web Shell/Tauri zoom setting identified | Missing | PR2 |
51-
| Composer expand | Expand/collapse chat composer | No exact OpenWork composer maximize control confirmed | Missing | PR2 |
52-
| Composer count | Live word/character count | No equivalent identified | Missing | PR2 |
53-
| Thinking-menu shortcut | Cmd/Ctrl+Shift+E opens thinking menu | No exact equivalent confirmed | Missing | PR2 |
5451
| Command palette | Global command palette with recently used commands | No equivalent OpenWork palette/recents experience confirmed | Missing | PR2 |
5552
| Shortcut search | Search box in keyboard-shortcuts settings | Web Shell has shortcut help/search-history commands, but no matching shortcuts settings search identified | Missing | PR2 |
5653
| Copy as Markdown | Assistant response action | Web Shell has message copy/export actions, but exact Markdown action parity needs confirmation | Partial | PR2 |

docs/design/openwork-tauri-pr2.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ management implementations.
1717

1818
- Add an OpenWork command palette on `Cmd/Ctrl+K` with six deduplicated recent
1919
commands.
20-
- Add starter prompts, a six-level thinking picker backed by the existing
21-
`/effort` command, `Cmd/Ctrl+Shift+E`, composer expand/collapse, and live word
22-
and character counts.
20+
- Add starter prompts.
2321
- Add persistent appearance controls for 50–200% interface zoom, small/default/
2422
large chat text, comfortable/wide/full transcript widths, high contrast, and
2523
explicit reduced motion.

packages/web-shell/client/components/dialogs/HelpDialog.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ const GENERAL_SHORTCUTS: Array<[string, string]> = [
8989
['Alt+Left/Right', 'help.shortcut.altWords'],
9090
['Up/Down', 'help.shortcut.history'],
9191
['Cmd/Ctrl+K', 'help.shortcut.commandPalette'],
92-
['Cmd/Ctrl+Shift+E', 'help.shortcut.expandComposer'],
9392
];
9493

9594
function commandSignature(command: CommandInfo): string {

packages/web-shell/client/i18n.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,6 @@ const EN: Messages = {
14261426
'help.shortcut.completion': 'Accept completion or switch help tabs',
14271427
'help.shortcut.history': 'Cycle prompt history or scroll lists',
14281428
'help.shortcut.commandPalette': 'Open the command palette',
1429-
'help.shortcut.expandComposer': 'Expand or collapse the composer',
14301429
'help.shortcut.searchHistory': 'Search prompt history',
14311430
'help.shortcut.newline': 'Insert a newline',
14321431
'help.shortcut.pasteImages': 'Paste images',
@@ -2801,18 +2800,6 @@ const EN: Messages = {
28012800
'openwork.starters.explain':
28022801
'Explain this codebase and suggest the next task',
28032802
'openwork.starters.fix': 'Find and fix the highest-impact issue',
2804-
'openwork.composer.count': (v) =>
2805-
`${v?.words ?? 0} words · ${v?.characters ?? 0} chars`,
2806-
'openwork.composer.countLabel': (v) =>
2807-
`${v?.words ?? 0} words, ${v?.characters ?? 0} characters`,
2808-
'openwork.composer.effort': 'Thinking effort',
2809-
'openwork.composer.expand': 'Expand composer (Cmd/Ctrl+Shift+E)',
2810-
'openwork.effort.default': 'Default',
2811-
'openwork.effort.low': 'Low',
2812-
'openwork.effort.medium': 'Medium',
2813-
'openwork.effort.high': 'High',
2814-
'openwork.effort.xhigh': 'XHigh',
2815-
'openwork.effort.max': 'Max',
28162803
'openwork.appearance.theme': 'Color theme',
28172804
'openwork.appearance.zoom': 'App zoom',
28182805
'openwork.appearance.textSize': 'Chat text size',
@@ -4263,7 +4250,6 @@ const ZH: Messages = {
42634250
'help.shortcut.completion': '接受补全或切换帮助标签',
42644251
'help.shortcut.history': '切换历史 prompt 或滚动列表',
42654252
'help.shortcut.commandPalette': '打开命令面板',
4266-
'help.shortcut.expandComposer': '展开或收起输入框',
42674253
'help.shortcut.searchHistory': '搜索历史 prompt',
42684254
'help.shortcut.newline': '插入换行',
42694255
'help.shortcut.pasteImages': '粘贴图片',
@@ -5541,18 +5527,6 @@ const ZH: Messages = {
55415527
'openwork.starters.review': '检查当前改动并指出风险',
55425528
'openwork.starters.explain': '解释这个代码库并建议下一项任务',
55435529
'openwork.starters.fix': '查找并修复影响最大的问题',
5544-
'openwork.composer.count': (v) =>
5545-
`${v?.words ?? 0} 词 · ${v?.characters ?? 0} 字符`,
5546-
'openwork.composer.countLabel': (v) =>
5547-
`${v?.words ?? 0} 个词,${v?.characters ?? 0} 个字符`,
5548-
'openwork.composer.effort': '思考强度',
5549-
'openwork.composer.expand': '展开输入框(Cmd/Ctrl+Shift+E)',
5550-
'openwork.effort.default': '默认',
5551-
'openwork.effort.low': '低',
5552-
'openwork.effort.medium': '中',
5553-
'openwork.effort.high': '高',
5554-
'openwork.effort.xhigh': '极高',
5555-
'openwork.effort.max': '最大',
55565530
'openwork.appearance.theme': '颜色主题',
55575531
'openwork.appearance.zoom': '应用缩放',
55585532
'openwork.appearance.textSize': '聊天文字大小',

packages/web-shell/client/main.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import type { WebShellApi } from './App';
2121
import type { WebShellComposerApi } from './customization';
2222
import {
2323
notifyOpenWorkTurnComplete,
24-
OpenWorkComposerTools,
2524
OpenWorkDesktopLayer,
2625
OpenWorkWelcomeFooter,
2726
openInOpenWorkBrowser,
@@ -230,7 +229,6 @@ function StandaloneApp({ daemonToken }: { daemonToken?: string }) {
230229
renderWelcomeFooter: () => (
231230
<OpenWorkWelcomeFooter composerRef={composerRef} />
232231
),
233-
renderComposerToolbarEnd: OpenWorkComposerTools,
234232
}}
235233
/>
236234
<OpenWorkDesktopLayer

packages/web-shell/client/openwork/OpenWorkDesktopLayer.module.css

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
}
99

1010
.starters button,
11-
.composerTools button,
12-
.composerTools select,
1311
.browserToolbar button {
1412
border: 1px solid var(--border);
1513
border-radius: 8px;
@@ -22,25 +20,6 @@
2220
cursor: pointer;
2321
}
2422

25-
.composerTools {
26-
display: flex;
27-
align-items: center;
28-
gap: 6px;
29-
}
30-
31-
.composerTools button,
32-
.composerTools select {
33-
min-height: 28px;
34-
padding: 3px 7px;
35-
font: inherit;
36-
}
37-
38-
.characterCount {
39-
color: var(--muted-foreground);
40-
font-size: 11px;
41-
font-variant-numeric: tabular-nums;
42-
}
43-
4423
.appearanceSettings {
4524
display: grid;
4625
}

packages/web-shell/client/openwork/OpenWorkDesktopLayer.tsx

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ import {
88
type ReactNode,
99
} from 'react';
1010
import type { WebShellApi } from '../App';
11-
import type {
12-
WebShellComposerApi,
13-
WebShellComposerToolbarRenderInfo,
14-
} from '../customization';
11+
import type { WebShellComposerApi } from '../customization';
1512
import {
1613
WEB_SHELL_LANGUAGES,
1714
normalizeLanguage,
@@ -278,67 +275,6 @@ export function OpenWorkWelcomeFooter({
278275
);
279276
}
280277

281-
export function OpenWorkComposerTools({
282-
text,
283-
runCommand,
284-
disabled,
285-
}: WebShellComposerToolbarRenderInfo) {
286-
const { t } = useI18n();
287-
const [effort, setEffort] = useState('default');
288-
const trimmed = text.trim();
289-
const words = trimmed ? trimmed.split(/\s+/u).length : 0;
290-
const characters = [...text].length;
291-
const toggleExpanded = (button: HTMLButtonElement) => {
292-
const composer = button.closest('[data-web-shell-composer]');
293-
if (!composer) return;
294-
composer.toggleAttribute(
295-
'data-openwork-expanded',
296-
!composer.hasAttribute('data-openwork-expanded'),
297-
);
298-
};
299-
return (
300-
<div className={styles.composerTools}>
301-
{trimmed && (
302-
<span
303-
className={styles.characterCount}
304-
aria-label={t('openwork.composer.countLabel', {
305-
words,
306-
characters,
307-
})}
308-
aria-live="polite"
309-
>
310-
{t('openwork.composer.count', { words, characters })}
311-
</span>
312-
)}
313-
<select
314-
aria-label={t('openwork.composer.effort')}
315-
value={effort}
316-
disabled={disabled}
317-
onChange={(event) => {
318-
const value = event.target.value;
319-
setEffort(value);
320-
runCommand(`/effort ${value}`);
321-
}}
322-
>
323-
<option value="default">{t('openwork.effort.default')}</option>
324-
<option value="low">{t('openwork.effort.low')}</option>
325-
<option value="medium">{t('openwork.effort.medium')}</option>
326-
<option value="high">{t('openwork.effort.high')}</option>
327-
<option value="xhigh">{t('openwork.effort.xhigh')}</option>
328-
<option value="max">{t('openwork.effort.max')}</option>
329-
</select>
330-
<button
331-
type="button"
332-
aria-label={t('openwork.composer.expand')}
333-
title={t('openwork.composer.expand')}
334-
onClick={(event) => toggleExpanded(event.currentTarget)}
335-
>
336-
337-
</button>
338-
</div>
339-
);
340-
}
341-
342278
function PreferenceRow({
343279
label,
344280
children,
@@ -729,12 +665,6 @@ export function OpenWorkDesktopLayer({
729665
event.preventDefault();
730666
setPaletteOpen(true);
731667
}
732-
if (command && event.shiftKey && event.key.toLowerCase() === 'e') {
733-
event.preventDefault();
734-
document
735-
.querySelector('[data-web-shell-composer]')
736-
?.toggleAttribute('data-openwork-expanded');
737-
}
738668
if (command && ['+', '=', '-', '0'].includes(event.key)) {
739669
event.preventDefault();
740670
adjustZoom(event.key === '0' ? 0 : event.key === '-' ? -1 : 1);

packages/web-shell/client/styles/standalone.css

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,6 @@ html[data-openwork-reduce-motion] *::after {
5959
transition-duration: 0.001ms !important;
6060
}
6161

62-
[data-web-shell-composer][data-openwork-expanded] {
63-
position: fixed !important;
64-
z-index: 90;
65-
inset: 48px 32px 32px !important;
66-
width: auto !important;
67-
max-width: none !important;
68-
margin: 0 !important;
69-
border-radius: 16px;
70-
background: var(--background);
71-
box-shadow: 0 20px 80px rgb(0 0 0 / 55%);
72-
}
73-
74-
[data-web-shell-composer][data-openwork-expanded]
75-
[data-web-shell-composer-surface] {
76-
height: 100%;
77-
}
78-
79-
[data-web-shell-composer][data-openwork-expanded]
80-
[data-web-shell-composer-editor] {
81-
min-height: calc(100vh - 190px);
82-
}
83-
8462
/*
8563
* Native-app feel (P0):
8664
*

0 commit comments

Comments
 (0)