change: name what the Provider tab's Save button saves #16
Loading…
Reference in a new issue
No description provided.
Delete branch "ux/clarify-scripts-save"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Save/Cancel pair at the foot of the Provider tab belongs to Add custom
scripts. Sitting at the bottom of the page it reads as saving the page, while
the section people are actually filling in is the one at the top -- whose submit
button is the inline Add Folder, which does not look like a submit at all.
So the natural sequence after entering a provider name and credentials is to
press Save, which does nothing that was wanted. Observed in practice: the
working order turns out to be name, then credentials, then Add Folder, then pick
the file, and nothing on screen suggests it.
It also did something that was not wanted.
save_scriptskeys its entry off theselected provider, and with none selected it builds
{"_scripts": {}}and sendsthat as the entire configuration. On a fresh install, with no provider yet to
select, pressing Save is how
config.jsonbecame a single meaningless key --the first bug in this series. #10 stopped that from destroying the file; this
stops the button inviting it.
Fix
unreachable rather than merely harmless.
Verification
Added
tests/test_scripts_button.py-- no root, network, display or accountneeded. It stubs the widgets and covers: disabled with no selection, enabled
with one, enabled automatically once the provider box is populated, and still
disabled when the provider list is empty (a fresh install).
Not addressed here
The larger UX gap remains: nothing confirms a successful import, and the user is
left on the same tab with no indication anything happened. That deserves a
considered answer about where someone should land after adding a provider,
rather than a notification bolted on, so it stays on the audit list.
The Save/Cancel pair at the foot of the Provider tab belongs to "Add custom scripts". Sitting at the bottom of the page it reads as saving the page, and the section people are actually filling in is the one at the top, whose submit button is the inline "Add Folder" -- so the natural move after entering a provider is to press Save, which does nothing they wanted. It also did something they did not. save_scripts keys its entry off the selected provider, and with none selected it builds {"_scripts": {}} and sends that as the entire configuration. On a fresh install, with no provider yet to select, pressing Save was how config.json got replaced by a single meaningless key. The button now says "Save scripts", and is disabled until a provider is selected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>