Skip to content

Commit 2081985

Browse files
authored
Remove the Editor deployment admin page at /processor/editor (#7859)
## Description of Changes Removes the `/processor/editor` **Editor deployment** admin page and the one button that navigated to it. The page (`EditorAdmin`) covered deployment targets, instance pairing, instance health, service-token rotation and offline activation. It was mock-only — there is no backend behind `GET /v1/editor/deployment`; it is served solely by MSW. It was reachable from exactly one place: a **Manage Editor deployment** button in the Infrastructure page header. It was never in the sidebar, search, or onboarding. ### Removed - `portal/views/EditorAdmin.tsx` + `EditorAdmin.css` - All of `portal/components/editor-admin/` — 6 components and their 6 co-located stories - The route in `portal/ViewRouter.tsx`, and the `"editor"` member of `ViewId` / `VIEW_PATHS` in `portal/contexts/ViewContext.tsx` - The **Manage Editor deployment** button in `portal/views/Infrastructure.tsx`, plus its now-unused `Button` / `useView` imports - The 15 `[portal.editorAdmin.*]` tables and `portal.infrastructure.manageEditorDeployment` from **en-US only** (the other 41 locales are rebuilt from the reference by the sync workflow) - The presentation-only constants in `portal/api/editorDeploy.ts` (`TARGET_META`, `INSTANCE_STATUS_TONE`, `INSTANCE_STATUS_LABEL`, `TargetMeta`) that had no consumer left and pointed at the deleted i18n keys, and the matching `ignoredKeyPatterns` entry in `core/i18n/translationAudit.ts` With the route gone, `/processor/editor` falls through the portal's existing catch-all to Home. ### Deliberately kept `portal/api/editorDeploy.ts`, `useEditorDeployment`, and the MSW mocks stay. `portal/components/EditorStatusCard.tsx` — the **PDF Editor** deployment rail on the portal Home hero — still reads them. An in-code comment claiming onboarding was a third consumer was wrong and has been corrected. The mock-only `targets` / `pairings` fields of `EditorDeploymentResponse` also have no reader now, but reshaping a documented endpoint contract is a separate decision from removing a page, so they are left alone here. ## Verification Ran the app against a live backend and drove the portal with Playwright: - `/processor/editor` lands on the portal Home with none of the old copy - Infrastructure renders with no **Manage Editor deployment** button - The Home hero **PDF Editor** rail still renders — the shared data layer survived `task fix` and `task check` both pass: backend spotless + tests, frontend typecheck (proprietary/saas/portal/storybook/core), oxlint at `--max-warnings=0`, theme-lint, stylelint, oxfmt, 350 frontend test files, engine pyright + ruff + 430 tests. Both translation gates are green, which confirms the en-US key removal was exactly complete — no orphans, nothing still referenced. ## Checklist - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] My changes generate no new warnings
1 parent 07b9708 commit 2081985

23 files changed

Lines changed: 6 additions & 1293 deletions

frontend/editor/public/locales/en-US/translation.toml

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -8032,86 +8032,6 @@ status = "Status"
80328032
time = "Time"
80338033
user = "User"
80348034

8035-
[portal.editorAdmin]
8036-
subtitle = "Deploy the Stirling PDF Editor, pair self-hosted instances to your org, and operate the running fleet — targets, health, credentials, and offline activation in one place."
8037-
title = "Editor deployment"
8038-
8039-
[portal.editorAdmin.health.columns]
8040-
activeUsers = "Active users"
8041-
host = "Host"
8042-
lastSeen = "Last seen"
8043-
region = "Region"
8044-
status = "Status"
8045-
target = "Target"
8046-
version = "Version"
8047-
8048-
[portal.editorAdmin.health.empty]
8049-
description = "Deploy a target and pair it to see live instance health here."
8050-
title = "No instances reporting"
8051-
8052-
[portal.editorAdmin.offlineActivation]
8053-
enterpriseTag = "Enterprise"
8054-
generateButton = "Generate offline bundle"
8055-
lockCopy = "Offline and on-prem activation is part of Enterprise."
8056-
subtitle = "Generate a signed activation bundle for an offline or on-prem install with no outbound network path. Transfer it to the instance and apply it during first-run setup."
8057-
talkToSales = "Talk to sales"
8058-
title = "Air-gapped activation"
8059-
8060-
[portal.editorAdmin.offlineActivation.readyBanner]
8061-
description = "{{file}} is signed and ready to transfer. It activates one instance and expires in 14 days."
8062-
title = "Bundle ready"
8063-
8064-
[portal.editorAdmin.pairing]
8065-
generated = "Generated ✓"
8066-
generateNewCode = "Generate new code"
8067-
lockCopy = "IaC provisioning is part of Enterprise."
8068-
rotate = "Rotate"
8069-
talkToSales = "Talk to sales"
8070-
8071-
[portal.editorAdmin.sections.health]
8072-
sub = "Every Editor instance reporting in — version, region, status, last seen, and active users."
8073-
title = "Instance health"
8074-
8075-
[portal.editorAdmin.sections.pairing]
8076-
sub = "Connect a self-hosted editor to this org. Generate a token, hand off a short code, or wire it through IaC."
8077-
title = "Pairing"
8078-
8079-
[portal.editorAdmin.sections.targets]
8080-
sub = "Where the Editor runs. Copy a snippet to stand up a self-hosted instance, or use Managed Cloud with no ops."
8081-
title = "Deployment targets"
8082-
8083-
[portal.editorAdmin.serviceToken]
8084-
currentToken = "Current token"
8085-
lastRotated = "Last rotated"
8086-
rotateButton = "Rotate service token"
8087-
subtitle = "Instances authenticate to the org with this credential. Rotate it on a schedule or immediately after a suspected leak."
8088-
title = "Service token"
8089-
8090-
[portal.editorAdmin.serviceToken.rotatedBanner]
8091-
description = "A new token was issued. Update each self-hosted instance's STIRLING_SERVICE_TOKEN within the 24h grace window or they'll drop offline."
8092-
title = "Rotate running instances"
8093-
8094-
[portal.editorAdmin.status]
8095-
degraded = "Degraded"
8096-
healthy = "Healthy"
8097-
offline = "Offline"
8098-
pairing = "Pairing"
8099-
8100-
[portal.editorAdmin.targets]
8101-
instanceCount_one = "{{count}} instance"
8102-
instanceCount_other = "{{count}} instances"
8103-
talkToSales = "Talk to sales"
8104-
upgradePlan = "Upgrade plan"
8105-
8106-
[portal.editorAdmin.targets.lock]
8107-
enterprise = "On-prem and Kubernetes self-hosting are part of Enterprise."
8108-
paid = "Self-hosting with Docker and Kubernetes unlocks on a paid plan."
8109-
8110-
[portal.editorAdmin.targets.state]
8111-
available = "Available"
8112-
locked = "Locked"
8113-
running = "Running"
8114-
81158035
[portal.errorBoundary]
81168036
description = "This view hit an unexpected error. Try again, or pick another section from the sidebar."
81178037
retry = "Try again"
@@ -8249,7 +8169,6 @@ evening = "Good evening"
82498169
morning = "Good morning"
82508170

82518171
[portal.infrastructure]
8252-
manageEditorDeployment = "Manage Editor deployment"
82538172
sectionsAriaLabel = "Infrastructure sections"
82548173
subtitle = "API credentials and the audit trail for your Stirling workspace."
82558174
title = "Infrastructure"

frontend/editor/src/core/i18n/translationAudit.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ export const I18N_PROJECTS: TranslationProject[] = [
9898
// (label maps, role/policy/journey catalogues) and rendered via
9999
// t(constant), invisible to the static scan.
100100
/^portal\.documents\.(status|audit)\./,
101-
/^portal\.editorAdmin\.status\./,
102101
/^portal\.components\.(maturity|billingUnit)\./,
103102
/^portal\.home\.(pipelineTemplates|pipelineStages)\./,
104103
/^portal\.procurement\.journeySteps\./,

frontend/editor/src/portal-saas/views/Infrastructure.test.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@ describe("Infrastructure (SaaS)", () => {
2929
enterprise.loading = false;
3030
});
3131

32-
it("defaults to the live API keys tab and drops the manage-editor button", () => {
32+
it("defaults to the live API keys tab", () => {
3333
render(<Infrastructure />);
3434
expect(screen.getByTestId("api-keys-tab")).toBeInTheDocument();
35-
expect(
36-
screen.queryByText("portal.infrastructure.manageEditorDeployment"),
37-
).not.toBeInTheDocument();
3835
});
3936

4037
it("renders the not-yet-shipped tabs as disabled 'coming soon'", () => {

frontend/editor/src/portal-saas/views/Infrastructure.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import "@portal/views/Infrastructure.css";
88

99
// SaaS pre-release: only API keys + Audit are shipped. Deployments, Security,
1010
// Models and Storage are shown as disabled "coming soon" tabs (greyed, to the
11-
// right of the live ones), and the self-hosted-only "Manage editor deployment"
12-
// header button is dropped. Selection is never one of the coming-soon keys — the
11+
// right of the live ones). Selection is never one of the coming-soon keys — the
1312
// Tabs primitive renders them as native-disabled buttons, so onChange can't fire.
1413
type InfraTab =
1514
| "api-keys"

frontend/editor/src/portal/ViewRouter.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Pipelines } from "@portal/views/Pipelines";
77
import { PipelineBuilder } from "@portal/views/PipelineBuilder";
88
import { Sources } from "@portal/views/Sources";
99
import { Integrations } from "@portal/views/Integrations";
10-
import { EditorAdmin } from "@portal/views/EditorAdmin";
1110
import { Infrastructure } from "@portal/views/Infrastructure";
1211
import { PortalBillingGate } from "@portal/components/billing/PortalBillingGate";
1312
import { ConnectGuardedRoute } from "@portal/components/account-link/ConnectGuardedRoute";
@@ -79,7 +78,6 @@ export function ViewRouter() {
7978
path working, preserving its query (e.g. onboarding's ?setup=<category>). */}
8079
<Route path={rel(VIEW_PATHS.policies)} element={<PoliciesRedirect />} />
8180
<Route path={rel(VIEW_PATHS.documents)} element={<Documents />} />
82-
<Route path={rel(VIEW_PATHS.editor)} element={<EditorAdmin />} />
8381
<Route
8482
path={rel(VIEW_PATHS.infrastructure)}
8583
element={<Infrastructure />}

frontend/editor/src/portal/api/editorDeploy.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -114,38 +114,6 @@ export interface EditorDeploymentResponse {
114114
instances: EditorInstance[];
115115
}
116116

117-
/* ──────────────────────────────────────────────────────────────────────── */
118-
/* Presentation metadata (lives client-side — product copy, not data) */
119-
/* ──────────────────────────────────────────────────────────────────────── */
120-
121-
export interface TargetMeta {
122-
tone: "neutral" | "blue" | "purple";
123-
}
124-
125-
export const TARGET_META: Record<TargetKind, TargetMeta> = {
126-
cloud: { tone: "blue" },
127-
docker: { tone: "neutral" },
128-
kubernetes: { tone: "purple" },
129-
};
130-
131-
export const INSTANCE_STATUS_TONE: Record<
132-
InstanceStatus,
133-
"success" | "warning" | "danger" | "info" | "neutral"
134-
> = {
135-
healthy: "success",
136-
degraded: "warning",
137-
offline: "danger",
138-
pairing: "info",
139-
};
140-
141-
/** Values are i18n keys — render with t(). */
142-
export const INSTANCE_STATUS_LABEL: Record<InstanceStatus, string> = {
143-
healthy: "portal.editorAdmin.status.healthy",
144-
degraded: "portal.editorAdmin.status.degraded",
145-
offline: "portal.editorAdmin.status.offline",
146-
pairing: "portal.editorAdmin.status.pairing",
147-
};
148-
149117
/* ──────────────────────────────────────────────────────────────────────── */
150118
/* Endpoints */
151119
/* ──────────────────────────────────────────────────────────────────────── */

frontend/editor/src/portal/components/editor-admin/CredentialRotationCard.stories.tsx

Lines changed: 0 additions & 37 deletions
This file was deleted.

frontend/editor/src/portal/components/editor-admin/CredentialRotationCard.tsx

Lines changed: 0 additions & 77 deletions
This file was deleted.

frontend/editor/src/portal/components/editor-admin/DeploymentSummaryStrip.stories.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

frontend/editor/src/portal/components/editor-admin/DeploymentSummaryStrip.tsx

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)