Skip to content

fix(settings): bring a provider card's Remove up to date after a save - #125

Merged
harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/provider-remove
Nov 13, 2026
Merged

harenome merged 1 commit into
ThinkFlowLab:mainfrom
harenome:fix/provider-remove

Conversation

@harenome

@harenome harenome commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #118

What

Settings → Model providers shows Remove and its question only for a provider with a saved value. After a save, the page copied only the state and the test result of each card from the fresh page. Thus the first key of a built-in provider showed no Remove until a reload, and a cleared provider kept a stale Remove.

The nullius-settings-saved event now also carries the Remove button and the question of each fresh card. When their presence changes, the card replaces its own with them. The click and Escape handlers are on the section, so the new Remove asks first, as before.

Touches

templates and static (app/static/settings/autosave.js, app/static/settings/providers.js) · routes (app/ui_tests/test_settings_page.py)

Before and after

Settings → Model providers, 1280 px, light. Add a provider → OpenAI, type a key, then Done. No reload.

Before After
1-before-saved 2-after-saved

Remove on the same card asks first (after only):

3-after-ask

Verified

On this branch, in a throwaway container with Node 24:

  • python3 app/tests/parallel.py: 1934 tests in 113 modules, OK.
  • python3 app/tests/parallel.py app/ui_tests: 402 tests in 39 modules, OK.
  • The new test test_a_save_brings_remove_to_a_card_and_takes_it_away runs providers.js in Node on the rendered pages. It checks a first key, Remove and its question, Keep it, Yes, and a cleared key. With the providers.js of main, it fails: the card has no Remove after the save.

Browser check, Chromium (Playwright 1.49.1), 1280 px, light and dark, with a fixture key:

  • main: no Remove after Done. Remove appears after a reload.
  • This branch: Remove appears after Done and asks first. Yes, remove clears the key and removes the card from the list. After a reload, the card has no Remove.

Risk

Low. The change is only in the scripts of the Settings page. If it is wrong, a card can show a Remove that does not match its saved state until a reload. The server still decides what Remove clears. A revert undoes it.

Remove and its confirmation are drawn only for a provider with a saved
value. A save fetches the page again but copied only the card's state
and test result, so a built-in provider's first key showed no Remove
until a reload, and a cleared one kept a stale Remove.

The saved event now carries the fresh card's Remove button and its
question, and the card takes them whenever their presence changes. The
click and Escape handlers are delegated, so the new elements ask first
as before.

Closes ThinkFlowLab#118
@harenome
harenome marked this pull request as ready for review November 13, 2026 16:40
@harenome
harenome merged commit 77b7d35 into ThinkFlowLab:main Nov 13, 2026
3 of 4 checks passed
@harenome
harenome deleted the fix/provider-remove branch November 13, 2026 16:58
aitianshi added a commit that referenced this pull request Nov 16, 2026
No linked issue: the owner asked for v0.1.1 as a release, so that the
Hugging Face endpoint setting (#129) reaches PyPI.

## What

Prepares v0.1.1. The version becomes `0.1.1`, and
`docs/releases/v0.1.1.md` gives the highlights since v0.1.0, a
Contributors section, the full changelog of every pull request in
`v0.1.0..main` (#114, #117, #120, #122, #125, #127, #129, #132, #137,
and #135 among the test and CI changes) and the installation notes, in
the shape of v0.1.0's. Install examples, the release guide, the docs'
release-notes link and menu, and the workflows' default tags name 0.1.1.
The release tooling already accepts final `vX.Y.Z` tags and does not
change.

## Touches

CI and skills (the release and publish workflows' default tags) · docs
and site

## Verified

- Backend suite (`python3 app/tests/parallel.py`): 1991 tests in 116
modules, OK. Route suite: 428 tests in 41 modules, OK.
- `catalogue_docs.py --write` and `diagrams.py --write` left no change.
- `python3 app/packaging/release.py build --tag v0.1.1` built and
verified `nullius_eval-0.1.1-py3-none-any.whl`,
`nullius_eval-0.1.1.tar.gz` and `SHA256SUMS`; `release.py verify --tag
v0.1.1` and `verify.py` on the wheel passed, including the
installed-tool and profile-preservation checks.
- The workflows have not run; they run only by hand on `main`.

## Risk

Version strings and docs only. A wrong default tag in a workflow is an
input the person running it can change, and `release.py` refuses a tag
that does not match `pyproject.toml` or has no notes. Nothing is tagged,
drafted or published by this change. Undo with a revert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings: a provider's card has no Remove after its first key is saved, until a reload

1 participant