Repository navigation
Feat/playground desktop2 - #3911
Open
neelneelneel wants to merge 94 commits into
Open
neelneelneel wants to merge 94 commits into
neelneelneel wants to merge 94 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atSessionContext Frees the Chat name for the @semoss/chat public export. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hatConfig Room leaves read the theme from ChatConfigContext instead of the deprecated useRoot(), and room search and delete ask the host to navigate instead of calling react-router. MainLayout provides the config. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChatStore and readDeploymentNewChatDefaults take the env's model, mode and agent defaults as a parameter instead of reading import.meta.env, so the chat code can move into a library. Precedence is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RoomStore.dispose() stops its sidebar and connector watchers. ChatStore stays the owner of every room, so a reply keeps streaming while another room is open, and calls dispose when a room is deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omComposer RoomContent now composes the two, with the turn state they share read by readRoomTurnState. These are the pieces chat hosts will compose. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stSection The Chats section (view menu, grouping, paging, rename, favorite, download, delete) is its own component. It navigates through ChatConfig: links take their href from roomHref so a modified click still opens a new tab, agent headings link only when the host gives agentHref, and deleting the open room calls onRoomDeleted. GlobalNav keeps the shell parts and chat search. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r barrels Every import that went through a components/, contexts/, hooks/, stores/ or pages/ index.ts now names the file that defines it, and the barrels are gone. Tests mock the defining files. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ugh ChatConfig Tool views and the tool picker read ChatConfig.platformUrl instead of VITE_PLATFORM_URL, the room's Connectors section opens settings through the optional navigation.openSettings, and the knowledge form reads the theme from ChatConfig. PlaygroundChatConfigProvider builds the config inside the settings dialog. Agent page links move into the agents feature. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ope and NewChat RoomScope opens a room and provides its insight, context, tool views and actions; the page composes the layout inside it. NewChat is the new-chat screen with its route inputs as props, and it opens the created room through ChatConfig navigation. RoomHeader takes the host's leading controls, and PageHeaderNavigation is the playground's. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ld's env DEFAULT_CHAT_THEME and mergeChatTheme live with the chat config; the playground lays its env theme over them. Chat tests use the chat theme instead of RootStore, and the MobX configure call moves to the chat store. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves and renames only; imports are rewritten in the next commit. Skips the pre-commit check, which cannot pass while the imports still point at the old paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Library files import each other by relative path. Playground imports the chat through @semoss/chat: the Chat namespace of composable pieces (Provider, SessionProvider, ConfigProvider, Room, NewChat, Layout, Header, Conversation, Messages, Composer, Workbench, RoomList, RoomSearch, ...) plus named hooks, the chat store, connectors helpers, and types. Shell tests render chat pieces inside real Chat providers instead of mocking their hooks. types.ts is a real module now, which surfaced two missing imports and two duplicate fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves only; the loaders point at the new paths in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chatResources lists every namespace @semoss/chat reads, from locales/*/chat, so any host that mounts chat UI loads the same set. playgroundResources builds on it and adds the tour and mobile notice. Namespace names are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The queue for a room's next message is a StoreState snapshot read through useContextItems; ContextItems drops observer, and the composer selects only the count. Tests use a real store and check identity and notifications. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every reader of the deprecated adapter reads usePlaygroundTheme, and RootLayout only applies the theme's colors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d stores into features Moves and renames only: pages take the .page.tsx suffix, and the knowledge and agent page bodies move into their features. Imports are rewritten next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he pages Imports follow the moves. The knowledge and agent bodies are features named KnowledgeDetail, KnowledgeLibrary, AgentCatalog, AgentDetail, AgentEdit and AgentCreate; the detail and edit features take their id as a prop, read by a thin page. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sses Since the chat's code left playground, playground's @source no longer scanned it; hosts now import @semoss/chat/globals.css as they do the other libraries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Header, Workbench, Conversation, Messages and Composer take their room from Chat.Room when no room prop is passed, and Chat.Frame lays out the open room's conversation beside its Workspace. A host composes a room with no store code; playground's room page now does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The renderer composes @semoss/chat (Chat.Provider, RoomList, RoomSearch, Room, Frame, NewChat) and signs in with the shared LoginForm. The main process serves it from a local origin on a persisted port and forwards the server's module (HTTP and WebSocket) there, so the SDK's same-origin calls, cookies and sockets work unchanged; SSO callbacks to the server are routed back through that origin. A first-run screen checks and saves the server in the app's user data folder; File > Change Server switches it and clears the old session. Sandboxed window, allowlisted IPC with sender checks, external links in the browser, save dialogs for downloads, remembered window state, single instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Knip learns the desktop app's entries and the dependencies hosts use only from CSS or the shared Vite config. Playground no longer depends on lexical or mermaid, which only the chat library uses; the unused SYSTEM__PLAYGROUND constant and five unused message types are gone. The desktop's main-process test uses static imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
libs/chat/AGENTS.md describes the Chat API, what a host wires up, where the stores stand, and takes over playground's sections on the chat (glossary, Workspace, chat tools, slash menu, tool views, the next message's files, connectors) with their new paths. The desktop guide covers its processes, the local origin and proxy, SSO, security, commands and what is not built yet. The root guide lists both packages. Playground's coverage reads src/features. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry's side Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e PowerPoint fonts The server's session cookie had no lifetime, so Chromium dropped it when the app quit and every launch signed the user out; the proxy now gives such cookies a 30-day Max-Age (the server's session timeout still ends them) and the app flushes cookies on quit. The CSP lets the PowerPoint viewer fetch its fallback fonts from Google Fonts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… list The renderer test lists the user's rooms with the library's RoomList, opens one through the router, follows New chat and a menu command, and sends a signed out user to sign in. DesktopLayout makes its store with the public useCreateChatStore so a test can stand one in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SDK's playground-room API removes, renames and pins a user's room and reads a model's context window; ChatStore runs them in the session's insight through Session.insight.withInsight, as Session.insight.run did. The chat's copy of throwOnPixelErrors moves to the SDK, and playground's knowledge pages use it from there. The lockfile is regenerated from dev's: adding electron-vite had moved Vite's rolldown from 1.2.3 to 1.2.19, which inlined React into the SDK's library build. electron-vite keeps its own rolldown; the desktop pins 1.2.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and clipboard useRoomSearchShortcut replaces the Cmd/Ctrl+K handlers playground's GlobalNav and the desktop sidebar each had. The room store waits with sleep, and the message copy actions with copyTextToClipboard, from @semoss/utility. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chat guide names who mounts the room's actions and who drops the mode commands, adds NewChat's headerLeading, every namespace chatResources loads, and its commands. The playground guide fixes the chat config folder, drops the removed ChatStore.user adapter, and adds its routes, layouts, and proxy. The desktop guide catches up with the server address form, the login and unreachable-server screens, cookie lifetimes, the renderer, and adding an IPC channel. libs/chat/README.md shows a host how to wire up and compose the chat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d the Playground name - Keep several SEMOSS servers saved at once, each in its own Electron session partition, so switching back to one needs no sign in. The server screen lists them (Switch, and Remove after a confirm), and the account menu gets a Switch server submenu. Removing a server clears its session; its emptied folder is deleted on the next launch. - Rename the config to smss-desktop-config.json (version 2: servers, active, port, window). A version 1 desktop-settings.json is migrated and deleted; its server keeps the default session, so nobody is signed out. - Encrypt the packaged app's cookie store with the cookie encryption fuse. - Name the app Playground: window, menu, dock, and installers, shown as "Playground ( <version> )" wherever a version appears. userData stays at @semoss/playground-desktop so the rename moves no one's data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
# Conflicts: # libs/sdk/src/utility/fetch.test.ts
…eat/playground-desktop2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SDK's connectLogin opens its popup blank as "semoss-connect", signs out any stale login, then sends it to the sign in. The window open handler only allowed popups that start on /api/auth/login/, so it denied the blank one, window.open returned null, and connectors showed "popup blocked". Allow that named blank popup with the same sandboxed child window options as the sign in popup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The language was only kept in each server partition's localStorage (smss-language), so it did not carry between servers or to the connect screen, and smss-desktop-config.json never held it. The config now has a validated language field behind language:get and language:set. At startup the renderer applies the saved language before the first paint, or saves the detected one when none is saved, then saves every switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dev's playground changes landed in files this branch moved into libs/chat, so they are ported rather than taken as-is: - agentModeOnly: new-chat modes come from newChatModes, and the draft agent choice gains noneIsDefaultAgent so the empty choice reads Default Agent without offering the Chat/Agent menu - room tool panel: Show Details toggle (ToolInspector), without MobX - tool row opens in the Workbench when the tool is placed there - markdown typewriter rewrite, keeping @param/@returns tags - docs moved from packages/playground/AGENTS.md to libs/chat/docs - useDockFileExplorer forwards dev's new onRefresh option Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the playground theme out of @semoss/chat. The chat takes typed ChatOptions and composed pieces; the playground and desktop apps map their theme to options themselves (themeToChatOptions), and the theme's parsing lives in @semoss/shared. Boundary cleanup: - Keep one chat store per session: new options reach the same store (setOptions), initialize joins a running read, dispose drops rooms; the new-chat draft survives a late theme (useDraftRoom). - Both apps use ChatProvider, RoomHistory and useWorkbenchNavigation from the chat instead of their own copies. - Shrink the public API: store readers, the split providers, useCreateChatStore and useChatConfig are internal; useAgentWorkspace and the App/Workspace types move to @semoss/shared; apps pass their own data (settings opener prop, DesktopToolsContext). - Replace hide flags with composition: suggestions slot, RoomHistory hasRoomDates, catalogItemHref, settings colorModes, and ChatConfig.workbenchPanels. - Merge each context, provider and hook into one .context.tsx, fold single-use files, and split mcp-constants by topic. - One word per concept: section, draft, panels, room history, workbench rail; is/has/should booleans; aligned app names (useHostChatConfig, AppNavigation, NewChatPage). Dock copy keys move to room:workbench.*. A test keeps the retired names out. Desktop builds with the playground's .env (renderer envDir) and reads the build theme and new-chat defaults through the same shared helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shrink @semoss/chat, the playground and the desktop app by about 1,400 lines without changing what they do. - One theme -> chat options mapping (playgroundThemeChatOptions) in @semoss/shared for both apps, with a compile-time check that every key it returns is a ChatOptions field. - Remove dead code: the mention plugin's unused token/node inserters, the focus plugin that never fired, props no caller passes (tool menu, className on three components, the search shortcut's switch), and a duplicated message type. - Consolidate: 23 tooltip buttons use TooltipButton, one DownloadDialog serves rooms and responses, the connector viewer panels are one table, one EMPTY_ENGINE_META, and a shared slash command matcher. - Fold single-use pieces: the new-chat landing, the desktop's attach folder hook and theme file, and the tab title and favicon (now set once in RootLayout). - Delete 63 unused chat translation keys from every locale, and orphaned plural forms. - Tests: one default i18n mock in the chat's setup replaces 27 copies; the playground's theme tests move to @semoss/shared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FileExplorer takes a list of explorers, one per root, built with per-mode hooks (useInsightFileExplorer, useStorageFileExplorer, useSourceFileExplorer, ...). With several roots, Files opens on a top level that lists each root as an ordinary folder row: a click expands it in place, a double-click or Enter goes into it, and Backspace or the path menu's "Files" goes back up. The top-level search runs in every root, each its own way. Search filters move into a menu inside the search field. Desktop's attached folders are one Desktop root, each folder a top-level directory, with Attach Folder in its menu and empty state. Desktop search walks folders at any depth in a worker thread of the main process (local-fs:search), cancels superseded searches, and stops at 500 matches or 10 seconds. Hosts add trees through ChatComponents.WorkbenchFileRoots and useFileExplorerRoot; the room's own tree is labelled Room. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window uses hiddenInset with the traffic lights in the room header row. The room header and the sidebar's top are the drag area, and both keep clear of the lights. RoomHeader gets data-slot="room-header" so the desktop can target it without matching other headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve conflicts from dev's HTML preview rework and dependency cleanup: - html-preview-block: take dev's HtmlPreview, useHtmlPreviewStream hook, focus return and accessible labels, keeping the chat library's i18n, TooltipButton and paths; adapt dev's test to the chat's props and keys - playground vite.config: dev's coverage glob over src/features - pnpm-lock.yaml: regenerated with pnpm install --lockfile-only - libs/chat and playground-desktop: align test and build tooling with dev's pins (vitest 5.1.1, vite 8.3.8, jest-dom 8.0.0) so the old versions leave the lockfile; jest-dom/vitest setup import as elsewhere Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
No description provided.