refactor: extract shared isBacklogLikeStatus helper and improve comments

Address PR #825 review feedback:
- Extract duplicated backlog-like status check into shared helper in constants.ts
- Improve spec-parser regex comment to clarify subsection preservation
- Add file path reference in row-actions.tsx comment for traceability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-03-02 20:45:23 -08:00
committed by gsxdsm
parent 4a128efbf4
commit 341a6534e6
4 changed files with 57 additions and 43 deletions

View File

@@ -214,7 +214,8 @@ export function extractSummary(text: string): string | null {
}
// Check for ## Summary section (use last match)
// Use \n## [^#] to stop at same-level headers (## Foo) but NOT subsections (### Root Cause)
// Stop at \n## [^#] (same-level headers like "## Changes") but preserve ### subsections
// (like "### Root Cause", "### Fix Applied") that belong to the summary content.
const sectionMatches = text.matchAll(/##\s*Summary\s*\n+([\s\S]*?)(?=\n## [^#]|\n\*\*|$)/gi);
const sectionMatch = getLastMatch(sectionMatches);
if (sectionMatch) {