Imported from IAmNo1Special/mvgeos (
mvgeos-gui/AGENTS.md). Install upstream withnpx skills add IAmNo1Special/mvgeos --skill mvgeos-gui. Copyright stays with the author.
mvgeos-GUI — Agent Instructions
This package implements the native desktop graphical interface for MvgeOS powered by NiceGUI and PyWebView. It provides a 1:1 visual experience matching Google Antigravity IDE for multi-turn Summoner interactions, live Spell tracking, Git diff inspection, and Tome navigation.
Package-Specific Conventions
- All code follows the red-green-refactor TDD cycle: write failing test first, then implement
- No inline imports (
await import(),import("pkg").Type). Top-level imports only - Use
pathlib.Pathfor all file path operations — never raw string concatenation - Mock sync methods with
MagicMock(), async methods withAsyncMock()— mixing causes "coroutine never awaited" warnings
Testing
# Run this package's tests
uv run pytest mvgeos-gui/tests/
# Run with coverage
uv run pytest mvgeos-gui/tests/ --cov
Test paths follow pattern: mvgeos-gui/tests/unit/<module>.py and mvgeos-gui/tests/integration/<module>.py
Key Types & Services
| Type | Purpose |
|---|---|
AppState |
Central reactive UI state (project, conversations, streaming tokens, artifacts, git diff, settings) |
AgentService |
Async execution bridge running CodingMvge and MvgeHarness, consuming event bus |
TomeService |
Session persistence, conversation loading, and branch forking via TomeHandleFactory |
ConfigService |
Provider and workspace configuration manager |
GitDiffService |
Workspace Git diff calculation, staged/unstaged changes, and diff line stats |
AutocompleteService |
Fuzzy autocomplete provider for @ mentions (files, skills, subagents) and / slash commands |
init_app |
NiceGUI layout builder assembling shell, themes, and reactive watchers |
main |
CLI entry point (mvgeos-gui) supporting native PyWebView window and --web mode |
UI Architecture
-
Left Navigation (
sidebar.py,home_screen.py):- Project selector and workspace switching
- Conversation history grouped by relative time badges
- Settings access (app + workspace modals) and scheduled tasks
-
Center Viewport (
shell.py,chat_panel.py):- Active State (
chat_panel.py): Message bubbles, channeling responses, collapsible step cards (step_cards.py,message_parts.py), inline composer with@//autocomplete popup, attachment chips, model switcher, and cancel/stop button - Side panels: file tree (
file_tree.py) and diff viewer (diff_viewer.py) - Terminal overlay (
terminal_panel.py)
- Active State (
-
Overlays (mounted in
shell.py):- Command palette (
command_palette.py) - Artifact drawer (
artifact_drawer.py) - Application settings modal (
settings_modal.py) and Project Workspace settings modal (workspace_settings_modal.py), backed byconfig_service.py - Diff review modal (
diff_review.py)
- Command palette (
-
Right Rail & Status:
- Review rail (
review_rail.py) with changed files - Status bar (
status_bar.py) reflectingAppState.mvge_status(idle / channeling / working), model, and Mana usage
- Review rail (
Dependencies
nicegui— Python UI frameworkpywebview— Native OS window container without browser chromepathspec— Path and pattern matchingcoding-mvge— Concrete coding agentmvgeos-agent— Core agent loop, types, and harnessmvgeos-provider— Realm protocol and providersmvgeos-tome— JSONL session persistencemvgeos-runes— Rune extension systemmvgeos-cli— CLI and credential helpers