fix(ui): translate the context panel's 'no figure' reason

Open Beginner friendly
#8,784 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python, react, typescript
Domain
frontend

Research direction

Start in ContextPanel.tsx, where ctx.reason is rendered verbatim without a useT key, then follow the path back through GET /api/chat/context and relayed_context_reason in _chat_helpers.py. Check relay_context_error in relay.py and context_upgrade_message in profiles.py to see where the stable code would be added beside context_error. Done when the panel maps a known code such as not_reported to a translation key and falls back to the English text for unknown codes.

Written by the indexing model from the issue text.

Description

agent-ui bug p3

The Agent UI's context panel shows an agent's "why there is no figure" note as raw English, so a user running the UI in another language reads an untranslated sentence there.

Two notes take this path today: the sidecar's own reason (gaiacpp's "Not available yet…", added in #8684) and the relay profile's upgrade message. The fix is to send a stable code next to the English text and have the panel map the code to a translation key, keeping the English as the fallback for codes the UI doesn't know yet.

🔍 Technical details
  • Path: the final event's context_error → relay.py (relay_context_error) → relayed_context_reason in _chat_helpers.py → GET /api/chat/context → ContextPanel.tsx, which renders ctx.reason verbatim with no useT key.
  • RelayProfile.context_upgrade_message in profiles.py reaches the same field the same way.
  • Suggested shape: context_error_code (for example not_reported) beside context_error; the panel looks up context.reason.<code>.
Dominant language
Python
Stars
1.6k
Forks
169
Avg merge
15h 4m
Merged PRs (30d)
847

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from amd/gaia

All issues in amd/gaia

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.