fix(tui): bulk-edit include toggles invisible + raw custom-field labels (v1.6.1)#138
Merged
Conversation
…els human-readable
The per-field include switch in the bulk-edit form was clipped to zero width
by `.bulk-include { width: 6 }` (a Textual Switch needs ~10 cells for its
border + padding + slider), so it rendered blank. Users couldn't see or flip
it, so no field was opted in and applies produced no change with no error —
custom-field edits silently didn't save.
Also render custom fields by their human label (`spec.label or name`) in both
the single-edit and bulk-edit forms and in the change-preview diff, instead of
the raw `custom_fields.<name>` key. And stop a blank `select` (unresolved
choice set) from seeding a null on opt-in, which silently cleared a field the
user never edited.
Bumps version to 1.6.1.
Closes #137
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Claimed by maintainer's agent. Branch |
…elect null Adversarial review of the bulk-edit fix surfaced a newly-reachable data-loss path: because the include toggle is now visible and usable, opting in a custom field whose widget didn't reflect the records' shared value would overwrite it. A shared boolean custom field rendered as a default-False switch, so opting it in unchanged silently flipped every record True -> False; a shared multiselect cleared to []. Seed custom-field widgets (including multiselect) from the records' shared value over the flattened custom_fields.<name> keys so an opted-in-but-unedited field is a no-op. Also harden on_select_changed so a blank select can't stage a null before the field is opted in (only the explicit null button nulls), and add a guard test that the single-edit diff modal renders the custom-field label. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
Adversarial review (3 parallel read-only agents) + fixesCorrectness/regression, break-the-fix, and test-quality reviews ran against the diff. Verdicts: ship, with findings. Findings actioned:
Findings dismissed (with reason):
Full suite: 1335 passed, 1 skipped; ruff + mypy --strict clean. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #137. Patch release v1.6.1.
Problem
In the TUI bulk-edit form, custom-field edits silently didn't save and showed an ugly
custom_fields.<name>name.Root causes & fixes
.bulk-include { width: 6 }is too narrow for a TextualSwitch(border + padding + slider ≈ 10 cells). With the real stylesheet the slider clipped to zero width, so every per-field include toggle rendered blank. No visible toggle → no field opted in → empty patch → silent no-change. Fixed by sizing.bulk-includeto fit (width: auto), with a regression test asserting the slider never clips to zero.custom_fields.<name>labels. Both forms renderedLabel(name)instead ofCustomFieldDef.label. NowWidgetSpeccarrieslabel; the form rows and the change-preview diff show the human label.selectwhose choice-set didn't resolve rendered empty; opting it in seededNoneand silently nulled the field. A blank select now seeds nothing on opt-in; only the explicit ∅ button nulls.Tests
7 new tests (TDD, each watched fail first): toggle-not-clipped regression (real CSS loaded), human-label rendering in both forms + diff, end-to-end custom-field save, and blank-select-doesn't-null.
Docs
CHANGELOG.md— v1.6.1 section.docs/guides/interactive-tui.md— clarified the include-toggle / per-field opt-in and that custom fields appear under their label.Release
Version bumped to 1.6.1 across
pyproject.toml,nsc/_version.py,uv.lock, and CHANGELOG. Tagv1.6.1to be pushed onmainHEAD after merge.🤖 Generated with Claude Code