feat: Solara map workspace UI with provider controls#69
Merged
Conversation
Replaces the placeholder Solara pages with a single map-bound chat workspace that lets users pick provider, model, fast mode, and auto-approve from the browser. Confirmation-required tools are denied by default unless auto-approve is enabled.
|
🚀 Deployed on https://69f63f7c4130b37da5a5b6a3--opengeos.netlify.app |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Solara-based web workspace for GeoAgent, aimed at giving the browser UI parity with the project's existing map-bound chat surfaces. It adds runtime helpers for map binding and provider/model selection, routes both existing Solara pages to the new workspace, and updates packaging/docs for the UI flow.
Changes:
- Add a new
geoagent/ui/workspace.pypage that combines a live map, chat transcript, provider/model controls, fast mode, and confirmation controls. - Add
geoagent/ui/app.pyhelpers for default models, confirmation behavior, map binding, and bound-agent creation. - Update Solara pages, tests, packaging, and UI documentation to point at the new workspace-based flow.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_ui_app.py |
Adds coverage for new UI helper functions and import-safety checks for the Solara pages. |
pyproject.toml |
Updates the ui extra dependencies to include a Starlette version pin alongside Solara. |
geoagent/ui/workspace.py |
Implements the new Solara workspace UI, including map display, controls, chat history, and tool-call rendering. |
geoagent/ui/pages/01_chat.py |
Replaces the old minimal chat page with the shared workspace component. |
geoagent/ui/pages/00_home.py |
Replaces the old home page content with the shared workspace component. |
geoagent/ui/app.py |
Adds UI runtime helpers for provider/model defaults, confirmation policy, map binding, and GeoAgent construction. |
docs/ui.md |
Rewrites the web UI documentation around the new workspace workflow and safety model. |
README.md |
Adds a top-level browser workspace quick-start section for the new UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- workspace.py: render user prompts inside a fenced code block so text containing Markdown, links, or raw HTML cannot reinterpret the transcript. - workspace.py / app.py: derive the initial provider from the environment via a new default_provider() helper instead of hard-coding openai-codex, so users with only OPENAI_API_KEY (or other credentials) start on the right provider. - workspace.py / app.py: move the send pipeline into a dispatch_prompt helper that prepends recent transcript context (mirroring the QGIS chat dock) and is unit-testable without a Solara render. - app.py: compact tool-call args/results structurally (per-string, per-list, per-dict caps) before stringifying, so a single oversized payload no longer allocates a multi-megabyte intermediate string. - docs/ui.md: replace the source-tree-only solara run path with one that resolves PAGES_DIR dynamically, and document the source-checkout shortcut. - tests: add coverage for default_provider, build_prompt_with_context, format_response_message, dispatch_prompt success / binding-error / agent-exception flows, and the structural compact_tool_call truncation.
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
geoagent/ui/workspace.pywith provider, model, fast-mode, and auto-approve controls plus session chat history and compact tool-call output.00_home.py,01_chat.py) to the new workspace and addgeoagent/ui/app.pyruntime helpers (map binding, provider defaults, confirmation policy).starlette<1.0for theuiextra, refresh README anddocs/ui.mdaccordingly.Test plan
pytest tests/test_ui_app.py -qpre-commit run --all-filesgeoagent uiopens the workspace and a prompt round-trips against ananymapmap with auto-approve off.