Skip to content

Add Kiro IDE support, and fix the RTL toggle's placement in the header - #2

Open
abdoo431 wants to merge 2 commits into
yechielby:masterfrom
abdoo431:feat/kiro-ide-support
Open

abdoo431 wants to merge 2 commits into
yechielby:masterfrom
abdoo431:feat/kiro-ide-support

Conversation

@abdoo431

@abdoo431 abdoo431 commented Aug 27, 2026

Copy link
Copy Markdown

Two commits: Kiro support, and a fix for where the toggle button is inserted.


1. Kiro IDE support

Adds Kiro to the editors the script can patch, alongside VS Code and Cursor. Kiro keeps its extensions in ~/.kiro/extensions, so the scanner now looks there too, on every platform and inside WSL distros.

The per-editor search paths were being repeated once per editor per platform — five nearly identical blocks. That duplication is how the missing remote-server path below slipped in, so the editor directories now live in a single EDITOR_LABELS map that drives both the search paths and the display names. Adding a fourth editor is now a one-line change.

  • Search .kiro-server too. Every other editor has a local dir and a remote counterpart (.vscode/.vscode-server, .cursor/.cursor-server); Kiro only had the local one, so Kiro installs over VS Code Remote / WSL / SSH were never discovered.
  • Label results by editor. The same extension version installed in two editors produced two identical, indistinguishable output lines. Results now read Kiro - anthropic.claude-code-2.1.245-win32-x64.
  • Widen the menu rules from 55 to 63 columns — the longer title had grown past the separator.
  • Stop scanning both \wsl$ and \wsl.localhost. They alias the same filesystem, so every WSL extension was being discovered twice. Pre-existing and unrelated to Kiro — happy to split it out.

2. Toggle button placement

The toggle was inserted with querySelector('[class*="header_"]'), which takes the first of the twelve elements whose class matches that prefix — not necessarily the session toolbar. It was also given a fixed 28px box with flex-shrink: 0, so in a narrow panel it took space from the toolbar's flex row and pushed the history and new-chat buttons out of view.

It now anchors to those buttons rather than guessing a container. They are drawn by the extension's shared icon-button component, so the last [class*="iconButton_"] inside a header is a reliable sibling to insert after, and copying its class list gives the toggle the extension's own size, padding, hover and colours. Nothing gets squeezed out, and the hashed class names — which change every release — are never hard-coded. The fixed dimensions move to a .yby-standalone class used only on the fallback path.

Two related fixes:

  • Skip headers inside the messages container. Those carry icon buttons of their own (copy, retry), so the toggle could land inside a message.
  • Repaint from #root after insertion. A React re-render drops the button, and the observer's replacement was built in the off state even while RTL was still applied, so the toggle looked inactive when it was not.

Mutation handling is coalesced with requestAnimationFrame; a streaming reply fires a great many mutations and each one re-ran the DOM query.

The CSS and JS markers are deliberately unchanged. Rewriting them would strand existing installs and break uninstall.

Documentation

README updated in all three languages. The Arabic section had not been updated when Cursor support was added either, so it is brought fully in line here. The interactive-menu samples in the Hebrew and Arabic sections now match the program's real output byte-for-byte, and Kiro is added to the links list.

Testing

On Windows 11 against real VS Code and Kiro installs:

  • Discovery finds extensions under ~/.kiro/extensions as well as ~/.vscode/extensions; editor labels resolve for Windows, POSIX and UNC/WSL path styles, with a safe fallback.
  • Full add → status → remove round-trip leaves index.css and index.js byte-identical to the originals, with no leftover .bak files.
  • Button behaviour checked against a DOM mirroring the real extension structure — 12 assertions: it lands in the toolbar and not in a per-message header, both native buttons survive, native classes are copied, the toggle round-trips, and a simulated re-render restores it exactly once with its state intact.
  • Both README menu blocks compared programmatically against actual program stdout.

Upgrade note

add skips an extension that already has an older injection, reporting "already installed". Anyone upgrading needs to run remove (2), then add (1) to pick up the new button placement. Glad to add a version stamp so add replaces an outdated injection automatically, if you'd prefer that in this PR.

Note: agents.md still describes VS Code only — it was not updated when Cursor support landed either. Left out to keep this focused.

🤖 Generated with Claude Code

abdullah7386 and others added 2 commits August 28, 2026 02:50
Kiro stores extensions in ~/.kiro/extensions, so the extension scanner
now looks there in addition to the VS Code and Cursor locations, on
every platform and inside WSL distros.

Rather than repeating the same append block once per editor per platform
(which is how the missing remote-server path below slipped in), the
editor directories now live in a single EDITOR_LABELS map that drives
both the search paths and the display names.

Also included:

- Search .kiro-server as well. Every other editor has a local dir and a
  remote counterpart; Kiro only had the local one, so Kiro installs over
  VS Code Remote / WSL / SSH were never discovered.
- Label each result with its editor ("Kiro - anthropic.claude-code-..."),
  since the same extension version installed in two editors previously
  produced two identical, indistinguishable lines.
- Widen the menu rules from 55 to 63 columns; the longer title had grown
  past the separator.
- Stop scanning both \wsl$ and \wsl.localhost. They alias the same
  filesystem, so every WSL extension was discovered twice.

The CSS and JS markers are deliberately left unchanged; rewriting them
would strand existing installs and break uninstall.

README is updated in all three languages, including the Arabic section
and the interactive-menu samples, which now match the program output.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The toggle was inserted with querySelector('[class*="header_"]'), which
takes the first of the twelve elements whose class matches that prefix -
not necessarily the session toolbar. It was also given a fixed 28px box
with flex-shrink:0, so in a narrow panel it took space from the toolbar's
flex row and pushed the history and new-chat buttons out of view.

Anchor to those buttons instead of guessing a container. They are drawn by
the extension's shared icon-button component, so the last element matching
[class*="iconButton_"] inside a header is a reliable sibling to insert
after, and copying its class list gives the toggle the extension's own
size, padding, hover and colours. Nothing can be squeezed out, and the
hashed class names, which change every release, are never hard-coded.

The fixed dimensions move to a .yby-standalone class applied only on the
fallback path where no native button was found to copy.

Two related fixes:

- Skip headers inside the messages container. Those carry icon buttons of
  their own (copy, retry), so the toggle could land inside a message.
- Repaint from #root after insertion. A React re-render drops the button,
  and the observer's replacement was built in the off state even while RTL
  was still applied, so the toggle looked inactive when it was not.

Mutation handling is coalesced with requestAnimationFrame; a streaming
reply fires a great many mutations and each one re-ran the DOM query.

Verified against a DOM mirroring the real extension structure: the button
lands in the toolbar, both native buttons survive, the toggle round-trips,
and a simulated re-render restores it once with its state intact.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@abdoo431 abdoo431 changed the title Add Kiro IDE support alongside VS Code and Cursor Add Kiro IDE support, and fix the RTL toggle's placement in the header Aug 28, 2026
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