cmux NEXT Home: the thought headline is a String extension (fixes the namespace-type base red)

Merged
TE
15d ago
+20-20

cmux-next checks fails on feat-cmux-next at the package conventions check: namespace-type on CmuxHomeCore/Store/HomeThoughtHeadline.swift:7, an enum with only static members ("extension on the receiver type or an instantiated value"). Every PR carries this red.

  • HomeThoughtHeadline.of(_:) and .limit become String.thoughtHeadline and String.thoughtHeadlineLimit in String+ThoughtHeadline.swift, the way String+HomeInternalID.swift reads. The helper lastSentence is a private property.
  • Call sites: HomeLiveBook (run.lastThought?.thoughtHeadline), HomeTurnProgress (narration limit and headline(_:)), HomeTurnProgressTests, and a doc reference in HomeLive.

No baseline entry: the baseline says not to add branch debt.

Tests

  • scripts/lint-ios-package-conventions.sh on this branch: "OK: no unjustified convention violations" (exit 0).
  • The old enum and the new extension compiled side by side agree on 13 sample thoughts (headings, sentences, empty, over-limit, markdown), and the limit stays 72.
  • HomeTurnProgressTests and the CmuxHomeCore suites run in CI.

No capture: a rename of a text helper; the same text reaches the screen.

Agent session: cosmic-gray

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the namespace-type convention violation flagged by cmux-next checks by converting the all-static HomeThoughtHeadline enum into a String extension.

  • HomeThoughtHeadline.of(_:) and .limit become String.thoughtHeadline and String.thoughtHeadlineLimit in String+ThoughtHeadline.swift; the helper lastSentence is now a private property.
  • Call sites in HomeLiveBook, HomeTurnProgress, HomeTurnProgressTests, and a doc reference in HomeLive use the extension.
  • Behavior is unchanged: the old enum and new extension agree on sample thoughts (headings, sentences, empty, over-limit, markdown), and the limit stays 72.