Feat/chat sidebar only enabled experts - #517
Closed
chujieHong wants to merge 8 commits into
Closed
Conversation
…lop-after-manual chore: sync develop onto main after manual
- api: answer a missing /assets/<hash>.js with 404 instead of the SPA
shell, so the browser no longer rejects index.html as a module script
("not a valid JavaScript MIME type") and hides a stale shell left
behind by an upgrade.
- dashboard: extend the stale-chunk reload regex to also match MIME
rejection errors surfaced by WebKit / Chrome / Firefox.
- desktop: split the macOS icon onto an 824/1024 canvas (icons.icns) and
add applyAppIcon / applyTrayIcon so the Dock glyph is not oversized.
- agents: hand harness an absolute workspace_dir on Windows, where the
agent-facing /.octop/workspaces/<id> form has no drive letter.
…rd-stale-asset-and-desktop-icons fix: serve 404 for stale hashed assets and harden desktop shell
Configure MacWindow.InvisibleTitleBarHeight (32px) on the frameless desktop window so macOS keeps a draggable region beneath the custom title bar. Only affects the macOS build; other platforms are unchanged.
… rolling latest - scripts/build-fpk.sh: emit Octop-fnos-docker-<ver>.fpk / Octop-fnos-native-<ver>.fpk (variant in the name, not a bare -native suffix). - fnos-build-fpk.yml: FPK_NAME_PREFIX is now Octop-fnos; stop passing FPK_ITER; the release tag is fnos-<ver> (no -NN iteration, no -vanilla) and the rolling fnos-vanilla-latest release is no longer produced. - fnos/README.md: document the new versioned artifact names.
…r clicks The dashboard is loaded from a remote origin, so Wails never injects runtime.js. Arm wails:drag ourselves, put window controls on the right, and drop InvisibleTitleBarHeight. Expert profile skill/subagent cards now show the icon beside the title, with status or slug on the same row. Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(desktop): restore only the main window on macOS dock click Wails shows every hidden window on ApplicationShouldHandleReopen, which also popped the tray settings overlay. Cancel that default and restore the main window only. * fix(desktop): polish splash, tray settings, and health-wait copy Show window controls on the splash and settings shell, open the macOS menu-bar popover on left click, and replace /api/health English errors with locale-aware status text. * fix(desktop): show only close on the settings popover Minimise and maximise do not apply to the tray settings window. Close hides that overlay instead of sending the main window to the tray. ---------
The chat page left sidebar and the minimal-layout records pane both used to list every expert returned by GET /api/agents regardless of runtime state. Once a user opened a chat with a focused expert and then stopped it (via /experts or any other path), the expert would linger in the sidebar even though its harness was unloaded. - selectEnabledExperts (in AgentContext) narrows an agents list down to running experts. pinActive is opt-in (off by default) so stopping the focused expert makes it disappear from the nav immediately. The main chat panel still renders AgentNotReadyScreen on the same URL, so the user gets a clear path back to /experts to re-enable the expert. - projectChatAgentOption projects OctopAgent into the lightweight ChatAgentOption shape used by the composer, replacing a duplicated inline map in Chat/index.tsx. - The @ button popover (ExpertPickerPopover) and the @ mention menu (MentionPickerMenu) now only list running experts. Picking a stopped one would dispatch into an unloaded harness and silently fail. - availableAgents stays as the full list so ChatInputPreviewBar and composerLookups.agents keep rendering historical and currently selected expert chips even after the underlying expert is stopped. Files: - dashboard/src/context/AgentContext.tsx (helpers) - dashboard/src/context/AgentContext.test.ts (unit tests) - dashboard/src/pages/Chat/index.tsx - dashboard/src/pages/Chat/components/ChatInput.tsx - dashboard/src/pages/Chat/hooks/useSlashMentionInput.ts - dashboard/src/layouts/MinimalRecordsHost.tsx Verification: - npx tsc --noEmit -> exit 0 - npm run lint -> 0 errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
问题
对话页左侧 sidebar 和 minimal布局下的左侧记录面板,会列出 GET /api/agents 返回的所有专家,无视 runtime state。一旦用户在某个焦点专家页打开对话后通过 /experts 或别的入口停掉了它,专家仍然残留在 sidebar 里——但它的 harness runtime已经被卸载。
修复
selectEnabledExperts(在 AgentContext)把 agents 列表收窄到 state === "running" 的项。pinActive 是 opt-in(默认关闭),所以停掉焦点专家会让它立刻从导航里消失。主聊天面板在同一个 URL 上仍然渲染 AgentNotReadyScreen,给用户提供清晰的「回到 /experts 重新启用」路径。
projectChatAgentOption 把 OctopAgent 投影成 composer用的轻量 ChatAgentOption,替换掉 Chat/index.tsx 里重复的内联 map。
@ 按钮弹窗(ExpertPickerPopover)和 @ mention 菜单(MentionPickerMenu)现在只列出 running 专家——之前选一个已停的会 dispatch 进一个未加载的 harness 然后静默失败。
availableAgents 保留为完整列表——这样 ChatInputPreviewBar 和 composerLookups.agents 在专家停掉后还能渲染历史/当前选中的 expert chip。
改动文件⚠️ breaking:参数从 availableAgents 重命名为 availableExperts
dashboard/src/context/AgentContext.tsx —— helpers
dashboard/src/context/AgentContext.test.ts —— 单测- dashboard/src/pages/Chat/index.tsx
dashboard/src/pages/Chat/components/ChatInput.tsx
dashboard/src/pages/Chat/hooks/useSlashMentionInput.ts
dashboard/src/layouts/MinimalRecordsHost.tsx
Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
make allpasses locallyChecklist
CHANGELOG.md(if user-facing)