feat(desktop): ABI Desktop standalone local app#1070
Open
jravenel wants to merge 48 commits into
Open
Conversation
Introduce a lightweight Nexus-style desktop app with Chat and Code sections, opencode/pi harness adapters, SQLite persistence, embedded Oxigraph, Monaco IDE, Ollama integrations, Settings, TDD coverage, and PyInstaller packaging.
Add native Finder drop bridge via pywebview, /api/files/import-local endpoint, graceful shutdown, and web UI polish for file import feedback.
Deploying abi-docs with
|
| Latest commit: |
33f5ddf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d5fd1fa5.abi-docs-76c.pages.dev |
| Branch Preview URL: | https://feat-abi-desktop-app.abi-docs-76c.pages.dev |
ABI Desktop chat failed when opencode agents ran against phi and other models without tool calling. Filter Ollama sync to tool-capable models, validate at send time, dedupe stream errors, and seed opencode.json plus env templates so workspace config is visible in the Code explorer.
Introduce canonical {workspace}/{org}/{model}/ paths for AGENTS.md, MEMORY.md, and RDF files, wire settings/API/graph/chat integration, and document the layout in an ADR.
Load system ontology TTL into the embedded graph, resolve chat/code section routes via SPARQL, and document iteration-1 routing in ADR.
Load system BFO7 TTL plus routing vocabulary into Oxigraph, scaffold meaningful ontology/instances per org/model, and resolve harness agents from SPARQL on chat send.
Route composer intent to local or cloud models via instances.ttl realizabilities, expose POST /api/router/suggest, and show debounced suggestion chips in the chat UI.
Restore Ollama-to-instances sync, hermetic test isolation, Graph active-context panel with auto SPARQL, and automatic repair of corrupt context TTL so BFO7 routing works when ~/abi is the workspace.
…code chat Add ABI branding assets, templates/slides seeding, Finder drag-drop import, Code section live HTML preview, opencode binary path resolution, and a reliable smoke_chat.sh (qwen2.5-coder, build agent, SSE complete exit).
Wire the rounded Nexus logo in the icon rail, chat empty state, favicon, and macOS Dock icon via PyInstaller .icns and pywebview.start(icon=).
Match Nexus message bubbles, agent/model picker pills, expandable tool-call dropdown, and RAG/URL sources panels; persist sources in SQLite and stream them over SSE.
Restore --radius: 0 and zero out all border-radius reintroduced by the Nexus chat port, keeping only .avatar.user circular per design.
Skip pywebview and PyInstaller during daily development via --browser-only or ABI_DESKTOP_BROWSER=1; document the workflow in AGENTS.md.
Expose GET /api/graph/overview to merge SQLite app data with Oxigraph routing triples and cross-store sync edges, with a Nexus-inspired Graph section (network canvas, detail table, SPARQL/Tables tabs).
Mirror bob ontology viewer patterns with search/filter highlighting, a slide-in inspector for node meta and relations, and richer overview node details for language models and BFO buckets.
Replace ephemeral port binding with a fixed localhost URL so browser bookmarks and tabs survive restarts; add ABI_DESKTOP_PORT override, port-in-use errors with PID, optional +1 fallback, and --reload support.
Split the flat desktop layout into clear layers so entry points, domain logic, HTTP API, and static UI each have a home. Updates imports, PyInstaller datas, and AGENTS.md without changing runtime behavior.
Move opencode and pi adapters out of harness/adapters/ into sibling provider folders, document why harness/ sits beside api/ in hexagonal layout, and add hermes/ stub with factory registration guidance.
Align bundled TTL folder naming with harness/ (singular) and update resolve_system_ontology_paths, PyInstaller datas, docs, and tests.
Avoid flaky failures when ABI Desktop or another process holds port 54242 by monkeypatching DEFAULT_SERVER_PORT to a free ephemeral port in port tests.
Give ABI Desktop a proper README, scripts/test.sh for pytest + coverage, coverage-kpi.sh for CI, make test-desktop, and hermetic port tests so the suite stays reliable when port 54242 is already in use.
Expose GET /api/workspaces and POST /api/workspaces/open so users can switch between on-disk project folders like VS Code/Cursor, with persisted recents and Nexus-inspired topbar UI including browser and pywebview open-folder flows.
Places the clickable workspace name on the bottom status bar (VS Code/Cursor pattern), keeps the ABI logo in the icon rail, and opens the menu upward from the bar.
Move the status bar out of #main-col so it sits at the #app root like VS Code, spanning edge-to-edge under the icon rail and section panel.
Reverts the status-bar switch control from def2ad7 so switching stays in the Nexus-style top-left control (logo + basename + chevron) while the full-width status bar only reflects workspace and git context.
Place the interactive workspace switcher in .rail-top (Nexus sidebar-top pattern) and keep the status bar read-only. Top bar stays panel toggle plus section title only.
Match Nexus UX: icon rail shows only the logo button (dropdown portal to the right with glass card, Workspaces header, active checkmark). Workspace basename and git branch live in the status bar as read-only context.
Rail navigation updates the location hash so refresh and back/forward restore the active section; settings tabs support #settings/<tab> and #ide aliases Code.
Replace vague group filters with bob_ontology.html bucket legend, node coloring, and inspector subclass navigation backed by new graph bucket/subclass APIs.
Classify every graph node into one of seven BFO buckets and use inline toolbar toggles instead of legacy group chips plus a redundant sidebar.
Decompose each chat into cross-bucket aspect nodes mapped from desktop-routing.ttl (Process, Temporal, Material, Site, Information, Role, Quality) and paint nodes with bob_ontology.html palette colors instead of generic blue dots.
Oxigraph and the dev UI break when multiple desktop processes share ~/.abi-desktop; acquire an instance lock, write server.json, and refuse to bind on a fallback port when ABI Desktop is already healthy on the default port.
Each chat and route process now emits six satellite bucket nodes plus the process hub, with shared deduplication and grey dashed unknown placeholders. Fixed vis.js layout uses server-side ring coordinates around AI System, and ABOX/TBOX/Full toggles drive the graph API view parameter.
Persist each occurrent as processes + process_aspects + shared aspect_entities, sync on chat create, and drive the ABOX hub-and-spoke graph from SQLite rows with shared dedup and unknown bucket placeholders.
Expose paginated /api/processes with seven BFO bucket columns and show a scrollable events log above the vis-network canvas in the Graph Overview tab, with row click focusing the matching process node.
Give the process log its own Events rail view with a full-height table, detail panel, and #events routing; remove the cramped table from Graph Overview and place the workspace logo above Settings in the rail bottom.
Introduce make dev-desktop and scripts/dev.sh so the browser dev server survives agent shell exit, clears stale locks, and auto-restarts on crash. Uvicorn reload now uses the create_app factory import path.
dev.sh start no longer stops a healthy server, uses start_new_session for macOS detach, flock to prevent parallel start races, and adds status. main.py exits 0 when ABI_DESKTOP_PORT is set and our app is already healthy.
Revert the iteration-8 move that placed the workspace switcher above Settings; match Nexus sidebar-top pattern with Settings alone in rail-bottom.
Split Events into a Table rail (Events + SQLite sub-tabs), move the workspace explorer to a dedicated Files section, and add GET /api/tables for paginated SQLite browsing.
Use /api/tables/{name} in the frontend and tests to match the server endpoint shape.
Replace Events|SQLite sub-tabs with a single table-name nav and path-based
GET /api/tables/{name}; processes/events returns the 7-bucket event grid.
Replace the tree explorer with a Nexus-style file manager: toolbar actions, path breadcrumbs, searchable list/grid views, preview split, and context menus. Add mtime to /api/files entries for modified-date columns.
Centralize workspace change handling in onWorkspaceChanged() so logo dropdown and settings save refresh files, tables, graph, chat, code, status bar, and panel sidebars for the new workspace_root.
This was referenced Jul 13, 2026
When default_model is unset and qwen2.5-coder is installed, persist ollama/qwen2.5-coder:7b on Ollama sync and prefer it for chat fallback.
Code section prompts now tell the build agent to use filesystem tools instead of dumping HTML in chat or writing to MEMORY.md. File listing also skips broken symlinks that previously crashed the explorer API.
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
libs/naas-abi/naas_abi/apps/desktop/: a lightweight Nexus-style local app (Chat + Code) with no Postgres/Docker dependencyHarnessPort) with opencode and pi adapters; SQLite store; embedded Oxigraph graph; Monaco IDE + xterm terminal; Ollama probe in Settingsbuild.mdfor macOS.apppackagingCloses #1069
Note: PR #964 adds a Code IDE section inside Nexus. This PR is a separate standalone desktop app with overlapping UX but different architecture (local-only, no
naas_abiengine imports).Test plan
uv run pytest libs/naas-abi/naas_abi/apps/desktop -vuv run python libs/naas-abi/naas_abi/apps/desktop/run.py— verify Chat and Code sections loadopencodeon PATH: send a chat message and confirm SSE streamingbuild.mdand launchdist/ABI Desktop.app