Skip to content

refactor(web): remove dead src/types/navigation.ts InspectorTab, fold into utils/inspectorTabs #1785

Description

@cliffhall

Summary

clients/web/src/types/navigation.ts exports InspectorTab, a tab-identifier union that has zero references anywhere in the repo (including tests). It duplicates — and drifts from — the live type in src/utils/inspectorTabs.ts.

Surfaced during the #1776 review (PR #1784) while auditing the new src/lib vs src/utils rule.

The two competing types

// src/types/navigation.ts  — 0 importers (dead)
export type InspectorTab = "tools" | "apps" | "prompts" | "resources" | "logs" | "tasks" | "protocol";

// src/utils/inspectorTabs.ts — the one actually used (App.tsx, lib/oauthResume.ts, …)
export const INSPECTOR_TAB_IDS = ["Apps","Tools","Prompts","Resources","Tasks","Logs","Protocol","Network"] as const;
export type InspectorTabId = (typeof INSPECTOR_TAB_IDS)[number];

They differ in case (lowercase vs capitalized) and membership (navigation.ts is missing Network), and the dead one is the stale copy.

Proposed change

  • Delete src/types/navigation.ts (the InspectorTab type is dead).
  • The live tab-identifier type stays InspectorTabId in src/utils/inspectorTabs.ts — no fold needed unless a lowercase-spelled variant is wanted, in which case derive it there.
  • After removal, src/types/ holds only the ambient react-syntax-highlighter .d.ts stubs (wired via tsconfig.app.json paths), which makes the refactor(web): sharpen the src/lib vs src/utils rule and move misfiled modules #1776 "no domain types in src/types/" framing exactly true.

Notes

Kept out of PR #1784 deliberately — deleting exported symbols changes the coverage denominator and is a scope change from that PR's pure-move mandate. Behavior-preserving (the type has no consumers).

Acceptance

  • src/types/navigation.ts removed; InspectorTab gone.
  • No dangling references (there are none today; verify after).
  • npm run ci green.

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions