Skip to content

feat(assistant): ask the assistant about a tile error - #166

Open
emmanuelmathot wants to merge 1 commit into
feat/assistant-docs-urlfrom
feat/ask-about-tile-errors
Open

emmanuelmathot wants to merge 1 commit into
feat/assistant-docs-urlfrom
feat/ask-about-tile-errors

Conversation

@emmanuelmathot

Copy link
Copy Markdown
Contributor

Stacked on #164.

What

Since #156, a processing error is often shown on a map tile, not for the run. The user could not ask the assistant about it, except by copying the error into the chat.

  • The tile alert gets Ask the assistant, when an agent is configured.
  • The tile error of the current view goes to the agent as diagnostics.tiles (code, message, failed, at). The contract (1.1) also gets the trigger kind map.tileError. The schema is generated again.
  • The map panel writes the tile error to the editor store. A new view or a new project clears it.
  • A question from an error, in the editor or on the map, goes through the assistant store (ask). The workspace opens the Assistant tab, and the tab sends the question once.

The toolset reads diagnostics.tiles in developmentseed/openeo-studio-assistant#3.

Test

pnpm build, pnpm lint and pnpm test pass. New tests: the store (tileError, ask), the state document, and the tile alert's button. Not tried in the browser with an agent.

🤖 Generated with Claude Code

@claude

claude Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Claude finished @emmanuelmathot's task in 21s —— View job


✅ No blocking issues — safe to merge.

I read the full app/ diff. I did not run the build or tests, and the PR says it was not tried in a browser with an agent.

  • Tile error reaches the agent. assistant-tab.tsx:179 spreads the editor store into studioDocument, so tileError arrives as diagnostics.tiles with no extra wiring.
  • Stale errors are cleared. use-map-tile-status restarts the status on a new view, and results-panel.tsx:62 resets it to idle when no services remain. The effect at line 73 then writes null to the store. The three project resets in the store also clear it.
  • The question handoff holds up. ask sets the question, the workspace effect switches to the Assistant tab, and AssistantTab takes the question once. It waits while busy is true and drops the question if the thread changed. After takeQuestion sets question to null, the workspace effect runs again and does nothing, so there is no tab-switch loop.

Simplify (ponytail)

  • app/utils/agent.ts:186: the inline tileError?: {code; message; failed; at?} type repeats TileError from editor-store.ts. Use tileError?: TileError | null, or Pick<EditorState, 'tileError'>.
  • app/types/agent.ts StudioDiagnostics.tiles?: TileDiagnostic | null: the field is both optional and nullable. studioDocument always sets it, so keep only | null. The ? is only needed if old producers must still type-check.
  • app/stores/assistant-store.ts question and takeQuestion: the tab reads question and then calls takeQuestion(), which reads it again. Read question from the store once. Make the action clearQuestion, or have the effect call set({question: null}) after sending.

💰 Estimated review cost: $0.15 · 0m21s · 9 turns

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🐳 Docker image built for this PR:

docker pull ghcr.io/developmentseed/openeo-studio:pr-166

The tile alert on the map gets "Ask the assistant". The tile error of the
view goes to the agent as diagnostics.tiles (contract 1.1, with the
map.tileError trigger kind). Questions from an error, in the editor or on
the map, go through the assistant store, which opens the Assistant tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emmanuelmathot
emmanuelmathot force-pushed the feat/ask-about-tile-errors branch from ea5a567 to 2f73cef Compare November 4, 2026 14:07

This branch has not been deployed

No deployments
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.

1 participant