Skip to content

Remove Phoenix & Notebooks - Phase 5: Remove Phoenix and the notebook…#2530

Draft
jawelton74 wants to merge 3 commits into
masterfrom
users/jawelton/removenotebooks-phase5-062926
Draft

Remove Phoenix & Notebooks - Phase 5: Remove Phoenix and the notebook…#2530
jawelton74 wants to merge 3 commits into
masterfrom
users/jawelton/removenotebooks-phase5-062926

Conversation

@jawelton74

@jawelton74 jawelton74 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Preview this branch

Remove Phoenix & Notebooks - Phase 5: Remove Phoenix and the notebook container/allocation core

Summary

This is Phase 5 of the multi-phase effort to retire the Notebooks feature and its
backing Phoenix compute-container service (tracked in docs/remove-notebooks-plan.md).
It removes the Phoenix client and the notebook container/allocation core, while keeping the
database shells
(Mongo / Cassandra / Postgres / VCoreMongo) fully functional on the
CloudShell path.

Phases 1–4 are already merged; this PR continues from b7caca1c (Phase 4). The Juno client,
the cosmosNotebooks ARM client, notebook constants/contracts, telemetry actions, and locale
strings are intentionally left for Phase 6 (boundary held — touched only where compilation
required it).

What changed

Deleted

  • src/Phoenix/PhoenixClient.ts (the whole src/Phoenix/ directory)
  • src/Explorer/Notebook/ core: NotebookContainerClient.ts, NotebookManager.tsx,
    useNotebook.ts, NotebookContentItem.ts, NotebookUtil.ts (+ NotebookUtil.test.ts)
    — the whole src/Explorer/Notebook/ directory is now gone
  • src/Utils/NotebookConfigurationUtils.ts, src/hooks/useNotebookSnapshotStore.ts
  • src/Explorer/Tree/ResourceTreeAdapter.tsx (+ test + snapshot) — it was entirely
    notebook-only/dead once the "My Notebooks" tree was removed
  • Dead Phoenix-container command-bar UI: ConnectionStatusComponent.tsx,
    MemoryTrackerComponent.tsx (+ their .less)

Added

  • src/Explorer/useSynapseLink.ts — a minimal Zustand store holding the only surviving
    non-notebook state that previously lived in useNotebook: isSynapseLinkUpdating
    (used by the Synapse Link enable flow and the command bar).

Changed (decoupled survivors)

  • Explorer.tsx — removed phoenixClient, notebookManager, _isInitializingNotebooks,
    initNotebooks, initiateAndRefreshNotebookList, refreshNotebookList, allocateContainer,
    setNotebookInfo, container heartbeat/connection logic, notebook-server URL feature overrides,
    the getDownloadModalContent gallery helper, and the resourceTree field/instantiation.
    Synapse Link enable now uses useSynapseLink. The shell entry points (openNotebookTerminal /
    connectToNotebookTerminal) are retained on CloudShell.
  • Command barCommandBarComponentAdapter no longer reads Phoenix state or renders the
    connection-status button; CommandBarUtil drops createConnectionStatus / createMemoryTracker;
    Main.tsx drops the two removed .less imports.
  • Shell gating simplifiedisShellEnabled || enableCloudShell collapses to
    enableCloudShell in CommandBarComponentButtonFactory, ContextMenuButtonFactory, and
    SplashScreen (isShellEnabled derived from the always-false isPhoenixFeatures).
  • Tree — removed the "My Notebooks" nodes and the dead isNotebookEnabled pass-through
    param from ResourceTree.tsx and treeNodeUtil.tsx; removed the stale useNotebook import
    in Collection.ts.
  • Hooks/state — removed useSelectedNode.isConnectedToContainer (no consumers),
    useTabs.closeAllNotebookTabs (only caller was the deleted useNotebook), and the Phoenix
    MPAC/flight feature-flag wiring in useKnockoutExplorer.ts.
  • tsconfig.strict.json — removed NotebookContentItem.ts and useNotebookSnapshotStore.ts;
    added the new useSynapseLink.ts.
  • Regenerated affected Jest snapshots (SettingsComponent, AddGlobalSecondaryIndexPanel,
    treeNodeUtil) — diffs only drop notebook fields from the serialized Explorer.

Why enableCloudShell is safe to gate on

userContext.features.enableCloudShell is hardcoded true in
src/Platform/Hosted/extractFeatures.ts, and Phase 1 already migrated all shells to the
CloudShell path. The legacy isShellEnabled / isNotebookEnabled flags derived from
isPhoenixFeatures, which has been permanently false since a36467f4, so the removed
branches were already dead.

Scope / non-goals (deferred to Phase 6)

src/Juno/, src/Utils/arm/generatedClients/cosmosNotebooks/, Constants.Notebook, notebook
fields in DataModels/ViewModels/ActionContracts, notebook/Phoenix telemetry actions,
EndpointUtils.allowedNotebookServerUrls, the notebook userContext.features.* flag
definitions, and locale strings are not removed here.

Testing / verification

Full sweep green:

  • npm run compile
  • npm run compile:strict
  • npm run lint ✓ (0 errors; only pre-existing warnings)
  • npm run format:check
  • npm test ✓ (1894 passing, 189 suites, 188 snapshots)
  • npm run build:ci ✓ (webpack, 367 assets, 7563 modules)

Manual smoke test: the Mongo, Cassandra, Postgres, and VCoreMongo shells still open.

Stats

38 files changed, +90 / −2821.

Related

  • Plan: docs/remove-notebooks-plan.md (Phase 5 section marked completed with deviations)
  • Prior phases: d19c7e0c (Phase 1), 8e90672f (Phase 2), b7caca1c (Phase 4)

… container/allocation core

Deletes the Phoenix client, notebook container/allocation core, and the legacy ResourceTreeAdapter; rewires the surviving non-notebook Synapse Link state into a new minimal useSynapseLink store; removes dead Phoenix container command-bar UI; and simplifies database-shell gating to enableCloudShell. Database shells (Mongo/Cassandra/Postgres/VCoreMongo) continue to run on CloudShell.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Playwright tests ✅ passed

Passed Failed Flaky Duration
651 0 12 954s

📁 Report: 28405020280-1/report.zip
Open container (Azure sign-in required) → click into 28405020280-1 folder → click report.zipDownload → unzip → open index.html · Workflow run

@github-actions

Copy link
Copy Markdown

Playwright tests ✅ passed

Passed Failed Flaky Duration
654 0 9 774s

📁 Report: 29356002798-1/report.zip
Open container (Azure sign-in required) → click into 29356002798-1 folder → click report.zipDownload → unzip → open index.html · Workflow run

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