Skip to content

feat(desktop): unify WorkHub conversation and floating controls - #4979

Draft
M4n5ter wants to merge 9 commits into
apache:mainfrom
M4n5ter:feat/desktop-assistant
Draft

feat(desktop): unify WorkHub conversation and floating controls#4979
M4n5ter wants to merge 9 commits into
apache:mainfrom
M4n5ter:feat/desktop-assistant

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Sep 7, 2026

Copy link
Copy Markdown
Member
English

Full WorkHub demo

3:27, real-time macOS feature recording. Read an attached brief, delegate to an existing task and verify its reply, change themes, open Extensions and Automations, collapse/expand the conversation, browse the model wheel, scroll a long draft, and dock back into Maka with the draft preserved.

workhub-full-demo-final.mp4

The full recording predates the docked-navigation width fix. Updated navigation in a 1240px window, checked with eight tasks in an isolated development instance:

Updated WorkHub navigation

Summary

Builds on the WorkHub composer and identity changes merged in #5003.

Make WorkHub a persistent conversation for coordinating Maka tasks and operating the application. The main workspace and floating window share one live renderer and one Host-owned coordination Session, preserving drafts, attachments and in-flight work across docking and hiding, with conversation history restored after restart.

  • Use the coordination Session's model, shared composer, attachment ingestion and transcript ledger. Delegate through the existing task tools while retaining each task's execution authority and workspace.

  • Operate visible Maka controls through observed, revalidated targets, with native cursor feedback, bounded batches and recovery. Verify preference changes and offer guarded undo. User stop cancels pending actions; terminal, browser and secret inputs remain outside this control surface.

  • Cmd/Ctrl+Shift+K floats WorkHub on the pointer's display; pressing it again returns to Maka. Collapse the conversation to just the composer, keeping its bottom fixed. Compact mode has a snapping model wheel and bounded multiline input; expansion restores the conversation and briefly reveals the Maka wordmark. The picture-in-picture button shows the shortcut on hover.

  • Replace the separate assistant state, model selection and retention path with WorkHub's durable Session. Fix reads racing Host creation, retain workbar expansion requested before that creation finishes, and avoid cleanup accessing a destroyed main window.

  • Keep task navigation readable at medium window widths. Explicit unsubscribe and renderer destruction complete pending observation IPC normally; first-seed failures still reject.

Protocol compatibility epoch is 134: update Desktop and Host together.

Verification

  • Full workspace tests, root build/typecheck/lint/format, Desktop/UI knip, renderer architecture against origin/main, and Astryx surface inventory pass locally.
  • After rebasing onto main: full workspace tests pass, including 414 UI tests and the presentation tests. Eleven Electron tests pass across WorkHub, draft lifecycle and Workbar behavior; the pending-creation Workbar regression also passes its focused controller test. Storybook smoke passes for 325 stories and 352 theme renders. Coverage includes preserving the same renderer/draft, compact model browsing without committing, scroll snapping, long-input scrolling, fixed window bottom, and expansion restoring history and scroll position.
  • Real macOS checks cover model-driven task coordination, attachment reading, settings control, docking/floating, and clean application exit/restart. The current shortcut tooltip was checked in the running app.
  • Follow-up regression checks pass: 98 observation, IPC, reconnect and preload tests; Electron geometry at 1000px, 1240px and 1600px; docking, folding and draft preservation. An isolated npm run dev launch and 20 rapid subscribe/cancel cycles produce no observation-handler error.
  • Remote Hosts and native Windows/Linux behavior have not been exercised. OS-level shortcut delivery has not been independently automated; display selection and repeated-toggle behavior are covered by presentation tests.

Current interaction recording, 19 seconds at real speed: collapse, browse models, edit and scroll a long draft, then expand with the wordmark reveal. The fixed recording canvas preserves the window's bottom as its height changes.

workhub-current-interactions.mp4
Earlier application-control demonstrations (previous assistant UI)

These recordings show the earlier control surface, not the final WorkHub layout.

Feature walkthrough (1:39): create/send/rename/pin a task, search skills, visit automations, change preferences, and continue while hidden.

assistant-medium-demo.mp4

Short control demo (22.5 seconds): change two preferences in one batch.

assistant-short-demo.mp4

Full control demo (3:47): complete the task and application-control workflow in real time.

assistant-complex-demo.mp4

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex implemented and validated the change; GPT-5.6 Luna and DeepSeek executed model-driven scenarios.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
中文

完整演示

3 分 27 秒 macOS 功能原速实录。 展示附件读取、向已有任务委派并确认回复、主题切换、打开扩展与定时任务、对话收起/展开、模型滚轮、长草稿滚动,以及保留草稿收回 Maka。

workhub-full-demo-final.mp4

完整实录录制于停靠导航宽度修复之前。下图为修复后 1240px 窗口中的导航,使用隔离开发实例和 8 个任务验证:

修复后的 WorkHub 导航

变更说明

将 WorkHub 统一为持久对话,用于协调 Maka 任务和操作应用。主窗口与悬浮窗共享同一个渲染实例及 Host 持有的协调会话;停靠、隐藏与重启保留对话,窗口切换保留草稿、附件和执行状态。

  • 复用协调会话的模型、公共 Composer、附件处理与对话记录;通过现有任务工具委派,保留各任务自己的执行权限与工作区。

  • 依据界面观察执行原生操作,逐步复核目标,提供连续光标反馈、有界批次与恢复;设置变更验证保存结果并可撤销,停止会取消待执行操作。

  • ⌘⇧K / Ctrl+Shift+K 在鼠标所在屏幕浮出,再按一次返回 Maka。对话可收成纯输入条,底边固定;紧凑模式使用吸附式模型滚轮,长输入达到高度上限后只在编辑区滚动;展开恢复对话并淡入淡出 Maka 标志。画中画按钮悬停显示快捷键。

  • 移除独立助手的状态、模型与过期清理路径,统一使用持久 WorkHub 会话;修复 Host 会话创建前提前读取、创建期间展开工作栏的点击丢失,以及退出时访问已销毁窗口的问题。

  • 修复中等窗口宽度下导航栏被挤成窄条的问题;主动退订或渲染器销毁正常结束待就绪的订阅 IPC,首次读取失败仍保留错误。

协议 epoch 为 134,Desktop 与 Host 需同步更新。

验证

全工作区测试、构建、类型、lint、格式、Desktop/UI knip、相对 origin/main 的渲染架构及 Astryx 覆盖检查通过。rebase 后全工作区测试通过,涵盖 414 项 UI 测试;11 项 Electron 测试及新增工作栏竞态回归测试通过,Storybook 的 325 个故事、352 次主题渲染通过;真实 macOS 应用验证了任务协调、附件读取、设置操作和正常退出重启。本节顶部附 3 分 27 秒完整实录及最新导航截图,另保留 19 秒交互片段;旧版操作视频折叠保留。本次修复另通过 98 项订阅、IPC、重连及 preload 测试,Electron 验证 1000px、1240px、1600px 窗口和草稿保留;隔离的 npm run dev 启动及 20 次快速订阅/取消未出现订阅处理器异常。

远程 Host、Windows/Linux 原生行为未实测;未独立自动化验证操作系统快捷键投递,屏幕选择与连续切换由窗口测试覆盖。

AI 使用说明

Codex 实现并验证;GPT-5.6 Luna 与 DeepSeek 执行真实模型场景。

检查清单

测试覆盖变更,本地 lint、格式、类型和相关测试通过。本 PR 改变产品行为,详见变更说明。

@github-actions github-actions Bot added the effort/XXL Over 2500 readable lines label Sep 7, 2026
@M4n5ter
M4n5ter changed the base branch from main to stack/4956-session-experience-foundation September 7, 2026 10:49
@M4n5ter
M4n5ter force-pushed the feat/desktop-assistant branch from 38e10ea to 16cd57b Compare September 7, 2026 12:25
@M4n5ter M4n5ter changed the title feat(desktop): add a floating assistant with visible UI control feat(desktop): add a floating UI assistant / 新增悬浮界面助手 Sep 7, 2026
@M4n5ter
M4n5ter changed the base branch from stack/4956-session-experience-foundation to main September 7, 2026 12:27
@M4n5ter
M4n5ter force-pushed the feat/desktop-assistant branch 2 times, most recently from 0931e67 to ae57ce4 Compare September 8, 2026 03:50
@M4n5ter M4n5ter changed the title feat(desktop): add a floating UI assistant / 新增悬浮界面助手 feat(desktop): unify WorkHub conversation and floating controls / 统一工作台对话与悬浮操作 Sep 8, 2026
@M4n5ter
M4n5ter force-pushed the feat/desktop-assistant branch from ae57ce4 to fb8b920 Compare September 8, 2026 04:54
Keep one durable coordination Session and one live renderer across docking, floating and hiding. Route input through its model, preserve delegated task authority, and reuse the shared composer, attachments and transcript ledger.

Generated-by: Codex
@M4n5ter
M4n5ter force-pushed the feat/desktop-assistant branch from fb8b920 to f399734 Compare September 8, 2026 05:27
@M4n5ter M4n5ter changed the title feat(desktop): unify WorkHub conversation and floating controls / 统一工作台对话与悬浮操作 feat(desktop): unify WorkHub conversation and floating controls Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XXL Over 2500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant