Skip to content

fix(site): Control robots card shows Python code under TypeScript - #6143

Open
TheWitcherish wants to merge 1 commit into
strands-agents:mainfrom
TheWitcherish:fix/usecases-robots-ts-shows-python
Open

TheWitcherish wants to merge 1 commit into
strands-agents:mainfrom
TheWitcherish:fix/usecases-robots-ts-shows-python

Conversation

@TheWitcherish

@TheWitcherish TheWitcherish commented Nov 13, 2026 •

Copy link
Copy Markdown

Human Overview

Caught this live on stream prep: the homepage's "Control robots" card showed Python code even with TypeScript selected. Turned out the TS sample was Python dressed up as TypeScript strands-robots has no TS package. Fixed it to follow the same Python-only pattern InteractiveToolkit.astro already uses for Evals.

Description

The homepage's "Control robots" use-case card labeled Python code as its TypeScript sample (filename shown as .py, content using from ... import). strands-robots has no TypeScript package, so there was never a real TS sample to show. This omits the fabricated ts array for that card, adds a pythonOnly flag, and falls back to the Python panel plus a short note when TypeScript is selected — the same pattern InteractiveToolkit.astro already uses for the Python-only Evals card.

Related Issues

Closes #6142

Documentation PR

Yes — site/src/components/UseCases.astro.

Type of Change

Bug fix

Testing

  • npx astro build — 1259 pages built, no broken links.

  • npx prettier --check src/components/UseCases.astro — passes.

  • Inspected the built dist/index.html: the "robots" use case now renders only a data-lang-code="python" panel plus the hidden data-use-case-note="robots" fallback note; no typescript panel is emitted for it.

  • npx astro check reports the same pre-existing errors in this file as on main before this change (indexed-access/token-color type-inference noise unrelated to this fix) — no new error categories introduced.

  • I ran hatch run prepare

Additional Details

Extended context (optional)

Filed from a live repro: selecting TypeScript on the homepage and picking "Control robots" showed Python import syntax instead of TypeScript (or a Python-only note). The other three cards on the same component switch correctly.

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions Bot added bug Something isn't working documentation Documentation changes, improvements, additions, content updates, site improvements, examples, guides labels Nov 13, 2026
@TheWitcherish
TheWitcherish marked this pull request as ready for review November 13, 2026 18:27
@TheWitcherish
TheWitcherish requested a review from a team as a code owner November 13, 2026 18:27

This branch is waiting to be deployed

1 waiting deployment
manual-approval — 1a7c850b Waiting Nov 13, 2026 by TheWitcherish via Build and Deploy Preview #3848
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Documentation changes, improvements, additions, content updates, site improvements, examples, guides

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CORRECTION] Homepage 'Control robots' card shows Python code when TypeScript is selected

1 participant