Skip to content

refactor: a sidecar profile names what is its own; the toolkit derives the rest - #120

Open
endrix wants to merge 2 commits into
mainfrom
refactor/profile-defaults
Open

endrix wants to merge 2 commits into
mainfrom
refactor/profile-defaults

Conversation

@endrix

@endrix endrix commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Phase 3 of the declutter plan: profile defaults and dead inputs. Platform only; no product repo changes. Every product's current profile still assembles to the same values.

Derived inputs (sidecar-diagram-profile.ts)

resolveSidecarProfileInput fills in what a product leaves out, each the way all five products spelled it by hand:

Field Default
commands.* (the .glsp. ids) <glspClientName>.glsp.<field>
commands.sidecarEdit / sidecarSend <sidecarOperationPrefix>.sidecar.edit / .send
operationKinds <prefix>.createEntityPort / .deleteEntityPort
glspClientName, glspClientId key, glsp.<glspClientName>
sidecarCommandSettingKey sidecarCommand, when sidecarCommandDefault is given
cliCommandSettingKey cliCommand
acceptedOperationPrefixes [prefix]
undoLabelSuffix (<key>)
scopeArgKey workflow
eight run-driver setting keys their shared names (runOutputDir, agentTools, ...)

commands is now Partial<SidecarProfileCommandIds>; a given id wins, a blank one is ignored. createSidecarDiagramProfile resolves first and reads the resolved input everywhere, so the assembler itself did not change.

Dead inputs

  • createAgentToolPolicyFile, chatAddViewerEditor, chatAddViewerTask: no registerCommand, no commandId() read, not in any product's contributes.commands. Optional and @deprecated in DiagramCommandIds and the toolkit type, so a product that still spells them compiles.
  • DiagramChatConfig.name and .operationPrefix: nothing reads them (the storage options carry the live prefix). Optional and deprecated; the toolkit stops passing them.
  • SidecarProfileInput.mcpEnabledSetting and SidecarEditBackendConfig.mcpEnabledSetting: declared, threaded, never read. Deprecated on the input, removed from the backend config.
  • DEFAULT_NODE_COMMANDS in edit-capability.ts (task/agent/viewer/workflow): every sidecar product sets nodeCommands; a profile that names none now gets no node-creation slash command instead of wfpy's.

Client flags: unchanged

The first version defaulted graphSourceNavigation, networkPropertySections and networkNavigationLabels to on. The review showed ndf-ide sets none of them, so on-by-default would have given its edges the queue-capacity editor and changed its cross-document navigation. Reverted; the flags read exactly as before. Their default is a question for the product pass (phase 5).

Found by the review of this PR

  • A deprecated id a product still spells was forwarded into profile.commands and the webview payload; the resolver now emits only the ids the platform registers.
  • A blank glspClientName, glspClientId, setting key or suffix produced ids like .glsp.openDiagram; blank now derives like absent, the rule the command ids already had.
  • The DiagramChatConfig doc still described an operation dispatcher; rewritten.
  • A test pins that a profile with chat but no nodeCommands offers no node-creation slash command (and keeps the edit commands and /layout).

Tests

derived-profile-inputs.test.ts pins every derived id and default, that a given value wins, the no-sidecar case, and that a minimal input assembles. Three existing expectations updated to the new behaviour (chat prefix no longer passed; a missing sidecar setting key is derived; the chat's node commands come from the profile).
Typecheck 5/5, neutrality 5/5, extension-core 332, client 361, toolkit 335 (the one local failure is the known variant-node-create-wizard.test.ts timeout, green in CI).

Follow-ups, each in its own repo: the products can drop the derived lines and the deprecated fields; the HDL products can drop the wfpy acpConnectorFiles and noneSentinel values (phase 5 moves the agent-tools select behind the run driver).

https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv

…s the rest

Phase 3 of the declutter plan. About half the keys every product wrote
were identical or derivable from the ones beside them, so the toolkit
now derives them, each as the products spelled it by hand: command ids
from the GLSP client name and the operation prefix, operation kinds from
the prefix, the GLSP client identity from the key, the CLI and sidecar
setting keys, the eight run-driver setting keys, the undo suffix and the
scope argument from their one shared spelling. A value the product gives
wins, so a product that keeps every line is unchanged.

Deprecated, accepted and ignored: the three command ids nothing registers
(createAgentToolPolicyFile, chatAddViewerEditor, chatAddViewerTask), the
two chat fields nothing reads (name, operationPrefix) and the toolkit's
mcpEnabledSetting. The chat's built-in node slash commands are gone: a
profile names its own or offers none. The webview's three network
behaviours are on unless a product sets them off.

Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
The webview's three network flags keep their off default: ndf-ide sets
none of them, and on by default would have given its edges a queue
capacity editor and changed its cross-document navigation. Their
default is a design question for the product pass, not this refactor.

A deprecated command id a product still spells stays out of the
resolved profile (only the ids the platform registers come through), a
blank GLSP client name, client id, setting key or suffix is derived like
an absent one, the chat config's doc no longer names a dispatcher that
is gone, and a test pins that a profile without node commands offers no
node-creation slash command.

Claude-Session: https://claude.ai/code/session_01EToj6RJRMSSHQiqGNMU9wv
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