chore: remove dead code (59 unused files + ~125 unused exports) (#1835)

* chore: remove dead/unreferenced files across ui, vscode

Remove 59 unused source files (components, hooks, lib utils, stores,
barrels, and orphaned vscode github modules) that are not imported by
any entry-reachable code. Also drop a stale test mock for the removed
execCommands module.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* refactor: remove unused exported symbols (types, functions, consts, hooks)

Remove exported symbols whose identifier is referenced nowhere in the
repository (verified via repo-wide search), across ui types/contracts,
lib utilities, sync layer, stores, and components. Also drop the few
imports/private helpers orphaned by these removals.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* refactor: remove more unused exports (desktop, shortcuts, worktree, vscode)

Continue removing repo-wide unreferenced exported functions, consts and
types across lib/desktop, shortcuts, worktreeSessionCreator, sync, and
vscode gitService, with cascading orphaned helpers/imports cleaned up.

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>

* chore: add dead-code cleanup tooling

* refactor: checkpoint dead-code cleanup

* refactor: remove dead-code suppressions

---------

Co-authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
Serhii Dziupin
2026-06-26 19:27:53 +03:00
committed by GitHub
co-authored by Serhii Dziupin Bohdan Triapitsyn
parent 4a37b9a005
commit 00821700de
324 changed files with 444 additions and 14876 deletions
-107
View File
@@ -7,28 +7,6 @@ export const SEMANTIC_TYPOGRAPHY = {
micro: '0.875rem',
} as const;
export const FONT_SIZE_SCALES = {
small: {
markdown: '0.875rem',
code: '0.8125rem',
uiHeader: '0.875rem',
uiLabel: '0.8125rem',
meta: '0.8125rem',
micro: '0.75rem',
},
medium: SEMANTIC_TYPOGRAPHY,
large: {
markdown: '1rem',
code: '0.9375rem',
uiHeader: '1rem',
uiLabel: '0.9375rem',
meta: '0.9375rem',
micro: '0.9375rem',
},
} as const;
export type FontSizeOption = keyof typeof FONT_SIZE_SCALES;
export const VSCODE_TYPOGRAPHY = {
// Keep VS Code webview typography slightly tighter; VS Code UI chrome already provides density.
markdown: '0.9063rem',
@@ -39,35 +17,12 @@ export const VSCODE_TYPOGRAPHY = {
micro: '0.7813rem',
} as const;
export const SEMANTIC_TYPOGRAPHY_CSS = {
'--text-markdown': SEMANTIC_TYPOGRAPHY.markdown,
'--text-code': SEMANTIC_TYPOGRAPHY.code,
'--text-ui-header': SEMANTIC_TYPOGRAPHY.uiHeader,
'--text-ui-label': SEMANTIC_TYPOGRAPHY.uiLabel,
'--text-meta': SEMANTIC_TYPOGRAPHY.meta,
'--text-micro': SEMANTIC_TYPOGRAPHY.micro,
} as const;
export const TYPOGRAPHY_CLASSES = {
markdown: 'typography-markdown',
code: 'typography-code',
uiHeader: 'typography-ui-header',
uiLabel: 'typography-ui-label',
meta: 'typography-meta',
micro: 'typography-micro',
} as const;
export type SemanticTypographyKey = keyof typeof SEMANTIC_TYPOGRAPHY;
export type TypographyClassKey = keyof typeof TYPOGRAPHY_CLASSES;
export function getTypographyVariable(key: SemanticTypographyKey): string {
return `--text-${key.replace(/([A-Z])/g, '-$1').toLowerCase()}`;
}
export function getTypographyClass(key: TypographyClassKey): string {
return TYPOGRAPHY_CLASSES[key];
}
export const typography = {
semanticMarkdown: {
@@ -248,22 +203,6 @@ export const typography = {
},
};
export function getTypographyStyle(path: string, fallback?: React.CSSProperties): React.CSSProperties {
const parts = path.split('.');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let current: any = typography;
for (const part of parts) {
if (current && current[part]) {
current = current[part];
} else {
return fallback || {};
}
}
return current || fallback || {};
}
export const toolDisplayStyles = {
padding: {
@@ -309,49 +248,3 @@ export const toolDisplayStyles = {
...typography.tool.inline,
}),
};
export const typographyClasses = {
'heading-1': 'typography-h1',
'heading-2': 'typography-h2',
'heading-3': 'typography-h3',
'heading-4': 'typography-h4',
'heading-5': 'typography-h5',
'heading-6': 'typography-h6',
'ui-button': 'typography-ui-button',
'ui-button-small': 'typography-ui-button-small',
'ui-button-large': 'typography-ui-button-large',
'ui-label': 'typography-ui-label',
'ui-caption': 'typography-ui-caption',
'ui-badge': 'typography-ui-badge',
'ui-tooltip': 'typography-ui-tooltip',
'ui-input': 'typography-ui-input',
'ui-helper': 'typography-ui-helper-text',
'code-inline': 'typography-code-inline',
'code-block': 'typography-code-block',
'code-line-numbers': 'typography-code-line-numbers',
'markdown-h1': 'typography-markdown-h1',
'markdown-h2': 'typography-markdown-h2',
'markdown-h3': 'typography-markdown-h3',
'markdown-h4': 'typography-markdown-h4',
'markdown-h5': 'typography-markdown-h5',
'markdown-h6': 'typography-markdown-h6',
'markdown-body': 'typography-markdown-body',
'markdown-body-small': 'typography-markdown-body-small',
'markdown-body-large': 'typography-markdown-body-large',
'markdown-blockquote': 'typography-markdown-blockquote',
'markdown-list': 'typography-markdown-list',
'markdown-link': 'typography-markdown-link',
'markdown-code': 'typography-markdown-code',
'markdown-code-block': 'typography-markdown-code-block',
'semantic-markdown': 'typography-markdown',
'semantic-code': 'typography-code',
'semantic-ui-header': 'typography-ui-header',
'semantic-ui-label': 'typography-ui-label',
'semantic-meta': 'typography-meta',
'semantic-micro': 'typography-micro',
};