Skip to content

Compute the block subtitle's settings part in the model - #58

Merged
AStaroverov merged 3 commits into
mainfrom
fix/headless-trace-label
Nov 9, 2026
Merged

AStaroverov merged 3 commits into
mainfrom
fix/headless-trace-label

Conversation

@AStaroverov

@AStaroverov AStaroverov commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Only the subtitle was affected. A watchEffect in the main page wrote data.defaultBlockLabel: on the file door <file label>[ - <scheme>] (scheme only when not IMGT), on the dataset door <pool dataset label> - <chains>. It fed only .subtitle, never args, so opening the UI did not make the block stale. But a block set up without opening the UI (e.g. from a template) had an empty subtitle until someone opened it.

The trace labels were already pure functions of args, named after what was imported (the file source's label, the chain or receptor, the format), and are unchanged.

Change

  • Trace label: unchanged; args and workflow are untouched. customBlockLabel stays out of args, so renaming the block still does not make it stale.
  • Subtitle: customBlockLabel, else [subtitleLabel, settings].join(" - "). The settings part is computed in the model: on the file door the file label plus the numbering scheme when not IMGT, on the dataset door the chains joined by ", ". subtitleLabel holds the picked pool dataset's label (empty on the file door), kept in sync with the result pool by a guarded watch in app setup; it writes only when the label changes and never reaches args. The main page's watchEffect and the "Select Dataset" seed on load are removed.
  • Data migration v3: on the dataset door defaultBlockLabel mixed the dataset name with the chains and cannot be split without the pool, so subtitleLabel starts empty; the file-door subtitle is fully recomputed from data.
  • Kind: doc comment only (defaultBlockLabel was never part of the contract); no version bump.
  • Workflow: unchanged.
  • Tests: fixtures use subtitleLabel instead of defaultBlockLabel.
Before After
Trace label (no custom label) e.g. IGHeavy (chain step), MiXCR bulk (stats step) unchanged
Subtitle, dataset Donor 3, IGHeavy + IGLight Donor 3 - IGHeavy, IGLight Donor 3 - IGHeavy, IGLight
Subtitle, same, block never opened (e.g. from a template) empty IGHeavy, IGLight
Subtitle, file panel, Kabat panel - Kabat (only after opening) panel - Kabat

Impact

  • Existing blocks do not go stale: args are unchanged.
  • Downstream labels do not change.
  • Migrated blocks on the dataset door show only the chains (e.g. IGHeavy, IGLight) until the block is opened; file-door blocks keep their subtitle.

Verification

  • kind build, tests (64) and check; model build, tests (15), type-check and check; ui type-check, check and build; software, workflow and block builds; test package check pass.
  • Integration tests were not run.
  • Not run against a live backend.

@greptile-apps

greptile-apps Bot commented Nov 9, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@AStaroverov AStaroverov changed the title Compute the block subtitle without opening the block Compute the block subtitle's settings part in the model Nov 9, 2026
@AStaroverov
AStaroverov added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit f0d5329 Nov 9, 2026
11 checks passed
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