Skip to content

Refactor to extract and import shared utility functions - #47

Merged
kbtale merged 2 commits into
masterfrom
refactor/shared-utils
Sep 4, 2026
Merged

kbtale merged 2 commits into
masterfrom
refactor/shared-utils

Conversation

@kbtale

@kbtale kbtale commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary: Extracts the duplicated toTitleCase and formatDefaultTitle text utilities into a single shared module and rewires both layout components to import them, removing all duplicate implementations.

Changes Included:
Shared module: Added src/utils/text.ts with toTitleCase and formatDefaultTitle as the single source of truth.
AppShell: Removed its local copies and imports from the shared module (4 call sites unchanged).
SettingsModal: Removed its local copies and imports from the shared module (2 call sites unchanged).
Scope note: The roadmap listed DoomsdayTool as a third consumer, but PR 27 already removed its only toTitleCase usage, so including it would have created a dead import. SettingsModal was added because the roadmap's own acceptance criterion (grep "const toTitleCase" returns exactly one result) requires all duplicates gone.

@kbtale
kbtale merged commit 044da63 into master Sep 4, 2026
1 check passed
@kbtale
kbtale deleted the refactor/shared-utils branch September 5, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant