Skip to content

Case-insensitive filename collisions silently exclude SettingsSearch.tsx from the TypeScript program #23

Closed

Description

@superman2003

Summary

tsconfig.json includes the src directory:

"include": ["src", "tests"]

When TypeScript expands a directory include, it keeps only one file per path
stem, preferring .ts over .tsx. On a case-insensitive filesystem — Windows
and macOS, and CLAUDE.md states this is a Windows-primary dev environment —
these two pairs share a stem:

Kept Silently dropped
src/pages/settings/settingsSearch.ts src/pages/settings/SettingsSearch.tsx
src/components/NormalizedConversation/tools/subagentCard.test.ts .../SubagentCard.test.tsx

Impact

SettingsSearch.tsx is a real product component and is never type-checked
on Windows or macOS. pnpm run check passes partly because it is not looking
at the file. A type error in it would ship undetected on the primary dev
platform and only surface on a case-sensitive CI runner, if at all.

It also breaks lint outright:

src/pages/settings/SettingsSearch.tsx
  0:0  error  Parsing error: ESLint was configured to run on
  `<tsconfigRootDir>/src\pages\settings\SettingsSearch.tsx` using
  `parserOptions.project`: <tsconfigRootDir>/tsconfig.json
  However, that TSConfig does not include this file.

src/components/NormalizedConversation/tools/SubagentCard.test.tsx
  0:0  error  Parsing error: ... (same)

Reproduce

On Windows or macOS:

cd frontend && pnpm run lint

Notes on fixing

settingsSearch.ts is a six-line re-export barrel:

export {
  applySettingsSearchHighlight,
  findSettingsHighlightTarget,
  matchSettingsSearch,
} from './settingsSearchQuery';
export type { ResolvedSettingsSearchEntry } from './settingsSearchQuery';

Nothing in src/ or tests/ imports it — even settingsSearch.test.ts
imports ./settingsSearchQuery directly. So it can simply be deleted rather
than renamed.

Worth considering separately: a lint rule or a CI check on a case-insensitive
runner would stop this class of collision from recurring, since a
case-sensitive CI box cannot reproduce it.

#20 fixes both collisions. Related: #21

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions