Repository navigation
chore: remove dead element types, handlers and helpers from shared, server and client - #118
Merged
Merged
Conversation
Ten GLSP types had a client class, a view, a server mapping, a shape hint and layout branches, and no producer: node:proxy, the two collapsed nodes, the if-branch, if-join, foreach-join and inline-if structure nodes, edge:virtual, comp:ports and comp:port-row. The graph builder emits then/else/foreach containers directly and never any of these. Their metadata keys, the three type guards that always answered false, their CSS rules and the per-submit model walk that looked for virtual edges go with them. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The spec-compatibility aliases (node:entity, port:in/out, the WORKFLOW_* metadata twins), the Origin helpers, the entity/port type guards, six sizing constants and the model's two never-populated AST maps had no reference outside their own file. The CSS namespace keeps only the names some TypeScript writes. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The property panel's "Change referenced type" button and the toggle-grid action had no handler on any side; two navigation files were imported by nothing; the back-compat aliases for the pre-split monolith had no caller left; the label view read a `wf:labelRole` no producer writes; the chat panel handled a `chat.sessionLoaded` the host never sends; two drag-state helpers and two model exports had no reference. Thirty-nine stylesheet selectors named classes no view, template or GLSP module produces (checked against the client, chisel-ide, mlir-viewer and the GLSP/sprotty/vscode-elements dists). Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The serpentine layout seeded every edge with its own 250-line orthogonal router, then let the reroute handler overwrite every one of those routes, so the seeding changed nothing. The layout-key migration module had no caller; seven layout-persistence methods had none either (the legacy file locations stay: a test pins them). The clipboard module kept a parser no paste path reads. The context menu offered a "Stable, Experimental" reroute whose strategy flag the handler never read, beside a navigation helper that was a copy of the one in use. The ELK defaults were never read, since the configurator always hands the root a full option set, and no caller set the MCP persona. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The namespace read comes back: the Run button spreads the diagram context into the host command and the toolkit's run driver builds `--workflow ns.name` from it, so only the producer was missing, not the reader. The layout service keeps `flush()` and the host drains every diagram's pending debounced save on deactivation, which nothing did before. The if-branch class the server stamped had no rule and no reader left, so the stamp and its constant go too. Plus the README's deleted view name, an unused import and two blank-line leftovers. Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
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.
Phase 1 of the declutter review (pure deletions, no behaviour change) for
packages/shared,packages/diagram-serverandpackages/diagram-client. 43 files changed, 75 insertions(+), 2610 deletions(-).Element types the model never emits (shared, client, server)
node:proxy,node:collapsed:conditional,node:collapsed:array,node:structure:if:branch,node:structure:if:join,node:structure:foreach:join,node:structure:if:inline,node:join,edge:virtual,comp:ports,comp:port-rowhad a client model class, a view, a registration, a server type mapping, a shape hint and layout-configurator/ELK branches, and no producer: the graph builder emits then/else/foreach containers directly. Gone with them: nine metadata keys only they carried, the three type guards that always returnedfalse, their CSS rules, and the per-submit model walk in the submission handler that logged virtual edges. The parity baseline fixture loses the ten registrations.Shared dead exports
NODE_ENTITY,PORT_IN/PORT_OUT,NODE_JOIN, theWORKFLOW_*metadata twins exceptWORKFLOW_NAME,HAS_EXTERNAL_MEMBERS,PORT_INDEX,NETWORK_VARIABLES/INPUT_PORTS/OUTPUT_PORTS, the Origin helpers, the entity/port type guards (isReadOnlyElementstays), six sizing constants, the model's two never-populated AST maps and itsworkflowfield, and theWorkflowDiagramCssmembers no TypeScript references.Client
requestWorkspaceEntities/showWorkspaceEntities/updateEntityInstanceType) anddialogram.toggleGrid: no handler anywhere (the host's grid command dispatches GLSP's own action). ThepropertySections.entityTypeflag stays, it still hides the row.go-to-source-context-menu-provider.ts,open-source-mouse-listener.ts: imported by nothing.di.config.ts,shared-webview-messenger.tsand the index's back-compat block: no caller in dialogram or any product.wf:labelRoleread (no producer; type labels are drawn by the node view),wf:namespace→namespaceName(no reader),WorkflowEditableLabel,ValidationDecoration,isAnyDragActive,isDragActiveForEdgeand the write-only map behind it,workflowDiagramViewMap, thechat.sessionLoadedcase (the host never sends it).Server
seedEdgeRoutesForFixedLayoutand its helpers): every seeded route was overwritten by the reroute the handler runs right after (resetAll routes every edge; with a selection, unselected routes are restored from the pre-op snapshot). The ELK call and thefixedbranch stay.layout-key-migration.ts(no caller) and sevenLayoutPersistenceServicemethods with no caller.clipboard.ts: the parser andescapeRegExpno paste path reads. The copy payload itself is untouched (that is phase 2).routingStrategyflag the handler never read;navigationTargetFromElement(a copy ofsourceTargetFromElement). "Clear Routes Only" stays: it dispatches a real handler.elkDefaults.defaultLayoutOptions: emptied. Verified with elkjs that defaults apply only to a root without options of its own, and the configurator always hands the root a full set, so the old values were never read.agentPersona: no caller set it.Kept from the review's list, and why
diagram-glsp-module.tsfacade: four sidecar-toolkit tests importWorkflowSourceModelStoragethrough it; that package is in the other phase-1 PR.layout-persistence-multi-network.test.tspins reading from the old location, so both stay.wf:edgeOpenAnchorX/Yargs: the review called them unproduced, but the edge-open mouse listener writes them on hover and the edge view reads them. Live.WorkflowDiagramCss.NODE_STRUCTURE_IF_BRANCH: the server still stamps it on then/else/foreach nodes.@eclipse-glsp/servertype import in shared: swapping it for@eclipse-glsp/graphmeans a dependency change and lockfile churn; left for a dependency pass.Verification
npm run typecheck5/5,npm run check:neutrality5/5,npm run buildok. Tests: diagram-server 441/441, diagram-client 361/361 (one trace test for virtual edges removed with the type), extension-core 344/344. sidecar-toolkit: 5 timeouts invariant-node-create-wizard.test.tsthat reproduce on untouched main (5 s limits), unrelated to this change.https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv