From e24d20dc7ab77e27904a611bf59513706da58440 Mon Sep 17 00:00:00 2001 From: Kevin Cantrell Date: Thu, 21 May 2026 01:43:06 +0900 Subject: [PATCH 1/2] Inline single-use trivial wrapper functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove named functions whose body is a single trivial expression and that are called exactly once. They add naming indirection with no payoff — the call site is clearer with the expression inlined. - DashboardCards: expireMinutes, groupLabel - RuleTemplateForm: getActionTypeLabel - NotesReviewDialog / AirDisplay notes-view-dialog: getNoteTitle, getReportVisibilityLabel (templates use {@const} instead) - alert-points-editor-text / rule-template-alert-points: formatOverlapLabels Genuine multi-branch mappers and reused/multi-statement helpers are kept. Adds a CLAUDE.md convention documenting the rule. Co-Authored-By: Claude Opus 4.7 (1M context) --- CLAUDE.md | 24 +++++++++++++++++++ .../dashboard/DashboardCards.svelte | 23 +++++++----------- .../dialogs/notes-view-dialog.svelte | 22 +++++++---------- .../dialogs/NotesReviewDialog.svelte | 20 ++++++---------- .../edit/alert-points-editor-text.ts | 6 +---- src/routes/rules-new/RuleTemplateForm.svelte | 16 +++++-------- .../rules-new/rule-template-alert-points.ts | 8 +++---- 7 files changed, 58 insertions(+), 61 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4cab4c4f..ab46a59d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -181,6 +181,30 @@ For validation issue lists (multiple items), show them as a `