Skip to content

Group E vscode halves: Signal dropdowns, Alignment editing, mpt paste and shared-name ids, on core v1.40.0 - #73

Merged
ww-mw merged 5 commits into
mainfrom
group-e-vscode-halves
Oct 17, 2026
Merged

ww-mw merged 5 commits into
mainfrom
group-e-vscode-halves

Conversation

@ww-mw

@ww-mw ww-mw commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

The vscode halves of the group E ruling of 2026-10-16. The maintainer's ruling: "Agree your suggestions ... Add unit tests to lock down the fix. I pre-approve PR and merge as long as it passes all tests." Each item takes its recommendation in discuss.md.

Core pin: #v1.40.0. The last commit moves package.json from #v1.39.0 to #v1.40.0 (mathworks/data-explorer-core#129). That tag carries the core halves, mathworks/data-explorer-core#124, #125 and #127. It also carries #128 (MCOS numeric classes and per-element object classes), which the four item commits were not gated against.

  • package-lock.json resolves data-explorer-core to f9acdf939aa726cb9ddd3162a6cac19fc4f4a5ca, version 1.40.0, the commit tag v1.40.0 points at.
  • Relative to main, the lockfile changes only data-explorer-core's two entries: the root spec and the node_modules entry. check:leak is OK.
  • CHANGELOG.md is unchanged. It is added at release.

Results at the head, after npm ci with v1.40.0:

  • npm run verify: 175 files, 3422 of 3422 tests pass, and check:leak is OK.
  • npm run test:integration: 221 passing, 1 pending, 0 failing, on the first run. The pending test is cutPasteUndo's "a same-document move ...". It skips itself where undo does not apply to an editor.
  • These are the same counts as with core main 3decebe installed --no-save, so #128 adds no failure.

Against v1.39.0, the earlier pin:

  • tsc fails once: src/host/parseWarnings.ts:131, TS2367, because 'duplicate-id' is not yet in ParseWarningCode.
  • 12 unit tests and 10 integration tests fail. These are the new locks, listed below. (The at-pin log shows 13 integration failures: the extra 3 are the known typeLinkBinary fixed-wait timing flake, not locks.)

C-030: a Signal's Complexity and DimensionsMode are dropdowns

Ruling: "(a). Confirm Signal's enum sets ... in MATLAB first, then reuse the BusElement and ValueType mechanism with Signal's own options. Dimensions stays a label."
Pairs with mathworks/data-explorer-core#124 (cca1e6e).

  • What changed: no behaviour change. The generic select cell already renders and edits the new cell. The column-group comment in rowBuilder.ts now names ValueType and Signal.
  • Changed existing test: test/dimensionsMode.test.ts, "the Signal surfaces an editable dimensionsMode column". It pinned the read-only label that the ruling removes. It now expects {text:'Fixed', editable:true, editor:'select', options:['auto','Fixed','Variable']}.
    • Fail-before: against v1.39.0 it fails with expected 'label' to be 'select'.
    • A stale comment in test/elementProps.test.ts is updated. That is a comment-only change.

C-086: Alignment can be edited in the table, by MATLAB's rule

Ruling: "(b): the validation rule is already recorded, but the written form and defaults-stripping are exactly what the plan deferred. One MATLAB check turns this into a bounded core and vscode change."
Pairs with mathworks/data-explorer-core#124 (71b3446).

  • What changed: no behaviour change. A comment in rowBuilder.ts now lists alignment among the columns that can be edited.
  • New test: test-integration/suite/alignmentEdit.test.ts, with 6 tests through the real SlddTextEditorProvider. They run over core's MATLAB-written classes_r2027a_text.sldd, which is copied byte for byte. The tests check that:
    • the cell is editable text under ExportedGlobal, and plain text under Auto;
    • an edit of 8 saves pAl8's CoderInfo;
    • -1 removes the key;
    • 3 is refused in MATLAB's words, and the document does not change;
    • under Auto, an edit is refused;
    • setting StorageClass to Auto resets Alignment.
    • Fail-before: against v1.39.0 all 6 fail, because the cell is plain text and the edit is lost.
  • Not changed: jsonHostEditRepaint's capitalised COLUMNS. None of the fixtures that sweep reads has a non-Auto Parameter or Signal, so it would never reach an alignment cell.

C-180: a pasted or dropped mpt entry lands in Design Data

Ruling: "(a). The paste copies an mpt object MATLAB already wrote, rather than writing one from scratch, so the doc's reason for refusing creation does not cover it."
Pairs with mathworks/data-explorer-core#125 (7f04c0b).

  • What changed: src/host/sectionRules.ts now posts getAdmittedTypes(). On a core without that method it falls back to getAllowedTypes().
    • Before this, the drop cursor and the Paste item refused an mpt entry that the host would accept.
    • The Add gallery keeps the creation list.
  • New tests:
    • sectionRules (+4): the posted rules agree with allowsType for every class, and Design Data lists mpt.
    • dropDecision (+2) and menuItems (+2): built from the rules a real model posts.
    • structuralEdit and xmlStructuralEdit (+4 together): both paste paths keep the class.
    • addCatalog (+1): no tile is an mpt class.
    • test-integration/suite/mptPasteDrop.test.ts: the paste and the drop through the real JSON and binary providers.
  • Fail-before:
    • With sectionRules.ts reverted, on core 3decebe, 5 unit tests and both integration tests fail. The integration message is "Design Data's posted rule admits mpt.Parameter".
    • The paste and addCatalog tests are locks on the core change. Against v1.39.0 they fail with A "mpt.Parameter" entry is not allowed in Design Data.
    • The "still refuses ..." tests and the fallback test are controls. The fallback test fails if the fallback is removed.
  • Changed existing tests: none have changed assertions. There is one import line and one comment.

F1-50: an edit on one of two same-named entries no longer lands on the first

Ruling: "(a). It stops the wrong-data delete without changing any id, and it suits a state that only malformed input reaches."
Pairs with mathworks/data-explorer-core#127 (98f8f7c).

  • What changed:
    • SlddModel.findNode now treats the session's null as final when the session holds the source. Before, its cache fallback returned the first twin.
    • It still falls back to the cache for a core without findNodeById, and for a source the session no longer holds.
    • warningBanner does not count duplicate-id as a part that could not be read. When shared names are the only warning, it shows a headline of its own.
  • New tests:
    • test/findNodeSharedName.test.ts (3 tests): two K Parameters and two S structs.
    • test/parseWarnings.test.ts (+3).
    • test-integration/suite/sharedNameEntries.test.ts (3 tests): the banner, a refused edit on a twin, and a control edit on another entry.
  • Fail-before, with the src reverted on core 3decebe:
    • findNode: expected 'the first twin' to be null.
    • Banner: "2 parts of this file could not be read".
    • Integration: the edit set the first gravity to 1.
    • The fallback test is a control. It fails if the fallback is dropped.
  • Changed existing test: test/binaryEntryScopedEdit.test.ts, "does NOT undo correctly with the inverses in forward order". It pinned the wrong-twin remove that the ruling removes.
    • It now expects No entry is indexed.
    • It also checks that both entries are left standing.

ww-mw added 5 commits October 16, 2026 20:16
…s it

Core now offers a Simulink.Signal's Complexity and DimensionsMode as dropdowns
over MATLAB's own sets: auto, real, complex and auto, Fixed, Variable. This
reverses the old "safe as read-only" label. The table's generic select cell
already renders and edits such a cell, and the host already routes the edit to
node.setProperty by column id, so no source change is needed here.

test/dimensionsMode.test.ts pinned exactly the label the ruling removes. It now
expects the real codegen.sldd Signal's dimensionsMode to be a select, with the
cell { text: 'Fixed', editable: true, editor: 'select', options: ['auto',
'Fixed', 'Variable'] }, and is retitled "editable". Against the pinned core it
fails with "expected 'label' to be 'select'".

Two comments that described the label are brought up to date. One is in
elementProps.test.ts. The other is in rowBuilder.ts's column-group note, which
now names ValueType and Signal beside BusElement.
data-explorer-core now lets Alignment (CoderInfo.Alignment) be edited by
MATLAB's rule wherever MATLAB takes an edit, which is any StorageClass but
'Auto' (group E ruling, C-086). The vscode side needs no code for it: the
generic schema cell renders the text editor, and the text editor provider
hands the column to node.setProperty.

test-integration/suite/alignmentEdit.test.ts locks the behaviour through the
real SlddTextEditorProvider, over core's MATLAB-written
classes_r2027a_text.sldd, copied into test-integration/fixtures/classes beside
the workspace folder:
- The alignment cell is an editable text cell on an ExportedGlobal Parameter
  or Signal, and plain text under 'Auto'.
- 8 on pSC saves pAl8's CoderInfo: a typed int32, first in CoderInfo. Nothing
  else changes.
- -1 removes the key, so pSC is back to what MATLAB wrote. pAl8 set to -1 saves
  pAlM1's CoderInfo.
- 3 is refused in MATLAB's words, and the document is unchanged. So is an
  Alignment under 'Auto'.
- StorageClass set to 'Auto' on pAl8 saves pNo's CoderInfo.

All six fail against the pinned core v1.39.0, where the cell is plain text and
the edit is accepted and then lost. They pass against core main. A comment in
rowBuilder.ts now names alignment among the columns that can be edited.
…w admits

Core now admits a paste or a drop of an mpt.Parameter or mpt.Signal entry
into Design Data (SectionNode.allowsType), while creating one stays refused
(getAllowedTypes). The section rules the host posts to the table held the
creation list, so the drop cursor and the Paste item refused an mpt entry the
host would have accepted, and Ctrl+V, which goes through the menu's decision,
never reached the host.

sectionRules now posts getAdmittedTypes, and falls back to getAllowedTypes on
a core that does not have it. The Add gallery keeps the creation list.

Tests: the posted rules agree with allowsType for every class, the cursor and
the Paste item admit an mpt entry into Design Data and refuse it elsewhere,
and both paste paths keep the class. A new integration test runs the paste
and the drop through both real providers.
Core now refuses to resolve a node id that names two nodes: two entries
with one name in one section, and every row inside them (F1-50, group E
ruling of 2026-10-16). SlddModel.findNode fell back to its cached tree
whenever the session answered null, and for the text editor that tree is
the session's own, so an edit on either twin's row edited the first one.
findNode now takes the session's null as final for a source the session
holds. It still falls back to the cache for a core without findNodeById
and for a source the session no longer holds.

The parse-warning banner no longer counts core's new duplicate-id warning
as a part that could not be read. When shared names are all there is,
the headline says so; core's messages are listed below it as before.

The forward-order undo test in binaryEntryScopedEdit now expects the
refusal: the remove after the insert throws, rather than removing
whichever twin was indexed last, and both entries are left standing.

Tests: findNodeSharedName (findNode on a text dictionary with two K
Parameters and two S structs), three banner cases in parseWarnings, and
sharedNameEntries through the real SlddTextEditorProvider.
v1.40.0 (f9acdf9) carries mathworks/data-explorer-core#124 (Signal
Complexity and DimensionsMode options; Alignment editing), #125 (mpt
entries admitted by paste and drop) and #127 (findNodeById and the
duplicate-id warning), the core halves of C-030, C-086, C-180 and F1-50.
It also carries #128 (MCOS numeric classes, per-element object classes).

The lockfile changes only data-explorer-core: its root spec and its
node_modules entry, which now resolves to f9acdf939aa726cb9ddd3162a6cac19fc4f4a5ca.

With the pin: npm run verify passes 3422 of 3422 tests in 175 files, and
check:leak is OK; npm run test:integration has 221 passing and 1 pending.
@ww-mw
ww-mw merged commit d23f495 into main Oct 17, 2026
4 checks passed
@ww-mw
ww-mw deleted the group-e-vscode-halves branch October 17, 2026 01:49
@ww-mw ww-mw mentioned this pull request Oct 17, 2026
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