Skip to content

feat: Solara map workspace UI with provider controls#69

Merged
giswqs merged 2 commits into
mainfrom
feat/ui-workspace
May 2, 2026
Merged

feat: Solara map workspace UI with provider controls#69
giswqs merged 2 commits into
mainfrom
feat/ui-workspace

Conversation

@giswqs

@giswqs giswqs commented May 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a Solara map-bound chat workspace at geoagent/ui/workspace.py with provider, model, fast-mode, and auto-approve controls plus session chat history and compact tool-call output.
  • Wire the existing Solara pages (00_home.py, 01_chat.py) to the new workspace and add geoagent/ui/app.py runtime helpers (map binding, provider defaults, confirmation policy).
  • Default the UI's confirmation policy to deny gated tools, pin starlette<1.0 for the ui extra, refresh README and docs/ui.md accordingly.

Test plan

  • pytest tests/test_ui_app.py -q
  • pre-commit run --all-files
  • geoagent ui opens the workspace and a prompt round-trips against an anymap map with auto-approve off.

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.
Copilot AI review requested due to automatic review settings May 2, 2026 03:30
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request May 2, 2026 03:31 Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py page that combines a live map, chat transcript, provider/model controls, fast mode, and confirmation controls.
  • Add geoagent/ui/app.py helpers 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.

Comment thread geoagent/ui/workspace.py
Comment thread docs/ui.md Outdated
Comment thread geoagent/ui/workspace.py Outdated
Comment thread geoagent/ui/workspace.py Outdated
Comment thread geoagent/ui/app.py
Comment thread tests/test_ui_app.py
- 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.
@github-actions github-actions Bot temporarily deployed to pull request May 2, 2026 18:16 Inactive
@giswqs giswqs merged commit 13f33af into main May 2, 2026
9 checks passed
@giswqs giswqs deleted the feat/ui-workspace branch May 2, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants