Skip to content

Remove unused exports with no callers - #203

Merged
cursor[bot] merged 1 commit into
masterfrom
cursor/remove-unused-symbols-c21f
Nov 22, 2026
Merged

cursor[bot] merged 1 commit into
masterfrom
cursor/remove-unused-symbols-c21f

Conversation

@jonbeckman

Copy link
Copy Markdown
Contributor

Summary

These exports had no callers outside the symbols that defined them. No whole file was deleted.

  • Removed SelectField. The AI provider panel still renders its adapter select inline.
  • Removed AdminViewTabs, ADMIN_VIEW_TABS, and isAdminView. Admin navigation uses the sidebar items in session-sidebar-admin-nav.tsx. IntegrationTabs stays.
  • Removed createS0ConfigStore and S0ConfigStorePromise. Call sites construct S0ConfigStore directly.
  • Removed buildIsolateModelMessages and its private buildUserPrompt. Repository warnings are appended in beforeTurn on the isolate agent.
  • Removed startWorkflowRunFromWebhook. Webhook and public routes call WorkflowLifecycle.startWorkflowRun directly.
  • Removed authorizeSessionProxyRequest and its private authorizeSessionProxy. No preview-proxy router calls them.
  • Removed redactHeaders and SENSITIVE_HEADER_NAMES. Request logs read individual headers (cf-ray, x-request-id, traceparent, tracestate) and do not dump the header map.
  • Removed validateWorkflowBuilderManifestSync. Draft reads call validateWorkflowDraft.
  • Removed unused isWorkflowRuntimeAbiVersion and getCurrentWorkflowRuntimeKernel. Kernel lookup still goes through getWorkflowRuntimeKernel, getWorkflowRuntimeKernelModuleName, and getWorkflowRuntimeKernelModules.
  • Removed the unused ApiWorkerResource alias. ApiWorker still names ReturnType<typeof createApi>.

This change has no user-visible effect. It uses the release:none label and does not add a Tegami entry.

Proof there were no callers

Searches were run from the repo root before the deletions, skipping node_modules, dist, and .alchemy.

rg -n --glob '!node_modules' --glob '!dist' --glob '!**/.alchemy/**' \
  '\b(SelectField|AdminViewTabs|ADMIN_VIEW_TABS|isAdminView|createS0ConfigStore|S0ConfigStorePromise|buildIsolateModelMessages|buildUserPrompt|startWorkflowRunFromWebhook|authorizeSessionProxyRequest|authorizeSessionProxy|redactHeaders|SENSITIVE_HEADER_NAMES|validateWorkflowBuilderManifestSync|isWorkflowRuntimeAbiVersion|getCurrentWorkflowRuntimeKernel|ApiWorkerResource)\b'

Every match was the definition, or a use inside the same unused symbol:

packages/api/src/server/mcp/workflow-builder/runtime.ts:294:export function validateWorkflowBuilderManifestSync
packages/api/src/server/effect/handlers/shared/control-plane.ts:716:const authorizeSessionProxy
packages/api/src/server/effect/handlers/shared/control-plane.ts:732:export function authorizeSessionProxyRequest
packages/api/src/server/effect/handlers/shared/control-plane.ts:739:    authorizeSessionProxy
packages/api/src/server/background/workflows/runtime-abi.ts:45:export function isWorkflowRuntimeAbiVersion
packages/api/src/server/background/workflows/runtime-abi.ts:55:export function getCurrentWorkflowRuntimeKernel
packages/api/src/server/effect/services/observability.ts:33:const SENSITIVE_HEADER_NAMES
packages/api/src/server/effect/services/observability.ts:197:export function redactHeaders
packages/api/src/server/effect/services/observability.ts:201:      Match.value(SENSITIVE_HEADER_NAMES.has
packages/api/src/server/background/workflows/lifecycle.ts:583:export function startWorkflowRunFromWebhook
packages/api/src/server/background/isolate/model.ts:410:function buildUserPrompt
packages/api/src/server/background/isolate/model.ts:425:export function buildIsolateModelMessages
packages/api/src/server/background/isolate/model.ts:432:      content: buildUserPrompt
apps/web/src/components/admin-page/page.tsx:339:export const ADMIN_VIEW_TABS
apps/web/src/components/admin-page/page.tsx:346:export function AdminViewTabs
apps/web/src/components/admin-page/page.tsx:357:        if (isAdminView(value))
apps/web/src/components/admin-page/page.tsx:361:      tabs={ADMIN_VIEW_TABS}
apps/web/src/components/admin-page/page.tsx:397:export function isAdminView
apps/web/src/components/admin-ai-provider-panel-ui.tsx:469:export function SelectField
apps/api/infra/index.ts:700:export type ApiWorkerResource
packages/api/src/server/background/db/s0-config.ts:267:export interface S0ConfigStorePromise
packages/api/src/server/background/db/s0-config.ts:275:export function createS0ConfigStore

rg '\bS0ConfigStore\b' still matches new S0ConfigStore(...) in the AI gateway, LiteLLM, admin config, AI Search, and MCPCF modules.

Validation

  • nub run typecheck
  • nub run lint
  • nub run format
  • nub run config:check was run on the Effect concurrency branch, which contains the same config files. This pull request does not change config.
  • nub run test was not run. No route, screen, or persisted behavior changed.

Checklist

  • I added or updated tests for behavior changes, or explained why tests are not needed.
  • I updated documentation and config examples when behavior or configuration changed.
  • I added a .tegami/ release entry, or explained why this pull request uses release:none.
  • I ran nub run config:check, nub run typecheck, nub run lint, nub run format, and nub run test.
  • I did not include credentials, private data, internal URLs, or organization-specific defaults.
  • I updated THIRD_PARTY_NOTICES.md for new third-party code or separately licensed assets.
Open in Web Open in Cursor 

These symbols were only referenced at their definitions. Call sites use the live helpers beside them, including the Effect workflow start path, S0ConfigStore, and the admin sidebar.

Co-authored-by: Jonathan Beckman <jonathantbeckman@gmail.com>
@jonbeckman jonbeckman added the release:none label Nov 22, 2026 — with Cursor
@jonbeckman
jonbeckman marked this pull request as ready for review November 22, 2026 09:21
@github-actions

Copy link
Copy Markdown
Contributor

Tegami

This repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under .tegami/ before merging.

Create a changelog → · Changelog format

No changelogs yet

This PR has no pending changelog files. If your changes require a release, add a changelog before merging.

Run nub run tegami locally to create a changelog interactively.

Managed by Tegami.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 e2e solzero-core: 10 passed, 21 left out by filters

2 agent steps · 2 replayed from cache

Change 10 files changed since 825b503
Filter decision kept 9 of 30 tests, left out 21 (1 call, 20.3k tokens)

21 tests left out by filters
Test Filter Reason
tests/accounts.e2e.ts › create, use and revoke an isolated user API key decision 13% likely affected
tests/accounts.e2e.ts › Better Auth 1.7 account APIs select the local account row id decision 13% likely affected
tests/accounts.e2e.ts › Accounts settings shows GitHub as unlinked without OAuth providers decision 13% likely affected
tests/advanced-sessions.e2e.ts › incognito sessions stay outside normal lists but open directly decision 13% likely affected
tests/advanced-sessions.e2e.ts › session MCP definitions and subagent preferences persist decision 19% likely affected
tests/api-contract.e2e.ts › exported API key and session schemas decode actual Worker responses decision 13% likely affected
tests/auth.e2e.ts › sign-in gate protects every application route decision 6% likely affected
tests/auth.e2e.ts › credential sign-in opens the requested settings page decision 13% likely affected
tests/auth.e2e.ts › anonymous callers cannot access any protected API group decision 11% likely affected
tests/auth.e2e.ts › sign-out removes authenticated UI access decision 7% likely affected
tests/bots.e2e.ts › create a bot and manage a temporary routine through the UI decision 13% likely affected
tests/branding.e2e.ts › the selected deployment brand reaches the browser decision 5% likely affected
tests/branding.e2e.ts › health identifies the configured application without exposing configuration decision 15% likely affected
tests/branding.e2e.ts › OpenAPI uses the selected deployment brand decision 10% likely affected
tests/session-transfer.e2e.ts › admin authentication transfer redeems once and retains its deep link decision 13% likely affected
tests/sessions.e2e.ts › a second account cannot read or mutate another account's session decision 15% likely affected
tests/sessions.e2e.ts › codex executes a real prompt and persists its output decision 17% likely affected
tests/settings.e2e.ts › runtime default persists after reload decision 14% likely affected
tests/settings.e2e.ts › MCP deep link and legacy settings URL open the MCP tab decision 16% likely affected
tests/settings.e2e.ts › secret editor creates, finds and deletes a disposable secret decision 16% likely affected
tests/settings.e2e.ts › theme preference survives reload decision 13% likely affected
All 10 tests in 6 files
Test Agent Time
🟢 tests/admin.e2e.ts · 1 passed 4.4s
🟢 administrator pages show live control-plane configuration 4.4s
🟢 tests/auth.setup.e2e.ts · 1 passed 6.9s
🟢 authenticate isolated admin 6.9s
🟢 tests/sessions.e2e.ts · 3 passed 1 step 30.5s
🟢 session tools, archive and restoration persist through the real Worker 1 step 5.6s
🟢 isolate executes a real prompt and persists its output 9.5s
🟢 opencode executes a real prompt and persists its output 15.5s
🟢 tests/settings.e2e.ts · 1 passed 8.1s
🟢 all settings categories load real data 8.1s
🟢 tests/skills.e2e.ts · 1 passed 7.5s
🟢 global skill defaults and per-user preferences persist independently 7.5s
🟢 tests/workflows.e2e.ts · 3 passed 1 step 8.5s
🟢 workflow authoring, rename, export, disable and archive persist 1 step 6.0s
🟢 manual workflow executes JavaScript and stores a real R2 artifact 2.4s
🟢 invalid workflow definitions are rejected before storage 107ms

Tested by e2e 0.23.0 · 2m 12s · local-cloudflare · run artifacts

@cursor
cursor Bot merged commit 136d3fe into master Nov 22, 2026
20 checks passed
@cursor
cursor Bot deleted the cursor/remove-unused-symbols-c21f branch November 22, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants