diff --git a/web/CLAUDE.md b/web/CLAUDE.md index 57e9e277..315ce50e 100644 --- a/web/CLAUDE.md +++ b/web/CLAUDE.md @@ -52,4 +52,9 @@ NEVER give a code reference or location in any other format. ## CRITICAL **IMPORTANT**: BEFORE YOU DO ANYTHING, READ spec.md IN FULL USING THE READ TOOL! -**IMPORTANT**: NEVER USE GREP. ALWAYS USE RIPGREP! \ No newline at end of file +**IMPORTANT**: NEVER USE GREP. ALWAYS USE RIPGREP! + +## Refactoring Philosophy +- We do not care about deprecation - remove old code completely +- Always prefer clean refactoring over gradual migration +- Delete unused functions and code paths immediately \ No newline at end of file diff --git a/web/src/client/components/clickable-path.ts b/web/src/client/components/clickable-path.ts index 8a4ef06c..637f613d 100644 --- a/web/src/client/components/clickable-path.ts +++ b/web/src/client/components/clickable-path.ts @@ -10,7 +10,7 @@ import { html, LitElement } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import { createLogger } from '../utils/logger.js'; -import { copyToClipboard, formatPathForDisplay } from '../utils/path-utils.js'; +import { copyToClipboard } from '../utils/path-utils.js'; import './copy-icon.js'; const logger = createLogger('clickable-path'); @@ -65,7 +65,7 @@ export class ClickablePath extends LitElement { render() { if (!this.path) return html``; - const displayText = this.displayPath || formatPathForDisplay(this.path); + const displayText = this.displayPath || this.path; return html`
- ${formatPathForDisplay(session.workingDir)} + ${session.displayWorkingDir || session.workingDir}
diff --git a/web/src/client/utils/path-utils.ts b/web/src/client/utils/path-utils.ts index 59750148..0d1391ef 100644 --- a/web/src/client/utils/path-utils.ts +++ b/web/src/client/utils/path-utils.ts @@ -1,23 +1,7 @@ /** - * Path utilities for formatting and displaying paths + * Path utilities for clipboard operations */ -/** - * Format a file path for display by replacing the home directory with ~ - * - * NOTE: This function is deprecated and only used as a fallback. - * The server now provides pre-formatted paths via the displayWorkingDir field. - * - * @param path The absolute path to format - * @returns The formatted path (no transformation applied) - * @deprecated Use displayWorkingDir from server response instead - */ -export function formatPathForDisplay(path: string): string { - // Client-side cannot reliably detect the home directory - // Return the path as-is; server should provide formatted paths - return path; -} - /** * Copy text to clipboard with fallback for older browsers * @param text The text to copy