{"version":"2.1.336","anchor":"ui-attach-accepts-a-clientfocus-draw","canonical_anchor":"ui-attach-accepts-a-clientfocus-draw","heading":"Attached interfaces can declare ClientFocus so focus can move to embedded plugin modules","tier":"internal","area":"UI Attach","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336\/e\/ui-attach-accepts-a-clientfocus-draw","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.336","markdown":"### Attached interfaces can declare ClientFocus so focus can move to embedded plugin modules\n\nThe `ui_attach` request accepts `ClientFocus`, so focus can target a plugin's embedded Client element, and surface regions gain `autoFocus`\n\n**What**\n\nPlugins can draw screens inside Claude Code, and an outside interface such as a desktop app can attach with a `ui_attach` request listing what it can draw. Embedded plugin modules (the Client element) could already ask for `autoFocus`. The rest of the focus support is new:\n\n- `ClientFocus` is now accepted in the `draws` list of `ui_attach`, for desktop clients that read `autoFocus` on a `Client`. Before, the known draws were Theme, Input, Progress, Select and Shader.\n\n- The plugin focus key can now point to a Client, by its `client.plugin` and `props.key`, when the client names `ClientFocus` in `draws`. Before, it could point only to a Button, Input or Select by its `press.plugin` and `props.key`.\n\n- A plugin surface-module region gains an optional `autoFocus` setting.\n\n- Session details passed to a session started from another one gain a `clientContentWidth` field.\n\n- When plugin commands are reloaded, `pluginInfo.namedFolderYield` is now kept instead of being overwritten.\n\n**Why**\n\nKeyboard focus can now land on an embedded plugin module or a drawn region, where previously only buttons, text inputs and select lists could be focused.\n\n- Area: UI Attach\n- Names: `ui_attach`, `ClientFocus`\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}