Skip to content

Variables: the nothing-applied message clears when a later data set applies - #3299

Open
dotCooCoo wants to merge 1 commit into
storytold:mainfrom
dotCooCoo:fix/data-set-status-clears-after-applying
Open

dotCooCoo wants to merge 1 commit into
storytold:mainfrom
dotCooCoo:fix/data-set-status-clears-after-applying

Conversation

@dotCooCoo

@dotCooCoo dotCooCoo commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What and why

This follows up #3048. Import Data Sets… with a CSV that holds data sets A and B defines its variables without binding them. Choose data set A in the Variables panel, and the status bar shows "nothing in data set A was applied: no object is bound to a variable it has a value for". Then bind the variable to an object and choose data set B, or step to it with the panel's arrows. On main data set B applies and the message about A stays. run_now (crates/ui-egui/src/lib.rs) sets the status from a command's warning and clears it only for file.new, and the panel's test cleared the status by hand before its last check.

dataset.select, dataset.next and dataset.prev now clear the status bar when they succeed, before the app shows the reply's warning. A data set with a value for a bound variable leaves the status bar empty, and one without shows the message as before. The replies are unchanged.

How it was tested

  • a_data_set_with_nothing_bound_shows_a_status_message (crates/ui-egui/src/panels/variables.rs) no longer clears the status by hand. After the variable is bound, it checks that dataset.select, dataset.next and dataset.prev each leave the status bar empty when the message showed before.

With any one of the three commands left out of the new check in run_now, the test fails on that command.

Targeted checks: cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings, cargo test -p vectorcraft-ui-egui --lib panels::variables (11 passed), cargo fmt --all -- --check, cargo xtask brands, cargo xtask layers and cargo xtask assets.

On Windows 11 (x86-64) with rustc 1.99.0, on top of main at bc1ae08:

  • CRAFT_FONTS_DIR=<craft-fonts checkout> cargo xtask ci passes its 10 steps: 8,570 tests passed, 0 failed, 13 ignored.

git merge-tree reports no conflicts with main at bc1ae08.

Checklist

  • cargo xtask ci passes (fmt, clippy, tests, assets, brands, layers, wasm).
  • No panics in shipped code: no unwrap(), expect(), panic!, unreachable!, todo! or
    unimplemented! outside tests, and no unchecked indexing on data from files, parameters or
    messages. Errors are returned as Result and shown to the user
    (why and how).
  • Clean-room: nothing copied from Adobe products or GPL/AGPL code (AGENTS.md).
  • Every new asset has a row in ASSETS.md.

Summary by CodeRabbit

  • Bug Fixes
    • Dataset selection and navigation now clear the UI status message when successful.
    • Status messages are correctly cleared after rebinding an object and moving to the next or previous dataset.

…pplies

After "nothing in data set A was applied: no object is bound to a
variable it has a value for" showed in the status bar, choosing a data
set that did apply, or stepping to one, left that message in place.
`run_now` set the status from a command's `warning` and cleared it only
for `file.new`, and the Variables panel test cleared the status by hand
before its last check.

`dataset.select`, `dataset.next` and `dataset.prev` now clear the status
bar when they succeed, and the warning shows when no object is bound to
a variable the new data set has a value for. The test no longer clears
the status by hand and checks all three commands.
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: storytold/vectorcraft/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8072cd99-f023-47d6-9dff-d11cde6e6d44
📥 Commits

Reviewing files that changed from the base of the PR and between bc1ae08 and a8c0f34.

📒 Files selected for processing: 2
  • crates/ui-egui/src/lib.rs
  • crates/ui-egui/src/panels/variables.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

📝 Walkthrough

Successful dataset selection and navigation now clear the UI status bar before any command warning is applied. The dataset status test covers next and previous navigation after rebinding an object.

Changes: Dataset status clearing

Layer / File(s) Summary
Clear status after dataset navigation
crates/ui-egui/src/lib.rs, crates/ui-egui/src/panels/variables.rs
Successful dataset selection or navigation clears the status bar. The test checks that next and previous navigation clear the status after rebinding an object. It also retains checks for the no-bound-object warning.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: bflatastic

Merge Risk: ⚪ Minimal · up to a8c0f

The status message is cleared after successful dataset operations while relevant warnings remain available.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: clearing the stale “nothing-applied” message when a later data set applies.
Description check Passed The description is complete. It explains what changed and why, documents targeted and full test coverage, and includes the required checklist with all items checked.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

1 participant