You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be super awesome to have the commands in error messages in a copy block, they are currently not "highlight-able" to copy them into the terminal and run them. screenshot for reference:
Thanks for the suggestion, and for including the screenshot — that makes it easy to see exactly what you mean.
You're right. Some of the error messages (for example the ones about serial port permissions) include commands like sudo snap connect ... that you're meant to run in a terminal, but the text in the message is rendered as a plain label that can't be selected or copied. So at the moment the only option is typing the command by hand, which is both annoying and error-prone.
I agree this should be fixed. The plan is to make command lines inside these messages selectable and/or add a one-click "copy" button next to them, so you can paste them straight into the terminal. I can't promise a release date, but it's on the list now and I'll keep this issue open until it ships.
A fix for this is ready on my fork, but this account can no longer open pull requests on this repo — the API rejects CreatePullRequest — so I cannot put it up as a PR myself. The complete diff is here:
If you open the PR from that link (or grant push rights so I can), here is what it does:
Error messages that hand the user something to run in a terminal no longer arrive as a wall of text: the prose stays in the row or banner that carries it, and every command becomes a one-click copy row underneath it.
Both surfaces that show the serial permission failure from the screenshot are covered: the setup wizard's probe page, and machine settings → General under the error banner.
rayforge/ui_gtk/shared/command_row.py (new) holds CommandRow, lifted out of the permissions pre-flight page unchanged, so the wizard's copy row and these two surfaces are one widget instead of two.
split_commands(message) pulls the trailing command block out of a free-form message. Messages introduce their commands with a blank line, and a block is only taken when every line of it looks like something to type — anything not clearly a command is shown exactly as it is written today. A message shown wrongly would be worse than one without a copy button.
The messages themselves are untouched: every message id in rayforge/locale/** stays valid, no translation is invalidated, and the commands stay verbatim in all six languages.
Checks: ruff format, ruff check, flake8, pyflakes clean; pyright reports only this machine's pre-existing from gi.repository import … stub noise (also on main). New tests in tests/ui_gtk/test_command_row.py and tests/ui_gtk/machine/test_general_preferences_page.py, a new probe-page case in test_unified_wizard.py, plus the whole -m ui run.
Activity
knipknap commentedon Oct 10, 2026
Thanks for the suggestion, and for including the screenshot — that makes it easy to see exactly what you mean.
You're right. Some of the error messages (for example the ones about serial port permissions) include commands like
sudo snap connect ...that you're meant to run in a terminal, but the text in the message is rendered as a plain label that can't be selected or copied. So at the moment the only option is typing the command by hand, which is both annoying and error-prone.I agree this should be fixed. The plan is to make command lines inside these messages selectable and/or add a one-click "copy" button next to them, so you can paste them straight into the terminal. I can't promise a release date, but it's on the list now and I'll keep this issue open until it ships.
mandy-apperkeeper commentedon Oct 10, 2026
what if you ran a terminal from rayforge?
switch87 commentedon Oct 17, 2026
A fix for this is ready on my fork, but this account can no longer open pull requests on this repo — the API rejects
CreatePullRequest— so I cannot put it up as a PR myself. The complete diff is here:https://github.com/barebaric/rayforge/compare/main...switch87:fix/544-copyable-error-commands?expand=1
If you open the PR from that link (or grant push rights so I can), here is what it does:
rayforge/ui_gtk/shared/command_row.py(new) holdsCommandRow, lifted out of the permissions pre-flight page unchanged, so the wizard's copy row and these two surfaces are one widget instead of two.split_commands(message)pulls the trailing command block out of a free-form message. Messages introduce their commands with a blank line, and a block is only taken when every line of it looks like something to type — anything not clearly a command is shown exactly as it is written today. A message shown wrongly would be worse than one without a copy button.rayforge/locale/**stays valid, no translation is invalidated, and the commands stay verbatim in all six languages.Checks:
ruff format,ruff check,flake8,pyflakesclean;pyrightreports only this machine's pre-existingfrom gi.repository import …stub noise (also onmain). New tests intests/ui_gtk/test_command_row.pyandtests/ui_gtk/machine/test_general_preferences_page.py, a new probe-page case intest_unified_wizard.py, plus the whole-m uirun.