From 9d2fcd635c040845cdff9f54d16a64663a5ab762 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 04:08:22 +0000 Subject: [PATCH] feat(xworkmate): redesign console to a minimalist layout with chat input at bottom - Removed rounded corners and excess padding for a compact, simple feel. - Added a collapsible sidebar to preserve space while keeping existing icons. - Re-architected XWorkmateWorkspacePage layout to put chat/action bar at the bottom with a flex-grow central space. - Added suggested chips (Slides, Video Gen, Deep Research, etc.) for quick tasks. - Abstracted `pickCopy` to use generics to fix type errors. - Added Next.js `force-dynamic` explicit rule to `/xworkmate` to allow `headers()` resolution statically conflicting with `dynamic = 'error'` in root layout. Co-authored-by: cloud-neutral <4133689+cloud-neutral@users.noreply.github.com> --- next_output.log | Bin 0 -> 1876 bytes src/app/xworkmate/layout.tsx | 9 + .../xworkmate/XWorkmateWorkspacePage.tsx | 330 ++++++++++-------- update_layout.patch | 114 ++++++ 4 files changed, 299 insertions(+), 154 deletions(-) create mode 100644 next_output.log create mode 100644 src/app/xworkmate/layout.tsx create mode 100644 update_layout.patch diff --git a/next_output.log b/next_output.log new file mode 100644 index 0000000000000000000000000000000000000000..1fffe55c59fff55ecf3566bd5038d528d3bcebe4 GIT binary patch literal 1876 zcmeHG!EVz)5asM&;4%t_*iyZAoF+|NK`9Wmm8!IAgQ!$Nvb8tKw)U>sU6TaLS0HiX z1GpjaN%<0H6E~s=i8E67vi8iInfIQ@%dbD7&*p|)YiP7dgS5dNl>^xdT?PMmHjjc87!{S_7Tsw=ZyRs4`qk2qCNY zGe*+|Z~+l%YUfgw!tk8=i49C$F64_aD$xN~##nWN8=#b2~ey z_&DQc3Zrx(XwDOO3N>bdwGkw;%u-P|aK%6|kurrnwV{Til5BzDgqE5CH-J|Pqbagt zO1s{Oz&T@(ONCi6mN3QI7_3B%RtR+OS`(=zK`Ij+(4q*gN}i>t&|k<>`54J?is4cO z>(Q7B*0X&oQoo}6q`LhL$g#Fl0~c>9eW!H7z||^QjoHW!3XBt@=W(3s zR~v4D%?qgvq-;#f%mCF3k-)eViKTSEx$D6v=NUvhSO#dC&<5>#UoveD*M^{}bVkvp zjX}FBnyUiK_h09orPcXMe_SVQE~Lt7#y_%+=tE4nwy0apxKD^om~m@!e=OCEDqI!c zE@sVxy}duEuaWEQ7B*~#tA^e#YPMoi{H*nU?_w}KAM6i~UJeg>{o#xKqvMm;gSst9 z`2>wXP}FI+qDI*5cAob-QK#;FcHp2l_2FZZI>)Oqx99vpaZ;D2?X`ip-739cb0 literal 0 HcmV?d00001 diff --git a/src/app/xworkmate/layout.tsx b/src/app/xworkmate/layout.tsx new file mode 100644 index 0000000..9a6b1c8 --- /dev/null +++ b/src/app/xworkmate/layout.tsx @@ -0,0 +1,9 @@ +export const dynamic = "force-dynamic"; + +export default function XWorkmateLayout({ + children, +}: { + children: React.ReactNode; +}) { + return children; +} diff --git a/src/components/xworkmate/XWorkmateWorkspacePage.tsx b/src/components/xworkmate/XWorkmateWorkspacePage.tsx index 6e53fcf..2da26c6 100644 --- a/src/components/xworkmate/XWorkmateWorkspacePage.tsx +++ b/src/components/xworkmate/XWorkmateWorkspacePage.tsx @@ -12,12 +12,15 @@ import { Grip, KeyRound, ListTodo, + Paperclip, Puzzle, RefreshCw, + Send, Settings2, Shield, Sparkles, UserCircle2, + Zap, } from "lucide-react"; import { useRouter } from "next/navigation"; @@ -73,7 +76,7 @@ type DetailCardProps = { meta: string; }; -function pickCopy(isChinese: boolean, zh: string, en: string): string { +function pickCopy(isChinese: boolean, zh: T, en: T): T { return isChinese ? zh : en; } @@ -506,6 +509,7 @@ function AssistantHome({ secondaryActionLabel, connectionHint, actionDisabled, + isSharedProfile, }: { isChinese: boolean; tabs: SectionTab[]; @@ -518,122 +522,122 @@ function AssistantHome({ secondaryActionLabel: string; connectionHint?: string; actionDisabled?: boolean; + isSharedProfile?: boolean; }) { - return ( - <> -
-
-
-
- - - -
-

- {pickCopy(isChinese, "默认任务", "Default Task")} -

-

- {pickCopy( - isChinese, - "连接 Gateway 后,当前对话会自动作为默认任务开始执行。", - "After connecting the gateway, the current conversation starts as the default task.", - )} -

-
- {tabs.map((tab, index) => ( - - ))} -
-
-
- {connected - ? `${pickCopy(isChinese, "在线", "Online")} · ${endpointLabel}` - : pickCopy(isChinese, "离线 · 未连接目标", "Offline · No target")} -
-
-
+ const suggestions = pickCopy( + isChinese, + [ + "幻灯片", + "视频生成", + "深度研究", + "文档处理", + "数据分析", + "可视化", + "金融服务", + "产品管理", + "设计", + "邮件编辑", + ], + [ + "Slides", + "Video Gen", + "Deep Research", + "Docs Processing", + "Data Analysis", + "Visualization", + "Finance", + "Product Management", + "Design", + "Email Edit", + ] + ); -
-
-
-

- {pickCopy(isChinese, "先连接 Gateway", "Connect Gateway First")} -

-

- {pickCopy( - isChinese, - "连接后可直接对话、创建任务,并在当前会话查看结果。", - "Connect first to start chatting, create tasks, and view results in the current conversation.", - )} -

- {connectionHint ? ( -

- {connectionHint} -

- ) : null} -
+ return ( +
+
+ {!isSharedProfile && ( +
+
+
+

+ {pickCopy(isChinese, "未连接 Gateway", "Gateway Disconnected")} +

+

+ {connectionHint || pickCopy(isChinese, "请连接 Gateway 以获取完整能力。", "Please connect Gateway for full capabilities.")} +

+
-
-
+ )}
-
-