Skip to content

fix(connectors): keep Slack token prefix LTR in Arabic; align invite docs - #6929

Merged
kovtcharov-amd merged 1 commit into
mainfrom
kalin/fix-slack-nits
Nov 7, 2026
Merged

kovtcharov-amd merged 1 commit into
mainfrom
kalin/fix-slack-nits

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Two leftovers from #6855. In Arabic, the "token should start with xoxb-" message could show the prefix's hyphen at the wrong end of the token. The prefix is now pinned left-to-right. The Slack guide's troubleshooting section also told users to run /invite @your-app-name while the setup steps say /invite @GAIA. Both now say @GAIA, with a note for apps made by hand.

Test plan

  • New vitest: the Arabic wrong-prefix error contains the prefix in an LTR isolate (⁦xoxb-⁩). It failed before the fix.
  • cd src/gaia/apps/webui && npx vitest run: 3180 pass
  • npx tsc --noEmit

…docs

The Arabic "should start with xoxb-" message now isolates the prefix as
left-to-right, so its hyphen can't drift to the wrong end of the token in a
right-to-left line. The Slack guide's "Common issues" now says `/invite @GAIA`
like the setup steps, with a note for hand-made apps.
@kovtcharov-amd kovtcharov-amd self-assigned this Nov 7, 2026
@github-actions github-actions Bot added the documentation Documentation changes label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve

This fixes two small things left over from the Slack connector work. In Arabic, the "token should start with xoxb-" message no longer shows the hyphen at the wrong end of the prefix. The Slack guide's troubleshooting section now gives the same /invite @GAIA instruction as the setup steps and the in-app help. The change is small and uses the helper other screens already use for this. A new test covers it, and the author says it failed before the fix.

Real-world evidence

The evidence stage exercised the backend behind the Slack configure panel. The rendered Arabic screenshot is pending strix-halo lane, so the visual result rests on the unit test and static review.

$ curl http://127.0.0.1:4200/api/connectors/mcp-slack
HTTP 200
  "key": "SLACK_MCP_XOXB_TOKEN",
  "prefix": "xoxb-"
  (help_md ends: "Then type `/invite @GAIA` in each channel GAIA should read.")
$ curl -X POST http://127.0.0.1:4200/api/connectors/mcp-slack/configure \
    -H "X-Gaia-UI: 1" -H "Content-Type: application/json" \
    -d '{"config":{"SLACK_MCP_XOXB_TOKEN":"xapp-1"}}'
{"detail":"The Slack bot token should start with xoxb-. Copy it again from the setup steps."}
HTTP 400

The rejected token was not stored. The sibling connector routes (list, agent-mcps, grants) all returned 200 with the expected shapes. The evidence supports merging. Once the strix-halo lane captures the Arabic screenshot, add it to the PR.

🔍 Technical details

Issues found: none blocking, and no nits worth posting.

  • I checked the docs for leftover copies of the old wording. The only remaining /invite @… mentions are docs/connectors/slack.mdx:47, the troubleshooting line this PR fixes, and the catalog help in src/gaia/connectors/catalog/mcp_servers.py:191. All three now say @GAIA.
  • ltrIn(code, …) takes its locale from the t.compose callback, so the prefix gets an isolate only when the composed locale is RTL. English output is unchanged.
  • No known bug class applies: this is a pure render change with no waits, shared state or startup path.

Strengths

  • It reuses ltrIn from setup/format.ts rather than adding another bidi helper.
  • The test checks for the actual LRI…PDI isolate characters around xoxb-, not just that an Arabic message appeared. It also resets the locale in a finally block, so a failure here can't break the tests that run after it.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 98e8a66 Nov 7, 2026
50 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the kalin/fix-slack-nits branch November 7, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant