Title: [REQUEST] Focus the new variable's name field after clicking "Add new variable" · Issue #10064 · simstudioai/sim · GitHub
Open Graph Title: [REQUEST] Focus the new variable's name field after clicking "Add new variable" · Issue #10064 · simstudioai/sim
X Title: [REQUEST] Focus the new variable's name field after clicking "Add new variable" · Issue #10064 · simstudioai/sim
Description: Is your feature request related to a problem? Please describe. When I add a workflow variable in the workflow builder (⋯ → Variables → +), the new variable appears with a default name (variable1, variable2, …), but focus stays on the + b...
Open Graph Description: Is your feature request related to a problem? Please describe. When I add a workflow variable in the workflow builder (⋯ → Variables → +), the new variable appears with a default name (variable1, v...
X Description: Is your feature request related to a problem? Please describe. When I add a workflow variable in the workflow builder (⋯ → Variables → +), the new variable appears with a default name (variable1, v...
Opengraph URL: https://github.com/simstudioai/sim/issues/10064
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[REQUEST] Focus the new variable's name field after clicking \"Add new variable\"","articleBody":"**Is your feature request related to a problem? Please describe.**\n\nWhen I add a workflow variable in the workflow builder (⋯ → Variables → **+**), the new variable appears with a default name (`variable1`, `variable2`, …), but focus stays on the **+** button. To name it, I have to find the new row and click its Name field before typing. With several variables in the panel, the new one is added at the bottom, so it isn't always obvious which row is new.\n\nIt's a small thing, but it comes up every time you add a variable, and keyboard users get the worst of it: after Tab → **+** → Enter, whatever you type next goes nowhere.\n\n**Steps to reproduce**\n\n1. Open any workflow and go to ⋯ → **Variables**.\n2. Click **+** (\"Add new variable\").\n3. Start typing a name straight away.\n4. Nothing is typed: focus is still on the **+** button, and the new variable keeps its default name.\n\nKeyboard-only version: Tab to **+**, press Enter, type. Same result.\n\n_Before:_\nhttps://github.com/user-attachments/assets/f3fd0713-bd33-4753-a04d-b34f31ae4014\n\n**Describe the solution you'd like**\n\nAfter clicking **+**, focus the new variable's Name input and select its default name, so the first keystroke replaces `variableN`. This matches how \"add row\" or \"new file\" works in most tools (e.g. renaming a new file in a file explorer). Focusing the input also scrolls it into view inside the panel, so the new row is visible even in a long list.\n\nThe new id is already available: `collaborativeAddVariable` in `hooks/use-collaborative-workflow.ts` returns it, but `handleAddVariable` in `w/[workflowId]/components/variables/variables.tsx` ignores it. A ref callback on the Name input can focus that one row once it mounts, with no effect needed. Only the client that clicked **+** should move focus: a variable added by a collaborator shouldn't steal focus from someone else.\n\nI have a small fix ready (one file, about 10 lines) and can open a PR against `staging`.\n\n**Describe alternatives you've considered**\n\n- **Focus with the cursor at the end, instead of selecting:** you'd have to delete `variableN` before typing, which is almost never what you want.\n- **Create the variable with an empty name and focus that:** changes store behaviour (default naming and uniqueness), so it's a bigger change than this needs.\n\n**Additional context**\n\n- Reproduced on `staging` at `0156813a4c` (the file is unchanged on the latest `staging`, `eaed9a110f`), running locally in dev mode, in Google Chrome on Windows 11.\n- Related accessibility detail, out of scope here: the Name, Type and Value `\u003cLabel>`s in this panel aren't linked to their inputs (no `htmlFor`/`id`), so screen readers don't announce the field names. I'm happy to open that as a separate follow-up.\n","author":{"url":"https://github.com/mofopeadegoke","@type":"Person","name":"mofopeadegoke"},"datePublished":"2026-11-15T02:25:37Z","url":"https://github.com/simstudioai/sim/issues/10064"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:86e7fdb8-3abd-d333-9628-fccd86343fbf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE3A:1C8E04:189B217:218CD61:6AFB8932 |
| html-safe-nonce | 2befe828920b2cf4e54295b55a0e75cbb83c990abcc8aff868e0dbaf3883d5f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTNBOjFDOEUwNDoxODlCMjE3OjIxOENENjE6NkFGQjg5MzIiLCJ2aXNpdG9yX2lkIjoiNDA3NzY4NjY0MTc1MTk4NDQzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cfdfa7949168669007626a56a0da22d1a20de569ab6ca7c1e50bd0105757ee08 |
| hovercard-subject-tag | issue:6398998693 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/simstudioai/sim/10064/issue_layout |
| twitter:image | https://opengraph.githubassets.com/db87ea00d6171be3ea84e46ad4dad47b762706717bf0e4534bb534fa6b673e3b/simstudioai/sim/issues/10064 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/db87ea00d6171be3ea84e46ad4dad47b762706717bf0e4534bb534fa6b673e3b/simstudioai/sim/issues/10064 |
| og:image:alt | Is your feature request related to a problem? Please describe. When I add a workflow variable in the workflow builder (⋯ → Variables → +), the new variable appears with a default name (variable1, v... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mofopeadegoke |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9694464143465782ecae2a97650b2a2b0708d5c31c74f41ee86da57e315e2735 |
| turbo-cache-control | no-preview |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 05d967182208691fc7f2e6af52e82fa7fabf6bd5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width