Skip to content

Remove inaccessible "express" feature#2018

Merged
GregorShear merged 3 commits into
mainfrom
greg/cull/express
Jul 2, 2026
Merged

Remove inaccessible "express" feature#2018
GregorShear merged 3 commits into
mainfrom
greg/cull/express

Conversation

@GregorShear

Copy link
Copy Markdown
Contributor

I anticipate revisiting this feature, and referencing this work, but for now we can remove a lot dead code

@GregorShear GregorShear requested a review from a team as a code owner July 1, 2026 04:56
@GregorShear GregorShear requested a review from jshearer July 1, 2026 04:57

@jshearer jshearer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to merge as is, deleting code/cleaning up is always great. That being said, Claude found a few dangling threads that could net even more deletions!


Workflow store still carries express-only state

customerId, redirectUrl, and their setters (setCustomerId, setRedirectUrl) have zero remaining callers after this commit. ExpressWorkflowGuard was the only writer for both.

customerId: string;
redirectUrl: string;
resetState: () => void;
setCatalogName: (segments: Partial<CatalogName>) => void;
setConnectorMetadata: (value: WorkflowState['connectorMetadata']) => void;
setCustomerId: (value: WorkflowState['customerId']) => void;
setRedirectUrl: (value: WorkflowState['redirectUrl']) => void;

setCustomerId: (value) => {
set(
produce((state: WorkflowState) => {
state.customerId = value;
}),
false,
'customer ID set'
);
},
setRedirectUrl: (value) => {
set(
produce((state: WorkflowState) => {
state.redirectUrl = value;
}),
false,
'redirect URL set'
);
},

That leaves an unreachable branch in useEntityWorkflowHelpers

Since redirectUrl can never be set again, externalRedirect in HeaderLogs.tsx is always false, so the window.location.href branch in exit() can't fire for any surviving flow. HeaderLogs is the only caller that ever passes external=true.

const redirectUrl = useWorkflowStore((state) => state.redirectUrl);
const testAction =
formStatus === FormStatus.TESTED || formStatus === FormStatus.TESTING;
const saveAction =
formStatus === FormStatus.SAVED || formStatus === FormStatus.SAVING;
const externalRedirect = Boolean(saveAction && redirectUrl);

const exit: RouteHandler = useCallback(
(customRoute?: string, external?: boolean) => {
logRocketConsole('EntityWorkflow:exit');
resetState();
let route: string;
if (!customRoute || !hasLength(customRoute)) {
route = generatePath({ catalog_name: catalogName });
} else {
route = customRoute;
}
logRocketConsole('EntityWorkflow:exit:navigate');
if (external && hasLength(route)) {
window.location.href = route;
return;
}
navigate(route, { replace: true });
},
[catalogName, generatePath, navigate, resetState]
);

docs/STATE.md still documents the flow

ui/docs/STATE.md

Lines 100 to 107 in 6d0f8f5

## Multi-Workflow Support
Different entity creation/edit flows exist as separate contexts and store hydration chains:
- `capture_create` / `capture_edit`
- `collection_create` (transformations)
- `express_capture_create` (simplified flow)
- `materialization_create` / `materialization_edit`

Orphaned translation string

expressFlowIntegration had exactly one consumer, PoweredByEstuaryWatermark, which this commit deletes.

'expressFlowIntegration': `Powered by Estuary`,

customerId, redirectUrl, and their setters on the Workflow store had
no remaining callers after ExpressWorkflowGuard was deleted. That in
turn left the external-redirect branch in useEntityWorkflowHelpers'
exit() unreachable, along with the closeCtaKey plumbing and cta.exit
string that only existed to drive it. Also drops the orphaned
expressFlowIntegration string and the docs/STATE.md mention of the
express_capture_create flow.
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

✅ Code Health

Removes $\textcolor{green}{12}$ dead-code issues, introduces none.

49 Unused files $\textcolor{green}{-11}$

File imported nowhere — delete (or import) it.

$\textcolor{green}{-}$ src/hooks/useExpressWorkflowAuth.ts
$\textcolor{green}{-}$ src/components/graphics/PoweredByEstuaryWatermark.tsx
$\textcolor{green}{-}$ src/context/Router/ExpressCaptureCreate.tsx
$\textcolor{green}{-}$ src/context/Router/ExpressCaptureCreateNew.tsx
$\textcolor{green}{-}$ src/pages/expressWorkflow/Wrapper.tsx
$\textcolor{green}{-}$ src/app/guards/ExpressWorkflowGuard/ConnectorGridSkeleton.tsx
$\textcolor{green}{-}$ src/app/guards/ExpressWorkflowGuard/FormSkeleton.tsx
$\textcolor{green}{-}$ src/app/guards/ExpressWorkflowGuard/index.tsx
$\textcolor{green}{-}$ src/components/capture/ExpressCreate/Config.tsx
$\textcolor{green}{-}$ src/components/capture/ExpressCreate/index.tsx
…and 50 more

157 Unused exports

Exported symbol with no references outside its own file — un-export it, or delete it if unused entirely

     src/context/Theme.tsx : sample_blue
     src/context/Theme.tsx : successDark
     src/context/Theme.tsx : infoMain
     src/context/Theme.tsx : logoColors
     src/context/Theme.tsx : chipDraggableIndex
     src/context/Theme.tsx : headerLinkIndex
     src/context/Theme.tsx : intensifiedOutlineThick
     src/context/Theme.tsx : tableAlternateRowsSx
     src/context/Theme.tsx : draggableChipIconSx
     src/context/Theme.tsx : hiddenButAccessibleInput
…and 147 more

102 Unused exported types $\textcolor{green}{-1}$

Exported type with no references outside its own file — un-export it, or delete it if unused entirely

$\textcolor{green}{-}$ src/app/guards/types.ts : ExpressWorkflowGuardProps
     src/utils/dataPlane-utils.ts : ErrorFlags
     src/test/test-utils.tsx : AllTheProvidersProps
     src/stores/Tables/Store.ts : StatsSchema
     src/api/liveSpecsExt.ts : CaptureQueryWithSpec
     src/api/liveSpecsExt.ts : MaterializationQuery
     src/api/liveSpecsExt.ts : MaterializationQueryWithSpec
     src/api/liveSpecsExt.ts : CollectionQuery
     src/api/liveSpecsExt.ts : LiveSpecsExtQuery_DetailsForm
     src/api/liveSpecsExt.ts : LiveSpecsExtQuery_DataPlaneAuthReq
…and 93 more

14 Unused exported enum members

An enum member referenced nowhere

     src/services/supabase.ts : CONNECTOR_TAGS
     src/services/supabase.ts : DRAFTS_EXT
     src/services/supabase.ts : TASKS_BY_DAY
     src/stores/names.ts : QUEUED_TASKS
     src/stores/Tables/hooks.ts : accessGrants
     src/stores/Tables/hooks.ts : accessLinks
     src/stores/Tables/hooks.ts : billing
     src/stores/Tables/hooks.ts : connectors
     src/stores/Tables/hooks.ts : entitySelector
     src/stores/Tables/hooks.ts : prefixes
…and 4 more

5 Unused dependencies

In package.json but never imported

     package.json : @mui/lab
     package.json : @testing-library/jest-dom
     package.json : @urql/exchange-retry
     package.json : logrocket-react
     package.json : stripe

3 Unused devDependencies

In package.json devDependencies but never used

     package.json : @types/logrocket-react
     package.json : @types/react-inspector
     package.json : sharp

@GregorShear GregorShear merged commit d36f6e8 into main Jul 2, 2026
8 checks passed
@GregorShear GregorShear deleted the greg/cull/express branch July 2, 2026 21:32
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.

2 participants