Skip to content

0.48.1 — modal focus fix + generic MCP client config

Choose a tag to compare

@Dim145 Dim145 released this 05 Sep 12:09
· 33 commits to main since this release

Modal focus fix + a config block for every other client

A patch on top of 0.48.0.

Fixed

Modals stole focus back on every keystroke. Typing in a text field inside any modal moved focus to the dialog's close button after each character — the character landed correctly first, so what you saw was a caret vanishing mid-word and the Tab order restarting from the top.

useFocusTrap listed onClose in its effect dependencies, and every caller passes an inline arrow. So any parent re-render — a keystroke updating the field's state, for instance — produced a new function identity, tore the effect down and set it up again, and the setup re-focuses the first tab stop. The callback now lives in a ref, so focus is placed once per open rather than once per render.

This affected every modal in the app, not just the new one. The three that could hit it in practice — the ones pairing a text input with an inline onClose — were the API-key dialog, the figure lookup and admin settings.

The API-key dialog now also opens focused on its name field instead of on the close button.

Docs

The MCP setup section only showed claude mcp add, which covers exactly one client. It now carries the generic mcpServers JSON block (Cursor, Windsurf, Cline, OpenCode, Claude Desktop), the VS Code variant under servers, and the mcp-remote bridge for clients that still launch servers as a subprocess — plus the two traps worth knowing: keeping the key out of a committed .vscode/mcp.json, and why the mcp-remote header argument has no space after its colon.


📘 MCP documentation
🐳 ghcr.io/dim145/figurecollector-{server,client,docs}:0.48.1
📝 Full changelog: 0.48.0...0.48.1