Skip to content

Commit ea64464

Browse files
mshanemcclaude
andcommitted
docs(org): concise cleanup of W-23069592 plan - W-23069592
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 96ae0de commit ea64464

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.claude/plans/W-23069592.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
## Context
44

55
- Org ext `extensionProvider.ts` has inline `buildAllServicesLayer` (lines 20-54), duplicate of shared `@salesforce/effect-ext-utils` export.
6-
- Diff vs shared: inline hardcodes `'Salesforce Org Management'` fallback; shared takes `fallbackDisplayName` param. Otherwise identical.
6+
- Diff vs shared: inline hardcodes `'Salesforce Org Management'` fallback; shared takes `fallbackDisplayName` param.
77
- Pattern to mirror: core (`packages/salesforcedx-vscode-core/src/services/extensionProvider.ts`) — local `extensionProvider.ts` keeps only `AllServicesLayer`/`setAllServicesLayer`; imports `buildAllServicesLayer` from `@salesforce/effect-ext-utils`; does NOT re-export it; `index.ts` imports it from shared too and calls `buildAllServicesLayer(ctx, nls.localize('channel_name'))` (core index.ts:49).
88
- Shared signature (`node_modules/@salesforce/effect-ext-utils/src/allServicesLayer.ts:27`): `buildAllServicesLayer(context: ExtensionContext, fallbackDisplayName: string)`. Pass `nls.localize('channel_name')` as `fallbackDisplayName`.
99
- Org keeps extra runtime helpers: `OrgRuntime` type, `getOrgRuntime`, `resetOrgRuntimeForTesting` — stay in local file.
1010
- `nls.localize('channel_name')` = `'Salesforce Org Management'` (matches package.json `displayName`).
11-
- Gates picker + command WIs.
11+
- Gates: picker + command WIs.
1212

1313
Files:
1414
- `packages/salesforcedx-vscode-org/src/extensionProvider.ts`
@@ -22,9 +22,8 @@ Files:
2222
### Phase 1 — swap inline for shared helper (mirror core; no re-export)
2323

2424
`extensionProvider.ts`:
25-
- Delete inline `buildAllServicesLayer` (lines 20-54) + `ExtensionProviderServiceLive`.
26-
- Import `buildAllServicesLayer` from `@salesforce/effect-ext-utils` (used by the `ReturnType<>` type refs in `AllServicesLayer`/`setAllServicesLayer`/`OrgRuntime`).
27-
- Do NOT re-export it (matches core; avoids re-exporting a third-party symbol as our own surface).
25+
- Delete inline `buildAllServicesLayer` (lines 20-54), `ExtensionProviderServiceLive`.
26+
- Import `buildAllServicesLayer` from `@salesforce/effect-ext-utils` (used by the `ReturnType<>` type refs in `AllServicesLayer`/`setAllServicesLayer`/`OrgRuntime`); do NOT re-export it (matches core; avoids re-exporting a third-party symbol as our own surface).
2827
- Drop now-unused imports: `ExtensionPackageJsonSchema`, `ExtensionProviderService`, `ExtensionPackageJson`, `getServicesApi`, `Effect`, `Schema`, `ExtensionContext`. `Layer` stays (used by `OrgRuntime` type via `Layer.Layer.Success`/`Layer.Layer.Error`).
2928
- Keep `AllServicesLayer`, `setAllServicesLayer`, `OrgRuntime` type, `getOrgRuntime`, `resetOrgRuntimeForTesting`, `ManagedRuntime` import.
3029

@@ -50,7 +49,7 @@ commit msg: `refactor(org): use shared buildAllServicesLayer in extensionProvide
5049

5150
## Verification
5251

53-
- `npm run compile` (or package tsc) — type check; confirms removed imports resolve and the 3 repointed test casts resolve `ReturnType<typeof buildAllServicesLayer>` from `@salesforce/effect-ext-utils`.
52+
- `npm run compile` (or package tsc) — confirms removed imports + 3 repointed test casts resolve `ReturnType<typeof buildAllServicesLayer>` from `@salesforce/effect-ext-utils`.
5453
- Org jest: `orgUtil.test.ts`, `orgLogout.test.ts`, `orgLogoutSelected.test.ts` reference `buildAllServicesLayer`/`setAllServicesLayer`/`getOrgRuntime` — must pass.
5554
- lint (no unused imports left; `Layer` retained for `OrgRuntime` type).
5655
- Runtime channel name unchanged (`'Salesforce Org Management'`). E2E coverage: `packages/salesforcedx-vscode-org/test/playwright/specs/orgPicker.desktop.spec.ts``ORG_OUTPUT_CHANNEL = 'Salesforce Org Management'` (line 39), `selectOutputChannel(page, ORG_OUTPUT_CHANNEL)` + `waitForOutputChannelText` (lines 87-88) assert output renders under that exact channel name. If the fallback regressed, this spec fails to find the channel.

0 commit comments

Comments
 (0)